diff options
author | Stamatis Katsaounis <mokats@intracom-telecom.com> | 2018-09-27 11:52:12 +0300 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-10-30 12:57:47 +0000 |
commit | 36d842cd4938d97d6cd16b3fafe4740aaa4f288e (patch) | |
tree | 03ba9f0394161a583890e7f30bd79d83ad3cc56c /mcp | |
parent | d9988cc10efd379c2d53778c67f6b035f2719001 (diff) |
Add odl bgpvpn noha scenario to fuel
JIRA: FUEL-393
This patch adds support of os-odl-bgvpn-noha scenario to fuel
installer.
Change-Id: I4e053e38aac70023b0a81f9a41b415c7a1aae3af
Depends-On: I57288bbb42f4c75af19f3807f8f15b44482c066c
Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
(cherry picked from commit 7f41e5fde88df7c312175a90c536550763d4c271)
Diffstat (limited to 'mcp')
10 files changed, 154 insertions, 1 deletions
diff --git a/mcp/config/scenario/os-odl-bgpvpn-noha.yaml b/mcp/config/scenario/os-odl-bgpvpn-noha.yaml new file mode 100644 index 000000000..1b2e2d0fb --- /dev/null +++ b/mcp/config/scenario/os-odl-bgpvpn-noha.yaml @@ -0,0 +1,39 @@ +############################################################################## +# Copyright (c) 2018 Intracom Telecom 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 +############################################################################## +--- +cluster: + domain: mcp-odl-noha.local + states: + - opendaylight + - openstack_noha + - neutron_gateway + - quagga + - networks +virtual: + nodes: + control: + - ctl01 + - gtw01 + - odl01 + compute: + - cmp001 + - cmp002 + ctl01: + vcpus: 4 + ram: 14336 + gtw01: + ram: 2048 + odl01: + vcpus: 4 + ram: 16384 + cmp001: + vcpus: 4 + ram: 16384 + cmp002: + vcpus: 4 + ram: 16384 diff --git a/mcp/config/states/quagga b/mcp/config/states/quagga new file mode 100755 index 000000000..e3c9de7da --- /dev/null +++ b/mcp/config/states/quagga @@ -0,0 +1,12 @@ +#!/bin/bash -e +############################################################################## +# Copyright (c) 2018 Intracom Telecom 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 +############################################################################## + +CI_DEBUG=${CI_DEBUG:-0}; [[ "${CI_DEBUG}" =~ (false|0) ]] || set -x + +salt -I 'quagga:server' state.sls quagga -b 1 diff --git a/mcp/reclass/classes/cluster/mcp-common-noha/openstack_control.yml.j2 b/mcp/reclass/classes/cluster/mcp-common-noha/openstack_control.yml.j2 index 2f7e39d87..6d09541a4 100644 --- a/mcp/reclass/classes/cluster/mcp-common-noha/openstack_control.yml.j2 +++ b/mcp/reclass/classes/cluster/mcp-common-noha/openstack_control.yml.j2 @@ -183,6 +183,11 @@ parameters: global_physnet_mtu: 9000 backend: external_mtu: 9000 +{%- if '-bgpvpn-' in conf.MCP_DEPLOY_SCENARIO %} + bgp_vpn: + enabled: True + driver: opendaylight_v2 +{%- endif %} apache: server: bind: diff --git a/mcp/reclass/classes/cluster/mcp-odl-noha/opendaylight/control.yml.j2 b/mcp/reclass/classes/cluster/mcp-odl-noha/opendaylight/control.yml.j2 index d905f7ad6..92abf9d8f 100644 --- a/mcp/reclass/classes/cluster/mcp-odl-noha/opendaylight/control.yml.j2 +++ b/mcp/reclass/classes/cluster/mcp-odl-noha/opendaylight/control.yml.j2 @@ -10,6 +10,7 @@ classes: - system.linux.system.repo.mcp.openstack - system.linux.system.repo.mcp.extra - service.opendaylight.server.single + - service.quagga.server.single - cluster.mcp-odl-noha - cluster.mcp-odl-noha.opendaylight.control_pdf parameters: diff --git a/mcp/reclass/classes/cluster/mcp-odl-noha/opendaylight/control_pdf.yml.j2 b/mcp/reclass/classes/cluster/mcp-odl-noha/opendaylight/control_pdf.yml.j2 index 5e647d0c0..95f3ee385 100644 --- a/mcp/reclass/classes/cluster/mcp-odl-noha/opendaylight/control_pdf.yml.j2 +++ b/mcp/reclass/classes/cluster/mcp-odl-noha/opendaylight/control_pdf.yml.j2 @@ -27,6 +27,17 @@ parameters: gateway: {{ nm.net_admin_gw }} name_servers: - {{ nm.net_admin_gw }} +{%- if '-bgpvpn-' in conf.MCP_DEPLOY_SCENARIO %} + external: + enabled: true + name: {{ nm.ctl01.nic_public }} + proto: static + type: eth + address: ${_param:opnfv_opendaylight_server_external_address} + netmask: ${_param:opnfv_net_public_mask} + mtu: ${_param:interface_mtu} + noifupdown: true +{%- endif %} {#- prevent duplicates for tagged mgmt on the same physical interface as PXE/admin #} {%- if nm.ctl01.nic_admin in nics %} diff --git a/mcp/salt-formulas/salt-formula-quagga/metadata/service/server/single.yml b/mcp/salt-formulas/salt-formula-quagga/metadata/service/server/single.yml new file mode 100644 index 000000000..2eeca6760 --- /dev/null +++ b/mcp/salt-formulas/salt-formula-quagga/metadata/service/server/single.yml @@ -0,0 +1,12 @@ +############################################################################## +# Copyright (c) 2018 Intracom Telecom 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 +############################################################################## +--- +parameters: + quagga: + server: + enabled: true diff --git a/mcp/salt-formulas/salt-formula-quagga/quagga/init.sls b/mcp/salt-formulas/salt-formula-quagga/quagga/init.sls new file mode 100644 index 000000000..810809d77 --- /dev/null +++ b/mcp/salt-formulas/salt-formula-quagga/quagga/init.sls @@ -0,0 +1,11 @@ +############################################################################## +# Copyright (c) 2018 Intracom Telecom 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 +############################################################################## +include: +{%- if pillar.quagga.server is defined %} +- quagga.server +{%- endif %} diff --git a/mcp/salt-formulas/salt-formula-quagga/quagga/map.jinja b/mcp/salt-formulas/salt-formula-quagga/quagga/map.jinja new file mode 100644 index 000000000..a76c760d9 --- /dev/null +++ b/mcp/salt-formulas/salt-formula-quagga/quagga/map.jinja @@ -0,0 +1,21 @@ +{#- + Copyright (c) 2018 Intracom Telecom 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 +-#} +{% set server = salt['grains.filter_by']({ + 'Debian': { + 'pkgs': ['libglib2.0-0'], + 'quagga_package_url': 'https://wiki.opnfv.org/download/attachments/6827916/quagga-ubuntu.tar.gz', + 'quagga_package_checksum': 'https://wiki.opnfv.org/download/attachments/6827916/quagga-ubuntu.checksum', + 'install_cmd': 'dpkg -i' + }, + 'RedHat': { + 'pkgs': ['glib2', 'glib2-devel'], + 'quagga_package_url': 'https://wiki.opnfv.org/download/attachments/6827916/quagga-4.tar.gz', + 'quagga_package_checksum': 'https://wiki.opnfv.org/download/attachments/6827916/quagga-4.checksum', + 'install_cmd': 'yum -y' + }, +}, merge=salt['pillar.get']('quagga:server')) %} diff --git a/mcp/salt-formulas/salt-formula-quagga/quagga/server.sls b/mcp/salt-formulas/salt-formula-quagga/quagga/server.sls new file mode 100644 index 000000000..3a9c32906 --- /dev/null +++ b/mcp/salt-formulas/salt-formula-quagga/quagga/server.sls @@ -0,0 +1,41 @@ +############################################################################## +# Copyright (c) 2018 Intracom Telecom 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 +############################################################################## +{%- from "quagga/map.jinja" import server with context %} +{%- if server.enabled %} + +quagga_packages: + pkg.installed: + - names: {{ server.pkgs }} + +download_quagga: + file.managed: + - name: /var/cache/quagga.tar.gz + - source: {{ server.quagga_package_url }} + - source_hash: {{ server.quagga_package_checksum }} + - user: root + - group: root + +unarchive_quagga: + archive.extracted: + - source: /var/cache/quagga.tar.gz + - name: /tmp + - user: root + - group: root + +install_quagga_packages: + cmd.run: + - name: {{ server.install_cmd }} $(ls |grep -vE 'debuginfo|devel|contrib') + - cwd: /tmp/quagga + - runas: root + +start_zebra_rpc_daemon: + cmd.run: + - name: /opt/quagga/etc/init.d/zrpcd start + - runas: root + +{%- endif %} diff --git a/mcp/scripts/docker-compose/files/entrypoint.sh b/mcp/scripts/docker-compose/files/entrypoint.sh index 0becb6333..9bf3cfc3f 100755 --- a/mcp/scripts/docker-compose/files/entrypoint.sh +++ b/mcp/scripts/docker-compose/files/entrypoint.sh @@ -43,7 +43,7 @@ cp -a /root/pod_config.yml \ prefix=/srv/salt/formula/salt-formulas rm -f /root/fuel/mcp/salt-formulas/*/.git cp -ar /root/fuel/mcp/salt-formulas/* ${prefix}/ -for formula in 'armband' 'opendaylight' 'tacker'; do +for formula in 'armband' 'opendaylight' 'tacker' 'quagga'; do ln -sf /root/fuel/mcp/salt-formulas/salt-formula-${formula}/* \ /srv/salt/env/prd/ done |