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