Asknot: Base configuration to run asknot on the stg openshift

Signed-off-by: Clement Verna <cverna@tutanota.com>
This commit is contained in:
Clement Verna 2018-12-17 21:59:19 +01:00
parent 234a43fb06
commit 3abd46b5c1
4 changed files with 123 additions and 0 deletions

View file

@ -0,0 +1,42 @@
- name: make the app be real
hosts: 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: asknot
description: What can I do for Fedora
appowners:
- cverna
- role: openshift/object
app: asknot
template: imagestream.yml
objectname: imagestream.yml
- role: openshift/object
app: asknot
file: service.yml
objectname: service.yml
- role: openshift/route
app: asknot
routename: asknot
host: "asknot{{ env_suffix }}.fedoraproject.org"
serviceport: 8080-tcp
servicename: asknot
- role: openshift/object
app: asknot
file: deploymentconfig.yml
objectname: deploymentconfig.yml
- role: openshift/rollout
app: asknot
dcname: asknot

View file

@ -0,0 +1,48 @@
---
apiVersion: v1
kind: DeploymentConfig
metadata:
name: asknot
labels:
app: asknot
service: asknot
spec:
replicas: 1
selector:
app: asknot
service: asknot
template:
metadata:
labels:
app: asknot
service: asknot
spec:
containers:
- name: asknot
image: registry/asknot:latest
ports:
- containerPort: 8080
volumeMounts:
readinessProbe:
timeoutSeconds: 5
initialDelaySeconds: 30
httpGet:
path: /
port: 8080
livenessProbe:
timeoutSeconds: 5
initialDelaySeconds: 30
httpGet:
path: /
port: 8080
resources:
volumes:
triggers:
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- "asknot"
from:
kind: ImageStreamTag
name: asknot:latest

View file

@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: asknot
name: asknot
spec:
ports:
- name: 8080-tcp
port: 8080
protocol: TCP
targetPort: 8080
selector:
app: asknot
deploymentconfig: asknot

View file

@ -0,0 +1,17 @@
apiVersion: v1
kind: ImageStream
metadata:
name: "asknot"
spec:
tags:
- name: latest
importPolicy:
scheduled: true
from:
kind: DockerImage
{% if env == 'staging' %}
name: quay.io/fedora-infra/asknot:os-staging
{% else %}
# This is 'prod' tag is maintained by hand.
name: quay.io/fedora-infra/asknot:os-prod
{% endif %}