Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add feature for creating Geo-replication sessions
- Loading branch information
Showing
16 changed files
with
127 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
- hosts: georep_slave | ||
remote_user: root | ||
gather_facts: no | ||
|
||
tasks: | ||
- name: Copy the pem key to client | ||
copy: src={{ base_dir }}/{{ mastervolname }}_{{ slavevolname }}_common_secret.pem.pub | ||
dest=/var/lib/glusterd/geo-replication/{{ mastervolname }}_{{ slavevolname }}_common_secret.pem.pub mode=0600 | ||
|
||
- name: Setup mountbroker | ||
shell: "gluster-mountbroker setup /var/gluster-mountbroker {{ groupname }}" | ||
when: georepuser != "root" | ||
|
||
- name: Add volume and user to mountbroker service | ||
shell: "gluster-mountbroker add {{ slavevol }} {{ georepuser }}" | ||
when: georepuser != "root" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
- hosts: georep_slave | ||
remote_user: root | ||
gather_facts: no | ||
|
||
tasks: | ||
- name: Copy pem keys | ||
shell: "gluster system:: copy file /geo-replication/{{ mastervolname }}_{{ slavevolname }}_common_secret.pem.pub" | ||
|
||
- name: Add pem keys | ||
shell: "gluster system:: execute add_secret_pub {{ georepuser }} geo-replication/{{ mastervolname }}_{{ slavevolname }}_common_secret.pem.pub" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
- hosts: georep_slaves | ||
remote_user: root | ||
gather_facts: no | ||
|
||
tasks: | ||
- name: Restart glusterd on slave nodes | ||
service: name=glusterd state=restarted | ||
when: georepuser != "root" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
- hosts: georep_slaves | ||
remote_user: root | ||
gather_facts: no | ||
|
||
tasks: | ||
- name: Create a new group | ||
group: name="{{ groupname }}" state=present | ||
|
||
- name: Create a new user | ||
user: name="{{ georepuser }}" group="{{ groupname }}" generate_ssh_key=yes | ||
when: georepuser != "root" | ||
|
||
- name: Create the mountbroker-root directory | ||
file: path=/var/gluster-mountbroker state=directory mode=0711 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
- hosts: georep_master | ||
remote_user: root | ||
gather_facts: no | ||
|
||
tasks: | ||
- name: Generate a common pem pub file | ||
shell: "gluster system:: execute gsec_create" | ||
|
||
- name: Copy the generated public key to local | ||
fetch: src=/var/lib/glusterd/geo-replication/common_secret.pem.pub | ||
dest={{ base_dir }}/{{ mastervolname }}_{{ slavevolname }}_common_secret.pem.pub | ||
flat=yes |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.