Merge "Fixes public vlan network settings"
authorDan Radez <dradez@redhat.com>
Mon, 18 Jul 2016 12:11:15 +0000 (12:11 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Mon, 18 Jul 2016 12:11:15 +0000 (12:11 +0000)
build/overcloud-full.sh
ci/PR_revision.log
ci/run_smoke_tests.sh [new file with mode: 0755]
lib/utility-functions.sh
tests/smoke_tests/execute_smoke_tests.sh [new file with mode: 0755]
tests/smoke_tests/execute_tests.yml [new file with mode: 0644]
tests/smoke_tests/prepare_undercloud.yml [new file with mode: 0644]
tests/smoke_tests/smoke_tests.yml [new file with mode: 0644]

index 01f4026..6143b28 100755 (executable)
@@ -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,8 +81,11 @@ 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" \
     --run-command "sed -i 's/^#UseDNS.*$/UseDNS no/' /etc/ssh/sshd_config" \
     --run-command "sed -i 's/^GSSAPIAuthentication.*$/GSSAPIAuthentication no/' /etc/ssh/sshd_config" \
     --run-command "cd /etc/puppet/modules && rm -rf tripleo && tar xzf opnfv-puppet-tripleo.tar.gz" \
@@ -84,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
index de62cb6..bbf39d0 100644 (file)
@@ -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 (executable)
index 0000000..b059952
--- /dev/null
@@ -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
index 9305070..f73a2d8 100644 (file)
@@ -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 (executable)
index 0000000..245ccc5
--- /dev/null
@@ -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 (file)
index 0000000..e232656
--- /dev/null
@@ -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 (file)
index 0000000..8f0cb70
--- /dev/null
@@ -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 (file)
index 0000000..b67c194
--- /dev/null
@@ -0,0 +1,3 @@
+---
+- include: prepare_undercloud.yml
+- include: execute_tests.yml
\ No newline at end of file