aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/reclass/classes/cluster
diff options
context:
space:
mode:
authorMichael Polenchuk <mpolenchuk@mirantis.com>2018-10-22 12:36:23 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-10-22 12:36:23 +0000
commitb6d00190ea2d1cc166b39f1db59912b3f572f248 (patch)
treee5b4765a08ca6d3cc6bcab92e580a7d65966f664 /mcp/reclass/classes/cluster
parentd176f3e13ad34afb2c292710ddb513fb33b55339 (diff)
parent6160264a0bd6d01552e120d2ea9dc11629fe4088 (diff)
Merge "[ha] Run OpenDaylight in cluster mode"
Diffstat (limited to 'mcp/reclass/classes/cluster')
-rw-r--r--mcp/reclass/classes/cluster/mcp-common-ha/openstack_init.yml.j210
-rw-r--r--mcp/reclass/classes/cluster/mcp-odl-ha/infra/config.yml.j2 (renamed from mcp/reclass/classes/cluster/mcp-odl-ha/infra/config.yml)19
-rw-r--r--mcp/reclass/classes/cluster/mcp-odl-ha/infra/kvm.yml.j212
-rw-r--r--mcp/reclass/classes/cluster/mcp-odl-ha/opendaylight/control.yml.j23
-rw-r--r--mcp/reclass/classes/cluster/mcp-odl-ha/openstack/init.yml.j226
-rw-r--r--mcp/reclass/classes/cluster/mcp-odl-noha/init.yml2
-rw-r--r--mcp/reclass/classes/cluster/mcp-odl-noha/openstack/init.yml2
7 files changed, 44 insertions, 30 deletions
diff --git a/mcp/reclass/classes/cluster/mcp-common-ha/openstack_init.yml.j2 b/mcp/reclass/classes/cluster/mcp-common-ha/openstack_init.yml.j2
index 7322378eb..bb76fdb10 100644
--- a/mcp/reclass/classes/cluster/mcp-common-ha/openstack_init.yml.j2
+++ b/mcp/reclass/classes/cluster/mcp-common-ha/openstack_init.yml.j2
@@ -110,16 +110,6 @@ parameters:
openstack_compute_node01_hostname: cmp001
openstack_compute_node02_hostname: cmp002
- # opendaylight options
-{%- if conf.MCP_VCP %}
- opendaylight_server_node01_hostname: odl01
- opendaylight_server_node01_single_address: ${_param:opnfv_opendaylight_server_node01_single_address}
-{%- else %}
- opendaylight_control_hostname: ${_param:openstack_control_node02_hostname}
- opendaylight_server_node01_hostname: ${_param:opendaylight_control_hostname}
- opendaylight_server_node01_single_address: ${_param:opnfv_openstack_control_node02_address}
-{%- endif %}
-
openstack_region: RegionOne
admin_email: root@localhost
db_connection_recycle_time: 300
diff --git a/mcp/reclass/classes/cluster/mcp-odl-ha/infra/config.yml b/mcp/reclass/classes/cluster/mcp-odl-ha/infra/config.yml.j2
index f72993f89..950c49355 100644
--- a/mcp/reclass/classes/cluster/mcp-odl-ha/infra/config.yml
+++ b/mcp/reclass/classes/cluster/mcp-odl-ha/infra/config.yml.j2
@@ -7,17 +7,26 @@
##############################################################################
---
classes:
- - system.reclass.storage.system.opendaylight_control_single
- cluster.mcp-common-ha.infra.config
- cluster.mcp-odl-ha.infra
parameters:
+ _param:
+ opendaylight_server_node01_hostname: odl01
+ opendaylight_server_node02_hostname: odl02
+ opendaylight_server_node03_hostname: odl03
reclass:
storage:
node:
- opendaylight_control_node01:
+{%- for i in range(1, 4) %}
+ opendaylight_control_node0{{ i }}:
+ name: ${_param:opendaylight_server_node0{{ i }}_hostname}
+ domain: ${_param:cluster_domain}
classes:
- cluster.${_param:cluster_name}.opendaylight.control
params:
- linux_system_codename: xenial
- single_address: ${_param:opendaylight_server_node01_single_address}
- pxe_admin_address: ${_param:opnfv_opendaylight_server_node01_pxe_admin_address}
+ salt_master_host: ${_param:reclass_config_master}
+ linux_system_codename: ${_param:linux_system_codename}
+ single_address: ${_param:opendaylight_server_node0{{ i }}_address}
+ pxe_admin_address: ${_param:opnfv_opendaylight_server_node0{{ i }}_pxe_admin_address}
+ keepalived_vip_priority: 10{{ i }}
+{%- endfor %}
diff --git a/mcp/reclass/classes/cluster/mcp-odl-ha/infra/kvm.yml.j2 b/mcp/reclass/classes/cluster/mcp-odl-ha/infra/kvm.yml.j2
index 09a490669..ef874cdb5 100644
--- a/mcp/reclass/classes/cluster/mcp-odl-ha/infra/kvm.yml.j2
+++ b/mcp/reclass/classes/cluster/mcp-odl-ha/infra/kvm.yml.j2
@@ -25,17 +25,19 @@ parameters:
cluster:
internal:
node:
- odl01:
- name: ${_param:opendaylight_server_node01_hostname}
- provider: ${_param:infra_kvm_node02_hostname}.${_param:cluster_domain}
+ {%- for i in range(1, 4) %}
+ odl0{{ i }}:
+ name: ${_param:opendaylight_server_node0{{ i }}_hostname}
+ provider: ${_param:infra_kvm_node0{{ i }}_hostname}.${_param:cluster_domain}
image: ${_param:salt_control_xenial_image}
size: opendaylight.server
-{%- if conf.nodes[nm.ctl01.idx].node.arch == 'aarch64' %}
+ {%- if conf.nodes[nm.ctl01.idx].node.arch == 'aarch64' %}
machine: virt
cpu_mode: host-passthrough
loader:
readonly: 'yes'
type: pflash
path: /usr/share/AAVMF/AAVMF_CODE.fd
-{%- endif %}
+ {%- endif %}
+ {%- endfor %}
{%- endif %}
diff --git a/mcp/reclass/classes/cluster/mcp-odl-ha/opendaylight/control.yml.j2 b/mcp/reclass/classes/cluster/mcp-odl-ha/opendaylight/control.yml.j2
index 685cd9ec1..107965e99 100644
--- a/mcp/reclass/classes/cluster/mcp-odl-ha/opendaylight/control.yml.j2
+++ b/mcp/reclass/classes/cluster/mcp-odl-ha/opendaylight/control.yml.j2
@@ -7,7 +7,7 @@
##############################################################################
---
classes:
- - service.opendaylight.server.single
+ - service.opendaylight.server.cluster
- cluster.mcp-common-ha.openstack_interface_vcp_biport
{%- if conf.MCP_VCP %}
- cluster.mcp-odl-ha
@@ -28,3 +28,4 @@ parameters:
- odl-aaa-authn
netvirt:
- odl-netvirt-openstack
+ seed_nodes_list: {%- for i in range(1, 4) %} ${_param:opendaylight_server_node0{{ i }}_address}{%- endfor %}
diff --git a/mcp/reclass/classes/cluster/mcp-odl-ha/openstack/init.yml.j2 b/mcp/reclass/classes/cluster/mcp-odl-ha/openstack/init.yml.j2
index 6301e737a..1dd02bb8a 100644
--- a/mcp/reclass/classes/cluster/mcp-odl-ha/openstack/init.yml.j2
+++ b/mcp/reclass/classes/cluster/mcp-odl-ha/openstack/init.yml.j2
@@ -10,18 +10,30 @@ classes:
- cluster.mcp-common-ha.openstack_init
parameters:
_param:
+ neutron_tenant_network_types: "flat,vxlan"
+
# opendaylight options
- opendaylight_service_host: ${_param:opendaylight_server_node01_single_address}
+ opendaylight_service_host: ${_param:opnfv_opendaylight_server_address}
opendaylight_rest_port: 8282
-
- neutron_tenant_network_types: "flat,vxlan"
{%- if conf.MCP_VCP %}
+ opendaylight_server_node01_hostname: odl01
+ opendaylight_server_node02_hostname: odl02
+ opendaylight_server_node03_hostname: odl03
+ opendaylight_server_node01_address: ${_param:opnfv_opendaylight_server_node01_address}
+ opendaylight_server_node02_address: ${_param:opnfv_opendaylight_server_node02_address}
+ opendaylight_server_node03_address: ${_param:opnfv_opendaylight_server_node03_address}
linux:
network:
host:
- odl01:
- address: ${_param:opendaylight_service_host}
+ {%- for i in range(1, 4) %}
+ odl0{{ i }}:
+ address: ${_param:opendaylight_server_node0{{ i }}_address}
names:
- - ${_param:opendaylight_server_node01_hostname}
- - ${_param:opendaylight_server_node01_hostname}.${_param:cluster_domain}
+ - ${_param:opendaylight_server_node0{{ i }}_hostname}
+ - ${_param:opendaylight_server_node0{{ i }}_hostname}.${_param:cluster_domain}
+ {%- endfor %}
+{%- else %}
+ opendaylight_control_hostname: ${_param:openstack_control_node02_hostname}
+ opendaylight_server_node01_hostname: ${_param:opendaylight_control_hostname}
+ opendaylight_server_node01_address: ${_param:opnfv_openstack_control_node02_address}
{%- endif %}
diff --git a/mcp/reclass/classes/cluster/mcp-odl-noha/init.yml b/mcp/reclass/classes/cluster/mcp-odl-noha/init.yml
index e0c642a9f..64b2a16f9 100644
--- a/mcp/reclass/classes/cluster/mcp-odl-noha/init.yml
+++ b/mcp/reclass/classes/cluster/mcp-odl-noha/init.yml
@@ -13,4 +13,4 @@ classes:
parameters:
_param:
- opendaylight_service_host: ${_param:opnfv_opendaylight_server_node01_single_address}
+ opendaylight_service_host: ${_param:opnfv_opendaylight_server_node01_address}
diff --git a/mcp/reclass/classes/cluster/mcp-odl-noha/openstack/init.yml b/mcp/reclass/classes/cluster/mcp-odl-noha/openstack/init.yml
index a3918b231..87c41b048 100644
--- a/mcp/reclass/classes/cluster/mcp-odl-noha/openstack/init.yml
+++ b/mcp/reclass/classes/cluster/mcp-odl-noha/openstack/init.yml
@@ -17,7 +17,7 @@ parameters:
network:
host:
odl01:
- address: ${_param:opnfv_opendaylight_server_node01_single_address}
+ address: ${_param:opnfv_opendaylight_server_node01_address}
names:
- odl01
- odl01.${_param:cluster_domain}