summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/nics-template.yaml.jinja22
-rw-r--r--build/opnfv-apex-common.spec2
-rwxr-xr-xbuild/overcloud-full.sh22
-rw-r--r--ci/PR_revision.log1
-rwxr-xr-xci/run_smoke_tests.sh5
-rwxr-xr-xci/util.sh34
-rw-r--r--config/deploy/os-onos-sfc-ha.yaml10
-rwxr-xr-xlib/overcloud-deploy-functions.sh6
-rw-r--r--lib/python/apex/network_environment.py12
-rw-r--r--lib/utility-functions.sh13
-rwxr-xr-xtests/smoke_tests/execute_smoke_tests.sh6
-rw-r--r--tests/smoke_tests/execute_tests.yml9
-rw-r--r--tests/smoke_tests/prepare_undercloud.yml16
-rw-r--r--tests/smoke_tests/smoke_tests.yml3
-rw-r--r--tests/test_apex_deploy_env.py3
15 files changed, 125 insertions, 19 deletions
diff --git a/build/nics-template.yaml.jinja2 b/build/nics-template.yaml.jinja2
index 455ae0f3..91d0c478 100644
--- a/build/nics-template.yaml.jinja2
+++ b/build/nics-template.yaml.jinja2
@@ -94,7 +94,7 @@ resources:
name: nic1
# force the MAC address of the bridge to this interface
primary: true
- {%- if 'public_network' in enabled_networks and vlans['private_network'] is number %}
+ {%- if 'public_network' in enabled_networks and vlans['public_network'] is number %}
-
type: vlan
vlan_id: {get_param: ExternalNetworkVlanID}
diff --git a/build/opnfv-apex-common.spec b/build/opnfv-apex-common.spec
index 8808cdb1..5e1a9b36 100644
--- a/build/opnfv-apex-common.spec
+++ b/build/opnfv-apex-common.spec
@@ -45,6 +45,7 @@ install config/deploy/os-odl_l2-fdio-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-ap
install config/deploy/os-odl_l2-fdio-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl_l2-fdio-noha.yaml
install config/deploy/os-odl_l3-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl_l3-nofeature-ha.yaml
install config/deploy/os-onos-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-onos-nofeature-ha.yaml
+install config/deploy/os-onos-sfc-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-onos-sfc-ha.yaml
install config/deploy/os-ocl-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-ocl-nofeature-ha.yaml
install config/network/network_settings.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/network_settings.yaml
install config/network/network_settings_v6.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/network_settings_v6.yaml
@@ -112,6 +113,7 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
%{_sysconfdir}/opnfv-apex/os-odl_l2-fdio-ha.yaml
%{_sysconfdir}/opnfv-apex/os-odl_l3-nofeature-ha.yaml
%{_sysconfdir}/opnfv-apex/os-onos-nofeature-ha.yaml
+%{_sysconfdir}/opnfv-apex/os-onos-sfc-ha.yaml
%{_sysconfdir}/opnfv-apex/os-ocl-nofeature-ha.yaml
%{_sysconfdir}/opnfv-apex/network_settings.yaml
%{_sysconfdir}/opnfv-apex/network_settings_v6.yaml
diff --git a/build/overcloud-full.sh b/build/overcloud-full.sh
index c40a8438..6143b28d 100755
--- a/build/overcloud-full.sh
+++ b/build/overcloud-full.sh
@@ -58,6 +58,22 @@ pushd puppet-congress > /dev/null
git archive --format=tar.gz --prefix=congress/ origin/stable/mitaka > ../puppet-congress.tar.gz
popd > /dev/null
+# create fd.io yum repo file
+cat > /tmp/fdio-master.repo << EOF
+[fdio-master]
+name=fd.io master branch latest merge
+baseurl=https://nexus.fd.io/content/repositories/fd.io.master.centos7/
+enabled=1
+gpgcheck=0
+EOF
+
+# tar up the fd.io module
+rm -rf puppet-fdio
+git clone https://github.com/radez/puppet-fdio
+pushd puppet-fdio > /dev/null
+git archive --format=tar.gz --prefix=fdio/ HEAD > ../puppet-fdio.tar.gz
+popd > /dev/null
+
# installing forked opnfv-puppet-tripleo
# enable connection tracking for protocal sctp
# upload dpdk rpms but do not install
@@ -65,6 +81,8 @@ popd > /dev/null
# install the congress rpms
# upload and explode the congress puppet module
# install doctor driver ## Can be removed in Newton
+# install fd.io yum repo and packages
+# upload puppet fdio
LIBGUESTFS_BACKEND=direct virt-customize \
--upload ../opnfv-puppet-tripleo.tar.gz:/etc/puppet/modules \
--run-command "if ! rpm -qa | grep python-redis; then yum install -y python-redis; fi" \
@@ -85,6 +103,10 @@ LIBGUESTFS_BACKEND=direct virt-customize \
--run-command "cd /etc/puppet/modules/ && tar xzf puppet-congress.tar.gz" \
--run-command "cd /usr/lib/python2.7/site-packages/congress/datasources && curl -O $doctor_driver" \
--run-command "sed -i \"s/'--detailed-exitcodes',/'--detailed-exitcodes','-l','syslog','-l','console',/g\" /var/lib/heat-config/hooks/puppet" \
+ --upload /tmp/fdio-master.repo:/etc/yum.repos.d/fdio-master.repo \
+ --install unzip,vpp,honeycomb \
+ --upload puppet-fdio.tar.gz:/etc/puppet/modules \
+ --run-command "cd /etc/puppet/modules && tar xzf puppet-fdio.tar.gz" \
-a overcloud-full_build.qcow2
mv -f overcloud-full_build.qcow2 overcloud-full.qcow2
diff --git a/ci/PR_revision.log b/ci/PR_revision.log
index de62cb6b..bbf39d02 100644
--- a/ci/PR_revision.log
+++ b/ci/PR_revision.log
@@ -12,3 +12,4 @@
33,Removes QOS service plugin from Neutron
35,Use nic1 as control plane inteface name instead of default br-ex
38,Fixes nova default floating pool to be 'external'
+39,removing extra whitespace from congress parameter
diff --git a/ci/run_smoke_tests.sh b/ci/run_smoke_tests.sh
new file mode 100755
index 00000000..b0599527
--- /dev/null
+++ b/ci/run_smoke_tests.sh
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+source ../lib/utility-functions.sh
+
+ansible-playbook -i "$(get_undercloud_ip)," ../tests/smoke_tests/smoke_tests.yml
diff --git a/ci/util.sh b/ci/util.sh
index f55e1e0f..ad7f0788 100755
--- a/ci/util.sh
+++ b/ci/util.sh
@@ -21,13 +21,19 @@ resolve_cmd() {
}
display_usage() {
- echo -e "Usage:\n$0 [arguments] \n"
- echo -e " undercloud <user> <command> : Connect to Undercloud VM as <user> and execute command <command>\n"
- echo -e " <user> Optional: Defaults to 'stack', <command> Optional: Defaults to none\n"
- echo -e " overcloud <node> <command> : Connect to an Overcloud <node> and execute command <command>\n"
- echo -e " <node> Required in format controller|compute<number>. Example: controller0\n"
- echo -e " <command> Optional: Defaults to none\n"
- echo -e " debug-stack : Print parsed deployment failures to stdout \n"
+ echo -e "Usage:\n$0 subcommand [ arguments ]\n"
+ echo -e "Arguments:\n"
+ echo -e " undercloud [ user [ command ] ] Connect to Undercloud VM as user and optionally execute a command\n"
+ echo -e " user Optional: Defaults to 'stack'\n"
+ echo -e " command Optional: Defaults to none\n"
+ echo -e ""
+ echo -e " overcloud [ node [ command ] ] Connect to an Overcloud node and optionally execute a command\n"
+ echo -e " node Required: in format controller|compute<number>. Example: controller0\n"
+ echo -e " command Optional: Defaults to none\n"
+ echo -e ""
+ echo -e " debug-stack Print parsed deployment failures to stdout \n"
+ echo -e ""
+ echo -e " mock-detached on | off Add firewall rules to the jump host to mock a detached deployment \n"
}
##translates the command line argument
@@ -77,6 +83,20 @@ parse_cmdline() {
undercloud_connect stack "$(typeset -f debug_stack); debug_stack"
exit 0
;;
+ mock-detached)
+ if [ "$2" == "on" ]; then
+ echo "Blocking output http and https traffic"
+ iptables -A OUTPUT -p tcp --dport 80 -j REJECT
+ iptables -A OUTPUT -p tcp --dport 443 -j REJECT
+ elif [ "$2" == "off" ]; then
+ echo "Allowing output http and https traffic"
+ iptables -D OUTPUT -p tcp --dport 80 -j REJECT
+ iptables -D OUTPUT -p tcp --dport 443 -j REJECT
+ else
+ display_usage
+ fi
+ exit 0
+ ;;
*)
echo -e "\n\nThis script is used to interact with Apex deployments\n\n"
echo "Use -h to display help"
diff --git a/config/deploy/os-onos-sfc-ha.yaml b/config/deploy/os-onos-sfc-ha.yaml
new file mode 100644
index 00000000..a81023db
--- /dev/null
+++ b/config/deploy/os-onos-sfc-ha.yaml
@@ -0,0 +1,10 @@
+global_params:
+ ha_enabled: true
+
+deploy_options:
+ sdn_controller: onos
+ sdn_l3: true
+ tacker: false
+ congress: false
+ sfc: true
+ vpn: false
diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh
index 067a6417..992d22af 100755
--- a/lib/overcloud-deploy-functions.sh
+++ b/lib/overcloud-deploy-functions.sh
@@ -36,7 +36,11 @@ function overcloud_deploy {
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight-external.yaml"
SDN_IMAGE=opendaylight
elif [ "${deploy_options_array['sdn_controller']}" == 'onos' ]; then
- DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/onos.yaml"
+ if [ "${deploy_options_array['sfc']}" == 'True' ]; then
+ DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/onos_sfc.yaml"
+ else
+ DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/onos.yaml"
+ fi
SDN_IMAGE=onos
elif [ "${deploy_options_array['sdn_controller']}" == 'opencontrail' ]; then
echo -e "${red}ERROR: OpenContrail is currently unsupported...exiting${reset}"
diff --git a/lib/python/apex/network_environment.py b/lib/python/apex/network_environment.py
index fec6299d..bf4bdc79 100644
--- a/lib/python/apex/network_environment.py
+++ b/lib/python/apex/network_environment.py
@@ -9,11 +9,13 @@
import yaml
import re
-from .common.constants import ADMIN_NETWORK
-from .common.constants import PRIVATE_NETWORK
-from .common.constants import STORAGE_NETWORK
-from .common.constants import PUBLIC_NETWORK
-from .common.constants import API_NETWORK
+from .common.constants import (
+ ADMIN_NETWORK,
+ PRIVATE_NETWORK,
+ STORAGE_NETWORK,
+ PUBLIC_NETWORK,
+ API_NETWORK,
+)
PORTS = '/ports'
# Resources defined by <resource name>: <prefix>
diff --git a/lib/utility-functions.sh b/lib/utility-functions.sh
index 93050701..f73a2d85 100644
--- a/lib/utility-functions.sh
+++ b/lib/utility-functions.sh
@@ -15,14 +15,19 @@ function undercloud_connect {
fi
if [ -z "$2" ]; then
- ssh ${SSH_OPTIONS[@]} ${user}@$(arp -a | grep $(virsh domiflist undercloud | grep default |\
- awk '{print $5}') | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+")
+ ssh ${SSH_OPTIONS[@]} ${user}@$(get_undercloud_ip)
else
- ssh ${SSH_OPTIONS[@]} -T ${user}@$(arp -a | grep $(virsh domiflist undercloud | grep default \
- | awk '{print $5}') | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+") "$2"
+ ssh ${SSH_OPTIONS[@]} -T ${user}@$(get_undercloud_ip) "$2"
fi
}
+##outputs the Undercloud's IP address
+##params: none
+function get_undercloud_ip {
+ echo $(arp -a | grep $(virsh domiflist undercloud | grep default |\
+ awk '{print $5}') | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+")
+}
+
##connects to overcloud nodes
##params: node to login to, command to execute on overcloud (optional)
function overcloud_connect {
diff --git a/tests/smoke_tests/execute_smoke_tests.sh b/tests/smoke_tests/execute_smoke_tests.sh
new file mode 100755
index 00000000..245ccc53
--- /dev/null
+++ b/tests/smoke_tests/execute_smoke_tests.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+cd ~/provisioning/python
+export PYTHONPATH=$PYTHONPATH:$(pwd)
+
+python unit_test_suite.py ~stack/overcloudrc \ No newline at end of file
diff --git a/tests/smoke_tests/execute_tests.yml b/tests/smoke_tests/execute_tests.yml
new file mode 100644
index 00000000..e2326560
--- /dev/null
+++ b/tests/smoke_tests/execute_tests.yml
@@ -0,0 +1,9 @@
+---
+- hosts: all
+ sudo: yes
+
+ tasks:
+ - name: Copy execute_smoke_tests.sh
+ copy: src=execute_smoke_tests.sh dest=~/execute_smoke_tests.sh mode=0755
+ - name: Execute Tests
+ command: sh ~/execute_smoke_tests.sh | tee ~/unit_tests.out \ No newline at end of file
diff --git a/tests/smoke_tests/prepare_undercloud.yml b/tests/smoke_tests/prepare_undercloud.yml
new file mode 100644
index 00000000..8f0cb709
--- /dev/null
+++ b/tests/smoke_tests/prepare_undercloud.yml
@@ -0,0 +1,16 @@
+---
+- hosts: all
+ sudo: yes
+
+ tasks:
+ - yum: name=libffi
+ - yum: name=libffi-devel
+ - pip: name=python-keystoneclient
+ - pip: name=python-glanceclient
+ - pip: name=python-neutronclient
+ - pip: name=python-novaclient
+ - pip: name=scp
+ - pip: name=PyYAML
+ - pip: name=ansible==2.1.0
+
+ - git: repo=https://nougat.cablelabs.com/SNAPS/provisioning.git dest=~/provisioning
diff --git a/tests/smoke_tests/smoke_tests.yml b/tests/smoke_tests/smoke_tests.yml
new file mode 100644
index 00000000..b67c194f
--- /dev/null
+++ b/tests/smoke_tests/smoke_tests.yml
@@ -0,0 +1,3 @@
+---
+- include: prepare_undercloud.yml
+- include: execute_tests.yml \ No newline at end of file
diff --git a/tests/test_apex_deploy_env.py b/tests/test_apex_deploy_env.py
index 648923d0..563bfd8f 100644
--- a/tests/test_apex_deploy_env.py
+++ b/tests/test_apex_deploy_env.py
@@ -27,7 +27,8 @@ deploy_files = ('deploy_settings.yaml',
'os-nosdn-performance-ha.yaml',
'os-odl_l2-nofeature-ha.yaml',
'os-odl_l2-sfc-noha.yaml',
- 'os-onos-nofeature-ha.yaml')
+ 'os-onos-nofeature-ha.yaml',
+ 'os-onos-sfc-ha.yaml')
test_deploy_content = (
'global_params:',