Skip to content

Latest commit

 

History

History
51 lines (39 loc) · 3.96 KB

core-concepts.md

File metadata and controls

51 lines (39 loc) · 3.96 KB

Background

To run a production Nomad cluster, you need to deploy a small number of server nodes (typically 3), which are responsible for being part of the consensus protocol, and a larger number of client nodes, which are used for running jobs. You must also have a Consul cluster deployed (see the Consul AWS Module) in one of the following configurations:

  1. Deploy Nomad and Consul in the same cluster
  2. Deploy Nomad and Consul in separate clusters

Deploy Nomad and Consul in the same cluster

  1. Use the install-consul module from the Consul AWS Module and the install-nomad module from this Module in a Packer template to create an AMI with Consul and Nomad.

    If you are just experimenting with this Module, you may find it more convenient to use one of our official public AMIs:

    WARNING! Do NOT use these AMIs in your production setup. In production, you should build your own AMIs in your own AWS account.

  2. Deploy a small number of server nodes (typically, 3) using the consul-cluster module. Execute the run-consul script and the run-nomad script on each node during boot, setting the --server flag in both scripts.

  3. Deploy as many client nodes as you need using the nomad-cluster module. Execute the run-consul script and the run-nomad script on each node during boot, setting the --client flag in both scripts.

Check out the nomad-consul-colocated-cluster example for working sample code.

Deploy Nomad and Consul in separate clusters

  1. Deploy a standalone Consul cluster by following the instructions in the Consul AWS Module.
  2. Use the scripts from the install-nomad module in a Packer template to create a Nomad AMI.
  3. Deploy a small number of server nodes (typically, 3) using the nomad-cluster module. Execute the run-nomad script on each node during boot, setting the --server flag. You will need to configure each node with the connection details for your standalone Consul cluster.
  4. Deploy as many client nodes as you need using the nomad-cluster module. Execute the run-nomad script on each node during boot, setting the --client flag.

Check out the nomad-consul-separate-cluster example for working sample code.