1b032ab81556b221f402d709afa067bcbff1866a
[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         "": *oam-space
8         public: *ceph-public-space
9         cluster: *ceph-cluster-space
10 {% endif %}
11       options:
12         monitor-count: {{ unit_ceph_qty() }}
13         fsid: ecbb8960-0e21-11e2-b495-83a88f44db01
14         monitor-secret: AQD1P2xQiKglDhAA4NGUF5j38Mhq56qwz+45wg==
15         source: *openstack-origin
16 {% if os.network.ipv6 %}
17         prefer-ipv6: {{ os.network.ipv6 }}
18 {% endif %}
19       to:
20 {% if os.hyperconverged %}
21 {% for unit_id in to_select(unit_ceph_qty()) %}
22         - "lxd:nodes/{{ unit_id }}"
23 {% endfor %}
24 {% else %}
25 {% if os.ha.mode == 'ha' %}
26 {% for unit_id in range(0, 3) %}
27         - "lxd:nodes/{{ unit_id }}"
28 {% endfor %}
29 {% else %}
30         - "lxd:nodes/0"
31         - "lxd:nodes/0"
32         - "lxd:nodes/0"
33 {% endif %}
34 {% endif %}
35     ceph-osd:
36       charm: "./{{ ubuntu.release }}/ceph-osd"
37 {% if os.hyperconverged %}
38 {% if opnfv.units >= 3 %}
39       num_units: {{ unit_ceph_qty() }}
40 {% else %}
41       num_units: {{ opnfv.units }}
42 {% endif %}
43 {% else %}
44       num_units: 3
45 {% endif %}
46 {% if os.service.bindings %}
47       bindings:
48         "": *oam-space
49         public: *ceph-public-space
50         cluster: *ceph-cluster-space
51 {% endif %}
52       options:
53         osd-devices: *osd-devices
54         osd-journal: *osd-journal
55         osd-reformat: 'yes'
56         source: *openstack-origin
57 {% if os.network.ipv6 %}
58         prefer-ipv6: {{ os.network.ipv6 }}
59 {% endif %}
60       to:
61 {% if os.hyperconverged %}
62 {% if opnfv.units >= 3 %}
63 {% for unit_id in range(0, 3) %}
64         - "nodes/{{ unit_id }}"
65 {% endfor %}
66 {% else %}
67  {% for unit_id in range(0, opnfv.units) %}
68          - "nodes/{{ unit_id }}"
69  {% endfor %}
70 {% endif %}
71 {% else %}
72 {% if os.ha.mode == 'ha' %}
73 {% for unit_id in range(0, 3) %}
74         - "nodes/{{ unit_id }}"
75 {% endfor %}
76 {% else %}
77         - "nodes/0"
78         - "nodes-compute/0"
79         - "nodes-compute/1"
80 {% endif %}
81 {% endif %}
82     ceph-radosgw:
83       charm: "./{{ ubuntu.release }}/ceph-radosgw"
84       num_units: {{ unit_qty() if os.beta.hacluster_ceph_radosgw else 1 }}
85 {% if os.service.bindings %}
86       constraints: *ceph-access-constr
87       bindings:
88         "": *oam-space
89         public: *public-space
90         admin: *admin-space
91         internal: *internal-space
92         mon: *ceph-public-space
93 {% endif %}
94       options:
95         region: *openstack-region
96         operator-roles: "Member,admin,SwiftOperator"
97         source: *openstack-origin
98 {% if os.network.ipv6 %}
99         prefer-ipv6: {{ os.network.ipv6 }}
100 {% endif %}
101 {% if opnfv.storage_dict.ceph is defined %}
102         ceph-osd-replication-count: {{ unit_ceph_qty() }}
103 {% endif %}
104       to:
105 {% for unit_id in to_select(unit_qty() if os.beta.hacluster_ceph_radosgw else 1) %}
106         - "lxd:nodes/{{ unit_id }}"
107 {% endfor %}
108 {% endif %}