Skip to content

Commit dd0b153

Browse files
committed
Added Helm charts to deploy Murfey's components on a Kubernetes cluster
1 parent 74b116b commit dd0b153

File tree

7 files changed

+228
-0
lines changed

7 files changed

+228
-0
lines changed

Helm/Chart.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: v1
2+
name: murfey-services
3+
description: Umbrella Helm chart for deploying the servers and daemons needed to enable Murfey to transfer and process data
4+
version: 0.16.9
5+
dependencies:
6+
- name: murfey-instrument-server-clem
7+
- name: murfey-server
8+
- name: murfey-rsync
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: v1
2+
name: murfey-instrument-server-clem
3+
description: Helm chart for deploying a Murfey instrument server, which executes orders to detect, modify, and transfer files on the instrument PC, and notifies the backend server about transferred files
4+
version: 0.16.9
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: {{ .Values.appName }}
5+
namespace: {{ .Values.global.namespace }}
6+
labels:
7+
app: {{ .Values.appName }}
8+
spec:
9+
type: LoadBalancer
10+
externalTrafficPolicy: Cluster
11+
ports:
12+
{{- toYaml .Values.servicePorts | nindent 2 }}
13+
selector:
14+
app: {{ .Values.appName }}
15+
---
16+
apiVersion: apps/v1
17+
kind: Deployment
18+
metadata:
19+
name: {{ .Values.appName }}
20+
namespace: {{ .Values.global.namespace }}
21+
labels:
22+
app: {{ .Values.appName }}
23+
spec:
24+
replicas: {{ .Values.replicas }}
25+
selector:
26+
matchLabels:
27+
app: {{ .Values.appName }}
28+
template:
29+
metadata:
30+
labels:
31+
app: {{ .Values.appName }}
32+
spec:
33+
securityContext:
34+
runAsUser: {{ .Values.global.runAsUser }}
35+
runAsGroup: {{ .Values.global.runAsGroup }}
36+
volumes:
37+
# Mount config files from secrets
38+
- name: murfey-client-config
39+
secret:
40+
secretName: {{ .Values.global.murfeyClientConfigCLEMSecretName }}
41+
items:
42+
- key: {{ .Values.global.murfeyClientConfigCLEMFileName }}
43+
path: .murfey
44+
# Mount data directories
45+
{{- toYaml .Values.extraVolumes | nindent 8 }}
46+
containers:
47+
- name: {{ .Values.appName }}
48+
image: {{ .Values.image }}
49+
imagePullPolicy: Always
50+
securityContext:
51+
privileged: false
52+
volumeMounts:
53+
# Mount Murfey client config
54+
- name: murfey-client-config
55+
mountPath: /murfey/config/.murfey
56+
subPath: .murfey
57+
readOnly: false
58+
# Mount data directories
59+
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
60+
env:
61+
- name: MURFEY_CLIENT_CONFIG_HOME
62+
value: "/tmp"
63+
ports:
64+
- containerPort: {{ .Values.containerPort }}
65+
command:
66+
{{- toYaml .Values.command | nindent 12 }}
67+
args:
68+
{{- toYaml .Values.args | nindent 12 }}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: v1
2+
name: murfey-rsync
3+
description: Helm chart for deploying an rsync daemon, which is responsible for executing the transfer of files from the client storage directory to the server storage system
4+
version: 0.16.9
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: {{ .Values.appName }}
5+
spec:
6+
ports:
7+
{{- toYaml .Values.servicePorts | nindent 2 }}
8+
selector:
9+
app: {{ .Values.appName }}
10+
type: ClusterIP
11+
---
12+
apiVersion: apps/v1
13+
kind: Deployment
14+
metadata:
15+
name: {{ .Values.appName }}
16+
namespace: {{ .Values.global.namespace }}
17+
spec:
18+
replicas: 1
19+
selector:
20+
matchLabels:
21+
app: {{ .Values.appName }}
22+
template:
23+
metadata:
24+
labels:
25+
app: {{ .Values.appName }}
26+
spec:
27+
securityContext:
28+
runAsUser: {{ .Values.global.runAsUser }}
29+
runAsGroup: {{ .Values.global.runAsGroup }}
30+
volumes:
31+
- name: rsyncd-conf
32+
secret:
33+
secretName: {{ .Values.global.rsyncConfigSecretName }}
34+
items:
35+
- key: {{ .Values.global.rsyncConfigFileName }}
36+
path: rsyncd.conf
37+
# Mount data directories
38+
{{- toYaml .Values.extraVolumes | nindent 8 }}
39+
containers:
40+
- name: {{ .Values.appName }}
41+
image: {{ .Values.image }}
42+
imagePullPolicy: Always
43+
resources:
44+
requests:
45+
cpu: {{ .Values.cpuRequest }}
46+
limits:
47+
cpu: {{ .Values.cpuLimit }}
48+
memory: {{ .Values.memoryLimit }}
49+
volumeMounts:
50+
# Mount rsync config files
51+
- name: rsyncd-conf
52+
mountPath: /murfey/rsync/rsyncd.conf
53+
subPath: rsyncd.conf
54+
readOnly: true
55+
# Mount data directories
56+
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
57+
ports:
58+
- containerPort: {{ .Values.containerPort }}
59+
command:
60+
{{- toYaml .Values.command | nindent 12 }}
61+
args:
62+
{{- toYaml .Values.args | nindent 12 }}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: v1
2+
name: murfey-server
3+
description: Helm chart for deploying a Murfey backend server, which is responsible for orchestrating the data transfer and processing workflow between the client PC and the storage system
4+
version: 0.16.9
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: {{ .Values.appName }}
5+
namespace: {{ .Values.global.namespace }}
6+
labels:
7+
app: {{ .Values.appName }}
8+
spec:
9+
type: LoadBalancer
10+
externalTrafficPolicy: Cluster
11+
ports:
12+
{{- toYaml .Values.servicePorts | nindent 2 }}
13+
selector:
14+
app: {{ .Values.appName }}
15+
---
16+
apiVersion: apps/v1
17+
kind: Deployment
18+
metadata:
19+
name: {{ .Values.appName }}
20+
namespace: {{ .Values.global.namespace }}
21+
labels:
22+
app: {{ .Values.appName }}
23+
spec:
24+
replicas: {{ .Values.replicas }}
25+
selector:
26+
matchLabels:
27+
app: {{ .Values.appName }}
28+
template:
29+
metadata:
30+
labels:
31+
app: {{ .Values.appName }}
32+
spec:
33+
securityContext:
34+
runAsUser: {{ .Values.global.runAsUser }}
35+
runAsGroup: {{ .Values.global.runAsGroup }}
36+
volumes:
37+
# Mount config files from secrets
38+
- name: secrets
39+
projected:
40+
sources:
41+
- secret:
42+
name: {{ .Values.global.murfeyMachineConfigSecretName }}
43+
- secret:
44+
name: {{ .Values.global.murfeySecurityConfigSecretName }}
45+
- secret:
46+
name: {{ .Values.global.ispybSecretName }}
47+
- secret:
48+
name: {{ .Values.global.murfeyDBSecretName }}
49+
- secret:
50+
name: {{ .Values.global.rmqSecretName }}
51+
# Mount data directories
52+
{{- toYaml .Values.extraVolumes | nindent 8 }}
53+
containers:
54+
- name: {{ .Values.appName }}
55+
image: {{ .Values.image }}
56+
imagePullPolicy: Always
57+
securityContext:
58+
privileged: false
59+
volumeMounts:
60+
# Mount config files
61+
- name: secrets
62+
mountPath: /murfey/config
63+
readOnly: true
64+
# Mount data directories
65+
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
66+
env:
67+
- name: MURFEY_MACHINE_CONFIGURATION
68+
value: "/murfey/config/{{ .Values.global.murfeyMachineConfigFileName }}"
69+
- name: MURFEY_SECURITY_CONFIGURATION
70+
value: "/murfey/config/{{ .Values.global.murfeySecurityConfigFileName }}"
71+
- name: ISPYB_CREDENTIALS
72+
value: "/murfey/config/{{ .Values.global.ispybFileName }}"
73+
ports:
74+
- containerPort: {{ .Values.containerPort }}
75+
command:
76+
{{- toYaml .Values.command | nindent 12 }}
77+
args:
78+
{{- toYaml .Values.args | nindent 12 }}

0 commit comments

Comments
 (0)