Skip to content

Commit

Permalink
feat(website): extract /plugins /tools docs (#11584)
Browse files Browse the repository at this point in the history
Co-authored-by: Luiz Aoqui <[email protected]>
Co-authored-by: Mike Nomitch <[email protected]>
  • Loading branch information
3 people authored Dec 9, 2021
1 parent 1fdf1b9 commit ddca508
Show file tree
Hide file tree
Showing 79 changed files with 783 additions and 178 deletions.
2 changes: 1 addition & 1 deletion website/content/api-docs/ui.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ This page lists all allocations for a CSI plugin. Each allocation includes the s

~> **Enterprise Only!** This feature depends on functionality only present in Nomad Autoscaler Enterprise.

This page lists all recommendations surfaced by [dynamic application sizing](/docs/autoscaling#dynamic-application-sizing). This page will automatically redirect to the recommendation summary route for the first recommendation sorted by relevance.
This page lists all recommendations surfaced by [dynamic application sizing](/tools/autoscaling#dynamic-application-sizing). This page will automatically redirect to the recommendation summary route for the first recommendation sorted by relevance.

Each recommendation in the list will contain information including the job and task group the recommendation is for, the time the recommendation was surfaced, the number of allocations impacted, the difference in CPU the recommendation suggests, the difference in memory the recommendation suggests, and the aggregate change in CPU and memory given the number of allocations impacted.

Expand Down
12 changes: 6 additions & 6 deletions website/content/docs/ecosystem.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,35 +36,35 @@ https://buildkite.com/works-with/hashicorp

#### Containerd

https://www.nomadproject.io/docs/drivers/external/containerd
https://www.nomadproject.io/plugins/drivers/community/containerd

#### Windows IIS

https://github.com/Roblox/nomad-driver-iis

#### Jailtask

https://www.nomadproject.io/docs/drivers/external/jail-task-driver
https://www.nomadproject.io/plugins/drivers/community/jail-task-driver

#### Pot

https://github.com/trivago/nomad-pot-driver

#### Singularity

https://www.nomadproject.io/docs/drivers/external/singularity
https://www.nomadproject.io/plugins/drivers/community/singularity

#### Firecracker

https://www.nomadproject.io/docs/drivers/external/firecracker-task-driver
https://www.nomadproject.io/plugins/drivers/community/firecracker-task-driver

#### Podman

https://www.nomadproject.io/docs/drivers/podman
https://www.nomadproject.io/plugins/drivers/podman

#### LXC

https://www.nomadproject.io/docs/drivers/external/lxc
https://www.nomadproject.io/plugins/drivers/community/lxc

### Application Definition & Image Build

Expand Down
4 changes: 2 additions & 2 deletions website/content/docs/enterprise/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,6 @@ Click [here](https://www.hashicorp.com/go/nomad-enterprise) to set up a demo or
request a trial of Nomad Enterprise.

[multiregion deployments]: /docs/job-specification/multiregion
[autoscaling capabilities]: /docs/autoscaling
[scaling policies]: /docs/autoscaling/policy
[autoscaling capabilities]: /tools/autoscaling
[scaling policies]: /tools/autoscaling/policy
[gh-9958]: https://github.com/hashicorp/nomad/issues/9958
4 changes: 2 additions & 2 deletions website/content/docs/internals/plugins/task-drivers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ For task driver plugin authors there are 2 important new behaviors when
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
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
Expand Down Expand Up @@ -253,4 +253,4 @@ inside the running container. `ExecTask` is called for Consul script checks.
[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]: /docs/drivers/remote
[rtd]: /plugins/drivers/remote
6 changes: 3 additions & 3 deletions website/content/docs/job-specification/scaling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ job "example" {
its contents are specific to the autoscaler; consult the
[Nomad Autoscaler documentation][autoscaling_policy] for more details.

[autoscaling_policy]: /docs/autoscaling/policy
[autoscaling_policy]: /tools/autoscaling/policy
[`count`]: /docs/job-specification/group#count 'Nomad Task Group specification'
[`resources`]: /docs/job-specification/task#resources 'Nomad Task specification'
[das]: /docs/autoscaling#dynamic-application-sizing
[horizontal_app_scaling]: /docs/autoscaling#horizontal-application-autoscaling
[das]: /tools/autoscaling#dynamic-application-sizing
[horizontal_app_scaling]: /tools/autoscaling#horizontal-application-autoscaling
4 changes: 2 additions & 2 deletions website/content/docs/partnerships.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Container Runtime

- [Task driver documentation](/docs/drivers)
- [Guide to build, install, and maintaining a task driver plugin](/docs/internals/plugins/task-drivers)
- [Community examples of task drivers](/docs/drivers/external)
- [Community examples of task drivers](/plugins/drivers/community)

GPUs & Specialized Hardware Devices

Expand All @@ -84,7 +84,7 @@ GPUs & Specialized Hardware Devices

Autoscaling

- [Autoscaling plugin documentation](/docs/autoscaling)
- [Autoscaling plugin documentation](/tools/autoscaling)

Storage

Expand Down
13 changes: 6 additions & 7 deletions website/content/docs/upgrade/upgrade-specific.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ you must ensure the `Config.Namespace` field is unset.

Starting in Nomad 1.1.2, task groups with `network.mode = "bridge"` generated a
hosts file in Docker containers. This generated hosts file was bind-mounted
from the task directory to `/etc/hosts` within the task. In Nomad 1.1.3 the
from the task directory to `/etc/hosts` within the task. In Nomad 1.1.3 the
source for the bind mount was moved to the allocation directory so that it is
shared between all tasks in an allocation.

Expand Down Expand Up @@ -144,7 +144,6 @@ Tasks using the `exec` or `java` task drivers can add or remove desired linux
capabilities using the [`cap_add`][cap_add_exec] and [`cap_drop`][cap_drop_exec]
task configuration options.


#### iptables

Nomad now appends its iptables rules to the `NOMAD-ADMIN` chain instead of
Expand Down Expand Up @@ -1182,11 +1181,11 @@ deleted and then Nomad 0.3.0 can be launched.
[go-client]: https://pkg.go.dev/github.com/hashicorp/nomad/api#Client
[hcl2]: https://github.com/hashicorp/hcl2
[limits]: /docs/configuration#limits
[lxc]: /docs/drivers/external/lxc
[lxc]: /plugins/drivers/community/lxc
[migrate]: /docs/job-specification/migrate
[nvidia]: /docs/devices/external/nvidia
[nvidia]: /plugins/devices/nvidia
[plugin-stanza]: /docs/configuration/plugin
[plugins]: /docs/drivers/external
[plugins]: /plugins/drivers/community
[preemption-api]: /api-docs/operator#update-scheduler-configuration
[preemption]: /docs/internals/scheduling/preemption
[proxy_concurrency]: /docs/job-specification/sidecar_task#proxy_concurrency
Expand All @@ -1204,8 +1203,8 @@ deleted and then Nomad 0.3.0 can be launched.
[`volume create`]: /docs/commands/volume/create
[`volume register`]: /docs/commands/volume/register
[`volume`]: /docs/job-specification/volume
[Enterprise licensing]: /docs/enterprise/license
[`CAP_NET_RAW`]: https://security.stackexchange.com/a/128988
[enterprise licensing]: /docs/enterprise/license
[`cap_net_raw`]: https://security.stackexchange.com/a/128988
[`linux capabilities`]: https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities
[`allow_caps`]: /docs/drivers/docker#allow_caps
[`extra_hosts`]: /docs/drivers/docker#extra_hosts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
---
layout: docs
page_title: 'Device Plugins: External'
description: 'A list of external Device Plugins.'
page_title: 'Device Plugins: Community Supported'
description: 'A list of community supported Device Plugins.'
---

# External Device Plugins

Nomad has a plugin system for defining task drivers. External device driver
plugins will have the same user experience as built in devices.

Below is a list of official external task drivers you can use with Nomad:

- [Nvidia][nvidia]

## Community Supported
# Community Supported

If you have authored a device plugin that you believe will be useful to the
broader Nomad community and you are committed to maintaining the plugin,
Expand All @@ -25,5 +16,4 @@ Below is a list of community-support task drivers you can use with Nomad:
- [USB][usb]

[plugin_guide]: /docs/internals/plugins
[nvidia]: /docs/devices/external/nvidia
[usb]: /docs/devices/external/usb
[usb]: /plugins/devices/community/usb
17 changes: 17 additions & 0 deletions website/content/plugins/devices/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
layout: docs
page_title: 'Device Plugins: External'
description: 'A list of external Device Plugins.'
---

# External Device Plugins

Nomad has a plugin system for defining task drivers. External device driver
plugins will have the same user experience as built in devices.

Below is a list of official external task drivers you can use with Nomad:

- [Nvidia][nvidia]

[plugin_guide]: /docs/internals/plugins
[nvidia]: /plugins/devices/nvidia
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ Name: `nvidia-gpu`
The Nvidia device plugin is used to expose Nvidia GPUs to Nomad.

~> **Note**: The Nvidia device plugin setup has changed in Nomad 1.2. You must
add a [`plugin`] block to your clients configuration and install the
[external Nvidia device plugin][nvidia_plugin_download] into their
[`plugin_dir`] prior to upgrading. See plugin options below for an example.
Note the job specification remains the same.
add a [`plugin`] block to your clients configuration and install the
[external Nvidia device plugin][nvidia_plugin_download] into their
[`plugin_dir`] prior to upgrading. See plugin options below for an example.
Note the job specification remains the same.

## Fingerprinted Attributes

Expand Down Expand Up @@ -337,7 +337,7 @@ Wed Jan 23 18:25:32 2019
[docker-driver]: /docs/drivers/docker 'Nomad docker Driver'
[exec-driver]: /docs/drivers/exec 'Nomad exec Driver'
[java-driver]: /docs/drivers/java 'Nomad java Driver'
[lxc-driver]: /docs/drivers/external/lxc 'Nomad lxc Driver'
[lxc-driver]: /plugins/drivers/community/lxc 'Nomad lxc Driver'
[`plugin`]: /docs/configuration/plugin
[`plugin_dir`]: /docs/configuration#plugin_dir
[nvidia_plugin_download]: https://releases.hashicorp.com/nomad-device-nvidia/
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,22 @@ Below is a list of community-supported task drivers you can use with Nomad:
- [Jail task driver][jail-task-driver]
- [Lightrun][lightrun]
- [LXC][lxc]
- [Podman][podman]
- [Pot][pot]
- [Rkt][rkt]
- [Rookout][rookout]
- [Singularity][singularity]
- [systemd-nspawn][nspawn-driver]
- [Windows IIS][nomad-driver-iis]

[rookout]: /docs/drivers/external/rookout
[lxc]: /docs/drivers/external/lxc
[rkt]: /docs/drivers/external/rkt
[rookout]: /plugins/drivers/community/rookout
[lxc]: /plugins/drivers/community/lxc
[rkt]: /plugins/drivers/community/rkt
[plugin_guide]: /docs/internals/plugins
[singularity]: /docs/drivers/external/singularity
[jail-task-driver]: /docs/drivers/external/jail-task-driver
[podman]: /docs/drivers/external/podman
[pot]: /docs/drivers/external/pot
[firecracker-task-driver]: /docs/drivers/external/firecracker-task-driver
[nspawn-driver]: /docs/drivers/external/nspawn
[nomad-driver-iis]: /docs/drivers/external/iis
[nomad-driver-containerd]: /docs/drivers/external/containerd
[lightrun]: /docs/drivers/external/lightrun
[singularity]: /plugins/drivers/community/singularity
[jail-task-driver]: /plugins/drivers/community/jail-task-driver
[pot]: /plugins/drivers/community/pot
[firecracker-task-driver]: /plugins/drivers/community/firecracker-task-driver
[nspawn-driver]: /plugins/drivers/community/nspawn
[nomad-driver-iis]: /plugins/drivers/community/iis
[nomad-driver-containerd]: /plugins/drivers/community/containerd
[lightrun]: /plugins/drivers/community/lightrun
41 changes: 41 additions & 0 deletions website/content/plugins/drivers/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
layout: docs
page_title: Task Drivers
description: Task Drivers are used to integrate with the host OS to run tasks in Nomad.
---

# Task Drivers

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.

Starting with Nomad 0.9, task drivers are now pluggable. This gives users the
flexibility to introduce their own drivers without having to recompile Nomad.
You can view the [plugin stanza][plugin] documentation for examples on how to
use the `plugin` stanza in Nomad's client configuration. Note that we have
introduced new syntax when specifying driver options in the client configuration
(see [docker][docker_plugin] for an example). Keep in mind that even though all
built-in drivers are now plugins, Nomad remains a single binary and maintains
backwards compatibility except with the `lxc` driver.

The list of supported task drivers is provided on the left of this page. Each
task driver documents the configuration available in a [job
specification](/docs/job-specification), the environments it can be
used in, and the resource isolation mechanisms available.

For details on authoring a task driver plugin, please refer to the [plugin
authoring guide][plugin_guide].

Task driver resource isolation is intended to provide a degree of separation of
Nomad client CPU / memory / storage between tasks. Resource isolation
effectiveness is dependent upon individual task driver implementations and
underlying client operating systems. Task drivers do include various
security-related controls, but the Nomad client to task interface should not be
considered a security boundary. See the [access control guide][acl_guide] for
more information on how to protect Nomad cluster operations.

[plugin]: /docs/configuration/plugin
[docker_plugin]: /docs/drivers/docker#client-requirements
[plugin_guide]: /docs/internals/plugins
[acl_guide]: https://learn.hashicorp.com/collections/nomad/access-control
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions website/content/plugins/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
layout: docs
page_title: Plugins
description: Learn about task driver and device plugins for Nomad.
---

# Plugins

Nomad 0.9 introduced a plugin framework which allows users to extend the
functionality of some components within Nomad. The design of the plugin system
is inspired by the lessons learned from plugin systems implemented in other
HashiCorp products such as Terraform and Vault.

The following components are currently pluggable within Nomad:

- [Task Drivers](/plugins/drivers)
- [Devices](/plugins/devices)
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,6 @@ following actions.
[hcl_v2]: https://github.com/hashicorp/hcl/tree/hcl2
[nomad_namespaces]: https://learn.hashicorp.com/tutorials/nomad/namespaces
[nomad_acls]: https://learn.hashicorp.com/collections/nomad/access-control
[autoscaler_agent_nomad]: /docs/autoscaling/agent/nomad
[autoscaler_cli_config]: /docs/autoscaling/cli#config
[autoscaler_cli_policy_dir]: /docs/autoscaling/cli#policy-dir
[autoscaler_agent_nomad]: /tools/autoscaling/agent/nomad
[autoscaler_cli_config]: /tools/autoscaling/cli#config
[autoscaler_cli_policy_dir]: /tools/autoscaling/cli#policy-dir
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ apm "example-apm-plugin" {
the plugin either as HCL or JSON. The accepted values are plugin specific.
Please refer to the individual plugin's documentation.

[plugin_dir]: /docs/autoscaling/agent#plugin_dir
[plugin_dir]: /tools/autoscaling/agent#plugin_dir
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ strategy "example-strategy-plugin" {
the plugin either as HCL or JSON. The accepted values are plugin specific.
Please refer to the individual plugin's documentation.

[plugin_dir]: /docs/autoscaling/agent#plugin_dir
[plugin_dir]: /tools/autoscaling/agent#plugin_dir
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ target "example-target-plugin" {
the plugin either as HCL or JSON. The accepted values are plugin specific.
Please refer to the individual plugin's documentation.

[plugin_dir]: /docs/autoscaling/agent#plugin_dir
[plugin_dir]: /tools/autoscaling/agent#plugin_dir
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,4 @@ $ nomad-autoscaler version
Nomad Autoscaler v0.0.3-dev (da91fa9)
```

[nomad_autoscaler_agent_guide]: /docs/autoscaling/agent
[nomad_autoscaler_agent_guide]: /tools/autoscaling/agent
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ from a cluster to ensure there is an appropriate amount of cluster resource for
the scheduled applications. This is achieved by interacting with remote providers
to start or terminate new Nomad clients based on metrics such as the remaining
free schedulable CPU or memory. Cluster scaling is enabled by configuring the
[autoscaler agent](/docs/autoscaling/agent#dir) with policies targeting the Nomad
[autoscaler agent](/tools/autoscaling/agent#dir) with policies targeting the Nomad
cluster.

## Dynamic Application Sizing
Expand All @@ -56,7 +56,7 @@ Dynamic Application Sizing can be enabled on an individual task by configuring
specification [`scaling` block][scaling_block].

[scaling_block]: /docs/job-specification/scaling#scaling-stanza
[autoscaling_policy]: /docs/autoscaling/policy
[autoscaling_policy]: /tools/autoscaling/policy
[autoscaler_github]: https://github.com/hashicorp/nomad-autoscaler
[autoscaler_releases]: https://releases.hashicorp.com/nomad-autoscaler/
[autoscaler_dockerhub]: https://hub.docker.com/r/hashicorp/nomad-autoscaler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ description: >
This section covers the internals of the Nomad Autoscaler and explains the
technical details of how it functions, its architecture, and sub-systems.

- [Autoscaler plugins](/docs/autoscaling/internals/plugins)
- [Check calculations](/docs/autoscaling/interals/checks)
- [Autoscaler plugins](/tools/autoscaling/internals/plugins)
- [Check calculations](/tools/autoscaling/interals/checks)
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ An example would be to return the CPU utilization for all allocations during
the time range.

[apm_plugin]: https://github.com/hashicorp/nomad-autoscaler/blob/v0.3.0/plugins/apm/apm.go#L11
[base_plugin]: /docs/autoscaling/internals/plugins/base
[base_plugin]: /tools/autoscaling/internals/plugins/base
[noop_plugin]: https://github.com/hashicorp/nomad-autoscaler/tree/v0.3.0/plugins/test/noop-apm
[das]: /docs/autoscaling#dynamic-application-sizing
[das]: /tools/autoscaling#dynamic-application-sizing
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ PluginInfo{
The `SetConfig` function is called when starting an instance of the plugin. It contains the
configuration for a named instance of the plugin as provided in the autoscaler [agent config][plugin_config].

[plugin_config]: /docs/autoscaling/agent
[plugin_config]: /tools/autoscaling/agent
Loading

0 comments on commit ddca508

Please sign in to comment.