You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add NnfContainerData documentation
Document the NnfContainerData resource that is created during PreRun for
external container orchestrators to use.
Signed-off-by: Matt Richerson <matthew.richerson@hpe.com>
* review comments
Signed-off-by: Matt Richerson <matthew.richerson@hpe.com>
---------
Signed-off-by: Matt Richerson <matthew.richerson@hpe.com>
| `data.volumes[].name` | string | Storage name as defined in the `NnfContainerProfile` (e.g. `local_storage`) |
278
+
| `data.volumes[].command` | string | Directive command that created the storage: `jobdw`or `persistentdw` |
279
+
| `data.volumes[].directiveIndex` | int | Zero-based index of the `#DW` directive in the workflow that created this storage |
280
+
| `data.volumes[].mountPath` | string | Absolute path on the Rabbit node where the storage is mounted |
281
+
282
+
The external orchestrator can query the resource by workflow name and namespace to discover where
283
+
each storage volume is mounted.
284
+
208
285
## Creating a Container Workflow
209
286
210
287
The user's workflow will specify the name of the `NnfContainerProfile` in a DW directive. If the
@@ -215,8 +292,7 @@ with the `profile` parameter.
215
292
#DW container profile=red-rock-slushy [...]
216
293
```
217
294
218
-
Furthermore, to set the container storages for the workflow, storage parameters must also be
219
-
supplied in the workflow. This is done using the `<storage_name>` (see [Container
295
+
Furthermore, to set the container storages for the workflow, storage parameters must also be supplied in the workflow. This is done using the `<storage_name>` (see [Container
220
296
Storages](#container-storages)) and setting it to the name of a storage directive that defines an
221
297
NNF filesystem. That storage directive must already exist as part of another workflow (e.g.
222
298
persistent storage) or it can be supplied in the same workflow as the container. For global lustre,
@@ -275,13 +351,16 @@ overview of the container-related behavior that occurs:
275
351
- Proposal: Verify [storages](#container-storages) are provided according to the container profile.
276
352
- Setup: If applicable, [request ports](#container-ports) from NnfPortManager.
277
353
- DataIn: No container related activity.
278
-
- PreRun: Appropriate `MPIJob` or `Job(s)` are created for the workflow. In turn, user containers
279
-
are created and launched by Kubernetes. Containers are expected to start in this state.
280
-
- PostRun: Once in PostRun, user containers are expected to complete (non-zero exit)
281
-
successfully.
354
+
- PreRun: If `createContainer: true` (default), appropriate `MPIJob` or `Job(s)` are created for
355
+
the workflow. In turn, user containers are created and launched by Kubernetes. Containers are
356
+
expected to start in this state. If `createContainer: false`, no pods are launched; instead an
357
+
[`NnfContainerData`](#nnfcontainerdata) resource is created that records the storage mount paths.
358
+
- PostRun: If `createContainer: true`, user containers are expected to complete (zero exit)
359
+
successfully. If `createContainer: false`, the NNF code does not coordinate with the external
360
+
container launcher.
282
361
- DataOut: No container related activity.
283
362
- Teardown: Ports are released; `MPIJob` or `Job(s)` are deleted, which in turn deletes the user
284
-
containers.
363
+
containers. Any `NnfContainerData` resource is also deleted.
285
364
286
365
The two main states of a container workflow (i.e. PreRun, PostRun) are discussed further in the
0 commit comments