Go to file
Mahmood Ali cdddd64a42
logging: Log the cause behind agent startup failure (#11353)
Log the failure error when the agent fails to start. Previously, the
agent startup failure error would be emitted to the command UI but not
logged. So it doesn't get emitted to syslog or `log_file` if they are
set, and it makes debugging much harder. Also, logging the error again
before exit makes the error more visible: previously, the operator
needed to scroll to the top to find the error.

On a sample failure, the output will look like:
```
==> WARNING: Bootstrap mode enabled! Potentially unsafe operation.
==> Loaded configuration from sample-configs/config-bad
==> Starting Nomad agent...
==> Error starting agent: setting up server node ID failed: mkdir /path-without-permission: read-only file system
    2021-10-20T14:38:51.179-0400 [WARN]  agent.plugin_loader: skipping external plugins since plugin_dir doesn't exist: plugin_dir=/path-without-permission/plugins
    2021-10-20T14:38:51.181-0400 [DEBUG] agent.plugin_loader.docker: using client connection initialized from environment: plugin_dir=/path-without-permission/plugins
    2021-10-20T14:38:51.181-0400 [DEBUG] agent.plugin_loader.docker: using client connection initialized from environment: plugin_dir=/path-without-permission/plugins
    2021-10-20T14:38:51.181-0400 [INFO]  agent: detected plugin: name=java type=driver plugin_version=0.1.0
    2021-10-20T14:38:51.181-0400 [INFO]  agent: detected plugin: name=docker type=driver plugin_version=0.1.0
    2021-10-20T14:38:51.181-0400 [INFO]  agent: detected plugin: name=mock_driver type=driver plugin_version=0.1.0
    2021-10-20T14:38:51.181-0400 [INFO]  agent: detected plugin: name=raw_exec type=driver plugin_version=0.1.0
    2021-10-20T14:38:51.181-0400 [INFO]  agent: detected plugin: name=exec type=driver plugin_version=0.1.0
    2021-10-20T14:38:51.181-0400 [INFO]  agent: detected plugin: name=qemu type=driver plugin_version=0.1.0
    2021-10-20T14:38:51.181-0400 [ERROR] agent: error starting agent: error="setting up server node ID failed: mkdir /path-without-permission: read-only file system"
```

This change adds the final `ERROR` message. It's easy to miss the `==>
Error starting agent` above.
2021-10-27 10:41:17 -07:00
.changelog logging: Log the cause behind agent startup failure (#11353) 2021-10-27 10:41:17 -07:00
.circleci website: upgrade dependencies (#11247) 2021-10-05 13:31:14 -05:00
.github dependabot: set proper theme/* labels (#11154) 2021-09-10 09:41:05 -04:00
acl lint: mark false positive or fix gocritic append lint errors. 2021-09-06 10:49:44 +02:00
api add dispatch idempotency token support in the CLI (#10930) 2021-10-22 12:39:05 -04:00
client Merge pull request #11280 from benbuzbee/log-err 2021-10-14 14:49:22 +02:00
command logging: Log the cause behind agent startup failure (#11353) 2021-10-27 10:41:17 -07:00
contributing update docs and changelog 2021-10-04 13:50:42 -04:00
demo [demo] Kadalu CSI support for Nomad (#11207) 2021-10-06 15:29:15 -04:00
dev docs: swap master for main in Nomad repo 2021-03-08 14:26:31 -05:00
drivers Add support for --init to docker driver. 2021-10-15 12:53:25 -07:00
e2e Return SchedulerConfig instead of SchedulerConfigResponse struct (#10799) 2021-10-13 21:23:13 -04:00
helper debug: Improve namespace and region support (#11269) 2021-10-12 16:58:41 -04:00
integrations spelling: registrations 2018-03-11 18:40:53 +00:00
internal/testing/apitests Return SchedulerConfig instead of SchedulerConfigResponse struct (#10799) 2021-10-13 21:23:13 -04:00
jobspec allow configuration of Docker hostnames in bridge mode (#11173) 2021-09-16 08:13:09 +02:00
jobspec2 chore: fix incorrect docstring formatting. 2021-08-30 11:08:12 +02:00
lib chore: fix incorrect docstring formatting. 2021-08-30 11:08:12 +02:00
nomad vault: set JobID in Vault metadata (#11397) 2021-10-27 07:20:29 -07:00
plugins gofmt all the files 2021-10-01 10:14:28 -04:00
scheduler scheduler: stop allocs in unrelated nodes (#11391) 2021-10-27 07:04:13 -07:00
scripts build: Update to golang 1.17.1 2021-10-01 09:41:25 -04:00
terraform Format Terraform files (#11099) 2021-09-01 15:15:06 -04:00
testutil cli: rename paths in debug bundle for clarity (#11307) 2021-10-13 18:00:55 -04:00
tools build: install buf during bootstrap 2021-04-06 09:42:44 -06:00
ui ui: update task group alloc summary chart to use new `SummaryLegendItem` component (#11375) 2021-10-25 11:14:01 -04:00
version update changelog and dev version (#11090) 2021-08-27 08:54:35 -04:00
website Replaces accidental use of Vault with Nomad (#11355) 2021-10-27 08:35:31 -07:00
.gitattributes Remove invalid gitattributes 2018-02-14 14:47:43 -08:00
.gitignore ignore local e2e files 2021-04-27 15:07:03 -07:00
.golangci.yml ci: enable staticcheck with ST1020 to check func docstrings. 2021-08-31 11:13:20 +02:00
CHANGELOG.md Merge release branch (#11317) 2021-10-14 13:06:04 -04:00
GNUmakefile ease building Linux binaries on macOS (#11329) 2021-10-15 11:12:59 -04:00
LICENSE Initial commit 2015-06-01 12:21:00 +02:00
README.md README: Align with Consul README (#9681) 2020-12-18 09:38:34 -08:00
Vagrantfile proto: Switch to using buf (#9308) 2020-11-17 07:01:48 -08:00
build_linux_arm.go gofmt all the files 2021-10-01 10:14:28 -04:00
go.mod Fix arm64 panics by updating google/snappy library to latest, 0.0.4 (#11396) 2021-10-27 06:39:16 -07:00
go.sum Fix arm64 panics by updating google/snappy library to latest, 0.0.4 (#11396) 2021-10-27 06:39:16 -07:00
main.go Added support for `-force-color` to the CLI. (#10975) 2021-10-06 10:02:42 -04:00
main_test.go Adding initial skeleton 2015-06-01 13:46:21 +02:00

README.md

Nomad Build Status Discuss

HashiCorp Nomad logo

Nomad is a simple and flexible workload orchestrator to deploy and manage containers (docker, podman), non-containerized applications (executable, Java), and virtual machines (qemu) across on-prem and clouds at scale.

Nomad is supported on Linux, Windows, and macOS. A commercial version of Nomad, Nomad Enterprise, is also available.

Nomad provides several key features:

  • Deploy Containers and Legacy Applications: Nomads flexibility as an orchestrator enables an organization to run containers, legacy, and batch applications together on the same infrastructure. Nomad brings core orchestration benefits to legacy applications without needing to containerize via pluggable task drivers.

  • Simple & Reliable: Nomad runs as a single binary and is entirely self contained - combining resource management and scheduling into a single system. Nomad does not require any external services for storage or coordination. Nomad automatically handles application, node, and driver failures. Nomad is distributed and resilient, using leader election and state replication to provide high availability in the event of failures.

  • Device Plugins & GPU Support: Nomad offers built-in support for GPU workloads such as machine learning (ML) and artificial intelligence (AI). Nomad uses device plugins to automatically detect and utilize resources from hardware devices such as GPU, FPGAs, and TPUs.

  • Federation for Multi-Region, Multi-Cloud: Nomad was designed to support infrastructure at a global scale. Nomad supports federation out-of-the-box and can deploy applications across multiple regions and clouds.

  • Proven Scalability: Nomad is optimistically concurrent, which increases throughput and reduces latency for workloads. Nomad has been proven to scale to clusters of 10K+ nodes in real-world production environments.

  • HashiCorp Ecosystem: Nomad integrates seamlessly with Terraform, Consul, Vault for provisioning, service discovery, and secrets management.

Quick Start

Testing

See Learn: Getting Started for instructions on setting up a local Nomad cluster for non-production use.

Optionally, find Terraform manifests for bringing up a development Nomad cluster on a public cloud in the terraform directory.

Production

See Learn: Nomad Reference Architecture for recommended practices and a reference architecture for production deployments.

Documentation

Full, comprehensive documentation is available on the Nomad website: https://www.nomadproject.io/docs

Guides are available on HashiCorp Learn.

Contributing

See the contributing directory for more developer documentation.