Commit f23cd482 authored by Michael Schurter's avatar Michael Schurter Committed by Michael Schurter
Browse files

Bump minimum required rkt version; update docs

Make section names match between docker and rkt
parent 3d828aad
Branches unavailable v1.4.3 v1.4.2 v1.4.1 v1.4.0 v1.4.0-rc.1 v1.4.0-beta.1 v1.3.8 v1.3.7 v1.3.6 v1.3.5 v1.3.4 v1.3.3 v1.3.2 v1.3.1 v1.3.0 v1.3.0-rc.1 v1.3.0-beta.1 v1.2.15 v1.2.14 v1.2.13 v1.2.12 v1.2.11 v1.2.10 v1.2.9 v1.2.8 v1.2.7 v1.2.6 v1.2.5 v1.2.4 v1.2.3 v1.2.2 v1.2.1 v1.2.0 v1.2.0-rc1 v1.2.0-beta1 v1.1.18 v1.1.17 v1.1.16 v1.1.15 v1.1.14 v1.1.13 v1.1.12 v1.1.11 v1.1.10 v1.1.9 v1.1.8 v1.1.7 v1.1.6 v1.1.5 v1.1.4 v1.1.3 v1.1.2 v1.1.1 v1.1.0 v1.1.0-rc1 v1.1.0-beta1 v1.0.18 v1.0.17 v1.0.16 v1.0.15 v1.0.14 v1.0.13 v1.0.12 v1.0.11 v1.0.10 v1.0.9 v1.0.8 v1.0.7 v1.0.6 v1.0.5 v1.0.4 v1.0.3 v1.0.2 v1.0.1 v1.0.0 v1.0.0-rc1 v1.0.0-beta3 v1.0.0-beta2 v0.12.12 v0.12.11 v0.12.10 v0.12.9 v0.12.8 v0.12.7 v0.12.6 v0.12.5 v0.12.4 v0.12.4-rc1 v0.12.3 v0.12.2 v0.12.1 v0.12.0 v0.12.0-rc1 v0.12.0-beta2 v0.12.0-beta1 v0.11.8 v0.11.7 v0.11.6 v0.11.5 v0.11.4 v0.11.3 v0.11.2 v0.11.1 v0.11.0 v0.11.0-rc1 v0.11.0-beta2 v0.11.0-beta1 v0.10.9 v0.10.8 v0.10.7 v0.10.6 v0.10.5 v0.10.4 v0.10.4-rc1 v0.10.3 v0.10.2 v0.10.2-rc1 v0.10.1 v0.10.0 v0.10.0-rc1 v0.10.0-connect1 v0.10.0-beta1 v0.9.7 v0.9.6 v0.9.5 v0.9.4 v0.9.4-rc1 v0.9.3 v0.9.2 v0.9.2-rc1 v0.9.1 v0.9.1-rc1 v0.9.0 v0.9.0-rc2 v0.9.0-rc1 v0.9.0-beta3 v0.9.0-beta2 v0.9.0-beta1 v0.8.7 v0.8.7-rc1 v0.8.6 v0.8.5 v0.8.4 v0.8.4-rc1 v0.8.3 v0.8.2 v0.8.1 v0.8.0 v0.8.0-rc1 v0.7.1 v0.7.1-rc1 v0.7.1-rc1+pro v0.7.1-rc1+ent v0.7.0 v0.7.0+pro v0.7.0+ent v0.7.0-rc3 v0.7.0-rc2 v0.7.0-rc1 v0.7.0-beta1 v0.6.3 v0.6.3-rc1 v0.6.2 v0.6.1 v0.6.0 v0.6.0-rc2 v0.6.0-rc1 v0.5.6 v0.5.6-rc1 v0.5.5 v0.5.5-rc2 v0.5.5-rc1 v0.5.4 v0.5.3 v0.5.3-rc1 v0.5.2 v0.5.2-rc1 v0.5.1 v0.5.1-rc2 v0.5.1-rc1 v0.5.0 v0.5.0-rc2 v0.5.0-rc1 nightly
No related merge requests found
Showing with 34 additions and 16 deletions
+34 -16
......@@ -13,6 +13,7 @@ IMPROVEMENTS:
* driver: Export `NOMAD_JOB_NAME` environment variable [GH-1804]
* driver/docker: Support Docker volumes [GH-1767]
* driver/docker: Allow Docker logging to be configured [GH-1767]
* driver/rkt: Support rkt volumes (rkt >= 1.0.0 required) [GH-1812]
BUG FIXES:
* agent: Handle the SIGPIPE signal preventing panics on journalctl restarts
......
......@@ -38,7 +38,7 @@ const (
// minRktVersion is the earliest supported version of rkt. rkt added support
// for CPU and memory isolators in 0.14.0. We cannot support an earlier
// version to maintain an uniform interface across all drivers
minRktVersion = "0.14.0"
minRktVersion = "1.0.0"
// The key populated in the Node Attributes to indicate the presence of the
// Rkt driver
......@@ -47,6 +47,9 @@ const (
// rktVolumesConfigOption is the key for enabling the use of custom
// bind volumes.
rktVolumesConfigOption = "rkt.volumes.enabled"
// rktCmd is the command rkt is installed as.
rktCmd = "rkt"
)
// RktDriver is a driver for running images via Rkt
......@@ -147,7 +150,7 @@ func (d *RktDriver) Fingerprint(cfg *config.Config, node *structs.Node) (bool, e
return false, nil
}
outBytes, err := exec.Command("rkt", "version").Output()
outBytes, err := exec.Command(rktCmd, "version").Output()
if err != nil {
delete(node.Attributes, rktDriverAttr)
return false, nil
......@@ -168,7 +171,7 @@ func (d *RktDriver) Fingerprint(cfg *config.Config, node *structs.Node) (bool, e
minVersion, _ := version.NewVersion(minRktVersion)
currentVersion, _ := version.NewVersion(node.Attributes["driver.rkt.version"])
if currentVersion.LessThan(minVersion) {
// Do not allow rkt < 0.14.0
// Do not allow ancient rkt versions
d.logger.Printf("[WARN] driver.rkt: please upgrade rkt to a version >= %s", minVersion)
node.Attributes[rktDriverAttr] = "0"
}
......@@ -203,7 +206,7 @@ func (d *RktDriver) Start(ctx *ExecContext, task *structs.Task) (DriverHandle, e
insecure := false
if trustPrefix != "" {
var outBuf, errBuf bytes.Buffer
cmd := exec.Command("rkt", "trust", "--skip-fingerprint-review=true", fmt.Sprintf("--prefix=%s", trustPrefix), fmt.Sprintf("--debug=%t", debug))
cmd := exec.Command(rktCmd, "trust", "--skip-fingerprint-review=true", fmt.Sprintf("--prefix=%s", trustPrefix), fmt.Sprintf("--debug=%t", debug))
cmd.Stdout = &outBuf
cmd.Stderr = &errBuf
if err := cmd.Run(); err != nil {
......@@ -331,7 +334,7 @@ func (d *RktDriver) Start(ctx *ExecContext, task *structs.Task) (DriverHandle, e
return nil, fmt.Errorf("failed to set executor context: %v", err)
}
absPath, err := GetAbsolutePath("rkt")
absPath, err := GetAbsolutePath(rktCmd)
if err != nil {
return nil, err
}
......
......@@ -315,7 +315,7 @@ Some networking modes like `container` or `none` will require coordination
outside of Nomad. First-class support for these options may be improved later
through Nomad plugins or dynamic job configuration.
## Host Requirements
## Client Requirements
Nomad requires Docker to be installed and running on the host alongside the
Nomad agent. Nomad was developed against Docker `1.8.2` and `1.9`.
......@@ -333,7 +333,7 @@ user to the `docker` group so you can run Nomad without root:
For the best performance and security features you should use recent versions
of the Linux Kernel and Docker daemon.
## Agent Configuration
## Client Configuration
The `docker` driver has the following [client configuration
options](/docs/agent/config.html#options):
......@@ -392,7 +392,7 @@ client {
}
```
## Agent Attributes
## Client Attributes
The `docker` driver will set the following client attributes:
......
......@@ -75,10 +75,15 @@ The `rkt` driver supports the following configuration in the job spec:
* `debug` - (Optional) Enable rkt command debug option.
## Task Directories
* `volumes` - (Optional) A list of `host_path:container_path` strings to bind
host paths to container paths. Can only be run on clients with the
`rkt.volumes.enabled` option set to true.
The `rkt` driver currently does not support mounting of the `alloc/` and `local/` directories.
Once support is added, version `v0.10.0` or above of `rkt` will be required.
```hcl
config {
volumes = ["/path/on/host:/path/in/container"]
}
```
## Client Requirements
......@@ -87,15 +92,24 @@ The `trust_prefix` must be accessible by the node running Nomad. This can be an
internal source, private to your cluster, but it must be reachable by the client
over HTTP.
## Client Configuration
The `rkt` driver has the following [client configuration
options](/docs/agent/config.html#options):
* `rkt.volumes.enabled`: Defaults to `false`. Allows tasks to bind host paths
(`volumes`) inside their container. Disabled by default as it removes the
isolation between containers' data.
## Client Attributes
The `rkt` driver will set the following client attributes:
* `driver.rkt` - Set to `1` if rkt is found on the host node. Nomad determines
this by executing `rkt version` on the host and parsing the output
* `driver.rkt.version` - Version of `rkt` eg: `0.8.1`. Note that the minimum required
version is `0.14.0`
* `driver.rkt.appc.version` - Version of `appc` that `rkt` is using eg: `0.8.1`
this by executing `rkt version` on the host and parsing the output
* `driver.rkt.version` - Version of `rkt` eg: `1.1.0`. Note that the minimum required
version is `1.0.0`
* `driver.rkt.appc.version` - Version of `appc` that `rkt` is using eg: `1.1.0`
Here is an example of using these properties in a job file:
......@@ -105,7 +119,7 @@ job "docs" {
constraint {
attribute = "${driver.rkt.version}"
operator = ">"
value = "0.8"
value = "1.2"
}
}
```
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment