github.com/huiliang/nomad@v0.2.1-0.20151124023127-7a8b664699ff/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. 22 23 * `artifact_source` – (Optional) Source location of an executable artifact. Must 24 be accessible from the Nomad client. If you specify an `artifact_source` to be 25 executed, you must reference it in the `command` as show in the examples below 26 27 * `checksum` - (Optional) The checksum type and value for the `artifact_source` 28 image. The format is `type:value`, where type is any of `md5`, `sha1`, 29 `sha256`, or `sha512`, and the value is the computed checksum. If a checksum 30 is supplied and does not match the downloaded artifact, the driver will fail 31 to start 32 33 * `args` - (Optional) A list of arguments to the `command`. 34 35 ## Client Requirements 36 37 The `raw_exec` driver can run on all supported operating systems. It is however 38 disabled by default. In order to be enabled, the Nomad client configuration must 39 explicitly enable the `raw_exec` driver in the client's 40 [options](../agent/config.html#options) field: 41 42 ``` 43 client { 44 options = { 45 "driver.raw_exec.enable" = "1" 46 } 47 } 48 ``` 49 50 You must specify a `command` to be executed. Optionally you can specify an 51 `artifact_source` to be executed. Any `command` is assumed to be present on the 52 running client, or a downloaded artifact 53 54 ## Examples 55 56 To run a binary present on the Node: 57 58 ``` 59 config { 60 command = "/bin/sleep" 61 args = 1 62 } 63 ``` 64 65 To execute a binary specified by `artifact_source`: 66 67 ``` 68 config { 69 artifact_source = "https://dl.dropboxusercontent.com/u/1234/binary.bin" 70 checksum = "sha256:133jifjiofu9090fsadjofsdjlk" 71 command = "$NOMAD_TASK_DIR/binary.bin" 72 } 73 ``` 74 75 ## Client Attributes 76 77 The `raw_exec` driver will set the following client attributes: 78 79 * `driver.raw_exec` - This will be set to "1", indicating the 80 driver is available. 81 82 ## Resource Isolation 83 84 The `raw_exec` driver provides no isolation.