-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP to add consistent run the server is currently too flakey with the port forward to be reliable for communication. I need to rethink how to do this because I am not happy with it. Signed-off-by: vsoch <[email protected]>
- Loading branch information
Showing
53 changed files
with
3,592 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
``# Up, Submit, Down | ||
|
||
This is an example of using flux cloud to bring up a cluster, install the Flux Operator | ||
(and then you would use it as you please) and run jobs with submit (on the same | ||
MiniCluster) and then bring it down. | ||
You should have kubectl and gcloud OR minikube installed for this demo. Note that | ||
we use the [experiments.yaml](experiments.yaml) file as a default, | ||
and we only provide basic metadata needed for a single experiment. | ||
|
||
## Up | ||
|
||
```bash | ||
$ flux-cloud up | ||
``` | ||
|
||
This will bring up your cluster, per the size and machine type defined | ||
in your experiments file, and install the operator. | ||
|
||
## Submit | ||
|
||
A "submit" means running the single (or multiple) experiments defined in your | ||
experiments.yaml on the same MiniCluster, without bringing it down between jobs. | ||
This means we are using Flux as the scheduler proper, and we don't need to bring pods | ||
up and down unecessarily (and submit a gazillion YAML files). There is only the number | ||
of YAML CRD needed to correspond to the sizes of MiniClusters you run across. | ||
|
||
```bash | ||
$ flux-cloud submit --cloud minikube | ||
$ flux-cloud submit --cloud google | ||
``` | ||
|
||
## Down | ||
|
||
To bring it down: | ||
|
||
```bash | ||
$ flux-cloud down | ||
``` | ||
|
||
## Batch | ||
|
||
Run all three with one command: | ||
|
||
```bash | ||
$ flux-cloud batch --cloud minikube | ||
$ flux-cloud batch --cloud google | ||
``` | ||
|
||
|
||
## Plot | ||
|
||
I threw together a script to compare running times with info and output times, | ||
where: | ||
|
||
running time < info < output | ||
|
||
```bash | ||
$ pip install pandas matplotlib seaborn | ||
``` | ||
```bash | ||
$ python plot_results.py data/k8s-size-4-n1-standard-1/meta.json | ||
``` |
12 changes: 12 additions & 0 deletions
12
examples/up-submit-down/data/k8s-size-4-n1-standard-1/.scripts/broker-id.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
NAMESPACE="flux-operator" | ||
JOB="lammps-job" | ||
brokerPrefix="${JOB}-0" | ||
|
||
for pod in $(kubectl get pods --namespace ${NAMESPACE} --field-selector=status.phase=Running --output=jsonpath='{.items[*].metadata.name}'); do | ||
if [[ "${pod}" == ${brokerPrefix}* ]]; then | ||
echo ${pod} | ||
break | ||
fi | ||
done |
Oops, something went wrong.