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