Skip to content

Instantly share code, notes, and snippets.

@nrvale0
Last active June 8, 2017 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nrvale0/f07247585f655e14182d61b7cb68b4ba to your computer and use it in GitHub Desktop.
Save nrvale0/f07247585f655e14182d61b7cb68b4ba to your computer and use it in GitHub Desktop.
Quickly setup Consul cluster
$myaddr = $facts['networking']['interfaces']['eth0']['ip']
notice("Configuring Consul to listen on ${myaddr}...")
file { '/var/hashicorp':
ensure => directory,
}
class { '::consul':
config_hash => {
bootstrap_expect => 4,
bind_addr => $myaddr,
log_level => 'INFO',
node_name => $::hostname,
server => true,
data_dir => '/var/hashicorp/consul',
ui_dir => '/var/hashicorp/consul/ui',
retry_join => [ '172.16.100.169', '54.149.223.140', '34.209.242.2', '54.200.58.222' ],
},
}
#!/bin/bash
set -eux
rpm -Uvh https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm
yum install -y puppet-agent
export PATH=/opt/puppetlabs/puppet/bin:$PATH
puppet service puppet ensure=stopped enable=false
puppet module install puppetlabs/stdlib
puppet module install KyleAnderson/consul
puppet module install lex/dnsmasq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment