15a0c1d66df699c16dae8fcf771262b04739fe29
[arvados.git] / doc / api / schema / ContainerRequest.html.textile.liquid
1 ---
2 layout: default
3 navsection: api
4 navmenu: Schema
5 title: ContainerRequest
6
7 ...
8
9 A ContainerRequest:
10 * Is a client's expression of interest in knowing the outcome of a computational process.
11 * The system is responsible for finding suitable containers and assigning them to container_requests.
12 * The client's description of the ContainerRequest is less precise than of a Container: a ContainerRequest describes container constraints which can have different interpretations over time. For example, a ContainerRequest with a {"kind":"git_tree","commit_range":"abc123..master",...} mount might be satisfiable by any of several different source trees, and this set of satisfying source trees can change when the repository's "master" branch is updated.
13
14 h2. Methods
15
16 See "container_requests":{{site.baseurl}}/api/methods/container_requests.html
17
18 h2. Resource
19
20 Each ContainerRequest offers the following attributes, in addition to the usual "attributes of Arvados resources":{{site.baseurl}}/api/resources.html:
21
22 table(table table-bordered table-condensed).
23 |_. Attribute|_. Type|_. Description|_. Notes|
24 |name|string|The name of the container_request.||
25 |description|string|The description of the container_request.||
26 |properties|hash|Client-defined structured data that does not affect how the container is run.||
27 |state|string|The allowed states are "Uncommitted", "Committed", and "Final".|Once a request is Committed, the only attributes that can be modified are priority, container_uuid, and container_count_max. A request in the "Final" state cannot have any of its functional parts modified (i.e., only name, description, and properties fields can be modified).|
28 |requesting_container_uuid|string|Set by the system to the uuid of a container corresponding to the user's token, if one exists.|When the referenced container ends, the container request is automatically completed.|
29 |container_uuid|string|The container that satisfies this container_request.||
30 |container_count_max|integer|Maximum number of containers to start, i.e., the maximum number of "attempts" to be made.||
31 |mounts|hash|Objects to attach to the container's filesystem and stdin/stdout.|See <A href="https://dev.arvados.org/projects/arvados/wiki/Containers_API#Mount-types">Mount types</A> for additional details.|
32 |runtime_constraints|hash|Restrict the container's access to compute resources and the outside world. Required and must specify ram and vcpus when the container_request is in Committed state.|e.g.,
33 <pre><code>{
34   "ram":12000000000,
35   "vcpus":2,
36   "API":true
37 }</code></pre>|
38 |container_image|string|Portable data hash of a collection containing the docker image to run the container.|Required.|
39 |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.||
40 |cwd|string|Initial working directory, given as an absolute path (in the container) or a path relative to the WORKDIR given in the image's Dockerfile.|Required.|
41 |command|array of strings|Command to execute in the container.|Required.
42 e.g., @["echo","hello"]@|
43 |output_path|string|Path to a directory or file inside the container that should be preserved as container's output when it finishes. This path must be, or be inside, one of the mount targets. For best performance, point output_path to a writable collection mount.|Required.|
44 |priority|integer|Higher value means spend more resources on this container_request, i.e., go ahead of other queued containers, bring up more nodes etc.|Priority 0 means a container should not be run on behalf of this request. Clients are expected to submit ContainerRequests with zero priority in order to prevew the container that will be used to satisfy it. Priority can be null if and only if state!="Committed".|
45 |expires_at|datetime|After this time, priority is considered to be zero.|Not yet implemented.|
46 |filters|string|Additional constraints for satisfying the container_request, given in the same form as the filters parameter accepted by the container_requests.list API.||