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