blob: 25938c4ab8675f143ba8f091943c69bf6ab572cc [file] [log] [blame]
Zack Williams41513bf2018-07-07 20:08:35 -07001# Copyright 2017-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
Sergio Slobodrian8725ea82017-08-27 23:47:41 -040014- name: The glusterfs registry volume is created
Sergio Slobodrian523ee782017-08-22 16:44:21 -040015 gluster_volume:
Sergio Slobodrian8725ea82017-08-27 23:47:41 -040016 bricks: "{{ barrier_fs_dir }}/reg_brick1"
Sergio Slobodrian523ee782017-08-22 16:44:21 -040017 force: true
18 cluster: "{{groups.cluster | join(\",\")}}"
19 replicas: 3
20 name: registry_volume
21 state: present
22 run_once: true
23
Sergio Slobodrian8725ea82017-08-27 23:47:41 -040024- name: The glusterfs logging volume is created
Sergio Slobodrian523ee782017-08-22 16:44:21 -040025 gluster_volume:
Sergio Slobodrian8725ea82017-08-27 23:47:41 -040026 bricks: "{{ barrier_fs_dir }}/log_brick1"
27 force: true
28 cluster: "{{groups.cluster | join(\",\")}}"
29 disperses: 3
30 name: logging_volume
31 state: present
32 run_once: true
33
34- name: Start the gluster volumes
35 gluster_volume:
36 name: "{{ item }}"
Sergio Slobodrian523ee782017-08-22 16:44:21 -040037 state: started
Sergio Slobodrian8725ea82017-08-27 23:47:41 -040038 with_items:
39 - registry_volume
40 - logging_volume
41
Stephane Barbarie2cbffca2018-03-26 16:20:03 -040042- name: The replicated registry filesystem is mounted
43 mount:
44 path: "{{ target_voltha_dir }}/registry_data"
45 src: "{{ inventory_hostname }}:/registry_volume"
46 fstype: glusterfs
47 opts: "defaults,_netdev,noauto,x-systemd.automount"
48 state: mounted
49 when: target == "cluster"
50
51- name: The replicated logging filesystem is mounted on boot
52 mount:
53 path: "/var/log/voltha"
54 src: "{{ inventory_hostname }}:/logging_volume"
55 fstype: glusterfs
56 opts: "defaults,_netdev,noauto,x-systemd.automount"
57 state: mounted
58 when: target == "cluster"
59 tags: [cluster_host]