Hashicorp at Home
This is the code to accompany the "Hashicorp At Home" series on our website.
How to use this repository
- Clone the repository onto the machine you'll use to deploy the software to the server
- Install Ansible
- Use Ansible Galaxy to install the following roles:
inventory/hostsand set the target IP Address to the ip address you are using for your server
plays/home_server.ymland set the following4
All variables ending in
_domainmust be set to the same value
This is the domain that you will use to look up services on your network. It defaults to
consul_recursors- The DNS servers you want to use for external lookups, we use the Google ones by default.
nomad_vault_address- Whilst we set this up, we won't have DNS running, so we need to hard-code the IP Address for the Vault server here.
ansible/roles/kibatic.traefik/templates/traefik.tomlwith the file at
custom_configuration_files/traefik.toml.j2in this repository
- Follow the instructions on the blog post to create a Vault token for Nomad
- Create two encrypted files using Ansible vault in the following locations (replacing the dummy values with the actual text):
datadog_api_key: "My DataDog API Key"
nomad_vault_token: "My Vault Nomad Token"
- Execute Ansible against the playbook in
Copyright and Licensing
All code in this repository remains the copyright of Mockingbird Consulting Ltd, however it is released to the community under the MIT License to allow adaptation and reuse.
If you find the code useful, please credit us in the project that you reuse it for.
Hashicorp, Vault, Consul, and Nomad are trademarks of Hashicorp Inc. and are used here to reference their product line only. This project has not been endorsed by Hashicorp, nor is there any implied support, endorsement, or liability on Hashicorp's part to anyone who uses this software.