Sergio Slobodrian | 8725ea8 | 2017-08-27 23:47:41 -0400 | [diff] [blame] | 1 | - name: The glusterfs registry volume is created |
Sergio Slobodrian | 523ee78 | 2017-08-22 16:44:21 -0400 | [diff] [blame] | 2 | gluster_volume: |
Sergio Slobodrian | 8725ea8 | 2017-08-27 23:47:41 -0400 | [diff] [blame] | 3 | bricks: "{{ barrier_fs_dir }}/reg_brick1" |
Sergio Slobodrian | 523ee78 | 2017-08-22 16:44:21 -0400 | [diff] [blame] | 4 | force: true |
| 5 | cluster: "{{groups.cluster | join(\",\")}}" |
| 6 | replicas: 3 |
| 7 | name: registry_volume |
| 8 | state: present |
| 9 | run_once: true |
| 10 | |
Sergio Slobodrian | 8725ea8 | 2017-08-27 23:47:41 -0400 | [diff] [blame] | 11 | - name: The glusterfs logging volume is created |
Sergio Slobodrian | 523ee78 | 2017-08-22 16:44:21 -0400 | [diff] [blame] | 12 | gluster_volume: |
Sergio Slobodrian | 8725ea8 | 2017-08-27 23:47:41 -0400 | [diff] [blame] | 13 | bricks: "{{ barrier_fs_dir }}/log_brick1" |
| 14 | force: true |
| 15 | cluster: "{{groups.cluster | join(\",\")}}" |
| 16 | disperses: 3 |
| 17 | name: logging_volume |
| 18 | state: present |
| 19 | run_once: true |
| 20 | |
| 21 | - name: Start the gluster volumes |
| 22 | gluster_volume: |
| 23 | name: "{{ item }}" |
Sergio Slobodrian | 523ee78 | 2017-08-22 16:44:21 -0400 | [diff] [blame] | 24 | state: started |
Sergio Slobodrian | 8725ea8 | 2017-08-27 23:47:41 -0400 | [diff] [blame] | 25 | with_items: |
| 26 | - registry_volume |
| 27 | - logging_volume |
| 28 | |
Stephane Barbarie | 2cbffca | 2018-03-26 16:20:03 -0400 | [diff] [blame] | 29 | - name: The replicated registry filesystem is mounted |
| 30 | mount: |
| 31 | path: "{{ target_voltha_dir }}/registry_data" |
| 32 | src: "{{ inventory_hostname }}:/registry_volume" |
| 33 | fstype: glusterfs |
| 34 | opts: "defaults,_netdev,noauto,x-systemd.automount" |
| 35 | state: mounted |
| 36 | when: target == "cluster" |
| 37 | |
| 38 | - name: The replicated logging filesystem is mounted on boot |
| 39 | mount: |
| 40 | path: "/var/log/voltha" |
| 41 | src: "{{ inventory_hostname }}:/logging_volume" |
| 42 | fstype: glusterfs |
| 43 | opts: "defaults,_netdev,noauto,x-systemd.automount" |
| 44 | state: mounted |
| 45 | when: target == "cluster" |
| 46 | tags: [cluster_host] |