HashiCorp Cloud Platform (HCP) Consul enables you to quickly deploy Consul servers in AWS. As a fully managed service, it allows you to leverage Consul for service discovery or service mesh features while offloading the operational burden to the Site Reliability Engineering (SRE) experts at HashiCorp.
In this tutorial, you will deploy HCP Consul in a development environment. With the HCP portal guided quickstart, you will set up a HashiCorp Virtual Network (HVN) and HCP Consul with all the defaults. This will enable you quickly get hands-on with Consul, including accessing the UI with a public IP.
You will need an HCP account. Previous experience with Consul is not required to get hands-on with a development deployment.
»Deploy HCP Consul
To get started, use the Guided quickstart on the Overview page in the HCP portal. Note, if you have an existing HCP Consul or HVN the Guided quickstart will not appear.
After selecting Guided quickstart, you will have several configuration options for your deployment. For this tutorial, you can select any region, but will need to deploy HCP Consul with a publicly accessible IP. This will allow you to quickly access the Consul UI and API.
Select Deploy setup to begin the deployment.
While HCP Consul initializes, you will be directed to the Consul resource page. Note, this process can take up to 10 minutes.
Once you see that the deployment is listed as stable, HCP Consul is fully deployed.
The public configuration quickstart is only for development, but it is the quickest way to get hands on experience with HCP Consul. The quickstart deploys the HVN with the default CIDR block values and the Consul datacenter with all the defaults.
»Access the Consul UI
Once HCP Consul is deployed, you can access the Consul UI by clicking Public from the list of Cluster URLs on the HCP Consul cluster overview page. This will copy the public IP address to your clipboard. You can now paste this IP address into your browser to access the Consul UI.
Since HCP Consul is secure by default, you will need an ACL token to view any data in the UI. Generate a token that you can be used to log into the UI. Select the Generate token button on the Consul resource page, then copy the token from the pop-up.
Paste the token into the UI, by selecting the login option in the top right corner.
You can now interact with your HCP Consul servers. The Consul UI enables you to view nodes and services, manage data in the key value store, and manage service mesh authorization for service-to-service communication with intentions.
»HCP Consul deployment workflow
The HCP portal quickstart deploys your HCP Consul servers and required networking components. The quickstart uses the same deployment workflow as you would use on your own.
- Create an HVN. Before you can deploy HCP Consul, you will need to set up an HVN, HCP Consul must be deployed into an HVN.
- Deploy HCP Consul. The HCP Consul servers are fully managed by HashiCorp.
After completing the quickstart, you will need to deploy Consul clients and peer networks to continue testing Consul service discovery and service mesh features.
If you'd like to keep learning about Consul's features, and for step-by-step examples of how to perform common Consul tasks, complete one of the Get Started with Consul tutorials.
- Register a Service with Consul Service Discovery
- Secure Applications with Service Sidecar Proxies
- Explore the Consul UI
If you encounter any issues, please contact the HCP team at support.hashicorp.com.