Create a Cluster
Nomad is a flexible scheduler that can run on your local machine as a single node cluster or as a multi-node cluster on virtualized or physical infrastructure.
In this tutorial, you will create a cluster locally on your machine or on one of the major cloud providers, verify connectivity to the cluster, and interact with Nomad via the UI.
Clone the code repository
The example repository includes Terraform configurations for starting a cluster on the cloud as well as the jobspec files for the example application.
Clone the code repository.
Navigate to the repository folder.
Check out the v1.1
tag of the repository as a local branch named nomad-getting-started
.
Create the cluster
Start a Nomad cluster. You will use the Nomad CLI to access your cluster regardless of its location. Select where you want to create and run your cluster.
Open your terminal and start the development agent. This creates a Nomad cluster of one node that acts as both the server and client. The -bind
flag set to 0.0.0.0
instructs Nomad to listen on all network interfaces present on the machine. Leave Nomad running in this terminal session.
In a second terminal session, export the cluster address.
Verify connectivity
Verify connectivity to the cluster by checking the status of the nodes. The output you see may be different than the example output depending on where your cluster is running and how many nodes it has.
Browse the web UI
Navigate to the Nomad UI in your web browser by visiting http://localhost:4646/ui
.
Visit the Servers page from the left navigation to see the server nodes in the cluster and the Clients page to see the client nodes. These pages will show only one node each if you are running a local development agent.
Visit the Topology page to see an overview of the clients, the resources available on each, and the total resources available to the cluster.
Next Steps
In this tutorial you created a Nomad cluster. Continue on to the next tutorial by clicking on the Next button below and learn how to submit and run a job.