Install a HashiCorp Enterprise License
Note
This guidance for enabling an enterprise license applies to both production and development environments.
To use a HashiCorp Enterprise product, you need a valid HashiCorp license. This tutorial will guide you on the steps to enable your enterprise license to start the server. By the end of this tutorial, you will have a server instance with enterprise features enabled. If you don't have a license, see the request a license section.
Tip
This tutorial is applicable to the following HashiCorp enterprise product versions or greater. Nomad v1.1.0, Consul v1.10.0, Vault v1.8.0, and Boundary v0.13.0.
Prerequisites
Each server needs to register the enterprise license as described below. In earlier versions of HashiCorp enterprise products, one server could distribute a license to other servers via the Raft protocol. This will no longer work since each server must be able to find a valid license during the startup process.
The tutorial below describes the most basic steps needed to register a license. You may need to design other steps to integrate this process into your build pipelines (such as building private disk images with Packer or using a configuration management system to distribute and install the enterprise binary and license file to your compute instances).
Install the enterprise binary
Install the enterprise binary before continuing with the tutorial. All HashiCorp binaries are in releases.hashicorp.com,
look for a binary that has +ent
in the suffix of the filename.
Review the installation tutorials for each HashiCorp product:
Request a trial license
Your customer support contact can generate a trial license for any HashiCorp enterprise product. If you are an existing HashiCorp enterprise customer, you may contact your organization's customer success manager (CSM) for information on how to get your organization's enterprise license.
Enable the license
You have three options for enabling an enterprise license.
- Provide the enterprise license as a string in an environment variable.
- Save the license string to a file and reference the path with an environment variable.
- Save the license string in a file and specify the path to the file in the server's configuration file.
Add an environment variable (optional)
You can set the enterprise license for Consul by using an environment variable.
Use the enterprise license you received in the previous step and set the environment variable CONSUL_LICENSE
to the license key value.
Read from a file (optional)
The enterprise license can be read from a file. If you add the enterprise license to a file, you have two options for how to point the server instance to the file location. The two options are an environment variable or a server instance configuration file.
Use the enterprise license key you received in the previous step and create a file that will hold the enterprise license.
You can use the echo
command to copy the content from your system's clipboard into a file.
Verify the content copied correctly to the specified file before you move onto the next step.
Note
You must provide an absolute path. You can use shell variables like $HOME
, but not relative paths like ~/
.
Validating the server
Start the Consul server instance.
If the server instance started successfully, then you will receive a message stating the Consul agent started.
Look for the lines Server: true
and Version: 1.10.0+ent
to verify that an enterprise server is running.
Error message
The server instance will notify you if the enterprise license key is not found. If you encounter the error message below or similar, please revisit the steps above.
Next steps
In this tutorial, you deployed a server instance for an enterprise HashiCorp product using a valid enterprise license key. You may now continue exploring other enterprise tutorials for Consul, Nomad, or Vault.