@@ -33,6 +33,98 @@ For more details, we refer to the paper.
3333
3434---
3535
36+ #### Run on Kubernetes
37+ You need to create an account to use the Common Workflow Scheduler in Kubernetes.
38+ Therefore, create a file ` account.yaml ` with the following content.
39+ Afterward, apply this to your Kubernetes cluster ` kubectl apply -f account.yaml `
40+ ```
41+ apiVersion: v1
42+ kind: ServiceAccount
43+ metadata:
44+ name: cwsaccount
45+
46+ ---
47+
48+ kind: ClusterRole
49+ apiVersion: rbac.authorization.k8s.io/v1
50+ metadata:
51+ name: cwsrole
52+ rules:
53+ - apiGroups: [""]
54+ resources: ["pods","pods/status","pods/exec","nodes","bindings","configmaps"]
55+ verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
56+ - apiGroups: ["metrics.k8s.io"]
57+ resources: ["nodes"]
58+ verbs: ["get","list"]
59+
60+ ---
61+
62+ kind: ClusterRoleBinding
63+ apiVersion: rbac.authorization.k8s.io/v1
64+ metadata:
65+ name: cwsbinding
66+ subjects:
67+ - kind: ServiceAccount
68+ name: cwsaccount
69+ namespace: <your namespace>
70+ roleRef:
71+ kind: ClusterRole
72+ name: cwsrole
73+ apiGroup: rbac.authorization.k8s.io
74+ ```
75+
76+ Next, you can start the Common Workflow Scheduler in your Kubernetes environment.
77+ Nextflow will start the Common Workflow Scheduler automatically.
78+ Therefore, create a file ` cws.yaml ` with the following content.
79+ Afterward, apply this to your Kubernetes cluster ` kubectl apply -f cws.yaml `
80+
81+ ```
82+ apiVersion: v1
83+ kind: Pod
84+ metadata:
85+ labels:
86+ app: cws
87+ component: scheduler
88+ tier: control-plane
89+ name: workflow-scheduler
90+ spec:
91+ containers:
92+ - env:
93+ - name: SCHEDULER_NAME
94+ value: workflow-scheduler
95+ - name: AUTOCLOSE
96+ value: "false"
97+ image: commonworkflowscheduler/kubernetesscheduler:v1.0
98+ imagePullPolicy: Always
99+ name: workflow-scheduler
100+ resources:
101+ limits:
102+ cpu: "2"
103+ memory: 1400Mi
104+ requests:
105+ cpu: "2"
106+ memory: 1400Mi
107+ volumeMounts:
108+ - mountPath: /input # mount at the same path as you do in your workflow
109+ name: vol-1
110+ - mountPath: /data
111+ name: vol-2
112+ nodeSelector:
113+ cwsscheduler: 'true'
114+ securityContext:
115+ runAsUser: 0
116+ serviceAccount: cwsaccount # use the account created before
117+ volumes:
118+ - name: vol-1
119+ persistentVolumeClaim:
120+ claimName: api-exp-input # mount the same pvc as you use in your workflow.
121+ - name: vol-2
122+ persistentVolumeClaim:
123+ claimName: api-exp-data
124+ ```
125+
126+ ---
127+
36128If you use this software or artifacts in a publication, please cite it as:
37129
38130#### Text
0 commit comments