summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStamatis Katsaounis <mokats@intracom-telecom.com>2018-09-27 11:52:12 +0300
committerStamatis Katsaounis <mokats@intracom-telecom.com>2018-10-16 17:25:48 +0300
commit7f41e5fde88df7c312175a90c536550763d4c271 (patch)
tree86856af6ebb811eaa5da4650d2b18f0f0baa492f
parentf7f3623807c6ff914b28e89b157e3c9e3578d507 (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>
-rw-r--r--mcp/config/scenario/os-odl-bgpvpn-noha.yaml39
-rwxr-xr-xmcp/config/states/quagga12
-rw-r--r--mcp/reclass/classes/cluster/mcp-common-noha/openstack_control.yml.j25
-rw-r--r--mcp/reclass/classes/cluster/mcp-odl-noha/opendaylight/control.yml.j21
-rw-r--r--mcp/reclass/classes/cluster/mcp-odl-noha/opendaylight/control_pdf.yml.j211
-rw-r--r--mcp/salt-formulas/salt-formula-quagga/metadata/service/server/single.yml12
-rw-r--r--mcp/salt-formulas/salt-formula-quagga/quagga/init.sls11
-rw-r--r--mcp/salt-formulas/salt-formula-quagga/quagga/map.jinja21
-rw-r--r--mcp/salt-formulas/salt-formula-quagga/quagga/server.sls41
-rwxr-xr-xmcp/scripts/docker-compose/files/entrypoint.sh2
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