From 6160264a0bd6d01552e120d2ea9dc11629fe4088 Mon Sep 17 00:00:00 2001 From: Michael Polenchuk Date: Fri, 28 Sep 2018 16:02:30 +0400 Subject: [ha] Run OpenDaylight in cluster mode Change-Id: Id75fbee34a6cfc6e7fc60df053cccaaff21cb15a Signed-off-by: Michael Polenchuk --- .../classes/cluster/mcp-odl-ha/infra/config.yml | 23 ---------------- .../classes/cluster/mcp-odl-ha/infra/config.yml.j2 | 32 ++++++++++++++++++++++ .../classes/cluster/mcp-odl-ha/infra/kvm.yml.j2 | 12 ++++---- 3 files changed, 39 insertions(+), 28 deletions(-) delete mode 100644 mcp/reclass/classes/cluster/mcp-odl-ha/infra/config.yml create mode 100644 mcp/reclass/classes/cluster/mcp-odl-ha/infra/config.yml.j2 (limited to 'mcp/reclass/classes/cluster/mcp-odl-ha/infra') diff --git a/mcp/reclass/classes/cluster/mcp-odl-ha/infra/config.yml b/mcp/reclass/classes/cluster/mcp-odl-ha/infra/config.yml deleted file mode 100644 index f72993f89..000000000 --- a/mcp/reclass/classes/cluster/mcp-odl-ha/infra/config.yml +++ /dev/null @@ -1,23 +0,0 @@ -############################################################################## -# Copyright (c) 2018 Mirantis Inc., Enea AB and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## ---- -classes: - - system.reclass.storage.system.opendaylight_control_single - - cluster.mcp-common-ha.infra.config - - cluster.mcp-odl-ha.infra -parameters: - reclass: - storage: - node: - opendaylight_control_node01: - 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} diff --git a/mcp/reclass/classes/cluster/mcp-odl-ha/infra/config.yml.j2 b/mcp/reclass/classes/cluster/mcp-odl-ha/infra/config.yml.j2 new file mode 100644 index 000000000..950c49355 --- /dev/null +++ b/mcp/reclass/classes/cluster/mcp-odl-ha/infra/config.yml.j2 @@ -0,0 +1,32 @@ +############################################################################## +# Copyright (c) 2018 Mirantis Inc., Enea AB and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +classes: + - 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: +{%- 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: + 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 %} -- cgit 1.2.3-korg