9835: Container and ContainerRequest documentation.
[arvados.git] / doc / api / schema / Container.html.textile.liquid
1 ---
2 layout: default
3 navsection: api
4 navmenu: Schema
5 title: Container
6
7 ...
8
9 A Container:
10 * Captures information about the environment in which a Crunch2 process was run. For example, git trees, data collections, and docker images are stored as content addresses. This makes it possible to reason about the difference between two processes, and to replay a process at a different time and place.
11 * Clients can read Container records, but only the system can create or modify them.
12
13 h2. Methods
14
15 See "containers":{{site.baseurl}}/api/methods/containers.html
16
17 h2. Resource
18
19 Each Container offers the following attributes, in addition to the usual "attributes of Arvados resources":{{site.baseurl}}/api/resources.html:
20
21 table(table table-bordered table-condensed).
22 |_. Attribute|_. Type|_. Description|_. Notes|
23 |state|string|The allowed states are "Queued", "Locked", "Running", "Cancelled" and "Complete".|See <A href="https://dev.arvados.org/projects/arvados/wiki/Containers_API#Container-states">Container states</A> for additional details.|
24 |started_at|datetime|When this container started running.|Null if container has not yet started.|
25 |finished_at|datetime|When this container finished.|Null if container has not yet finished.|
26 |log|string|Portable data hash of the log collection.|Null if the container is not yet finished.|
27 |environment|hash|Environment variables and values that should be set in the container environment (@docker run --env@). This augments and (when conflicts exist) overrides environment variables given in the image's Dockerfile.|Must be equal to a ContainerRequest's environment in order to satisfy the ContainerRequest.|
28 |cwd|string|Initial working directory.|Must be equal to a ContainerRequest's cwd in order to satisfy the ContainerRequest|
29 |command|array of strings|Command to execute.| Must be equal to a ContainerRequest's command in order to satisfy the ContainerRequest.|
30 |output_path|string|Path to a directory or file inside the container that should be preserved as this container's output when it finishes.|Must be equal to a ContainerRequest's output_path in order to satisfy the ContainerRequest.|
31 |mounts|hash|Must contain the same keys as the ContainerRequest being satisfied. Each value must be within the range of values described in the ContainerRequest at the time the Container is assigned to the ContainerRequest.|See <A href="https://dev.arvados.org/projects/arvados/wiki/Containers_API#Mount-types">Mount types</A> for additional details.|
32 |runtime_constraints|hash|Compute resources, and access to the outside world, that are / were available to the container.
33 Generally this will contain additional keys that are not present in any corresponding ContainerRequests: for example, even if no ContainerRequests specified constraints on the number of CPU cores, the number of cores actually used will be recorded here.|e.g.,
34 <pre><code>{
35   "ram":12000000000,
36   "vcpus":2,
37   "API":true
38 }</code></pre>|
39 |output|string|Portable data hash of the output collection.|Null if the container is not yet finished.|
40 |container_image|string|Portable data hash of a collection containing the docker image used to run the container.||
41 |progress|number|A number between 0.0 and 1.0 describing the fraction of work done.||
42 |priority|integer|Priority assigned by the system, taking into account the priorities of all associated ContainerRequests.||
43 |exit_code|integer|Process exit code.|Null if state!="Complete"|
44 |auth_uuid|string|UUID of a token to be passed into the container itself, used to access Keep-backed mounts, etc.|Null if state∉{"Locked","Running"}|
45 |locked_by_uuid|string|UUID of a token, indicating which dispatch process changed state to Locked. If null, any token can be used to lock. If not null, only the indicated token can modify this container.|Null if state∉{"Locked","Running"}|