Add initial CAIAPI openshift objects
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
This commit is contained in:
parent
f90cd284d9
commit
9cc5dca6fc
5 changed files with 149 additions and 0 deletions
49
playbooks/openshift-apps/caiapi_noggin.yml
Normal file
49
playbooks/openshift-apps/caiapi_noggin.yml
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
- 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: caiapi_noggin
|
||||||
|
description: CAIAPI and Noggin
|
||||||
|
appowners:
|
||||||
|
- puiterwijk
|
||||||
|
- role: openshift/imagestream
|
||||||
|
app: caiapi_noggin
|
||||||
|
imagename: caiapi
|
||||||
|
- role: openshift/imagestream
|
||||||
|
app: caiapi_noggin
|
||||||
|
imagename: noggin
|
||||||
|
- role: openshift/object
|
||||||
|
app: caiapi_noggin
|
||||||
|
objectname: buildconfig_caiapi.yml
|
||||||
|
template: buildconfig_caiapi.yml
|
||||||
|
- role: openshift/start-build
|
||||||
|
app: caiapi_noggin
|
||||||
|
buildname: caiapi-build
|
||||||
|
- role: openshift/object
|
||||||
|
app: caiapi_noggin
|
||||||
|
template: configmap_caiapi.yml
|
||||||
|
objectname: configmap_caiapi.yml
|
||||||
|
- role: openshift/object
|
||||||
|
app: caiapi_noggin
|
||||||
|
file: service_caiapi.yml
|
||||||
|
objectname: service_caiapi.yml
|
||||||
|
- role: openshift/route
|
||||||
|
app: caiapi_noggin
|
||||||
|
routename: caiapi
|
||||||
|
host: "caiapi{{ env_suffix }}.fedoraproject.org"
|
||||||
|
servicename: caiapi
|
||||||
|
- role: openshift/object
|
||||||
|
app: caiapi_noggin
|
||||||
|
file: deploymentconfig_caiapi.yml
|
||||||
|
objectname: deploymentconfig_caiapi.yml
|
||||||
|
- role: openshift/rollout
|
||||||
|
app: caiapi_noggin
|
||||||
|
dcname: caiapi
|
|
@ -0,0 +1,53 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: DeploymentConfig
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: caiapi_noggin
|
||||||
|
service: caiapi
|
||||||
|
name: caiapi
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
deploymentconfig: caiapi
|
||||||
|
strategy:
|
||||||
|
activeDeadlineSeconds: 21600
|
||||||
|
recreateParams:
|
||||||
|
timeoutSeconds: 600
|
||||||
|
resources: {}
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: caiapi_noggin
|
||||||
|
deploymentconfig: caiapi
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: caiapi
|
||||||
|
image: caiapi_noggin/caiapi:latest
|
||||||
|
env:
|
||||||
|
- name: CAIAPI_SETTINGS
|
||||||
|
value: /etc/caiapi/caiapi.cfg
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
volumeMounts:
|
||||||
|
- name: config-volume
|
||||||
|
mountPath: /etc/caiapi
|
||||||
|
readOnly: true
|
||||||
|
readinessProbe:
|
||||||
|
timeoutSeconds: 1
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: 8080
|
||||||
|
livenessProbe:
|
||||||
|
timeoutSeconds: 1
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: 8080
|
||||||
|
volumes:
|
||||||
|
- name: config-volume
|
||||||
|
configMap:
|
||||||
|
name: caiapi-config
|
||||||
|
triggers:
|
||||||
|
- type: ConfigChange
|
15
roles/openshift-apps/caiapi_noggin/files/service_caiapi.yml
Normal file
15
roles/openshift-apps/caiapi_noggin/files/service_caiapi.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: caiapi
|
||||||
|
labels:
|
||||||
|
app: caiapi_noggin
|
||||||
|
service: caiapi
|
||||||
|
namespace: caiapi_noggin
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: web
|
||||||
|
port: 8080
|
||||||
|
targetPort: 8080
|
||||||
|
selector:
|
||||||
|
deploymentconfig: caiapi
|
|
@ -0,0 +1,22 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: BuildConfig
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
build: caiapi-build
|
||||||
|
name: caiapi-build
|
||||||
|
spec:
|
||||||
|
runPolicy: Serial
|
||||||
|
source:
|
||||||
|
git:
|
||||||
|
url: https://github.com/fedora-infra/noggin.git
|
||||||
|
ref: {{ env }}
|
||||||
|
contextDir: CAIAPI
|
||||||
|
strategy:
|
||||||
|
sourceStrategy:
|
||||||
|
from:
|
||||||
|
kind: ImageStreamTag
|
||||||
|
name: python-36-rhel7:latest
|
||||||
|
output:
|
||||||
|
to:
|
||||||
|
kind: ImageStreamTag
|
||||||
|
name: caiapi
|
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: caiapi-configmap
|
||||||
|
labels:
|
||||||
|
app: caiapi_noggin
|
||||||
|
data:
|
||||||
|
caiapi.cfg: |-
|
||||||
|
# TODO
|
Loading…
Add table
Add a link
Reference in a new issue