modified the source for ceph.
[joid.git] / ci / config_tpl / juju2 / bundle_tpl / ceph.yaml
1 {% if opnfv.storage_dict.ceph is defined %}
2     ceph:
3       charm: "./{{ ubuntu.release }}/ceph"
4       num_units: {{ unit_ceph_qty() }}
5       options:
6         monitor-count: {{ unit_ceph_qty() }}
7         fsid: 5a791d94-980b-11e4-b6f6-3c970e8b1cf7
8         monitor-secret: AQAi5a9UeJXUExAA+By9u+GPhl8/XiUQ4nwI3A==
9         source: "cloud:{{ ubuntu.release }}/{{ os.release }}"
10 {% if os.network.ipv6 %}
11         prefer-ipv6: {{ os.network.ipv6 }}
12 {% endif %}
13 {% if opnfv.spaces_dict.storage is defined %}
14         #ceph-cluster-network: {{ opnfv.spaces_dict.storage.cidr }}
15 {% endif %}
16       to:
17 {% if os.hyperconverged %}
18 {% for unit_id in to_select(unit_ceph_qty()) %}
19         - "lxd:nodes/{{ unit_id }}"
20 {% endfor %}
21 {% else %}
22 {% if os.ha.mode == 'ha' %}
23 {% for unit_id in range(0, 3) %}
24         - "lxd:nodes/{{ unit_id }}"
25 {% endfor %}
26 {% else %}
27         - "lxd:nodes/0"
28         - "lxd:nodes/0"
29         - "lxd:nodes/0"
30 {% endif %}
31 {% endif %}
32     ceph-osd:
33       charm: "./{{ ubuntu.release }}/ceph-osd"
34 {% if os.hyperconverged %}
35       num_units: {{ opnfv.units }}
36 {% else %}
37       num_units: 3
38 {% endif %}
39       options:
40         osd-devices: {{ opnfv.storage_dict.ceph.disk }}
41         osd-reformat: 'yes'
42         source: "cloud:{{ ubuntu.release }}/{{ os.release }}"
43 {% if os.network.ipv6 %}
44         prefer-ipv6: {{ os.network.ipv6 }}
45 {% endif %}
46       to:
47 {% if os.hyperconverged %}
48 {% for unit_id in range(0, opnfv.units) %}
49         - "nodes/{{ unit_id }}"
50 {% endfor %}
51 {% else %}
52 {% if os.ha.mode == 'ha' %}
53 {% for unit_id in range(0, 3) %}
54         - "nodes/{{ unit_id }}"
55 {% endfor %}
56 {% else %}
57         - "nodes/0"
58         - "nodes-compute/0"
59         - "nodes-compute/1"
60 {% endif %}
61 {% endif %}
62     ceph-radosgw:
63       charm: "./{{ ubuntu.release }}/ceph-radosgw"
64       num_units: {{ unit_qty() if os.beta.hacluster_ceph_radosgw else 1 }}
65       options:
66         region: {{ os.region }}
67         use-embedded-webserver: true
68         operator-roles: "Member,admin"
69         source: "cloud:{{ ubuntu.release }}/{{ os.release }}"
70 {% if os.network.ipv6 %}
71         prefer-ipv6: {{ os.network.ipv6 }}
72 {% endif %}
73 {% if opnfv.storage_dict.ceph is defined %}
74         ceph-osd-replication-count: {{ unit_ceph_qty() }}
75 {% endif %}
76       to:
77 {% for unit_id in to_select(unit_qty() if os.beta.hacluster_ceph_radosgw else 1) %}
78         - "lxd:nodes/{{ unit_id }}"
79 {% endfor %}
80 {% endif %}