blob: a01d60bbe3e92106c73dd8598a0248e2f9edd47f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
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,
volumes => ["/data/${name}:/var/lib/etcd","/etc/ssl:/etc/ssl"],
command => "--initial-advertise-peer-urls http://0.0.0.0:2380 --listen-peer-urls http://0.0.0.0:2380 --discovery ${disco_url} --name ${::hostname} --key-file /etc/ssl/private/${::fqdn}_infra.key --peer-key-file /etc/ssl/private/${::fqdn}_infra.key --ca-file /etc/ssl/certs/infra.crt --peer-ca-file /etc/ssl/certs/infra.crt --cert-file /etc/ssl/certs/${::fqdn}_infra.crt --peer-cert-file /etc/ssl/certs/${::fqdn}_infra.crt",
ports => ["${::ipaddress_eth1}:2380:2380"]
}
}
|