summaryrefslogtreecommitdiffstats
path: root/ci/config_tpl
diff options
context:
space:
mode:
authorNarinder Gupta <narinder.gupta@canonical.com>2016-08-15 08:41:55 -0500
committerNarinder Gupta <narinder.gupta@canonical.com>2016-08-15 09:18:31 -0500
commitb4c1448a8548b75de14915110abc4a0be292482a (patch)
tree0dd882337ccbbb7ab72fe1f418eb49f4275ffa3a /ci/config_tpl
parent86c767d5c762fc1555f54a7a9ec9029617c6950e (diff)
added option to choose the architecture of hyperconverged ot not.
Change-Id: If5d83b221ce1481014f2e76816a7fe568e656904 Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'ci/config_tpl')
-rw-r--r--ci/config_tpl/bundle_tpl/bundle.yaml24
-rw-r--r--ci/config_tpl/bundle_tpl/ceph.yaml16
-rw-r--r--ci/config_tpl/bundle_tpl/haclusters.yaml10
-rw-r--r--ci/config_tpl/bundle_tpl/harelations.yaml2
-rw-r--r--ci/config_tpl/bundle_tpl/heat.yaml10
-rw-r--r--ci/config_tpl/bundle_tpl/nova-compute.yaml20
6 files changed, 72 insertions, 10 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 %}