github.com/kardianos/nomad@v0.1.3-0.20151022182107-b13df73ee850/website/source/docs/drivers/exec.html.md (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Drivers: Exec"
     4  sidebar_current: "docs-drivers-exec"
     5  description: |-
     6    The Exec task driver is used to run binaries using OS isolation primitives.
     7  ---
     8  
     9  # Isolated Fork/Exec Driver
    10  
    11  Name: `exec`
    12  
    13  The `exec` driver is used to simply execute a particular command for a task.
    14  However unlike [`raw_exec`](raw_exec.html) it uses the underlying isolation
    15  primitives of the operating system to limit the tasks access to resources. While
    16  simple, since the `exec` driver  can invoke any command, it can be used to call
    17  scripts or other wrappers which provide higher level features.
    18  
    19  ## Task Configuration
    20  
    21  The `exec` driver supports the following configuration in the job spec:
    22  
    23  * `command` - The command to execute. Must be provided.
    24  
    25  * `args` - The argument list to the command, space seperated. Optional.
    26  
    27  ## Client Requirements
    28  
    29  The `exec` driver can run on all supported operating systems but to provide
    30  proper isolation the client must be run as root on non-Windows operating systems.
    31  Further, to support cgroups, `/sys/fs/cgroups/` must be mounted.
    32  
    33  ## Client Attributes
    34  
    35  The `exec` driver will set the following client attributes:
    36  
    37  * `driver.exec` - This will be set to "1", indicating the
    38    driver is available.
    39  
    40  ## Resource Isolation
    41  
    42  The resource isolation provided varies by the operating system of
    43  the client and the configuration.
    44  
    45  On Linux, Nomad will use cgroups, namespaces, and chroot to isolate the
    46  resources of a process and as such the Nomad agent must be run as root.
    47  
    48  On Windows, the task driver will just execute the command with no additional
    49  resource isolation.