mirror of
https://github.com/kemko/nomad.git
synced 2026-01-07 19:05:42 +03:00
Merge pull request #237 from hashicorp/f-raw-exec-driver
A raw fork/exec driver that provides no isolation.
This commit is contained in:
@@ -207,8 +207,8 @@ configured on server nodes.
|
||||
option is not required and has no default.
|
||||
* <a id="meta">`meta`</a>: This is a key/value mapping of metadata pairs. This
|
||||
is a free-form map and can contain any string values.
|
||||
* `options`: This is a key/value mapping of internal configuration for clients,
|
||||
such as for driver configuration.
|
||||
* <a id="options">`options`</a>: This is a key/value mapping of internal
|
||||
configuration for clients, such as for driver configuration.
|
||||
* <a id="network_interface">`network_interface`</a>: This is a string to force
|
||||
network fingerprinting to use a specific network interface
|
||||
* <a id="network_speed">`network_speed`</a>: This is an int that sets the
|
||||
|
||||
@@ -6,14 +6,15 @@ description: |-
|
||||
The Exec task driver is used to run binaries using OS isolation primitives.
|
||||
---
|
||||
|
||||
# Fork/Exec Driver
|
||||
# Isolated Fork/Exec Driver
|
||||
|
||||
Name: `exec`
|
||||
|
||||
The `exec` driver is used to simply execute a particular command for a task.
|
||||
This is the simplest driver and is extremely flexible. In particlar, because
|
||||
it can invoke any command, it can be used to call scripts or other wrappers
|
||||
which provide higher level features.
|
||||
However unlike [`raw_exec`](raw_exec.html) it uses the underlying isolation
|
||||
primitives of the operating system to limit the tasks access to resources. While
|
||||
simple, since the `exec` driver can invoke any command, it can be used to call
|
||||
scripts or other wrappers which provide higher level features.
|
||||
|
||||
## Task Configuration
|
||||
|
||||
|
||||
47
website/source/docs/drivers/raw_exec.html.md
Normal file
47
website/source/docs/drivers/raw_exec.html.md
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "Drivers: Raw Exec"
|
||||
sidebar_current: "docs-drivers-raw-exec"
|
||||
description: |-
|
||||
The Raw Exec task driver simply fork/execs and provides no isolation.
|
||||
---
|
||||
|
||||
# Raw Fork/Exec Driver
|
||||
|
||||
Name: `raw_exec`
|
||||
|
||||
The `raw_exec` driver is used to execute a command for a task without any
|
||||
isolation. Further, the task is started as the same user as the Nomad process.
|
||||
As such, it should be used with extreme care and is disabled by default.
|
||||
|
||||
## Task Configuration
|
||||
|
||||
The `raw_exec` driver supports the following configuration in the job spec:
|
||||
|
||||
* `command` - The command to execute. Must be provided.
|
||||
|
||||
* `args` - The argument list to the command, space seperated. Optional.
|
||||
|
||||
## Client Requirements
|
||||
|
||||
The `raw_exec` driver can run on all supported operating systems. It is however
|
||||
disabled by default. In order to be enabled, the Nomad client configuration must
|
||||
explicitly enable the `raw_exec` driver in the
|
||||
[options](../agent/config.html#options) field:
|
||||
|
||||
```
|
||||
options = {
|
||||
driver.raw_exec.enable = "1"
|
||||
}
|
||||
```
|
||||
|
||||
## Client Attributes
|
||||
|
||||
The `raw_exec` driver will set the following client attributes:
|
||||
|
||||
* `driver.raw_exec` - This will be set to "1", indicating the
|
||||
driver is available.
|
||||
|
||||
## Resource Isolation
|
||||
|
||||
The `raw_exec` driver provides no isolation.
|
||||
Reference in New Issue
Block a user