Skip to content

Commit 1852b16

Browse files
committed
Worked on some helper scripts
1 parent 8e9621a commit 1852b16

File tree

4 files changed

+18
-42
lines changed

4 files changed

+18
-42
lines changed

README.md

+11-12
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ This repository provides tools and instructions for running nextflow pipelines o
66
- [SystemsGenetics/gene-oracle](https://github.com/SystemsGenetics/gene-oracle)
77
- [SystemsGenetics/KINC-nf](https://github.com/SystemsGenetics/KINC-nf)
88

9-
(In Progress)
10-
- [ebenz99/MPCM-Nextflow](https://github.com/ebenz99/MPCM-Nextflow)
9+
(In Progress)
10+
- [ebenz99/MPCM-Nextflow](https://github.com/ebenz99/MPCM-Nextflow)
1111

1212
## Dependencies
1313

@@ -19,7 +19,7 @@ There are a few administrative tasks which must be done in order for nextflow to
1919

2020
- Nextflow needs a service account with the `edit` and `view` cluster roles:
2121
```bash
22-
kubectl create rolebinding default-edit --clusterrole=edit --serviceaccount=<namespace>:default
22+
kubectl create rolebinding default-edit --clusterrole=edit --serviceaccount=<namespace>:default
2323
kubectl create rolebinding default-view --clusterrole=view --serviceaccount=<namespace>:default
2424
```
2525

@@ -51,15 +51,8 @@ The `nextflow kuberun` command will automatically create a pod that runs your pi
5151
# transfer local nextflow.config if necessary
5252
./kube-load.sh <pvc-name> nextflow.config
5353

54-
# launch pod
55-
./kube-run.sh <pvc-name> <pipeline> <options>
56-
57-
# stream pod output
58-
kubectl logs -f <pod-name>
59-
60-
# delete pod after it finishes
61-
kubectl delete job <run-name>
62-
kubectl delete configmap <run-name>
54+
# run pipeline
55+
./kube-run.sh <pvc-name> <pipeline> [options]
6356
```
6457

6558
As you run pipelines, nextflow will create pods to perform the work. Some pods may not be properly cleaned up due to errors or other issues, therefore it is important to clean up your pods periodically. You can list all of the pods in your namespace using `kubectl`:
@@ -72,6 +65,12 @@ You can use the `kube-clean.sh` script in this repository to clean up dangling p
7265
./kube-clean.sh
7366
```
7467

68+
Lastly, there are a few additional scripts you can use to manage the pods in your namespace:
69+
```bash
70+
./kube-logs.sh
71+
./kube-pods.sh
72+
```
73+
7574
## Appendix
7675

7776
### Working with Docker images

kube-log.sh kube-logs.sh

File renamed without changes.

kube-pods.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
# List all pods by run name and working directory.
3+
4+
kubectl get pods --no-headers --output custom-columns=RUN:.metadata.labels.runName,NAME:.metadata.name,DIR:.spec.containers[0].workingDir \
5+
| sed 's/\/workspace\///' \
6+
| sed 's/\/work.*//' \
7+
| sort -V

kube-stat.sh

-30
This file was deleted.

0 commit comments

Comments
 (0)