915e73d91819f5b64b4cfb8b14f1c26fa6814714
[joid.git] / ci / config_tpl / juju2 / bundle_tpl / ceph.yaml
1 {% if opnfv.storage_dict.ceph is defined %}
2     ceph-mon:
3       charm: "./{{ ubuntu.release }}/ceph-mon"
4       num_units: {{ unit_ceph_qty() }}
5 {% if os.service.bindings %}
6       bindings:
7 {% if opnfv.spaces_dict.public is defined %}
8         public: internal-api
9 {% else %}
10         public: internal-api
11 {% endif %}
12 {% if opnfv.spaces_dict.storage is defined %}
13         cluster: cluster-stor
14 {% else %}
15         cluster: internal-api
16 {% endif %}
17 {% endif %}
18       options:
19         monitor-count: {{ unit_ceph_qty() }}
20         fsid: ecbb8960-0e21-11e2-b495-83a88f44db01
21         monitor-secret: AQD1P2xQiKglDhAA4NGUF5j38Mhq56qwz+45wg==
22 {% if ubuntu.release == 'trusty' and os.release < 'newton' %}
23         source: "cloud:{{ ubuntu.release }}-updates/{{ os.release }}"
24 {% elif ubuntu.release == 'xenial' and os.release >= 'newton' %}
25         source: "cloud:{{ ubuntu.release }}-updates/{{ os.release }}"
26 {% endif %}
27 {% if os.network.ipv6 %}
28         prefer-ipv6: {{ os.network.ipv6 }}
29 {% endif %}
30       to:
31 {% if os.hyperconverged %}
32 {% for unit_id in to_select(unit_ceph_qty()) %}
33         - "lxd:nodes/{{ unit_id }}"
34 {% endfor %}
35 {% else %}
36 {% if os.ha.mode == 'ha' %}
37 {% for unit_id in range(0, 3) %}
38         - "lxd:nodes/{{ unit_id }}"
39 {% endfor %}
40 {% else %}
41         - "lxd:nodes/0"
42         - "lxd:nodes/0"
43         - "lxd:nodes/0"
44 {% endif %}
45 {% endif %}
46     ceph-osd:
47       charm: "./{{ ubuntu.release }}/ceph-osd"
48 {% if os.hyperconverged %}
49 {% if opnfv.units >= 3 %}
50       num_units: {{ unit_ceph_qty() }}
51 {% else %}
52       num_units: {{ opnfv.units }}
53 {% endif %}
54 {% else %}
55       num_units: 3
56 {% endif %}
57 {% if os.service.bindings %}
58       bindings:
59 {% if opnfv.spaces_dict.public is defined %}
60         public: internal-api
61 {% else %}
62         public: internal-api
63 {% endif %}
64 {% if opnfv.spaces_dict.storage is defined %}
65         cluster: cluster-stor
66 {% else %}
67         cluster: internal-api
68 {% endif %}
69 {% endif %}
70       options:
71         osd-devices: {{ opnfv.storage_dict.ceph.disk }}
72         osd-reformat: 'yes'
73 {% if ubuntu.release == 'trusty' and os.release < 'newton' %}
74         source: "cloud:{{ ubuntu.release }}-updates/{{ os.release }}"
75 {% elif ubuntu.release == 'xenial' and os.release >= 'newton' %}
76         source: "cloud:{{ ubuntu.release }}-updates/{{ os.release }}"
77 {% endif %}
78 {% if os.network.ipv6 %}
79         prefer-ipv6: {{ os.network.ipv6 }}
80 {% endif %}
81       to:
82 {% if os.hyperconverged %}
83 {% if opnfv.units >= 3 %}
84 {% for unit_id in range(0, 3) %}
85         - "nodes/{{ unit_id }}"
86 {% endfor %}
87 {% else %}
88  {% for unit_id in range(0, opnfv.units) %}
89          - "nodes/{{ unit_id }}"
90  {% endfor %}
91 {% endif %}
92 {% else %}
93 {% if os.ha.mode == 'ha' %}
94 {% for unit_id in range(0, 3) %}
95         - "nodes/{{ unit_id }}"
96 {% endfor %}
97 {% else %}
98         - "nodes/0"
99         - "nodes-compute/0"
100         - "nodes-compute/1"
101 {% endif %}
102 {% endif %}
103     ceph-radosgw:
104       charm: "./{{ ubuntu.release }}/ceph-radosgw"
105       num_units: {{ unit_qty() if os.beta.hacluster_ceph_radosgw else 1 }}
106 {% if os.service.bindings %}
107       bindings:
108         internal: internal-api
109 {% if opnfv.spaces_dict.data is defined %}
110         admin: admin-api
111 {% else %}
112         admin: internal-api
113 {% endif %}
114 {% if opnfv.spaces_dict.public is defined %}
115         public: public-api
116 {% else %}
117         public: internal-api
118 {% endif %}
119 {% endif %}
120       options:
121         region: {{ os.region }}
122         operator-roles: "Member,admin"
123 {% if ubuntu.release == 'trusty' and os.release < 'newton' %}
124         source: "cloud:{{ ubuntu.release }}-updates/{{ os.release }}"
125 {% elif ubuntu.release == 'xenial' and os.release >= 'newton' %}
126         source: "cloud:{{ ubuntu.release }}-updates/{{ os.release }}"
127 {% endif %}
128 {% if os.network.ipv6 %}
129         prefer-ipv6: {{ os.network.ipv6 }}
130 {% endif %}
131 {% if opnfv.storage_dict.ceph is defined %}
132         ceph-osd-replication-count: {{ unit_ceph_qty() }}
133 {% endif %}
134       to:
135 {% for unit_id in to_select(unit_qty() if os.beta.hacluster_ceph_radosgw else 1) %}
136         - "lxd:nodes/{{ unit_id }}"
137 {% endfor %}
138 {% endif %}