Commit Graph

835 Commits

Author SHA1 Message Date
Tim Gross
37df614da6 docs: fix recommended binding rules for Consul integration (#19299)
Fixes some errors in the documentation for the Consul integration, based on
tests locally without using the `nomad setup consul` command and updating the
docs to match.

* Consul CE doesn't support the `-namespace-rule-bind-namespace` option.
* The binding rule for services should not including the Nomad namespace in the
  `bind-name` parameter (the service is registered in the appropriate Consul
  namespace).
* The role for tasks should include the suffix "-tasks" in the name to match the
  binding rule we create.
* Fix the Consul bound audiences to be a list of strings
* Fix some quoting issues in the commands.
2023-12-04 11:56:03 -05:00
Piotr Kazmierczak
0a783d0046 wi: change setup cmds -cleanup flag to -destroy (#19295) 2023-12-04 15:28:17 +01:00
Piotr Kazmierczak
0ff190fa38 docs: setup helpers documentation (#19267) 2023-12-04 09:59:07 +01:00
James Rasell
d041ddc4ee docs: fix up HCL formatting on agent config examples. (#19254) 2023-12-04 08:44:00 +00:00
Luiz Aoqui
125dd4af38 docs: small updates to agent consul (#19285) 2023-12-01 16:40:06 -05:00
Seth Hoenig
b83c1e14c1 docs: fix documentation of client.reserved.cores (#19266) 2023-12-01 13:06:55 -06:00
Tim Gross
2ba459c73a docs: split consul config params into client vs server sections (#19258)
Some sections of the `consul` configuration are relevant only for clients or
servers. We updated our Vault docs to split these parameters out into their own
sections for clarity. Match that for the Consul docs.
2023-12-01 13:37:39 -05:00
Adrian Todorov
af71f4a55a Clarify docs around CSI volume context updates (#19216)
Co-authored-by: Tim Gross <tgross@hashicorp.com>
2023-12-01 15:19:04 +00:00
Phil Renaud
d104432cd3 Actions: API, command, and jobspec docs (#19166)
* API command and jobspec docs

* PR comments addressed

* API docs for job/jobid/action socket

* Removing a perhaps incorrect origin of job_id across the jobs api doc

* PR comments addressed
2023-11-30 14:13:37 -05:00
Piotr Kazmierczak
e57dcdf106 docs: adjust claim mappings for Consul auth method (#19244) 2023-11-30 20:01:18 +01:00
Seth Hoenig
5f3aae7340 website: fix spellcheck path and cleanup some misspellings (#19238) 2023-11-30 09:38:19 -06:00
Piotr Kazmierczak
d699b82df6 docs: update consul-integration to include ns changes (#19239)
Co-authored-by: Tim Gross <tgross@hashicorp.com>
2023-11-30 16:37:48 +01:00
Luiz Aoqui
d29ac461a7 cli: non-service jobs on job restart -reschedule (#19147)
The `-reschedule` flag stops allocations and assumes the Nomad scheduler
will create new allocations to replace them. But this is only true for
service and batch jobs.

Restarting non-service jobs with the `-reschedule` flag causes the
command to loop forever waiting for the allocations to be replaced,
which never happens.

Allocations for system jobs may be replaced by triggering an evaluation
after each stop to cause the reconciler to run again.

Sysbatch jobs should not be allowed to be rescheduled as they are never
replaced by the scheduler.
2023-11-29 13:01:19 -05:00
Piotr Kazmierczak
26b778bb0c docs: correction to Consul integration TLS note (#19207) 2023-11-28 19:22:02 +01:00
Tim Gross
8ab7ab0db4 docs: fix typos and markdown issues on CPU concepts page (#19205) 2023-11-28 11:27:27 -05:00
James Rasell
e2487698e6 docs: add alloc metrics note about possible cgroup variations. (#19195) 2023-11-28 14:32:08 +00:00
Jorge Marey
5f78940911 Allow setting a token name template on auth methods (#19135)
Co-authored-by: James Rasell <jrasell@hashicorp.com>
2023-11-28 12:26:21 +00:00
Piotr Kazmierczak
248b2ba5cd WI: use single auth method for Consul by default (#19169)
This simplifies the default setup of Nomad workloads WI-based
authentication for Consul by using a single auth method with 2 binding rules.

Users can still specify separate auth methods for services and tasks.
2023-11-28 12:22:27 +01:00
Luiz Aoqui
e0cea41e37 client: deprecate loading plugins without config (#19189)
Nomad load all plugins from `plugin_dir` regardless if it is listed in
the agent configuration file. This can cause unexpected binaries to be
executed.

This commit begins the deprecation process of this behaviour. The Nomad
agent will emit a warning log for every plugin binary found without a
corresponding agent configuration block.

---------

Co-authored-by: Michael Schurter <mschurter@hashicorp.com>
2023-11-27 21:36:42 -05:00
Luiz Aoqui
5ff6cce3ab vault: update default JWT auth method path (#19188)
Update default auth method path to be `jwt-nomad` to avoid potential
conflicts when Vault's `jwt` default is already being used for something
else.
2023-11-27 17:48:12 -05:00
Piotr Kazmierczak
3b701ee0cf docs: additional note about JWKS endpoints and CA certs (#19144) 2023-11-27 17:34:44 +01:00
James Rasell
cfbb2e8923 cli: use spaces when outputting ACL auth method token TTL param. (#19159) 2023-11-24 10:39:27 +00:00
Charlie Voiselle
659c0945fc [core] Honor job's namespace when checking distinct_hosts feasibility (#19004)
* Update distinct_host feasibility checking to honor the job's namespace. Fixes #9792
* Added test to verify original condition and that fix resolved it.
* Added documentation
2023-11-17 11:25:10 -05:00
Judith Malnick
d9fa19f542 docs: fix networking and licensing links (#19096) 2023-11-16 09:03:23 -05:00
Adriano Caloiaro
f66eb83fc0 Add go-netaddrs support to retry_join (#18745) 2023-11-15 10:07:18 -05:00
Tim Gross
98e9fb4698 docs: clarify when "all" is not permitted for cap_add (#19091)
Linux capabilities configurable by the task must be a subset of those configured
in the plugin configuration. Clarify this implies that `"all"` is not permitted
if the plugin is not also configured to allow all capabilities.

Fixes: https://github.com/hashicorp/nomad/issues/19059
2023-11-14 16:33:55 -05:00
Juana De La Cuesta
bae82b14b4 docs: Add section for disable restart (#19083)
* docs: add section for disable restart that mirrors what is on disable reschedule

* Update restart.mdx
2023-11-14 14:53:43 +01:00
Dave May
e4f98a8d1d docs: fix broken links in docker.mdx (#19003) 2023-11-07 07:34:47 +00:00
Seth Hoenig
61e21db2b4 docs: add 1.7 cpu upgrade notes and tweak cpu concepts doc (#18977)
* docs: add 1.7 cpu upgrade notes and tweak cpu concepts doc

* docs: fix spelling
2023-11-02 09:58:16 -05:00
Seth Hoenig
0dc9c49c6c docs: add a Concepts/CPU docs page (#18924)
* docs: add a Concepts/CPU docs page

* docs: cpu doc cr feedback

* docs: cpu fix image
2023-11-02 08:45:43 -05:00
Michael Schurter
0b0ae40199 docs: recommend rotating keys on upgrade (#18958)
RIP EdDSA.
2023-11-01 10:57:33 -07:00
Anthony
e1acf72eb5 Automated license utilization reporting docs (#17976) 2023-11-01 12:18:04 -04:00
Michael Schurter
e49ca3c431 identity: Implement change_mode (#18943)
* identity: support change_mode and change_signal

wip - just jobspec portion

* test struct

* cleanup some insignificant boogs

* actually implement change mode

* docs tweaks

* add changelog

* test identity.change_mode operations

* use more words in changelog

* job endpoint tests

* address comments from code review

---------

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2023-11-01 09:41:11 -05:00
James Rasell
4ec27a97d1 docs: clarify ACL agent config TTL params apply to auth methods. (#18949) 2023-11-01 13:45:13 +00:00
Tim Gross
2bff6d2a6a docs: fix token_period in example Vault role for WI (#18939)
Vault tokens requested for WI are "periodic" Vault tokens (ones that get
periodically renewed). The field we should be setting for the renewal window is
`token_period`.
2023-10-31 16:33:03 -04:00
Michael Schurter
9afc70ef5a Fix Vault docs to use HCL instead of JSON (#18938) 2023-10-31 13:25:20 -07:00
Tim Gross
ea3e711fa6 docs: upgrade guide for integrations deprecation warnings (#18928)
The Consul and Vault integrations work shipping in Nomad 1.7 will deprecated the
existing token-based workflows. These will be removed in Nomad 1.9, so add a
note describing this to the upgrade guide.
2023-10-31 13:21:47 -04:00
Tim Gross
4850f07295 docs: name, audience, and TTL fields for identity blocks (#18916) 2023-10-30 13:45:40 -04:00
Tim Gross
9463d7f88a docs: add note about consul.service_identity ignoring fields (#18900)
The WI we get for Consul services is saved to the client state DB like all other
WIs, but the resulting JWT is never exposed to the task secrets directory
because (a) it's only intended for use with Consul service configuration,
and (b) for group services it could be ambiguous which task to expose it to.

Add a note to the `consul.service_identity` docs that these fields are ignored.
2023-10-30 09:19:15 -04:00
Tim Gross
694a5ec19d docs: remove stale note about generate_lease from template docs (#18895)
Prior to `consul-template` v0.22.0, automatic PKI renewal wouldn't work properly
based on the expiration of the cert. More recent versions of `consul-template`
can use the expiry to refresh the cert, so it's no longer necessary (and in fact
generates extra load on Vault) to set `generate_lease`. Remove this
recommendation from the docs.

Fixes: #18893
2023-10-27 11:09:09 -04:00
Seth Hoenig
fdde8a56ae docs: add job-specification docs for numa (#18864)
* docs: add job-specification docs for numa

* docs: take suggestions

Co-authored-by: Tim Gross <tgross@hashicorp.com>

* docs: more cr suggestions

---------

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2023-10-26 11:39:08 -05:00
Tim Gross
47f2118f40 docs: Vault Workload Identity integration (#18704)
Documentation updates to support the new Vault integration with Nomad Workload
Identity. Included:

* Added a large section to the Vault integration docs to explain how to set up
  auth methods, roles, and policies (by hand, assuming we don't ship a `nomad
  setup-vault` tool for now), and how to safely migrate from the existing workflow
  to the new one.
* Shuffled around some of the existing text so that the legacy authentication
  method text is in its own section.
* Added a compatibility matrix to the Vault integration page.
2023-10-26 10:33:52 -04:00
Piotr Kazmierczak
7f62dec473 consul WI: rename default auth method for services (#18867)
It should be called nomad-services instead of nomad-workloads.
2023-10-26 09:43:33 +02:00
Michael Schurter
9b3c38b3ed docs: deprecate rsadecrypt (#18856)
`rsadecrypt` uses PKCS #1 v1.5 padding which has multiple known
weaknesses. While it is possible to use safely in Nomad, we should not
encourage our users to use bad cryptographic primitives.

If users want to decrypt secrets in jobspecs we should choose a
cryptographic primitive designed for that purpose. `rsadecrypt` was
inherited from Terraform which only implemented it to support decrypting
Window's passwords on AWS EC2 instances:

https://github.com/hashicorp/terraform/pull/16647

This is not something that should ever be done in a jobspec, therefore
there's no reason for Nomad to support this HCL2 function.
2023-10-24 15:48:15 -07:00
Kerim Satirli
5e1bbf90fc docs: update all URLs to developer.hashicorp.com (#16247) 2023-10-24 11:00:11 -04:00
Tim Gross
8a311255a2 docs: Consul Workload Identity integration (#18685)
Documentation updates to support the new Consul integration with Nomad Workload
Identity. Included:

* Added a large section to the Consul integration docs to explain how to set up
  auth methods and binding rules (by hand, assuming we don't ship a `nomad
  setup-consul` tool for now), and how to safely migrate from the existing
  workflow to the new one.
* Move `consul` block out of `group` and onto its own page now that we have it
  available at the `task` scope, and expanded examples of its use.
* Added the `service_identity` and `task_identity` blocks to the Nomad agent
  configuration, and provided a recommended default.
* Added the `identity` block to the `service` block page.
* Added a rough compatibility matrix to the Consul integration page.
2023-10-23 09:17:22 -04:00
Michael Schurter
a806363f6d OpenID Configuration Discovery Endpoint (#18691)
Added the [OIDC Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) `/.well-known/openid-configuration` endpoint to Nomad, but it is only enabled if the `server.oidc_issuer` parameter is set. Documented the parameter, but without a tutorial trying to actually _use_ this will be very hard.

I intentionally did *not* use https://github.com/hashicorp/cap for the OIDC configuration struct because it's built to be a *compliant* OIDC provider. Nomad is *not* trying to be compliant initially because compliance to the spec does not guarantee it will actually satisfy the requirements of third parties. I want to avoid the problem where in an attempt to be standards compliant we ship configuration parameters that lock us in to a certain behavior that we end up regretting. I want to add parameters and behaviors as there's a demonstrable need.

Users always have the escape hatch of providing their own OIDC configuration endpoint. Nomad just needs to know the Issuer so that the JWTs match the OIDC configuration. There's no reason the actual OIDC configuration JSON couldn't live in S3 and get served directly from there. Unlike JWKS the OIDC configuration should be static, or at least change very rarely.

This PR is just the endpoint extracted from #18535. The `RS256` algorithm still needs to be added in hopes of supporting third parties such as [AWS IAM OIDC Provider](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html).

Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
2023-10-20 17:11:41 -07:00
James Rasell
ca9e08e6b5 monitor: add log include location option on monitor CLI and API (#18795) 2023-10-20 07:55:22 +01:00
James Rasell
1ffdd576bb agent: add config option to enable file and line log detail. (#18768) 2023-10-16 15:59:16 +01:00
Kevin Wang
6dcc402188 chore(docs): update file HCL function (#18696) 2023-10-16 09:03:50 +01:00