Commit 330f9f4f authored by Leo Pound Singer's avatar Leo Pound Singer
Browse files

WIP: Add Kubernetes cluster configuration

parent bad37d3a
Pipeline #17238 passed with stages
in 6 minutes and 43 seconds
#
# Add a netrc file with:
# $ kubectl create secret generic gwcelery-netrc --from-file=netrc
#
# Start cluster with:
# $ kubectl apply -f k8s.yml
#
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: redis
spec:
replicas: 1
template:
metadata:
labels:
app: redis
spec:
containers:
- name: redis
image: redis
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: gwcelery-beat
spec:
replicas: 1
template:
metadata:
labels:
app: gwcelery-beat
spec:
containers:
- name: gwcelery-beat
image: containers.ligo.org/leo-singer/gwcelery:dockerize-ligo.skymap
args: ["beat"]
env:
- name: CELERY_BROKER_URL
value: redis://redis
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: gwcelery-flower
spec:
replicas: 1
template:
metadata:
labels:
app: gwcelery-flower
spec:
containers:
- name: gwcelery-flower
image: containers.ligo.org/leo-singer/gwcelery:dockerize-ligo.skymap
args: ["flower"]
env:
- name: CELERY_BROKER_URL
value: redis://redis
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: gwcelery-worker
spec:
replicas: 1
template:
metadata:
labels:
app: gwcelery-worker
spec:
containers:
- name: gwcelery-worker
image: containers.ligo.org/leo-singer/gwcelery:dockerize-ligo.skymap
args: ["worker", "-l", "info", "-n", "gwcelery-worker", "-Q", "celery"]
env:
- name: CELERY_BROKER_URL
value: redis://redis
- name: NETRC
value: /etc/gwcelery-netrc/netrc
volumeMounts:
- name: gwcelery-netrc
mountPath: /etc/gwcelery-netrc
readOnly: true
volumes:
- name: gwcelery-netrc
secret:
secretName: gwcelery-netrc
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: gwcelery-openmp-worker
spec:
replicas: 1
template:
metadata:
labels:
app: gwcelery-openmp-worker
spec:
containers:
- name: gwcelery-openmp-worker
image: containers.ligo.org/leo-singer/gwcelery:dockerize-ligo.skymap
args: ["worker", "-l", "info", "-n", "gwcelery-openmp-worker", "-Q", "openmp", "-c", "1"]
env:
- name: CELERY_BROKER_URL
value: redis://redis
- name: NETRC
value: /etc/gwcelery-netrc/netrc
volumeMounts:
- name: gwcelery-netrc
mountPath: /etc/gwcelery-netrc
readOnly: true
volumes:
- name: gwcelery-netrc
secret:
secretName: gwcelery-netrc
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: gwcelery-voevent-worker
spec:
replicas: 1
template:
metadata:
labels:
app: gwcelery-voevent-worker
spec:
containers:
- name: gwcelery-voevent-worker
image: containers.ligo.org/leo-singer/gwcelery:dockerize-ligo.skymap
args: ["worker", "-l", "info", "-n", "gwcelery-voevent-worker", "-Q", "voevent", "-c", "1"]
env:
- name: CELERY_BROKER_URL
value: redis://redis
- name: NETRC
value: /etc/gwcelery-netrc/netrc
volumeMounts:
- name: gwcelery-netrc
mountPath: /etc/gwcelery-netrc
readOnly: true
volumes:
- name: gwcelery-netrc
secret:
secretName: gwcelery-netrc
---
apiVersion: v1
kind: Service
metadata:
labels:
app: gwcelery-flower
name: gwcelery-flower
spec:
externalTrafficPolicy: Cluster
ports:
- name: tcp-5555-5555-nczt4
port: 5555
protocol: TCP
selector:
app: gwcelery-flower
type: LoadBalancer
---
apiVersion: v1
kind: Service
metadata:
labels:
app: redis
name: redis
spec:
ports:
- name: tcp-6379-6379-bh2pq
port: 6379
protocol: TCP
selector:
app: redis
type: ClusterIP
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment