github.com/dkerwin/nomad@v0.3.3-0.20160525181927-74554135514b/website/source/docs/drivers/raw_exec.html.md (about) 1 --- 2 layout: "docs" 3 page_title: "Drivers: Raw Exec" 4 sidebar_current: "docs-drivers-raw-exec" 5 description: |- 6 The Raw Exec task driver simply fork/execs and provides no isolation. 7 --- 8 9 # Raw Fork/Exec Driver 10 11 Name: `raw_exec` 12 13 The `raw_exec` driver is used to execute a command for a task without any 14 isolation. Further, the task is started as the same user as the Nomad process. 15 As such, it should be used with extreme care and is disabled by default. 16 17 ## Task Configuration 18 19 The `raw_exec` driver supports the following configuration in the job spec: 20 21 * `command` - The command to execute. Must be provided. If executing a binary 22 that exists on the host, the path must be absolute. If executing a binary that 23 is download from an [`artifact`](/docs/jobspec/index.html#artifact_doc), the 24 path can be relative from the allocations's root directory. 25 26 * `args` - (Optional) A list of arguments to the optional `command`. 27 References to environment variables or any [intepretable Nomad 28 variables](/docs/jobspec/interpreted.html) will be interpreted 29 before launching the task. For example: 30 31 ``` 32 args = ["${nomad.datacenter}", "${MY_ENV}", "${meta.foo}"] 33 ``` 34 35 ## Examples 36 37 To run a binary present on the Node: 38 39 ``` 40 task "example" { 41 driver = "raw_exec" 42 43 config { 44 # When running a binary that exists on the host, the path must be absolute 45 command = "/bin/sleep" 46 args = ["1"] 47 } 48 } 49 ``` 50 51 To execute a binary downloaded from an [`artifact`](/docs/jobspec/index.html#artifact_doc): 52 53 ``` 54 task "example" { 55 driver = "raw_exec" 56 57 config { 58 command = "binary.bin" 59 } 60 61 artifact { 62 source = "https://dl.dropboxusercontent.com/u/1234/binary.bin" 63 options { 64 checksum = "sha256:abd123445ds4555555555" 65 } 66 } 67 } 68 ``` 69 70 ## Client Requirements 71 72 The `raw_exec` driver can run on all supported operating systems. It is however 73 disabled by default. In order to be enabled, the Nomad client configuration must 74 explicitly enable the `raw_exec` driver in the client's 75 [options](/docs/agent/config.html#options) field: 76 77 ``` 78 client { 79 options = { 80 "driver.raw_exec.enable" = "1" 81 } 82 } 83 ``` 84 85 ## Client Attributes 86 87 The `raw_exec` driver will set the following client attributes: 88 89 * `driver.raw_exec` - This will be set to "1", indicating the 90 driver is available. 91 92 ## Resource Isolation 93 94 The `raw_exec` driver provides no isolation.