Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add container support to workflows (#159)
Note: This is an experimental feature, but is working end-to-end (i.e. Proposal to Teardown) via the workflow process. This feature adds experimental support for NNF Containers in workflows. Containers workflows are created by using the `#DW container` directive. An `NnfContainerProfile` must be supplied to the directive to instruct the workflow on what containers to create and which volumes to mount inside of the container. Look at the sample container profile in the `config/samples` directory for more information. The `config/examples` directory are deployed with examples profiles on the system, but do not contain the full documentation. The computes resource must also be updated to instruct the workflow on where to place the container pods. The provided compute nodes will be traced back to their local rabbit node, which will be used as the targets for the pods. Containers are created during `PreRun` through the use of Kubernetes Jobs. Each rabbit node will be the target of one kubernetes Job, which will manage the successful completion of the container. `PreRun` will progress to `ready:true` when the pods have started successfully. Each container has volumes mounted inside of it that are defined by the container profile. The mount paths for these volumes are exposed to the container via environment variables that match the storage names provided by the container directive's arguments (e.g. DW_JOB_foo-local-storage). These storages can be considered optional or not. If not, and the storage argument isn't supplied to the directive, the workflow will fail in the `Proposal` state. Once the workflow has progressed to `PostRun`, the workflow will start to check if the pods have finished. Once finished, `PostRun` will progress to `ready:true` if all pods (i.e. k8s jobs) have completed successfully. If not, `PostRun` will remain in ready:false. Example container directive: ``` #DW jobdw name=my-gfs2 type=gfs2 capacity=50GB #DW persistentdw name=my-persistent #DW container name=my-container profile=example-randomly-fail DW_JOB_foo-local-storage=my-gfs2 DW_PERSISTENT_foo-persistent-storage=my-persistent ``` --------- Signed-off-by: Blake Devcich <[email protected]> Signed-off-by: Nate Thornton <[email protected]> Co-authored-by: Nate Thornton <[email protected]>
- Loading branch information