diff options
-rw-r--r-- | ci/config_tpl/bundle_tpl/bundle.yaml | 24 | ||||
-rw-r--r-- | ci/config_tpl/bundle_tpl/ceph.yaml | 16 | ||||
-rw-r--r-- | ci/config_tpl/bundle_tpl/haclusters.yaml | 10 | ||||
-rw-r--r-- | ci/config_tpl/bundle_tpl/harelations.yaml | 2 | ||||
-rw-r--r-- | ci/config_tpl/bundle_tpl/heat.yaml | 10 | ||||
-rw-r--r-- | ci/config_tpl/bundle_tpl/nova-compute.yaml | 20 | ||||
-rw-r--r-- | ci/default_deployment_config.yaml | 1 | ||||
-rw-r--r-- | ci/genBundle.py | 9 |
8 files changed, 81 insertions, 11 deletions
diff --git a/ci/config_tpl/bundle_tpl/bundle.yaml b/ci/config_tpl/bundle_tpl/bundle.yaml index 8c08c1a2..a5aa5578 100644 --- a/ci/config_tpl/bundle_tpl/bundle.yaml +++ b/ci/config_tpl/bundle_tpl/bundle.yaml @@ -9,9 +9,27 @@ 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' %} @@ -46,8 +64,14 @@ openstack-phase1: {% 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 %} diff --git a/ci/config_tpl/bundle_tpl/ceph.yaml b/ci/config_tpl/bundle_tpl/ceph.yaml index 82cfd283..da1e8b54 100644 --- a/ci/config_tpl/bundle_tpl/ceph.yaml +++ b/ci/config_tpl/bundle_tpl/ceph.yaml @@ -15,14 +15,30 @@ {% 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 }} diff --git a/ci/config_tpl/bundle_tpl/haclusters.yaml b/ci/config_tpl/bundle_tpl/haclusters.yaml index fc42d38e..ef193654 100644 --- a/ci/config_tpl/bundle_tpl/haclusters.yaml +++ b/ci/config_tpl/bundle_tpl/haclusters.yaml @@ -9,11 +9,11 @@ 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: diff --git a/ci/config_tpl/bundle_tpl/harelations.yaml b/ci/config_tpl/bundle_tpl/harelations.yaml index d4c4c064..e7bac9a2 100644 --- a/ci/config_tpl/bundle_tpl/harelations.yaml +++ b/ci/config_tpl/bundle_tpl/harelations.yaml @@ -1,7 +1,7 @@ {% 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' ] diff --git a/ci/config_tpl/bundle_tpl/heat.yaml b/ci/config_tpl/bundle_tpl/heat.yaml index 4fe9deb7..40ed71af 100644 --- a/ci/config_tpl/bundle_tpl/heat.yaml +++ b/ci/config_tpl/bundle_tpl/heat.yaml @@ -1,13 +1,15 @@ 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 #} diff --git a/ci/config_tpl/bundle_tpl/nova-compute.yaml b/ci/config_tpl/bundle_tpl/nova-compute.yaml index 81803807..24a81253 100644 --- a/ci/config_tpl/bundle_tpl/nova-compute.yaml +++ b/ci/config_tpl/bundle_tpl/nova-compute.yaml @@ -1,6 +1,14 @@ 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 @@ -13,6 +21,18 @@ 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 %} diff --git a/ci/default_deployment_config.yaml b/ci/default_deployment_config.yaml index 4b941a71..10001fe3 100644 --- a/ci/default_deployment_config.yaml +++ b/ci/default_deployment_config.yaml @@ -2,6 +2,7 @@ ubuntu: release: xenial os: release: mitaka + hyperconverged: True ha: mode: ha cluster_size: 3 diff --git a/ci/genBundle.py b/ci/genBundle.py index 9c6781b5..499cd63a 100644 --- a/ci/genBundle.py +++ b/ci/genBundle.py @@ -88,7 +88,10 @@ def to_select(qty=False): 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): @@ -173,6 +176,8 @@ if 'bgpvpn' in features: 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: @@ -185,6 +190,8 @@ if 'trusty' 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 |