Introduction
This article covers the steps of updating your Nomad Enterprise license; these steps are intended for servers where license files are stored locally, and the nomad configuration references the local file. As a Nomad Enterprise license approaches its expiration time, Nomad servers will periodically log a warning message about the approaching expiration.
Expected Outcome
Once you have successfully updated your license, Nomad will no longer log warnings of an approaching expiration.
Prerequisites (if applicable)
- A Nomad Enterprise cluster with a license that will soon expire.
- A new Nomad license, provided by Hashicorp.
- Access (ssh) to your Nomad servers.
Use Case
Nomad has been begun logging warning messages, similar to those noted below.
2023-03-29T15:02:28.100-0400 [WARN] nomad.licensing: license expiring: time_left=5m0s
2023-03-29T15:03:28.103-0400 [WARN] nomad.licensing: license expiring: time_left=4m0s
2023-03-29T15:04:28.106-0400 [WARN] nomad.licensing: license expiring: time_left=3m0s
2023-03-29T15:05:28.109-0400 [WARN] nomad.licensing: license expiring: time_left=2m0s
2023-03-29T15:06:28.112-0400 [WARN] nomad.licensing: license expiring: time_left=1m0s
Procedure
It is recommended that the license update of the cluster leader is performed last.
On each nomad server:
- Run `nomad license get` and save the output for reference once the new license has been applied.
-
Backup the current license file before continuing.
-
Edit the local license file and replace it's content with the content of your new license.
-
Reload the server agent configuration by sending a SIGHUP signal to the nomad agent process.
- Verify that the new license has been applied (reference the output of step 2 for verification).
Determine the Cluster Leader
root@nomad-server-1:/opt/nomad# nomad server members
Name Address Port Status Leader Protocol Build Datacenter Region
nomad-server-1.global 192.168.56.21 4648 alive true 2 1.2.6+ent dc1 global
nomad-server-2.global 192.168.56.22 4648 alive false 2 1.2.6+ent dc1 global
nomad-server-3.global 192.168.56.23 4648 alive false 2 1.2.6+ent dc1 global
Save the Current License Information
root@nomad-server-3:/opt/nomad# nomad license get
Product = nomad
License Status = valid
License ID = XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Customer ID = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Issued At = 2022-05-23 19:28:53.439594792 +0000 UTC
Expires At = 2023-05-23 23:59:59.999 +0000 UTC
Datacenter = *
Modules:
multicluster-and-efficiency
governance-policy
Licensed Features:
Automated Upgrades
Enhanced Read Scalability
Redundancy Zones
Namespaces
Resource Quotas
Audit Logging
Sentinel Policies
Multiregion Deployments
Automated Backups
Multi-Vault Namespaces
Dynamic Application Sizing
Backup the Current License File
root@nomad-server-3:/opt/nomad# cp nomad.hclic nomad.hclic.bak
Replace the Content of the License File
root@nomad-server-3:/opt/nomad# vim nomad.hclic
<UPDATE LICENSE WITH THE CONTENT OF YOUR NEW LICENSE>
Reload the Server Agent Configuration
root@nomad-server-3:/opt/nomad# ps -ef | grep nomad
nomad 22392 1 1 18:59 ? 00:00:16 /usr/bin/nomad agent -config /etc/nomad.d
root 23336 23300 0 19:18 pts/0 00:00:00 grep --color=auto nomad
root@nomad-server-3:/opt/nomad# kill -1 22392
Verify the New License Has Been Applied
root@nomad-server-3:/opt/nomad# nomad license get
Product = nomad
License Status = valid
License ID = YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY
Customer ID = yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
Issued At = 2023-04-19 18:04:56.374993341 +0000 UTC
Expires At = 2024-04-19 00:00:00 +0000 UTC
Datacenter = *
Modules:
multicluster-and-efficiency
governance-policy
Licensed Features:
Automated Upgrades
Enhanced Read Scalability
Redundancy Zones
Namespaces
Resource Quotas
Audit Logging
Sentinel Policies
Multiregion Deployments
Automated Backups
Multi-Vault Namespaces
Dynamic Application Sizing