4 This cookbook sets up a etcd cluster.
8 - [Requirements](#requirements)
9 - [platforms](#platforms)
10 - [packages](#packages)
11 - [Attributes](#attributes)
14 - [etcd-grid::default](#etcd-griddefault)
15 - [etcd-grid::docker-compose (for TESTING)](#etcd-griddocker-compose-for-testing)
16 - [Role Examples](#role-examples)
17 - [License and Authors](#license-and-authors)
32 |Key|Type|Description, example|Default|
34 |`['etcd-grid']['image']['url']`|String|etcd container image URL.|`'quay.io/coreos/etcd'`|
35 |`['etcd-grid']['image']['version']`|String|Container image version.|`'v3.1'`|
36 |`['etcd-grid']['cluster']['size']`|Integer|recommended: 3, 5, 7|`3`|
37 |`['etcd-grid']['node']['port4client']`|String|Port number for client requests.|`'2379'`|
38 |`['etcd-grid']['node']['port4peer']`|String|Port number for peer communication.|`'2380'`|
39 |`['etcd-grid']['docker-compose']['app_dir']`|String||`"#{node['docker-grid']['compose']['app_dir']}/etcd"`|
40 |`['etcd-grid']['docker-compose']['data_dir']`|String||`"#{node['etcd-grid']['docker-compose']['app_dir']}/data"`|
41 |`['etcd-grid']['docker-compose']['config']`|Hash|`docker-compose.yml` configurations.|See `attributes/default.rb`|
47 #### etcd-grid::default
49 This recipe does nothing.
51 #### etcd-grid::docker-compose (for TESTING)
53 This recipe generates a `docker-compose.yml` for the etcd cluster.
57 - `roles/etcd-on-docker.rb`
61 description 'etcd on Docker'
65 'recipe[etcd-grid::docker-compose]',
68 host_ip = '192.168.1.123'
77 'skip_setup' => false,
80 'skip_setup' => false,
85 'url' => 'quay.io/coreos/etcd',
89 'size' => 3, # recommended: 3, 5, 7
96 "#{host_ip}:23791:2379",
97 "#{host_ip}:23801:2380",
102 "#{host_ip}:23792:2379",
103 "#{host_ip}:23802:2380",
108 "#{host_ip}:23793:2379",
109 "#{host_ip}:23803:2380",
114 'image' => 'quay.io/coreos/etcd:v3.1',
116 'entrypoint' => '/bin/sh -c "while true; echo dummy; do sleep 600; done"',
118 'ETCDCTL_API' => '3',
119 'ETCDCTL_ENDPOINTS' => 'http://etcd1:2379,http://etcd2:2379,http://etcd3:2379',
129 ## License and Authors
131 - Author:: whitestar at osdn.jp
134 Copyright 2017, whitestar
136 Licensed under the Apache License, Version 2.0 (the "License");
137 you may not use this file except in compliance with the License.
138 You may obtain a copy of the License at
140 http://www.apache.org/licenses/LICENSE-2.0
142 Unless required by applicable law or agreed to in writing, software
143 distributed under the License is distributed on an "AS IS" BASIS,
144 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
145 See the License for the specific language governing permissions and
146 limitations under the License.