openstack-phase1:
services:
+{% if os.hyperconverged %}
nodes:
charm: "cs:{{ ubuntu.release }}/ubuntu"
num_units: {{ opnfv.units }}
+{% else %}
+ nodes:
+ charm: "cs:{{ ubuntu.release }}/ubuntu"
+{% if os.ha.mode == 'ha' %}
+ num_units: 3
+{% else %}
+ num_units: 1
+{% endif %}
+ constraints: tags=control
+ nodes-compute:
+ charm: "cs:{{ ubuntu.release }}/ubuntu"
+{% if os.ha.mode == 'ha' %}
+ num_units: {{ opnfv.units - 3 }}
+{% else %}
+ num_units: {{ opnfv.units - 1 }}
+{% endif %}
+{% endif %}
ntp:
charm: "local:{{ ubuntu.release }}/ntp"
{% if os.network.controller == 'ocl' %}
{% include 'haclusters.yaml' %}
{% endif %}
+{% if os.hyperconverged %}
relations:
- [ 'ntp:juju-info', 'nodes:juju-info' ]
+{% else %}
+ relations:
+ - [ 'ntp:juju-info', 'nodes:juju-info' ]
+ - [ 'ntp:juju-info', 'nodes-compute:juju-info' ]
+{% endif %}
{% if os.ha.mode == 'ha' %}
{% include 'harelations.yaml' %}
{% endif %}
{% endfor %}
ceph-osd:
charm: "local:{{ ubuntu.release }}/ceph-osd"
+{% if os.hyperconverged %}
num_units: {{ opnfv.units }}
+{% else %}
+ num_units: 3
+{% endif %}
options:
osd-devices: {{ opnfv.storage_dict.ceph.disk }}
osd-reformat: 'yes'
to:
+{% if os.hyperconverged %}
{% for unit_id in range(0, opnfv.units) %}
- "nodes={{ unit_id }}"
{% endfor %}
+{% else %}
+{% if os.ha.mode == 'ha' %}
+{% for unit_id in range(0, 3) %}
+ - "nodes={{ unit_id }}"
+{% endfor %}
+{% else %}
+ - "nodes=0"
+ - "nodes-compute=0"
+ - "nodes-compute=1"
+{% endif %}
+{% endif %}
ceph-radosgw:
charm: "local:{{ ubuntu.release }}/ceph-radosgw"
num_units: {{ unit_qty() if os.beta.hacluster_ceph_radosgw else 1 }}
options:
corosync_transport: unicast
cluster_count: 3
-# hacluster-heat:
-# charm: "local:{{ ubuntu.release }}/hacluster"
-# options:
-# corosync_transport: unicast
-# cluster_count: 3
+ hacluster-heat:
+ charm: "local:{{ ubuntu.release }}/hacluster"
+ options:
+ corosync_transport: unicast
+ cluster_count: 3
hacluster-horizon:
charm: "local:{{ ubuntu.release }}/hacluster"
options:
{% if os.ha.mode == 'ha' %}
- [ 'mysql:ha', 'hacluster-mysql:ha' ]
- [ 'cinder:ha', 'hacluster-cinder:ha' ]
-# - [ 'heat:ha', 'hacluster-heat:ha' ]
+ - [ 'heat:ha', 'hacluster-heat:ha' ]
- [ 'glance:ha', 'hacluster-glance:ha' ]
- [ 'keystone:ha', 'hacluster-keystone:ha' ]
- [ 'neutron-api:ha', 'hacluster-neutron:ha' ]
heat:
charm: "local:{{ ubuntu.release }}/heat"
-# num_units: {{ unit_qty() }}
+ num_units: {{ unit_qty() }}
options:
{% if os.ha.mode == 'ha' %}
-# vip: {{ opnfv.vip.heat }}
+ vip: {{ opnfv.vip.heat }}
{% endif %}
{% if os.beta.public_api %}
-# os-public-hostname: api.{{ opnfv.domain }}
+ os-public-hostname: api.{{ opnfv.domain }}
{% endif %}
to:
- - "lxc:nodes=0"
+{% for unit_id in to_select() %}
+ - "lxc:nodes={{ unit_id }}"
+{% endfor %}
{# Empty block to avoid bad block trim #}
nova-compute:
charm: "local:{{ ubuntu.release }}/nova-compute"
+{% if os.hyperconverged %}
num_units: {{ opnfv.units - 1 }}
+{% else %}
+{% if os.ha.mode == 'ha' %}
+ num_units: {{ opnfv.units - 3 }}
+{% else %}
+ num_units: {{ opnfv.units - 1 }}
+{% endif %}
+{% endif %}
options:
enable-live-migration: true
enable-resize: true
virt-type: lxd
{% endif %}
to:
+{% if os.hyperconverged %}
{% for unit_id in range(1, opnfv.units) %}
- "nodes={{ unit_id }}"
{% endfor %}
+{% else %}
+{% if os.ha.mode == 'ha' %}
+{% for unit_id in range(0, opnfv.units - 3) %}
+ - "nodes-compute={{ unit_id }}"
+{% endfor %}
+{% else %}
+{% for unit_id in range(0, opnfv.units - 1) %}
+ - "nodes-compute={{ unit_id }}"
+{% endfor %}
+{% endif %}
+{% endif %}
release: xenial
os:
release: mitaka
+ hyperconverged: True
ha:
mode: ha
cluster_size: 3
if not qty:
qty = config['os']['ha']['cluster_size'] if \
config['os']['ha']['mode'] == 'ha' else 1
- return random.sample(range(0, config['opnfv']['units']), qty)
+ if config['os']['hyperconverged']:
+ return random.sample(range(0, config['opnfv']['units']), qty)
+ else:
+ return random.sample(range(0, qty), qty)
def get_password(key, length=16, special=False):
config['os']['network']['bgpvpn'] = True
if 'odll3' in features:
config['os']['network']['odll3'] = True
+if 'dishypcon' in features:
+ config['os']['hyperconverged'] = False
# Set beta option from extra
if 'publicapi' in extra:
config['ubuntu']['release'] = 'trusty'
if 'liberty' in extra:
config['os']['release'] = 'liberty'
+if 'dishypcon' in extra:
+ config['os']['hyperconverged'] = False
#
# Transform template to bundle.yaml according to config