summaryrefslogtreecommitdiff
path: root/global/overlay/etc/puppet/modules/sunet/manifests/etcd_node.pp
blob: 3d17691381839bf23bab5f4f89a6225ebe036524 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
define sunet::etcd_node(
   $disco_url    =   undef,
   $etcd_version =   'v2.0.8'
) 
{
   file { ["/data","/data/${name}","/data/${name}/${::hostname}"]: ensure => 'directory' }
   sunet::docker_run { "etcd_${name}":
      image            => 'quay.io/coreos/etcd',
      imagetag         => $etcd_version,
      command          => "-initial-advertise-peer-urls http://${::ipaddress_eth1}:2380 -listen-peer-urls http://${::ipaddress_eth1}:2380 -discovery ${disco_url} -name ${::hostname} -data-dir /data/${name}/${::hostname}",
      ports            => ["${::ipaddress_eth1}:2380:2380"]
   }
}