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