diff options
author | Leif Johansson <leifj@sunet.se> | 2015-04-14 11:20:58 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2015-04-14 11:20:58 +0200 |
commit | 24a444d3baa763517e2c842fbdee0085ac0cec08 (patch) | |
tree | 7d1fe5876b9f0182bb404527a1a580d7054b8672 /global/overlay/etc | |
parent | ee32baf3d26202f3385366dcadb839e2478ae9e4 (diff) |
Diffstat (limited to 'global/overlay/etc')
-rw-r--r-- | global/overlay/etc/puppet/manifests/cosmos-site.pp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/global/overlay/etc/puppet/manifests/cosmos-site.pp b/global/overlay/etc/puppet/manifests/cosmos-site.pp index 3ab6744..9a21843 100644 --- a/global/overlay/etc/puppet/manifests/cosmos-site.pp +++ b/global/overlay/etc/puppet/manifests/cosmos-site.pp @@ -821,21 +821,17 @@ class fail2ban { } } -define etcd_node($peers_file=undef,$cluster_name="etcd") { - file { ["/data","/data/${cluster_name}","/data/${cluster_name}/${name}"]: ensure => 'directory' } +define etcd_node($disco_url=undef) { + file { ["/data","/data/${name}","/data/${name}/${::hostname}"]: ensure => 'directory' } sunet::docker_run { 'etcd_${name}': image => 'quay.io/coreos/etcd', - extra_parameters => ["-initial-advertise-peer-urls http://${::ipaddress_eth1}:8001", - "-listen-peer-urls http://${::ipaddress_eth1}:8001", - "-advertise-client-urls http://${::ipaddress_eth1}:5001", - "-listen-client-urls http://${::ipaddress_eth1}:5001", + version => 'v2.0.8', + extra_parameters => ["-initial-advertise-peer-urls http://${::ipaddress_eth1}:2380", + "-listen-peer-urls http://${::ipaddress_eth1}:2380", + "-discovery ${disco_url}", "-name ${::hostname}", - "-data-dir /data/${cluster_name}/${name}", - "-initial-cluster-token ${cluster_name}", - "-peers-file ${peers_file}"], - ports => ["8001:8001","5001:5001"] - - + "-data-dir /data/${name}/${::hostname}"] + ports => ["2380:2380"] } } @@ -858,6 +854,9 @@ class webappserver { } class webbackend { + etcd_node {'etcd': + disco_url => 'https://discovery.etcd.io/5344f39debed977d90dd72e3a7267bf8' + } class { 'webcommon': } } |