Skip to content

Commit

Permalink
Updates for versions and configurable bind_address to fix ansible-col…
Browse files Browse the repository at this point in the history
…lections#1.

- Updated to Consul 0.6.4
- Make bind_address configurable for ansible-collections#1
- Cleaned up deprecaed bare variables
- Updated supporting software versions
- Updated documentation
  • Loading branch information
brianshumate committed Jun 8, 2016
1 parent 8fd228f commit 2184489
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_Store
.vagrant
.tm_properties
*.retry
examples/hosts
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,11 @@
- Made cluster bootable and switch to become_user + other Ansibel best
practices (thanks @Rodjers)
- Updated minimum Ansible version required in meta

## v1.0.6

- Updated to Consul 0.6.4
- Make bind_address configurable for #1
- Cleaned up deprecaed bare variables
- Updated supporting software versions
- Updated documentation
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ version.

## Requirements

This role requires a Debian or RHEL family of Linux host; the role is tested
This role requires a Debian or RHEL family of Linux host; the role is tested
with the following specific software versions:

* Ansible: 1.9.2
* Consul: 0.5.2
* Ansible: 2.1.0.0
* Consul: 0.6.4
* Debian: 8

## Role Variables
Expand All @@ -23,8 +23,8 @@ The role specifies variables in `defaults/main.yml` and `vars/*.yml`.

| Name | Default Value | Description |
| -------------- | ------------- | -----------------------------------|
| `consul_version` | `0.5.2` | Consul version to install |
| `consul_zip_url` | `https://dl.bintray.com/mitchellh/consul/{{ consul_version }}_linux_amd64.zip` | Consul download URL |
| `consul_version` | `0.6.4` | Consul version to install |
| `consul_zip_url` | `https://releases.hashicorp.com/consul/{{ consul_version }}/consul_{{ consul_version }}_linux_amd64.zip` | Consul download URL |
| `consul_zip_sha256` | SHA256 SUM | Consul download SHA256 summary |
| `consul_bin_path` | `/usr/local/bin` | Consul binary installation path |
| `consul_config_path` | `/etc/consul.d` | Consul configuration file path |
Expand All @@ -36,10 +36,11 @@ The role specifies variables in `defaults/main.yml` and `vars/*.yml`.
| `consul_domain` | `local` | Consul domain name |
| `consul_log_level` | `INFO` | Consul logging level |
| `consul_syslog_enable` | true | Consul logs to syslog |
| `consul_ui_url` | `https://dl.bintray.com/mitchellh/consul/0.5.2_web_ui.zip` | Consul UI download URL |
| `consul_ui_url` | `https://dl.bintray.com/mitchellh/consul/0.5.2_web_ui.zip` | Consul UI download URL |
| `consul_ui_pkg` | `0.5.2_web_ui.zip` | Conul UI package file name |
| `consul_ui_sha256` | SHA256 SUM | Consul UI download SHA256 summary |
| `consul_iface` | `eth1` | Consul network interface |
| `consul_bind_address` | dynamic from hosts inventory | The interface address to bind to

### OS Distribution Variables

Expand Down Expand Up @@ -74,7 +75,7 @@ None


After you have reviewed and altered any necessary variables, and created a
hosts inventory, basic Consul installation is possible using the
hosts inventory, basic Consul installation is possible using the
included `site.yml` playbook:

