Setting up the Nomad Cluster

My first task in setting up my Nomad Image Factory is creating the Nomad cluster.

Lab:

3 : Mini Computers

N100 CPU
16 GB Memory
2 : 1GB Nics

Proxmox

Nomad Cluster:

Simple Cluster

3 Nodes with Server and Client Role
2 CPU
4 GB Memory…


This content originally appeared on DEV Community and was authored by lykins

My first task in setting up my Nomad Image Factory is creating the Nomad cluster.

Lab:

  • 3 : Mini Computers
    • N100 CPU
    • 16 GB Memory
    • 2 : 1GB Nics
  • Proxmox

Cluster Nodes

Nomad Cluster:

  • Simple Cluster
    • 3 Nodes with Server and Client Role
    • 2 CPU
    • 4 GB Memory
    • Ubuntu 24

Nomad VMs

Installing Nomad:

I take the easy way to install Nomad.

sudo apt-get update && \
  sudo apt-get install wget gpg coreutils

wget -O- https://apt.releases.hashicorp.com/gpg | \
  sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg

echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" \
| sudo tee /etc/apt/sources.list.d/hashicorp.list

sudo apt-get update && sudo apt-get install nomad

After installing you should be able to check the Nomad version to confirm.

Nomad Version

Additional Notes:

If you want to do a manual install and setup, I would recommend following this guide : HERE :).

If sticking with using the package manager, just a few notes - atleast on he Ubuntu side. I would not think there is a difference with RHEL-based.

Service

systemctl

It is setup up with a default config. If this was a server only node, I would have set up a nomad user and group, and change root in both places nomad.

user

Other note is the nomad environment and config file. They are set up in /etc/nomad.d. If changing you'll need to update those values in the service config.

config

Config

My favorite thing about Nomad and what drew me to it was its use of HCL. My background prior to messing with Nomad is with Terraform + Packer, so it is a common syntax I am already familiar with.

The common config location is /etc/nomad.d.

ls -l

For now, I will not change anything in here. I probably will play with TLS down the road, but since this is a lab, I am sticking to the defaults.

nomad.hcl

Starting up Nomad:

Last item I had to hit was install Docker. Went ahead and did that since I will be running containers on this.

At this point I am ready to get it up and running...

starting service

Just to note, I entered in the IP address to bootstrap the servers. Everything else is pretty much the default...

data_dir  = "/opt/nomad/data"
bind_addr = "0.0.0.0"

server {
  enabled          = true
  bootstrap_expect = 1
        server_join {
        retry_join = ["192.168.39.109"]
        }
}

client {
  enabled = true
  servers = ["127.0.0.1"]

Once I got the service running on each I checked the UI to confirm all have been joined...

Joined Servers

I did notice when checking the clients and their driver status that I must have missed the Docker engine on one of them. I'll jump back in and get that cleaned up.

missing driver

Well that is it for the night. It is getting late and HashiConf starts in two days :)

Cheers,
lykins


This content originally appeared on DEV Community and was authored by lykins


Print Share Comment Cite Upload Translate Updates
APA

lykins | Sciencx (2024-10-13T03:25:36+00:00) Setting up the Nomad Cluster. Retrieved from https://www.scien.cx/2024/10/13/setting-up-the-nomad-cluster/

MLA
" » Setting up the Nomad Cluster." lykins | Sciencx - Sunday October 13, 2024, https://www.scien.cx/2024/10/13/setting-up-the-nomad-cluster/
HARVARD
lykins | Sciencx Sunday October 13, 2024 » Setting up the Nomad Cluster., viewed ,<https://www.scien.cx/2024/10/13/setting-up-the-nomad-cluster/>
VANCOUVER
lykins | Sciencx - » Setting up the Nomad Cluster. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/10/13/setting-up-the-nomad-cluster/
CHICAGO
" » Setting up the Nomad Cluster." lykins | Sciencx - Accessed . https://www.scien.cx/2024/10/13/setting-up-the-nomad-cluster/
IEEE
" » Setting up the Nomad Cluster." lykins | Sciencx [Online]. Available: https://www.scien.cx/2024/10/13/setting-up-the-nomad-cluster/. [Accessed: ]
rf:citation
» Setting up the Nomad Cluster | lykins | Sciencx | https://www.scien.cx/2024/10/13/setting-up-the-nomad-cluster/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.