Skip to content

Instantly share code, notes, and snippets.

@CJCShadowsan
Created October 6, 2022 07:43
Show Gist options
  • Select an option

  • Save CJCShadowsan/11df41cd360e8ef012cbcf1d3ec059e5 to your computer and use it in GitHub Desktop.

Select an option

Save CJCShadowsan/11df41cd360e8ef012cbcf1d3ec059e5 to your computer and use it in GitHub Desktop.
A quick-and-dirty condor pool - From: https://raw.githubusercontent.com/htcondor/htcondor/latest/build/docker/k8s/pool.yaml modified to have smaller requirements for "Devin - The Little Cluster That Could"
# This is the service that names the ip address of the collector
# All pods get an environment variable with this ip in it
apiVersion: v1
kind: Service
metadata:
name: condor
spec:
selector:
htcondor-role: cm
ports:
- protocol: TCP
port: 9618
targetPort: 9618
---
# This is pod yaml to desribe the single htcondor central manager
apiVersion: v1
kind: Pod
metadata:
name: cm
labels:
htcondor-role: cm
spec:
restartPolicy: Never
containers:
- name: cm
image: htcondor/cm:8.9.11-el7
imagePullPolicy: Always
resources:
limits:
cpu: "100m"
memory: "200Mi"
ephemeral-storage: "1G"
requests:
cpu: "100m"
memory: "200Mi"
ephemeral-storage: "1G"
volumeMounts:
- name: htcondor-pool-password
mountPath: /root/secrets
readOnly: true
volumes:
- name: htcondor-pool-password
secret:
secretName: htcondor-pool-password
items:
- key: htcondor-pool-password
path: pool_password
---
apiVersion: v1
kind: Pod
metadata:
name: submit
labels:
htcondor-role: submit
spec:
restartPolicy: Never
containers:
- name: submit-container
image: htcondor/submit:8.9.11-el7
imagePullPolicy: Always
resources:
limits:
cpu: "100m"
memory: "250Mi"
ephemeral-storage: "1G"
requests:
cpu: "100m"
memory: "250Mi"
ephemeral-storage: "1G"
volumeMounts:
- name: htcondor-pool-password
mountPath: /root/secrets
readOnly: true
volumes:
- name: htcondor-pool-password
secret:
secretName: htcondor-pool-password
items:
- key: htcondor-pool-password
path: pool_password
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: workers-deployment
labels:
app: workers
spec:
replicas: 10
selector:
matchLabels:
app: workers
template:
metadata:
labels:
app: workers
spec:
containers:
- name: execute
image: htcondor/execute:8.9.11-el7
imagePullPolicy: Always
resources:
limits:
cpu: "100m"
memory: "25Mi"
ephemeral-storage: "1G"
requests:
cpu: "100m"
memory: "25Mi"
ephemeral-storage: "1G"
volumeMounts:
- name: htcondor-pool-password
mountPath: /root/secrets
readOnly: true
- name: docker-shared
mountPath: /shared
env:
- name: DOCKER_HOST
value: unix:///shared/docker.sock
- name: dind-daemon
image: docker:dind
# 64 is the condor group
args: ["-G", "64"]
resources:
limits:
memory: "250Mi"
securityContext:
privileged: true
env:
- name: DOCKER_HOST
value: unix:///shared/docker.sock
volumeMounts:
- name: docker-shared
mountPath: /shared
volumes:
- name: docker-shared
emptyDir: {}
- name: htcondor-pool-password
secret:
secretName: htcondor-pool-password
items:
- key: htcondor-pool-password
path: pool_password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment