Skip to content

Commit

Permalink
Merge pull request #32 from ualberta-rcg/main
Browse files Browse the repository at this point in the history
update and cleanup
  • Loading branch information
rahimkhoja authored Jan 22, 2025
2 parents 9d83eb3 + d735cb2 commit 0566b53
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 7 deletions.
74 changes: 74 additions & 0 deletions slurmctld/slurmctld.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: slurmctld
namespace: slurm
spec:
replicas: 1
selector:
matchLabels:
app: slurmctld
template:
metadata:
labels:
app: slurmctld
spec:
containers:
- name: slurmctld
image: rkhoja/slurm:slurmctld # Adjust image as needed
imagePullPolicy: Always
ports:
- containerPort: 6817
volumeMounts:
- name: munge-key
mountPath: /etc/munge/.secret/
- name: slurm-config
mountPath: /etc/slurm
- name: slurmctld-state
mountPath: /var/spool/slurmctld
# command: ["/bin/bash", "-c"]
# args:
# - |
# tail -f /dev/null
volumes:
- name: munge-key
secret:
secretName: munge-key
items:
- key: munge-key
path: munge.keyfile
- name: slurm-config
nfs:
server: 192.168.1.1
path: /disks/slurm/etc/slurm
- name: slurmctld-state
nfs:
server: 192.168.1.1
path: /disks/slurm/var/spool/slurmctld/
---
apiVersion: v1
kind: Service
metadata:
name: slurmctld-service
namespace: slurm
labels:
app: slurmctld-service
spec:
selector:
app: slurmctld
ports:
- name: slurmctld
port: 6817
protocol: TCP
targetPort: 6817
sessionAffinity: ClientIP
sessionAffinityConfig:
clientIP:
timeoutSeconds: 10800
type: LoadBalancer
loadBalancerIP: 192.168.1.20
externalTrafficPolicy: Cluster
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
31 changes: 24 additions & 7 deletions slurmdbd/slurmdbd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,22 @@ spec:
name: paice-db-pxc-db-secrets
key: root
- name: STORAGE_LOC
value: "slurm_acct_db" # Or your desired database name
value: "slurm_acct_db"
- name: AUTH_TYPE
value: "auth/munge"
volumeMounts:
- name: munge-key
mountPath: /etc/munge/.secret/
# command: ["/bin/bash", "-c"]
# args:
# - |
# tail -f /dev/null
volumes:
- name: munge-key
secret:
secretName: slurm
secretName: munge-key
items:
- key: munge
- key: munge-key
path: munge.keyfile
restartPolicy: Always
---
Expand All @@ -54,12 +58,25 @@ kind: Service
metadata:
name: slurmdbd-service
namespace: slurm
labels:
app: slurmdbd-service
spec:
allocateLoadBalancerNodePorts: true
selector:
app: slurmdbd
ports:
- port: 6819 # The port used by slurmdbd
targetPort: 6819
- name: slurmdbd
port: 6819
protocol: TCP
sessionAffinity: ClientIP # Enable sticky sessions
type: LoadBalancer # Or NodePort for bare-metal, depending on your setup
targetPort: 6819
sessionAffinity: ClientIP
sessionAffinityConfig:
clientIP:
timeoutSeconds: 10800 # 3 hours
type: LoadBalancer
loadBalancerIP: 192.168.1.20
externalTrafficPolicy: Cluster
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack

0 comments on commit 0566b53

Please sign in to comment.