Start with RATS openshift deployment

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2018-04-13 15:58:55 +00:00
parent 6f6a5efd5d
commit c784b339df
4 changed files with 104 additions and 0 deletions

View file

@ -0,0 +1,20 @@
- name: make the app be real
hosts: os-masters-stg
user: root
gather_facts: True
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: rats
description: rats
appowners:
- pingou
- { role: openshift/object, vars: {app: rats, file: rabbitmq/imagestream.yml }}
- { role: openshift/object, vars: {app: rats, file: rabbitmq/deploymentconfig.yml }}
- { role: openshift/object, vars: {app: rats, file: rabbitmq/service.yml }}
- { role: openshift/rollout, vars: {app: rats, name: rats-rabbitmq }}

View file

@ -0,0 +1,44 @@
apiVersion: v1
kind: DeploymentConfig
metadata:
name: rats-queue
labels:
app: rats
service:
spec:
replicas: 2
selector:
app: rats
service: rabbitmq
template:
metadata:
labels:
app: rats
service: rabbitmq
spec:
containers:
- name: rabbitmq
image: rabbitmq
ports:
- containerPort: 4369
protocol: TCP
- containerPort: 5671
protocol: TCP
- containerPort: 5672
protocol: TCP
volumeMounts:
- mountPath: /var/lib/rabbitmq
name: rabbitmq-1
volumes:
- emptyDir: {}
name: rabbitmq-1
triggers:
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- rabbitmq
from:
kind: ImageStreamTag
name: rabbitmq:latest
- type: ConfigChange

View file

@ -0,0 +1,12 @@
apiVersion: v1
kind: ImageStream
metadata:
labels:
app: rats
name: rabbitmq
spec:
tags:
- name: latest
from:
kind: DockerImage
name: rabbitmq:latest

View file

@ -0,0 +1,28 @@
apiVersion: v1
kind: Service
metadata:
name: rats-rabbitmq
labels:
app: rats
spec:
selector:
app: rats
service: rabbitmq
ports:
- name: 4369-tcp
port: 4369
protocol: TCP
targetPort: 4369
- name: 5671-tcp
port: 5671
protocol: TCP
targetPort: 5671
- name: 5672-tcp
port: 5672
protocol: TCP
targetPort: 5672
- name: 25672-tcp
port: 25672
protocol: TCP
targetPort: 25672
type: ClusterIP