cmodfiied to add juju 2.0 support.
[joid.git] / ci / config_tpl / juju2 / bundle_tpl / ceph.yaml
1 {% if opnfv.storage_dict.ceph is defined %}
2     ceph:
3       charm: "./{{ ubuntu.release }}/ceph"
4       num_units: {{ unit_ceph_qty() }}
5       options:
6         monitor-count: {{ unit_ceph_qty() }}
7         fsid: 5a791d94-980b-11e4-b6f6-3c970e8b1cf7
8         monitor-secret: AQAi5a9UeJXUExAA+By9u+GPhl8/XiUQ4nwI3A==
9 {% if os.network.ipv6 %}
10         prefer-ipv6: {{ os.network.ipv6 }}
11 {% endif %}
12 {% if opnfv.spaces_dict.storage is defined %}
13         #ceph-cluster-network: {{ opnfv.spaces_dict.storage.cidr }}
14 {% endif %}
15       to:
16 {% if os.hyperconverged %}
17 {% for unit_id in to_select(unit_ceph_qty()) %}
18         - "lxd:nodes/{{ unit_id }}"
19 {% endfor %}
20 {% else %}
21 {% if os.ha.mode == 'ha' %}
22 {% for unit_id in range(0, 3) %}
23         - "lxd:nodes/{{ unit_id }}"
24 {% endfor %}
25 {% else %}
26         - "lxd:nodes/0"
27         - "lxd:nodes/0"
28         - "lxd:nodes/0"
29 {% endif %}
30 {% endif %}
31     ceph-osd:
32       charm: "./{{ ubuntu.release }}/ceph-osd"
33 {% if os.hyperconverged %}
34       num_units: {{ opnfv.units }}
35 {% else %}
36       num_units: 3
37 {% endif %}
38       options:
39         osd-devices: {{ opnfv.storage_dict.ceph.disk }}
40         osd-reformat: 'yes'
41 {% if os.network.ipv6 %}
42         prefer-ipv6: {{ os.network.ipv6 }}
43 {% endif %}
44       to:
45 {% if os.hyperconverged %}
46 {% for unit_id in range(0, opnfv.units) %}
47         - "nodes/{{ unit_id }}"
48 {% endfor %}
49 {% else %}
50 {% if os.ha.mode == 'ha' %}
51 {% for unit_id in range(0, 3) %}
52         - "nodes/{{ unit_id }}"
53 {% endfor %}
54 {% else %}
55         - "nodes/0"
56         - "nodes-compute/0"
57         - "nodes-compute/1"
58 {% endif %}
59 {% endif %}
60     ceph-radosgw:
61       charm: "./{{ ubuntu.release }}/ceph-radosgw"
62       num_units: {{ unit_qty() if os.beta.hacluster_ceph_radosgw else 1 }}
63       options:
64         region: {{ os.region }}
65         use-embedded-webserver: true
66         operator-roles: "Member,admin"
67 {% if os.network.ipv6 %}
68         prefer-ipv6: {{ os.network.ipv6 }}
69 {% endif %}
70 {% if opnfv.storage_dict.ceph is defined %}
71         ceph-osd-replication-count: {{ unit_ceph_qty() }}
72 {% endif %}
73       to:
74 {% for unit_id in to_select(unit_qty() if os.beta.hacluster_ceph_radosgw else 1) %}
75         - "lxd:nodes/{{ unit_id }}"
76 {% endfor %}
77 {% endif %}