'recipe[etcd-grid::docker-compose]',
)
+host_ip = '192.168.1.123'
+
#env_run_lists()
#default_attributes()
'cluster' => {
'size' => 3, # recommended: 3, 5, 7
},
+ 'docker-compose' => {
+ 'config' => {
+ 'services' => {
+ 'etcd1' => {
+ 'ports' => [
+ "#{host_ip}:23791:2379",
+ "#{host_ip}:23801:2380",
+ ],
+ },
+ 'etcd2' => {
+ 'ports' => [
+ "#{host_ip}:23792:2379",
+ "#{host_ip}:23802:2380",
+ ],
+ },
+ 'etcd3' => {
+ 'ports' => [
+ "#{host_ip}:23793:2379",
+ "#{host_ip}:23803:2380",
+ ],
+ },
+ # for TEST
+ 'client' => {
+ 'image' => 'quay.io/coreos/etcd:v3.1',
+ 'restart' => 'none',
+ 'entrypoint' => '/bin/sh -c "while true; echo dummy; do sleep 600; done"',
+ 'environment' => {
+ 'ETCDCTL_API' => '3',
+ 'ETCDCTL_ENDPOINTS' => 'http://etcd1:2379,http://etcd2:2379,http://etcd3:2379',
+ },
+ },
+ },
+ },
+ },
},
)
```