Commit Graph

202 Commits

Author SHA1 Message Date
Kent 'picat' Gruber
fc3ff8ee13 Update deployment status doc example output 2021-07-16 09:58:58 -04:00
Kent 'picat' Gruber
440d556fdb Handle successful/canceled/blocked deployments in CLI output
Otherwise the spinner would just end, which felt a bit awkward.

I wanted to see a  "✓" to know that everything was ok, and a "!" (maybe something else?) if something went wrong.
2021-07-09 19:27:55 -04:00
Mike Nomitch
9235c790f0 [docs] Adds federation caveat to upgrade guide (#10847) 2021-07-09 09:42:17 -04: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
Isabel Suchanek
3117d6c78e cli: add -task flag to alloc signal, restart (#10859)
Alloc exec only works when task is passed as a flag and not an arg.
Alloc logs currently accepts either, but alloc signal and restart only
accept task as an arg. This adds -task as a flag to the other alloc
commands to make the cli UX consistent. If task is passed as a flag and
an arg, it ignores the arg.
2021-07-07 09:58:16 -07: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
Tim Gross
a66034bb3a docker: move host path for hosts file mount to alloc dir (#10823)
In Nomad 1.1.1 we generate a hosts file based on the Nomad-owned network
namespace, rather than using the default hosts file from the pause
container. This hosts file should be shared between tasks in the same
allocation so that tasks can update the file and have the results propagated
between tasks.
2021-06-30 11:10:04 -04:00
Juan Carlos Alonso
acd13314ed Fix missing opening quote 2021-06-30 12:33:34 +08:00
Tim Gross
7edf0cc108 docs: unset port to field maps to dynamic port (#10828) 2021-06-28 15:55:24 -04:00
Tim Gross
166a056531 docs: add missing backwards compat warning about port_map (#10827)
The `docker` driver's `port_map` field was deprecated in 0.12 and this is
documented in the task driver's docs, but we never explicitly flagged it for
backwards compatibility.
2021-06-28 15:49:41 -04:00
Boris Shomodjvarac
2cd8f3ae93 docs: update csi_plugin example (#10821)
Current efs driver does not support telling it if its a `node` or a `controller`, and it will not print any error it will just ignore all other parameters then:(
So this will result in endpoint being `/tmp/csi.sock` and not `/csi/csi.sock` which will in turn break nomad/csi integration.

Also I changed the latest image tag to v1.3.2 to make sure anybody copy pasting this example is sure that it will work.

Tested on nomad 1.1.2
2021-06-28 08:28:03 -04:00
Tim Gross
3fdbbeefe0 docs: improve CSI deployment recommendations (#10798)
* add some more context to the recommendations
* add recommendations around per-AZ `plugin_id`
2021-06-22 10:23:09 -04:00
Tim Gross
ad3070a1c2 docs: host_network does support Docker task port mapping (#10774) 2021-06-17 09:11:10 -04: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
Isabel Suchanek
ca010f9f87 cli: check deployment exists before monitoring (#10757)
System and batch jobs don't create deployments, which means nomad tries
to monitor a non-existent deployment when it runs a job and outputs an
error message. This adds a check to make sure a deployment exists before
monitoring. Also fixes some formatting.

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2021-06-14 16:42:38 -07:00
Isabel Suchanek
34aecd0e82 docs: add deployment monitor to docs, changelog
Updates the deployment status and job run docs
2021-06-10 10:51:33 -07: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
Michael Schurter
594ceb7022 docs: improve wait_for_index metrics description (#10717)
Old description of `{plan,worker}.wait_for_index` described the metric
in terms of waiting for a snapshot which has two problems:

1. "Snapshot" is an overloaded term in Nomad and operators can't be
   expected to know which use we're referring to here.
2. The most important thing about the metric is what we're waiting *on*
   before taking a snapshot: the raft index of the object to be
   processed (plan or eval).

The new description tries to cram all of that context into the tiny
space provided.

See #5791 for details about the `wait_for_index` mechanism in general.
2021-06-09 08:53:06 -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
Seth Hoenig
37b49ba573 consul/connect: fix upstream mesh gateway default mode setting
This PR fixes the API to _not_ set the default mesh gateway mode. Before,
the mode would be set to "none" in Canonicalize, which is incorrect. We
should pass through the empty string so that folks can make use of Consul
service-defaults Config entries to configure the default mode.
2021-06-04 08:53:12 -05:00
Seth Hoenig
312161c5fc consul/connect: add support for connect mesh gateways
This PR implements first-class support for Nomad running Consul
Connect Mesh Gateways. Mesh gateways enable services in the Connect
mesh to make cross-DC connections via gateways, where each datacenter
may not have full node interconnectivity.

Consul docs with more information:
https://www.consul.io/docs/connect/gateways/mesh-gateway

The following group level service block can be used to establish
a Connect mesh gateway.

service {
  connect {
    gateway {
      mesh {
        // no configuration
      }
    }
  }
}

Services can make use of a mesh gateway by configuring so in their
upstream blocks, e.g.

service {
  connect {
    sidecar_service {
      proxy {
        upstreams {
          destination_name = "<service>"
          local_bind_port  = <port>
          datacenter       = "<datacenter>"
          mesh_gateway {
            mode = "<mode>"
          }
        }
      }
    }
  }
}

Typical use of a mesh gateway is to create a bridge between datacenters.
A mesh gateway should then be configured with a service port that is
mapped from a host_network configured on a WAN interface in Nomad agent
config, e.g.

client {
  host_network "public" {
    interface = "eth1"
  }
}

Create a port mapping in the group.network block for use by the mesh
gateway service from the public host_network, e.g.

network {
  mode = "bridge"
  port "mesh_wan" {
    host_network = "public"
  }
}

Use this port label for the service.port of the mesh gateway, e.g.

service {
  name = "mesh-gateway"
  port = "mesh_wan"
  connect {
    gateway {
      mesh {}
    }
  }
}

Currently Envoy is the only supported gateway implementation in Consul.
By default Nomad client will run the latest official Envoy docker image
supported by the local Consul agent. The Envoy task can be customized
by setting `meta.connect.gateway_image` in agent config or by setting
the `connect.sidecar_task` block.

Gateways require Consul 1.8.0+, enforced by the Nomad scheduler.

Closes #9446
2021-06-04 08:24:49 -05:00
Tim Gross
094927124d docs: fix broken links in nomad csi snapshot commands 2021-06-03 11:25:30 -04:00
Tim Gross
9fbb771f2d docs: clarify default check.initial_status behavior 2021-06-03 10:02:25 -04:00
mrspanishviking
41a43a98dc docs: added license faq 2021-05-27 13:30:17 -04:00
Tim Gross
9135b42903 docs: improve documentation for CSI create/register mount_options
Adds clarification to `nomad volume create` commands around how the `volume`
block in the jobspec overrides this behavior. Adds missing section to `nomad
volume register` and to example volume spec for both commands.
2021-05-24 11:13:58 -04:00
Florian Apolloner
b01416258e Removed unsupported options from volume create
Volume creation doesn't support the context (this would only be used for register)
2021-05-24 08:29:42 -04:00
James Rasell
17ff991a49 docs: fix jobspec hcl2 locals example. 2021-05-21 15:20:46 +02:00
Grant Griffiths
771aad241f Add new volume commands to overview page 2021-05-21 07:50:57 -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
Daniel Durante
cb5a408f1a docs: fixes typo within volume registration page 2021-05-19 08:36:38 -04:00
Tim Gross
e6c4a75bcf docs: ensure definitions have anchors
Move the words being defined in the /docs/internal/architecture page to be
small headers so that they can be linked to with anchors from Learn guides and
other documentation location.
2021-05-18 15:05:11 -04:00
Mike Wickett
b497705920 patch images (#10607) 2021-05-18 11:14:09 -04:00
mrspanishviking
43201cb4c7 docs: update enterprise license page
Added a link to the enterprise license tutorial and updated the trial link to use the recommended marketing url.
2021-05-18 07:25:54 -07:00
Ahmed
7896c42f72 Update service.mdx 2021-05-17 15:41:50 -04: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
Michael Schurter
78fd25cbdd Merge pull request #10550 from hashicorp/docs-rtd
Remote Task Driver docs
2021-05-14 10:49:35 -07:00
Michael Schurter
711a05d3ce Apply suggestions from code review
Co-authored-by: Seth Hoenig <shoenig@hashicorp.com>
2021-05-14 10:45:12 -07:00
Michael Schurter
b68ec47247 docs: mention #10592 in rtd docs 2021-05-13 15:14:56 -07:00
Michael Schurter
4393d666ae docs: document remote task drivers & ecs driver 2021-05-13 10:43:46 -07:00
Mahmood Ali
02e585a611 add a section about memory oversubscription (#10573)
add a section about memory oversubscription

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2021-05-13 13:35:51 -04:00
Tim Gross
7aa18b6063 docs: fix fields in 'volume create' example
The `capacity` block was removed during implementation in lieu of the
`capacity_max` and `capacity_min` fields, but it wasn't removed from the
example in the documentation.
2021-05-13 08:48:49 -04:00
Joel May
780698caa4 minor: update 'Cloudflare' capitalization 2021-05-12 15:15:54 -07:00
Seth Hoenig
003d68fe6d drivers/docker+exec+java: disable net_raw capability by default
The default Linux Capabilities set enabled by the docker, exec, and
java task drivers includes CAP_NET_RAW (for making ping just work),
which has the side affect of opening an ARP DoS/MiTM attack between
tasks using bridge networking on the same host network.

https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities

This PR disables CAP_NET_RAW for the docker, exec, and java task
drivers. The previous behavior can be restored for docker using the
allow_caps docker plugin configuration option.

A future version of nomad will enable similar configurability for the
exec and java task drivers.
2021-05-12 13:22:09 -07:00
Mike Nomitch
ee1163ed94 docs: add detail to 1.1 upgrade guide for licensing 2021-05-10 12:28:05 -04:00
Mike Noordermeer
87af5dec78 docs: clarify that a default update strategy is used when update strategy is omitted 2021-05-10 08:27:22 -04:00
Luiz Aoqui
334de88582 docs: restructure autoscaling plugins menu (#10534)
* docs: restructure autoscaling plugins menu

* docs: add autoscaling threshold strategy (#10535)
2021-05-07 14:21:50 -04:00
Chris Baker
140e7b3aaa Node Drain Metadata (#10250) 2021-05-07 13:58:40 -04:00
Tim Gross
826ecd94e4 documentation for disable_default_tcp_check 2021-05-07 13:16:39 -04:00