Skip to content

Commit

Permalink
driver: remove LXC and ECS driver documentation. (#24107)
Browse files Browse the repository at this point in the history
Co-authored-by: Aimee Ukasick <[email protected]>
  • Loading branch information
jrasell and aimeeu authored Oct 3, 2024
1 parent 2fc7544 commit 1fabbaa
Show file tree
Hide file tree
Showing 17 changed files with 290 additions and 792 deletions.
4 changes: 3 additions & 1 deletion plugins/drivers/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,10 @@ type Capabilities struct {

// RemoteTasks indicates this driver runs tasks on remote systems
// instead of locally. The Nomad client can use this information to
// adjust behavior such as propogating task handles between allocations
// adjust behavior such as propagating task handles between allocations
// to avoid downtime when a client is lost.
//
// Deprecated: remote tasks drivers are no longer developed or supported.
RemoteTasks bool

// DisableLogCollection indicates this driver has disabled log collection
Expand Down
494 changes: 248 additions & 246 deletions plugins/drivers/proto/driver.pb.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion plugins/drivers/proto/driver.proto
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ message DriverCapabilities {

// remote_tasks indicates whether the driver executes tasks remotely such
// on cloud runtimes like AWS ECS.
bool remote_tasks = 7;
bool remote_tasks = 7 [deprecated=true];

// disable_log_collection indicates whether the driver has the capability of
// disabling log collection
Expand Down
8 changes: 4 additions & 4 deletions website/content/api-docs/json-jobs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ The `Task` object supports the following keys:
in a port map. A numeric port may be specified since port maps aren't
required by all network plugins. Useful for advertising SDN and
overlay network addresses. Task will fail if driver network cannot be
determined. Only implemented for Docker and rkt.
determined. Only implemented for Docker.

- `host` - Use the host IP and port.

Expand Down Expand Up @@ -625,7 +625,7 @@ The `Task` object supports the following keys:
supplied, this value takes precedence over the `Service.PortLabel`
value. This is useful for services which operate on multiple ports.
`http` and `tcp` checks require a port while `script` checks do not.
Checks will use the host IP and ports by default. Numeric ports may be
Checks will use the host IP and ports by default. Numeric ports may be
used if `AddressMode: "driver"` is set on the check.

- `Header`: Headers for HTTP checks. Should be an object where the values
Expand Down Expand Up @@ -657,7 +657,7 @@ The `Task` object supports the following keys:
checks.

- `TLSSkipVerify`: If true, Consul will not attempt to verify the
certificate when performing HTTPS checks.
certificate when performing HTTPS checks.

- `CheckRestart`: `CheckRestart` is an object which enables
restarting of tasks based upon Consul health checks.
Expand Down Expand Up @@ -1095,7 +1095,7 @@ creates a convenient way to ship configuration files that are populated from
environment variables, Consul data, Vault secrets, or just general
configurations within a Nomad task.

Nomad utilizes a tool called [Consul Template][ct]. The template can reference
Nomad utilizes a tool called [Consul Template][ct]. The template can reference
[Nomad's runtime environment variables][env]. For a full list of the API template
functions, please refer to the [Consul Template README][ct].

Expand Down
31 changes: 2 additions & 29 deletions website/content/docs/concepts/plugins/task-drivers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ description: Learn how to author a Nomad task driver plugin.
# Task Drivers

Task drivers in Nomad are the runtime components that execute workloads. For
a real world example of a Nomad task driver plugin implementation, see the [LXC
driver source][lxcdriver].
a real world example of a Nomad task driver plugin implementation, see the [exec2 driver][].

## Authoring Task Driver Plugins

Expand Down Expand Up @@ -104,30 +103,6 @@ The network isolation modes are:
- `NetIsolationModeNone`: There is no network to isolate. This is used for
task that the client manages remotely.

#### Remote Task Drivers

[Remote Task Drivers][rtd] should set `RemoteTasks` to `true`. Remote Task
Drivers are task driver plugins that execute tasks on a different system than
the Nomad client. This means the tasks lifecycle is distinct from the Nomad
client's.

For task driver plugin authors there are 2 important new behaviors when
`RemoteTasks` is `true`:

1. The `TaskHandle` returned by `StartTask` will be propagated to replacement
allocations if the Nomad client is drained or down. Nomad will call
`RecoverTask` instead of `StartTask` for remote tasks in replacement
allocations when a `TaskHandle` has been propagated from the previous
allocation.
2. If the Nomad client managing a remote task is drained or if the allocation
was `lost`, the remote task is sent a special `DETACH` kill signal. This
indicates the plugin should stop managing the remote task, but _not_ stop
it.

These behaviors are meant to keep remote tasks running even when the Nomad
client managing them is shutdown. Remote tasks are stopped when the job is
explicitly stopped like traditional tasks.

### `Fingerprint(context.Context) (<-chan *Fingerprint, error)`

This function is called by the client when the plugin is started. It allows the
Expand Down Expand Up @@ -265,15 +240,13 @@ The `ExecTask` function is used by the Nomad client to execute commands inside
the task execution context. For example, the Docker driver executes commands
inside the running container. `ExecTask` is called for Consul script checks.

[lxcdriver]: https://github.com/hashicorp/nomad-driver-lxc
[exec2 driver]: https://github.com/hashicorp/nomad-driver-exec2
[driverplugin]: https://github.com/hashicorp/nomad/blob/v0.9.0/plugins/drivers/driver.go#L39-L57
[skeletonproject]: https://github.com/hashicorp/nomad-skeleton-driver-plugin
[baseplugin]: /nomad/docs/concepts/plugins/base
[taskconfig]: https://godoc.org/github.com/hashicorp/nomad/plugins/drivers#TaskConfig
[taskhandle]: https://godoc.org/github.com/hashicorp/nomad/plugins/drivers#TaskHandle
[fifopackage]: https://godoc.org/github.com/hashicorp/nomad/client/lib/fifo
[rtd]: /nomad/plugins/drivers/remote
[landlock]: https://docs.kernel.org/userspace-api/landlock.html
[unveil]: https://man.openbsd.org/unveil
[users]: /nomad/docs/configuration/client#users-block

14 changes: 8 additions & 6 deletions website/content/docs/drivers/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ Task drivers are used by Nomad clients to execute a task and provide resource
isolation. By having extensible task drivers, Nomad has the flexibility to
support a broad set of workloads across all major operating systems.

Task drivers are pluggable. This gives users the flexibility to introduce their
own drivers without having to recompile Nomad. You can view the [plugin block][plugin]
documentation for examples on how to use the `plugin` block in Nomad's client configuration.
See [docker][docker_plugin] for a more detailed and specific example.
Keep in mind that even though all built-in drivers are plugins, Nomad
remains a single binary and maintains backwards compatibility except with the `lxc` driver.
Task drivers are pluggable. This gives you the flexibility to introduce your
own drivers without having to recompile Nomad. You can view the
[plugin block][plugin] documentation for examples on how to use the plugin
block in Nomad's client configuration. See the Docker driver's
[Client Requirements][docker_plugin] for a more detailed and specific example.

The Nomad binary includes the default task drivers, so you do not have to
download them separately.

The list of supported task drivers is provided on the left of this page. Each
task driver documents the configuration available in a [job
Expand Down
1 change: 0 additions & 1 deletion website/content/docs/ecosystem.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ description: Comparison between Nomad and Kubernetes
- [Singularity](/nomad/plugins/drivers/community/singularity)
- [Firecracker](/nomad/plugins/drivers/community/firecracker-task-driver)
- [Podman](/nomad/plugins/drivers/podman)
- [LXC](/nomad/plugins/drivers/community/lxc)

## Application Definition & Image Build

Expand Down
7 changes: 3 additions & 4 deletions website/content/docs/job-specification/task.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,9 @@ job "docs" {

- `user` `(string: <varies>)` - Specifies the user that will run the task.
Defaults to `nobody` for the [`exec`][exec] and [`java`][java] drivers.
[Docker][] and [rkt][] images specify their own default users. This can only
be set on Linux platforms, and clients can restrict
[which drivers][user_drivers] are allowed to run tasks as
[certain users][user_denylist].
[Docker][] images specify their own default users. This can only be set
on Linux platforms, and clients can restrict [which drivers][user_drivers]
are allowed to run tasks as [certain users][user_denylist].

- `template` <code>([Template][]: nil)</code> - Specifies the set of templates
to render for the task. Templates can be used to inject both static and
Expand Down
6 changes: 1 addition & 5 deletions website/content/plugins/devices/nvidia.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,7 @@ The Nvidia integration only works with drivers who natively integrate with
Nvidia's [container runtime
library](https://github.com/NVIDIA/libnvidia-container).

Nomad has tested support with the [`docker` driver][docker-driver]. Support for
[`lxc`][lxc-driver] should be possible by installing the [Nvidia hook][nvidia_hook]
but is not tested or documented by Nomad.
Nomad has tested support with the [`docker` driver][docker-driver].

## Source Code & Compiled Binaries

Expand Down Expand Up @@ -279,10 +277,8 @@ Wed Jan 23 18:25:32 2019
[docker-driver]: /nomad/docs/drivers/docker 'Nomad docker Driver'
[exec-driver]: /nomad/docs/drivers/exec 'Nomad exec Driver'
[java-driver]: /nomad/docs/drivers/java 'Nomad java Driver'
[lxc-driver]: /nomad/plugins/drivers/community/lxc 'Nomad lxc Driver'
[`plugin`]: /nomad/docs/configuration/plugin
[`plugin_dir`]: /nomad/docs/configuration#plugin_dir
[nvidia_hook]: https://github.com/lxc/lxc/blob/master/hooks/nvidia
[nvidia_plugin_download]: https://releases.hashicorp.com/nomad-device-nvidia/
[nvidia_container_toolkit]: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html
[source]: https://github.com/hashicorp/nomad-device-nvidia
2 changes: 0 additions & 2 deletions website/content/plugins/drivers/community/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Below is a list of community-supported task drivers you can use with Nomad:
- [Firecracker][firecracker-task-driver]
- [Jail task driver][jail-task-driver]
- [Lightrun][lightrun]
- [LXC][lxc]
- [Pledge][pledge]
- [Pot][pot]
- [Rookout][rookout]
Expand All @@ -34,7 +33,6 @@ Below is a list of community-supported task drivers you can use with Nomad:
- [Windows IIS][nomad-iis]

[rookout]: /nomad/plugins/drivers/community/rookout
[lxc]: /nomad/plugins/drivers/community/lxc
[plugin_guide]: /nomad/docs/concepts/plugins
[singularity]: /nomad/plugins/drivers/community/singularity
[jail-task-driver]: /nomad/plugins/drivers/community/jail-task-driver
Expand Down
197 changes: 0 additions & 197 deletions website/content/plugins/drivers/community/lxc.mdx

This file was deleted.

Loading

0 comments on commit 1fabbaa

Please sign in to comment.