Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ansible_3par_docker_plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ These playbooks perform the following tasks on the Master/Worker nodes as define
| ```etcd_client_port_1``` | Yes | 23790 |
| ```etcd_client_port_2``` | Yes | 40010 |

- The Etcd data directory for backup and restore can be modified in [etcd cluster properties](/ansible_3par_docker_plugin/properties/etcd_cluster_properties.yml)
e.g. etcd_data_directory=/var/lib/etcd

> **Note:** Please ensure that the ports specified above are unoccupied before installation. If the ports are not available on a particular node, etcd installation will fail.

> **Limitation:** The installer, in the current state does not have the capability to add or remove nodes in the etcd cluster. In case an etcd node is not responding or goes down, it is beyond the current scope to admit it back into the cluster. Please follow the [etcd documentation](https://coreos.com/etcd/docs/latest/etcd-live-cluster-reconfiguration.html) to do so manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@
- "{{ etcd_peer_port }}:{{ etcd_peer_port }}"
- "{{ etcd_client_port_1 }}:{{ etcd_client_port_1 }}"
- "{{ etcd_client_port_2 }}:{{ etcd_client_port_2 }}"
volumes:
- "{{etcd_data_dir}}:/etcd-data"
env:
ETCD_NAME: etcd0
ETCD_ADVERTISE_CLIENT_URLS: "{{ etcd_advertise_client_url_1 }},{{ etcd_advertise_client_url_2 }}"
Expand All @@ -130,6 +132,7 @@
ETCD_LISTEN_PEER_URLS: "{{ etcd_listen_peer_urls }}"
ETCD_INITIAL_CLUSTER: "etcd0=http://{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}:{{ etcd_peer_port }}"
ETCD_INITIAL_CLUSTER_TOKEN: "{{ etcd_initial_cluster_token }}"
ETCD_DATA_DIR: /etcd-data
ETCD_INITIAL_CLUSTER_STATE: "{{ etcd_initial_cluster_state }}"
restart_policy: always
become: yes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ etcd_client_port_1: 23790
etcd_client_port_2: 40010
etcd_url_scheme: http
etcd_peer_port: 23800
etcd_data_directory: /var/lib/etcd

etcd_name: "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}"
etcd_advertise_client_url_1: "{{ etcd_url_scheme }}://{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}:{{ etcd_client_port_1 }}"
Expand All @@ -29,4 +30,5 @@ etcd_listen_client_url_2: "{{ etcd_url_scheme }}://0.0.0.0:{{ etcd_client_port_2
etcd_initial_advertise_peer_urls: "{{ etcd_url_scheme }}://{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}:{{ etcd_peer_port }}"
etcd_listen_peer_urls: "{{ etcd_url_scheme }}://0.0.0.0:{{ etcd_peer_port }}"
etcd_initial_cluster_token: etcd-cluster-1
etcd_data_dir: "{{etcd_data_directory}}"
etcd_initial_cluster_state: "new"
3 changes: 3 additions & 0 deletions ansible_3par_docker_plugin/tasks/create_etcd_container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
- "{{ etcd_peer_port }}:{{ etcd_peer_port }}"
- "{{ etcd_client_port_1 }}:{{ etcd_client_port_1 }}"
- "{{ etcd_client_port_2 }}:{{ etcd_client_port_2 }}"
volumes:
- "{{etcd_data_dir}}:/etcd-data"
env:
ETCD_NAME: "{{ etcd_name }}"
ETCD_ADVERTISE_CLIENT_URLS: "{{ etcd_advertise_client_url_1 }},{{ etcd_advertise_client_url_2 }}"
Expand All @@ -30,5 +32,6 @@
ETCD_LISTEN_PEER_URLS: "{{ etcd_listen_peer_urls }}"
ETCD_INITIAL_CLUSTER: "{{ etcd_initial_cluster[1:] }}"
ETCD_INITIAL_CLUSTER_TOKEN: "{{ etcd_initial_cluster_token }}"
ETCD_DATA_DIR: /etcd-data
ETCD_INITIAL_CLUSTER_STATE: "{{ etcd_initial_cluster_state }}"
restart_policy: always