Commit Graph

74 Commits

Author SHA1 Message Date
Dao Thanh Tung
82cbbacf69 Update the order of docker auth method (#18399)
Signed-off-by: dttung2905 <ttdao.2015@accountancy.smu.edu.sg>
2023-09-06 11:24:37 +01:00
Luiz Aoqui
7548eecbaa docs: clarify reference to network.mode in docker network_mode config (#18277) 2023-08-22 15:07:22 -04:00
James Rasell
7f5d39fc02 docs: fix QEMU driver HCL plugin options example formatting. (#17930) 2023-07-14 10:22:45 +01:00
Seth Hoenig
80b9ff6436 docs: clarify using user on raw_exec driver (#17897) 2023-07-11 13:06:46 -05:00
KamilCuk
da9ec8ce1e Add group_add docker option (#17313) 2023-06-02 20:26:01 -04:00
Tim Gross
43e25410d0 docs: clarify capabilities options for docker driver (#16693)
The `docker` driver cannot expand capabilities beyond the default set when the
task is a non-root user. Clarify this in the documentation of `allow_caps` and
update the `cap_add` and `cap_drop` to match the `exec` driver, which has more
clear language overall.
2023-03-28 13:32:08 -04:00
Seth Hoenig
7ffb0b1102 docs: remove cores/memory beta label, update driver cpu docs (#16175)
* docs: remove cores/memory beta label, update driver cpu docs

* docs: fixup cr stuff
2023-02-14 14:43:07 -06:00
Seth Hoenig
7f3bdd4359 docker: set force=true on remove image to handle images referenced by multiple tags (#15962)
* docker: set force=true on remove image to handle images referenced by multiple tags

This PR changes our call of docker client RemoveImage() to RemoveImageExtended with
the Force=true option set. This fixes a bug where an image referenced by more than
one tag could never be garbage collected by Nomad. The Force option only applies to
stopped containers; it does not affect running workloads.

* docker: add note about image_delay and multiple tags
2023-01-31 07:53:18 -06:00
Piotr Kazmierczak
949a6f60c7 renamed stanza to block for consistency with other projects (#15941) 2023-01-30 15:48:43 +01:00
Ashlee M Boyer
3444ece549 docs: Migrate link formats (#15779)
* Adding check-legacy-links-format workflow

* Adding test-link-rewrites workflow

* chore: updates link checker workflow hash

* Migrating links to new format

Co-authored-by: Kendall Strautman <kendallstrautman@gmail.com>
2023-01-25 09:31:14 -08:00
Nick Wales
69fd1a0e4b docker: add option for Windows isolation modes (#15819) 2023-01-24 16:31:48 -05:00
Tim Gross
11a5f79084 exec: allow running commands from host volume (#14851)
The exec driver and other drivers derived from the shared executor check the
path of the command before handing off to libcontainer to ensure that the
command doesn't escape the sandbox. But we don't check any host volume mounts,
which should be safe to use as a source for executables if we're letting the
user mount them to the container in the first place.

Check the mount config to verify the executable lives in the mount's host path,
but then return an absolute path within the mount's task path so that we can hand
that off to libcontainer to run.

Includes a good bit of refactoring here because the anchoring of the final task
path has different code paths for inside the task dir vs inside a mount. But
I've fleshed out the test coverage of this a good bit to ensure we haven't
created any regressions in the process.
2022-11-11 09:51:15 -05:00
Tim Gross
fb1f5ea2d9 Revert removing deprecated client options docs (#14753)
This reverts PR #12416 and commit 6668ce022a.

While the driver options are well and truly deprecated, this documentation also
covers features like `fingerprint.denylist` that are not available any other
way. Let's revert this until #12420 is ready.
2022-09-30 08:38:03 -04:00
Seth Hoenig
0bd42a501c docker: create a docker task config setting for disable built-in healthcheck
This PR adds a docker driver task configuration setting for turning off
built-in HEALTHCHECK of a container.

References)
https://docs.docker.com/engine/reference/builder/#healthcheck
https://github.com/docker/engine-api/blob/master/types/container/config.go#L16

Closes #5310
Closes #14068
2022-08-11 10:33:48 -05:00
Luiz Aoqui
e1ae7bf7d1 qemu: reduce monitor socket path (#13971)
The QEMU driver can take an optional `graceful_shutdown` configuration
which will create a Unix socket to send ACPI shutdown signal to the VM.

Unix sockets have a hard length limit and the driver implementation
assumed that QEMU versions 2.10.1 were able to handle longer paths. This
is not correct, the linked QEMU fix only changed the behaviour from
silently truncating longer socket paths to throwing an error.

By validating the socket path before starting the QEMU machine we can
provide users a more actionable and meaningful error message, and by
using a shorter socket file name we leave a bit more room for
user-defined values in the path, such as the task name.

The maximum length allowed is also platform-dependant, so validation
needs to be different for each OS.
2022-08-04 12:10:35 -04:00
Tim Gross
f295396ef8 docs: rename Internals to Concepts (#13696) 2022-07-11 16:55:33 -04:00
Ted Behling
295021caad driver/docker: Don't pull InfraImage if it exists (#13265)
Co-authored-by: James Rasell <jrasell@hashicorp.com>
2022-07-07 17:44:06 +02:00
Andrew
37e5accf09 Fix typo in Docker docs (#13497) 2022-06-28 11:05:50 +02:00
Daniel Rossbach
9bb9aab714 qemu driver: Add option to configure drive_interface (#11864) 2022-06-10 10:03:51 -04:00
phreakocious
f8774369d2 Add guest_agent config option for QEMU driver (#12800)
Add boolean 'guest_agent' config option for QEMU driver, which will
create the socket file for the QEMU Guest Agent in the task dir when
enabled.
2022-06-09 09:21:38 -04:00
Radek Simko
cbde2ba94b docs/docker: fix broken link to bridge mode (#13221) 2022-06-06 09:59:36 -04:00
Radek Simko
ff87354665 docs: link to client reqs section for added clarity (#13215) 2022-06-06 09:56:29 -04:00
Toyam Cox
a145ffc6dc docs: make the example for 'load' work (#13102) 2022-05-27 08:48:58 -04:00
Seth Hoenig
d91e4160da cli: update default redis and use nomad service discovery
Closes #12927
Closes #12958

This PR updates the version of redis used in our examples from 3.2 to 7.
The old version is very not supported anymore, and we should be setting
a good example by using a supported version.

The long-form example job is now fixed so that the service stanza uses
nomad as the service discovery provider, and so now the job runs without
a requirement of having Consul running and configured.
2022-05-17 10:24:19 -05:00
Tim Gross
6668ce022a docs: remove deprecated client options parameters docs (#12416)
The client configuration options for drivers have been deprecated
since 0.9. We haven't torn them out completely but because they're
deprecated it's been hard to guarantee correct behavior. Remove the
documentation so that users aren't misled about their viability.
2022-03-31 11:45:51 -04:00
Tim Gross
a9d64b8e3e docs: add note about docker DNS config when using bridge mode (#12229)
The Docker DNS configuration options are not compatible with a
group-level network in `bridge` mode. Warn users about this in the
Docker task configuration docs.
2022-03-08 11:59:20 -05:00
Merlin Scholz
6707062b0d docs: elaborate on networking issues with firewalld (#12214) 2022-03-08 09:49:29 -05:00
Luiz Aoqui
a9407111aa docs: update link to mount in Docker task driver (#12101) 2022-02-22 13:39:49 -05:00
Tim Gross
3320a297df docs: fix attribute name for java version detection (#11764) 2022-01-03 16:50:25 -05:00
Shishir
f2a37a0a03 Add support for setting pids_limit in docker plugin config. (#11526) 2021-12-21 13:31:34 -05:00
Kevin Wang
ddca508b0d feat(website): extract /plugins /tools docs (#11584)
Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
Co-authored-by: Mike Nomitch <mnomitch@hashicorp.com>
2021-12-09 14:25:18 -05:00
Tim Gross
40de248b94 qemu: add args_allowlist to sandbox VM command line inputs
The QEMU driver allows arbitrary command line options, but many of
these options give access to host resources that operators may not
want to expose such as devices. Add an optional allowlist to the
plugin configuration so that operators can limit the resources for
QEMU.
2021-11-19 11:11:52 -05:00
Luiz Aoqui
0e3cd604d2 docs: update podman driver documentation (#11300) 2021-11-03 11:07:44 -04:00
Shishir Mahajan
479442e682 Add support for --init to docker driver.
Signed-off-by: Shishir Mahajan <smahajan@roblox.com>
2021-10-15 12:53:25 -07:00
Amit Shuster
215bf04bc6 Lightrun Integration - External task driver (#11203) 2021-10-06 15:34:34 -04:00
Luiz Aoqui
cb0b2f5387 Document Docker extra_hosts behaviour post v1.1.3 (#11079)
Co-authored-by: Derek Strickland <1111455+DerekStrickland@users.noreply.github.com>
2021-09-01 12:41:06 -04:00
James Rasell
989d5812ed docs: update website to detail cni plugins v1.0.0 2021-08-27 11:15:25 +02:00
Lir (Rookout)
de8c69dad3 Some Rookout docs tweaks (#10989) 2021-08-09 11:19:36 +02:00
James Rasell
8adb00bfad docs: order external driver overview alphabetically. 2021-08-02 10:51:37 +02:00
Lir (Rookout)
9b65172d7b Rookout driver docs (#10950)
Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
2021-08-02 10:09:45 +02:00
Shishir
24f88398c3 Containerd task driver options. (#10878)
- Auth support via driver config
- pid_mode
- shm_size

Signed-off-by: Shishir Mahajan <smahajan@roblox.com>
2021-07-09 08:17:42 -04:00
Shantanu Gadgil
751f66f3a6 constraint on the Docker driver missing 'attr'
Between this page and https://www.nomadproject.io/docs/runtime/interpolation
I realized that the syntax on the Docker page was missing the word `attr`.
2021-07-06 08:48:04 +05:30
Juan Carlos Alonso
acd13314ed Fix missing opening quote 2021-06-30 12:33:34 +08:00
Tim Gross
2a640f0b2d docker: generate /etc/hosts file for bridge network mode (#10766)
When `network.mode = "bridge"`, we create a pause container in Docker with no
networking so that we have a process to hold the network namespace we create
in Nomad. The default `/etc/hosts` file of that pause container is then used
for all the Docker tasks that share that network namespace. Some applications
rely on this file being populated.

This changeset generates a `/etc/hosts` file and bind-mounts it to the
container when Nomad owns the network, so that the container's hostname has an
IP in the file as expected. The hosts file will include the entries added by
the Docker driver's `extra_hosts` field.

In this changeset, only the Docker task driver will take advantage of this
option, as the `exec`/`java` drivers currently copy the host's `/etc/hosts`
file and this can't be changed without breaking backwards compatibility. But
the fields are available in the task driver protobuf for community task
drivers to use if they'd like.
2021-06-16 14:55:22 -04:00
Shishir Mahajan
b9668e87dc Update containerd task driver options.
- hostname
- auth

Signed-off-by: Shishir Mahajan <smahajan@roblox.com>
2021-06-10 08:03:49 -04:00
Tim Gross
f5c71526c1 docs: warn not to set network_mode for Connect-enabled Docker task 2021-06-08 10:14:15 -04:00
Charlie Voiselle
90da87f6e6 (demo) -> [demo] 2021-05-19 16:30:23 -04:00
mrspanishviking
674ae4b3f1 docs: fixes broken links
Fixed broken links for the remote task driver ECS page
2021-05-19 12:56:08 -07:00
Seth Hoenig
845a3d3cdc docs: minor wording tweaks + cl 2021-05-17 12:52:52 -06:00
Seth Hoenig
7245ac3fc5 docs: update docs for linux capabilities in exec/java/docker drivers
Update docs for allow_caps, cap_add, cap_drop in exec/java/docker driver
pages. Also update upgrade guide with guidance on new default linux
capabilities for exec and java drivers.
2021-05-17 12:37:40 -06:00