73591b6b32188e27facc37c55bc681660773563e
[joid.git] / ci / config_tpl / juju2 / bundle_tpl / nova-compute.yaml
1     nova-compute:
2       charm: "./{{ ubuntu.release }}/nova-compute"
3 {% if os.hyperconverged %}
4 {% if os.ha.mode == 'ha' %}
5       num_units: {{ opnfv.units - 2 }}
6 {% else %}
7       num_units: {{ opnfv.units - 1 }}
8 {% endif %}
9 {% else %}
10 {% if os.ha.mode == 'ha' %}
11       num_units: {{ opnfv.units - 3 }}
12 {% else %}
13       num_units: {{ opnfv.units - 1 }}
14 {% endif %}
15 {% endif %}
16       bindings:
17         "": *oam-space
18         internal: *internal-space
19       options:
20         openstack-origin: *openstack-origin
21 {% if os.git_repo.origin_git %}
22         openstack-origin-git: "{{ os.git_repo.branch }}"
23 {% endif %}
24         enable-live-migration: True
25         enable-resize: True
26         migration-auth-type: ssh
27 {% if os.network.ipv6 %}
28         prefer-ipv6: {{ os.network.ipv6 }}
29 {% endif %}
30 {% if opnfv.storage_dict.ceph is defined %}
31         ceph-osd-replication-count: {{ unit_ceph_qty() }}
32 {% endif %}
33 {% if os.beta.huge_pages %}
34         hugepages: "2048"
35 {% endif %}
36 {% if os.beta.cpu_pin %}
37         vcpu-pin-set: "{{ os.beta.cpu_pin_set }}"
38 {% endif %}
39 {% if os.lxd %}
40         virt-type: lxd
41 {% else %}
42         virt-type: kvm
43 {% endif %}
44       to:
45 {% if os.hyperconverged %}
46 {% if os.ha.mode == 'ha' %}
47 {% for unit_id in range(2, opnfv.units) %}
48         - "nodes/{{ unit_id }}"
49 {% endfor %}
50 {% else %}
51 {% for unit_id in range(1, opnfv.units) %}
52         - "nodes/{{ unit_id }}"
53 {% endfor %}
54 {% endif %}
55 {% else %}
56 {% if os.ha.mode == 'ha' %}
57 {% for unit_id in range(0, opnfv.units - 3) %}
58         - "nodes-compute/{{ unit_id }}"
59 {% endfor %}
60 {% else %}
61 {% for unit_id in range(0, opnfv.units - 1) %}
62         - "nodes-compute/{{ unit_id }}"
63 {% endfor %}
64 {% endif %}
65 {% endif %}