How To Install nomad on Ubuntu 18.04

In this tutorial we learn how to install nomad on Ubuntu 18.04. nomad is distributed, highly available, datacenter-aware scheduler

Introduction

In this tutorial we learn how to install nomad on Ubuntu 18.04.

What is nomad

nomad is:

Nomad is a cluster manager, designed for both long lived services and short lived batch processing workloads. Developers use a declarative job specification to submit work, and Nomad ensures constraints are satisfied and resource utilization is optimized by efficient task packing. Nomad supports all major operating systems and virtualized, containerized, or standalone applications. The key features of Nomad are:

  • Docker Support: Jobs can specify tasks which are Docker containers. Nomad will automatically run the containers on clients which have Docker installed, scale up and down based on the number of instances request, and automatically recover from failures.

  • Multi-Datacenter and Multi-Region Aware: Nomad is designed to be a global-scale scheduler. Multiple datacenters can be managed as part of a larger region, and jobs can be scheduled across datacenters if requested. Multiple regions join together and federate jobs making it easy to run jobs anywhere.

  • Operationally Simple: Nomad runs as a single binary that can be either a client or server, and is completely self contained. Nomad does not require any external services for storage or coordination. This means Nomad combines the features of a resource manager and scheduler in a single system.

  • Distributed and Highly-Available: Nomad servers cluster together and perform leader election and state replication to provide high availability in the face of failure. The Nomad scheduling engine is optimized for optimistic concurrency allowing all servers to make scheduling decisions to maximize throughput.

  • HashiCorp Ecosystem: Nomad integrates with the entire HashiCorp ecosystem of tools. Along with all HashiCorp tools, Nomad is designed in the unix philosophy of doing something specific and doing it well. Nomad integrates with tools like Packer, Consul, and Terraform to support building artifacts, service discovery, monitoring and capacity management.

There are three methods to install nomad on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install nomad Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install nomad using apt-get by running the following command:

sudo apt-get -y install nomad

Install nomad Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install nomad using apt by running the following command:

sudo apt -y install nomad

Install nomad Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install nomad using aptitude by running the following command:

sudo aptitude -y install nomad

How To Uninstall nomad on Ubuntu 18.04

To uninstall only the nomad package we can use the following command:

sudo apt-get remove nomad

Uninstall nomad And Its Dependencies

To uninstall nomad and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove nomad

Remove nomad Configurations and Data

To remove nomad configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge nomad

Remove nomad configuration, data, and all of its dependencies

We can use the following command to remove nomad configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge nomad

References

Summary

In this tutorial we learn how to install nomad package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.