Add containers.fpo static website
This commit is contained in:
parent
cde0d90bec
commit
6029087eb0
5 changed files with 181 additions and 0 deletions
59
playbooks/openshift-apps/containers.yml
Normal file
59
playbooks/openshift-apps/containers.yml
Normal file
|
@ -0,0 +1,59 @@
|
|||
- name: make the app be real
|
||||
hosts: os-masters[0]:os-masters-stg[0]
|
||||
user: root
|
||||
gather_facts: False
|
||||
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- "/srv/private/ansible/vars.yml"
|
||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||
|
||||
roles:
|
||||
- role: openshift/project
|
||||
app: containers
|
||||
description: containers.fedoraproject.org static website
|
||||
appowners:
|
||||
- misc
|
||||
- sanja
|
||||
- role: openshift/object
|
||||
app: containers
|
||||
template: imagestream.yml
|
||||
objectname: imagestream.yml
|
||||
- role: openshift/object
|
||||
app: containers
|
||||
template: buildconfig.yml
|
||||
objectname: buildconfig.yml
|
||||
|
||||
- role: openshift/start-build
|
||||
app: containers
|
||||
buildname: containers-build
|
||||
objectname: containers-build
|
||||
|
||||
- role: openshift/object
|
||||
app: containers
|
||||
file: service.yml
|
||||
objectname: service.yml
|
||||
|
||||
- role: openshift/route
|
||||
app: containers
|
||||
routename: containers
|
||||
host: "containers.fedoraproject.org"
|
||||
serviceport: 8080-tcp
|
||||
servicename: containers
|
||||
when: env == "production"
|
||||
|
||||
- role: openshift/route
|
||||
app: containers
|
||||
routename: containers
|
||||
host: "containers{{ env_suffix }}.fedoraproject.org"
|
||||
serviceport: 8080-tcp
|
||||
servicename: containers
|
||||
|
||||
- role: openshift/object
|
||||
app: containers
|
||||
file: deploymentconfig.yml
|
||||
objectname: deploymentconfig.yml
|
||||
|
||||
- role: openshift/rollout
|
||||
app: containers
|
||||
dcname: containers
|
50
roles/openshift-apps/containers/files/deploymentconfig.yml
Normal file
50
roles/openshift-apps/containers/files/deploymentconfig.yml
Normal file
|
@ -0,0 +1,50 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
labels:
|
||||
app: containers
|
||||
service: containers
|
||||
name: containers
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
app: containers
|
||||
deploymentconfig: containers
|
||||
strategy:
|
||||
resources: {}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: containers
|
||||
deploymentconfig: containers
|
||||
spec:
|
||||
containers:
|
||||
- image: containers:latest
|
||||
name: containers
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
timeoutSeconds: 1
|
||||
initialDelaySeconds: 5
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8080
|
||||
livenessProbe:
|
||||
timeoutSeconds: 1
|
||||
initialDelaySeconds: 30
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8080
|
||||
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- type: ImageChange
|
||||
imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- containers
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: containers:latest
|
15
roles/openshift-apps/containers/files/service.yml
Normal file
15
roles/openshift-apps/containers/files/service.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: containers
|
||||
name: containers
|
||||
spec:
|
||||
ports:
|
||||
- name: 8080-tcp
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: containers
|
||||
deploymentconfig: containers
|
29
roles/openshift-apps/containers/templates/buildconfig.yml
Normal file
29
roles/openshift-apps/containers/templates/buildconfig.yml
Normal file
|
@ -0,0 +1,29 @@
|
|||
apiVersion: v1
|
||||
kind: BuildConfig
|
||||
metadata:
|
||||
name: containers-build
|
||||
labels:
|
||||
environment: "containers"
|
||||
spec:
|
||||
output:
|
||||
to:
|
||||
kind: ImageStreamTag
|
||||
name: containers:latest
|
||||
source:
|
||||
type: Git
|
||||
git:
|
||||
uri: https://github.com/containers/containers.fedoraproject.org.git
|
||||
strategy:
|
||||
type: Source
|
||||
sourceStrategy:
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: s2i-golang:latest
|
||||
triggers:
|
||||
{% if containers_github_secret is defined %}
|
||||
- type: GitHub
|
||||
github:
|
||||
secret: "{{ containers_github_secret }}"
|
||||
{% endif %}
|
||||
- type: ConfigChange
|
||||
- type: ImageChange
|
28
roles/openshift-apps/containers/templates/imagestream.yml
Normal file
28
roles/openshift-apps/containers/templates/imagestream.yml
Normal file
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
name: containers
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
name: s2i-golang
|
||||
spec:
|
||||
lookupPolicy:
|
||||
local: false
|
||||
tags:
|
||||
- from:
|
||||
kind: DockerImage
|
||||
name: quay.io/osas/s2i-golang
|
||||
importPolicy: {}
|
||||
name: latest
|
||||
referencePolicy:
|
||||
type: Source
|
||||
status:
|
||||
dockerImageRepository: ""
|
Loading…
Add table
Add a link
Reference in a new issue