```
Expand Down
7 changes: 4 additions & 3 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
# File: defaults/main.yml - Main default variables for Consul

consul_version: "0.6.3"
consul_version: "0.6.4"
consul_zip_url: "https://releases.hashicorp.com/consul/{{ consul_version }}/consul_{{ consul_version }}_linux_amd64.zip"
consul_zip_sha256: "b0532c61fec4a4f6d130c893fd8954ec007a6ad93effbe283a39224ed237e250"
consul_zip_sha256: "abdf0e1856292468e2c9971420d73b805e93888e006c76324ae39416edcf0627"
consul_bin_path: "/usr/local/bin"
consul_config_path: "/etc/consul.d"
consul_data_path: "/var/consul"
Expand All @@ -16,5 +16,6 @@ consul_log_level: "INFO"
consul_syslog_enable: "true"
consul_ui_url: "https://releases.hashicorp.com/consul/{{ consul_version }}/consul_{{ consul_version }}_web_ui.zip"
consul_ui_pkg: "{{ consul_version }}_web_ui.zip"
consul_ui_sha256: "93bbb300cacfe8de90fb3bd5ede7d37ae6ce014898edc520b9c96a676b2bbb72"
consul_ui_sha256: "5f8841b51e0e3e2eb1f1dc66a47310ae42b0448e77df14c83bb49e0e0d5fa4b7"
consul_iface: "eth1"
consul_bind_address: "{{ hostvars[inventory_hostname]['ansible_eth1']['ipv4']['address'] }}"
22 changes: 11 additions & 11 deletions examples/README_VAGRANT.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Consul with Ansible

This project provides documentation and a collection of scripts to help you
automate the deployment of Consul using
[Ansible](http://www.ansibleworks.com/). These are the instructions for
automate the deployment of Consul using
[Ansible](http://www.ansibleworks.com/). These are the instructions for
deploying a development cluster on Vagrant and VirtualBox.

The documentation and scripts are merely a starting point designed to both
Expand All @@ -13,7 +13,7 @@ them with additional features specific to your needs later.
## Vagrant Development Cluster

In some situations deploying a small cluster on your local development
machine can be handy. This document describes such a scenario using the
machine can be handy. This document describes such a scenario using the
following technologies:

* [Consul](https://consul.io)
Expand All @@ -22,9 +22,9 @@ following technologies:
supporting plugin
* [Ansible](http://www.ansibleworks.com/)

Each of the virtual machines for this guide are configured with
1.5GB RAM, 2 CPU cores, and 2 network interfaces. The first interface uses
NAT and has connection via the host to the outside world. The second
Each of the virtual machines for this guide are configured with
1.5GB RAM, 2 CPU cores, and 2 network interfaces. The first interface uses
NAT and has connection via the host to the outside world. The second
interface is a private network and is used for Consul intra-cluster
communication in addition to access from the host machine.

Expand Down Expand Up @@ -83,11 +83,11 @@ BOX_NAME="chef/centos-7.0" vagrant up
## Notes

0. This project functions with the following software versions:
* Consul version 0.5.2
* Ansible version 1.9.2
* VirtualBox version 4.3.28
* Vagrant version 1.7.2
* Vagrant Hosts version 2.4.0
* Consul version 0.6.4
* Ansible version 2.1.0.0
* VirtualBox version 5.0.20
* Vagrant version 1.8.1
* Vagrant Hosts version 2.8.0
1. This project uses Debian Jessie by default, but you can choose other OS
with the *BOX_NAME* environment variable
2. The `bin/preinstall` shell script performs the following actions for you:
Expand Down
2 changes: 1 addition & 1 deletion tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

- name: OS Packages
apt: "name={{ item }} state=present update_cache=yes"
with_items: consul_debian_os_packages
with_items: "{{ consul_debian_os_packages }}"
tags: installation

- name: Download Consul
Expand Down
2 changes: 1 addition & 1 deletion templates/bootstrap_config.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{
"advertise_addr": "{{ hostvars[inventory_hostname]['ansible_eth1']['ipv4']['address'] }}",
"bind_addr": "{{ hostvars[inventory_hostname]['ansible_eth1']['ipv4']['address'] }}",
"bind_addr": "{{ consul_bind_address }}",
"bootstrap": true,
"server": true,
"client_addr": "0.0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion templates/client_config.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{
"advertise_addr": "{{ hostvars[inventory_hostname]['ansible_eth1']['ipv4']['address'] }}",
"bind_addr": "{{ hostvars[inventory_hostname]['ansible_eth1']['ipv4']['address'] }}",
"bind_addr": "{{ consul_bind_address }}",
"bootstrap": false,
"server": false,
"client_addr": "0.0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion templates/server_config.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{
"advertise_addr": "{{ hostvars[inventory_hostname]['ansible_eth1']['ipv4']['address'] }}",
"bind_addr": "{{ hostvars[inventory_hostname]['ansible_eth1']['ipv4']['address'] }}",
"bind_addr": "{{ consul_bind_address }}",
"bootstrap": false,
"server": true,
"client_addr": "0.0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.0.5
v1.0.6

0 comments on commit 2184489

Please sign in to comment.