2015-04-07 10:49:28 +00:00
|
|
|
#+AUTHOR: parasitid@yahoo.fr
|
|
|
|
#+TITLE: Terraforming consul on Openstack
|
|
|
|
|
|
|
|
* 1. Pre-requisites
|
2017-01-27 17:19:47 +00:00
|
|
|
- Populate all variables in your terraform.tfvars
|
2015-04-07 10:49:28 +00:00
|
|
|
#+BEGIN_SRC terraform
|
|
|
|
username = "..."
|
|
|
|
password = "..."
|
|
|
|
tenant_name = "..."
|
|
|
|
auth_url = "https://myopenstackprovider.com/identity/v2.0"
|
|
|
|
public_key = "ssh-rsa AAAAB..."
|
|
|
|
key_file_path = "..."
|
|
|
|
#+END_SRC
|
|
|
|
- Change regions, networks, flavor and image ids in the variables.tf
|
|
|
|
according to your openstack settings
|
|
|
|
- Use an "upstart" compatible image for your consul nodes
|
|
|
|
|
2017-01-27 17:19:47 +00:00
|
|
|
* 2. Test it
|
2015-04-07 10:49:28 +00:00
|
|
|
|
|
|
|
: terraform apply
|
|
|
|
|
|
|
|
* 3. Terraform as a module
|
|
|
|
|
|
|
|
You should now be able to use openstack as a provider for the consul module.
|
|
|
|
#+BEGIN_SRC terraform
|
|
|
|
module "consul" {
|
|
|
|
source = "github.com/hashicorp/consul/terraform/openstack"
|
|
|
|
servers = 3
|
|
|
|
}
|
|
|
|
#+END_SRC
|