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
Document the NnfContainerData resource that is created during PreRun for
external container orchestrators to use.
Signed-off-by: Matt Richerson <matthew.richerson@hpe.com>
`directiveIndex`refers to the position of the storage directive (`#DW jobdw` or `#DW persistentdw`)
276
+
in the workflow, not the position of the `#DW container` directive. `mountPath` is the path on the
277
+
Rabbit node where the storage is mounted.
278
+
279
+
| Field | Type | Description |
280
+
|---|---|---|
281
+
| `data.volumes[].name` | string | Storage name as defined in the `NnfContainerProfile` (e.g. `local_storage`) |
282
+
| `data.volumes[].command` | string | Directive command that created the storage: `jobdw`or `persistentdw` |
283
+
| `data.volumes[].directiveIndex` | int | Zero-based index of the `#DW` directive in the workflow that created this storage |
284
+
| `data.volumes[].mountPath` | string | Absolute path on the Rabbit node where the storage is mounted |
285
+
286
+
The external orchestrator can query the resource by workflow name and namespace to discover where
287
+
each storage volume is mounted:
288
+
208
289
## Creating a Container Workflow
209
290
210
291
The user's workflow will specify the name of the `NnfContainerProfile` in a DW directive. If the
@@ -215,8 +296,7 @@ with the `profile` parameter.
215
296
#DW container profile=red-rock-slushy [...]
216
297
```
217
298
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
299
+
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
300
Storages](#container-storages)) and setting it to the name of a storage directive that defines an
221
301
NNF filesystem. That storage directive must already exist as part of another workflow (e.g.
222
302
persistent storage) or it can be supplied in the same workflow as the container. For global lustre,
@@ -275,13 +355,16 @@ overview of the container-related behavior that occurs:
275
355
- Proposal: Verify [storages](#container-storages) are provided according to the container profile.
276
356
- Setup: If applicable, [request ports](#container-ports) from NnfPortManager.
277
357
- 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.
358
+
- PreRun: If `createContainer: true` (default), appropriate `MPIJob` or `Job(s)` are created for
359
+
the workflow. In turn, user containers are created and launched by Kubernetes. Containers are
360
+
expected to start in this state. If `createContainer: false`, no pods are launched; instead an
361
+
[`NnfContainerData`](#nnfcontainerdata) resource is created that records the storage mount paths.
362
+
- PostRun: If `createContainer: true`, user containers are expected to complete (non-zero exit)
363
+
successfully. If `createContainer: false`, the NNF code does not coordinate with the external
364
+
container launcher.
282
365
- DataOut: No container related activity.
283
366
- Teardown: Ports are released; `MPIJob` or `Job(s)` are deleted, which in turn deletes the user
284
-
containers.
367
+
containers. Any `NnfContainerData` resource is also deleted.
285
368
286
369
The two main states of a container workflow (i.e. PreRun, PostRun) are discussed further in the
0 commit comments