summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xjjb/apex/apex-build.sh2
-rw-r--r--jjb/apex/apex.yml31
-rw-r--r--jjb/compass4nfv/compass-ci-jobs.yml9
-rw-r--r--jjb/functest/functest-ci-jobs.yml4
-rw-r--r--jjb/joid/joid-ci-jobs.yml138
-rw-r--r--jjb/opnfv/slave-params.yml22
-rw-r--r--jjb/yardstick/yardstick-ci-jobs.yml12
-rw-r--r--prototypes/bifrost/README.md48
-rw-r--r--prototypes/bifrost/playbooks/test-bifrost-infracloud.yaml66
-rw-r--r--prototypes/bifrost/scripts/destroy_env.sh38
-rw-r--r--prototypes/bifrost/scripts/test-bifrost-deployment.sh120
11 files changed, 381 insertions, 109 deletions
diff --git a/jjb/apex/apex-build.sh b/jjb/apex/apex-build.sh
index 7b7295855..e3e3f6194 100755
--- a/jjb/apex/apex-build.sh
+++ b/jjb/apex/apex-build.sh
@@ -23,7 +23,7 @@ fi
# start the build
cd $WORKSPACE/ci
./build.sh $BUILD_ARGS
-RPM_VERSION=$(grep Version: $BUILD_DIRECTORY/opnfv-apex.spec | awk '{ print $2 }')-$(echo $OPNFV_ARTIFACT_VERSION | tr -d '_-')
+RPM_VERSION=$(grep Version: $BUILD_DIRECTORY/rpm_specs/opnfv-apex.spec | awk '{ print $2 }')-$(echo $OPNFV_ARTIFACT_VERSION | tr -d '_-')
# list the contents of BUILD_OUTPUT directory
echo "Build Directory is ${BUILD_DIRECTORY}"
echo "Build Directory Contents:"
diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml
index 1655dc488..4650fcdea 100644
--- a/jjb/apex/apex.yml
+++ b/jjb/apex/apex.yml
@@ -55,6 +55,7 @@
- 'os-nosdn-nofeature-noha'
- 'os-nosdn-nofeature-ha'
- 'os-nosdn-nofeature-ha-ipv6'
+ - 'os-nosdn-ovs-noha'
- 'os-nosdn-fdio-noha'
- 'os-odl_l2-nofeature-ha'
- 'os-odl_l2-bgpvpn-ha'
@@ -992,6 +993,36 @@
block-thresholds:
build-step-failure-threshold: 'never'
block: true
+ - trigger-builds:
+ - project: 'apex-deploy-baremetal-os-nosdn-ovs-noha-{stream1}'
+ predefined-parameters: |
+ BUILD_DIRECTORY=apex-build-{stream1}/build
+ OPNFV_CLEAN=yes
+ git-revision: true
+ same-node: true
+ block-thresholds:
+ build-step-failure-threshold: 'never'
+ block: true
+ - trigger-builds:
+ - project: 'functest-apex-{daily-slave}-daily-{stream1}'
+ predefined-parameters:
+ DEPLOY_SCENARIO=os-nosdn-ovs-noha
+ block: true
+ same-node: true
+ block-thresholds:
+ build-step-failure-threshold: 'never'
+ failure-threshold: 'never'
+ unstable-threshold: 'FAILURE'
+ - trigger-builds:
+ - project: 'yardstick-apex-{slave}-daily-{stream1}'
+ predefined-parameters:
+ DEPLOY_SCENARIO=os-nosdn-ovs-noha
+ block: true
+ same-node: true
+ block-thresholds:
+ build-step-failure-threshold: 'never'
+ failure-threshold: 'never'
+ unstable-threshold: 'FAILURE'
- job-template:
name: 'apex-gs-clean-{stream}'
diff --git a/jjb/compass4nfv/compass-ci-jobs.yml b/jjb/compass4nfv/compass-ci-jobs.yml
index eb30004d1..efd1fc150 100644
--- a/jjb/compass4nfv/compass-ci-jobs.yml
+++ b/jjb/compass4nfv/compass-ci-jobs.yml
@@ -48,27 +48,35 @@
- 'os-nosdn-nofeature-ha':
disabled: false
auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
+ openstack-os-version: ''
- 'os-odl_l2-nofeature-ha':
disabled: false
auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
+ openstack-os-version: ''
- 'os-odl_l3-nofeature-ha':
disabled: false
auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
+ openstack-os-version: ''
- 'os-onos-nofeature-ha':
disabled: false
auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
+ openstack-os-version: ''
- 'os-ocl-nofeature-ha':
disabled: false
auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
+ openstack-os-version: ''
- 'os-onos-sfc-ha':
disabled: false
auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
+ openstack-os-version: ''
- 'os-odl_l2-moon-ha':
disabled: false
auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
+ openstack-os-version: 'xenial'
- 'os-nosdn-kvm-ha':
disabled: false
auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
+ openstack-os-version: ''
jobs:
- 'compass-{scenario}-{pod}-daily-{stream}'
@@ -122,6 +130,7 @@
predefined-parameters: |
DEPLOY_SCENARIO={scenario}
COMPASS_OS_VERSION={os-version}
+ COMPASS_OS_VERSION_OPTION={openstack-os-version}
same-node: true
block: true
- trigger-builds:
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml
index 3109fcb6e..e6b977f62 100644
--- a/jjb/functest/functest-ci-jobs.yml
+++ b/jjb/functest/functest-ci-jobs.yml
@@ -91,10 +91,10 @@
#--------------------------------
# None-CI PODs
#--------------------------------
- - orange-pod2:
+ - orange-pod1:
slave-label: '{pod}'
installer: joid
- <<: *brahmaputra
+ <<: *master
- orange-pod5:
slave-label: '{pod}'
installer: fuel
diff --git a/jjb/joid/joid-ci-jobs.yml b/jjb/joid/joid-ci-jobs.yml
index 1c998c9c4..cf4d9cc1c 100644
--- a/jjb/joid/joid-ci-jobs.yml
+++ b/jjb/joid/joid-ci-jobs.yml
@@ -16,10 +16,6 @@
stream: master
branch: '{stream}'
gs-pathname: ''
- brahmaputra: &brahmaputra
- stream: brahmaputra
- branch: 'stable/{stream}'
- gs-pathname: '/{stream}'
#--------------------------------
# POD, INSTALLER, AND BRANCH MAPPING
#--------------------------------
@@ -32,18 +28,12 @@
- virtual:
slave-label: joid-virtual
<<: *master
- - baremetal:
- slave-label: joid-baremetal
- <<: *brahmaputra
- - virtual:
- slave-label: joid-virtual
- <<: *brahmaputra
#--------------------------------
# None-CI PODs
#--------------------------------
- - orange-pod2:
- slave-label: orange-pod2
- <<: *brahmaputra
+ - orange-pod1:
+ slave-label: orange-pod1
+ <<: *master
- orange-pod2:
slave-label: orange-pod2
<<: *master
@@ -54,11 +44,11 @@
# new scenario descriptions
scenario:
- 'os-nosdn-nofeature-noha':
- auto-trigger-name: 'daily-trigger-disabled'
+ auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger'
- 'os-nosdn-nofeature-ha':
auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger'
- 'os-nosdn-lxd-ha':
- auto-trigger-name: 'daily-trigger-disabled'
+ auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger'
- 'os-nosdn-lxd-noha':
auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger'
- 'os-odl_l2-nofeature-ha':
@@ -223,29 +213,15 @@
triggers:
- timed: ''
- trigger:
- name: 'joid-os-nosdn-nofeature-ha-orange-pod2-master-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-nosdn-nofeature-ha-juniper-pod1-master-trigger'
- triggers:
- - timed: ''
-
-# os-nosdn-nofeature-ha trigger - branch: stable/brahmaputra
-- trigger:
- name: 'joid-os-nosdn-nofeature-ha-baremetal-brahmaputra-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-nosdn-nofeature-ha-virtual-brahmaputra-trigger'
+ name: 'joid-os-nosdn-nofeature-ha-orange-pod1-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-nosdn-nofeature-ha-orange-pod2-brahmaputra-trigger'
+ name: 'joid-os-nosdn-nofeature-ha-orange-pod2-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-nosdn-nofeature-ha-juniper-pod1-brahmaputra-trigger'
+ name: 'joid-os-nosdn-nofeature-ha-juniper-pod1-master-trigger'
triggers:
- timed: ''
@@ -259,29 +235,15 @@
triggers:
- timed: ''
- trigger:
- name: 'joid-os-odl_l2-nofeature-ha-orange-pod2-master-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-odl_l2-nofeature-ha-juniper-pod1-master-trigger'
- triggers:
- - timed: ''
-
-# os-odl_l2-nofeature-ha trigger - branch: stable/brahmaputra
-- trigger:
- name: 'joid-os-odl_l2-nofeature-ha-baremetal-brahmaputra-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-odl_l2-nofeature-ha-virtual-brahmaputra-trigger'
+ name: 'joid-os-odl_l2-nofeature-ha-orange-pod1-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-odl_l2-nofeature-ha-orange-pod2-brahmaputra-trigger'
+ name: 'joid-os-odl_l2-nofeature-ha-orange-pod2-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-odl_l2-nofeature-ha-juniper-pod1-brahmaputra-trigger'
+ name: 'joid-os-odl_l2-nofeature-ha-juniper-pod1-master-trigger'
triggers:
- timed: ''
@@ -295,6 +257,10 @@
triggers:
- timed: ''
- trigger:
+ name: 'joid-os-onos-nofeature-ha-orange-pod1-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
name: 'joid-os-onos-nofeature-ha-orange-pod2-master-trigger'
triggers:
- timed: ''
@@ -313,45 +279,15 @@
triggers:
- timed: ''
- trigger:
- name: 'joid-os-onos-sfc-ha-orange-pod2-master-trigger'
+ name: 'joid-os-onos-sfc-ha-orange-pod1-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-onos-sfc-ha-juniper-pod1-master-trigger'
- triggers:
- - timed: ''
-
-# os-onos-nofeature-ha trigger - branch: stable/brahmaputra
-- trigger:
- name: 'joid-os-onos-nofeature-ha-baremetal-brahmaputra-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-onos-nofeature-ha-virtual-brahmaputra-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-onos-nofeature-ha-orange-pod2-brahmaputra-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-onos-nofeature-ha-juniper-pod1-brahmaputra-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-onos-sfc-ha-baremetal-brahmaputra-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-onos-sfc-ha-virtual-brahmaputra-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-onos-sfc-ha-orange-pod2-brahmaputra-trigger'
+ name: 'joid-os-onos-sfc-ha-orange-pod2-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-onos-sfc-ha-juniper-pod1-brahmaputra-trigger'
+ name: 'joid-os-onos-sfc-ha-juniper-pod1-master-trigger'
triggers:
- timed: ''
@@ -365,29 +301,15 @@
triggers:
- timed: ''
- trigger:
- name: 'joid-os-nosdn-lxd-noha-orange-pod2-master-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-nosdn-lxd-noha-juniper-pod1-master-trigger'
- triggers:
- - timed: ''
-
-# os-nosdn-lxd-noha trigger - branch: stable/brahmaputra
-- trigger:
- name: 'joid-os-nosdn-lxd-noha-baremetal-brahmaputra-trigger'
+ name: 'joid-os-nosdn-lxd-noha-orange-pod1-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-nosdn-lxd-noha-virtual-brahmaputra-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-nosdn-lxd-noha-orange-pod2-brahmaputra-trigger'
+ name: 'joid-os-nosdn-lxd-noha-orange-pod2-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-nosdn-lxd-noha-juniper-pod1-brahmaputra-trigger'
+ name: 'joid-os-nosdn-lxd-noha-juniper-pod1-master-trigger'
triggers:
- timed: ''
@@ -401,6 +323,10 @@
triggers:
- timed: ''
- trigger:
+ name: 'joid-os-nosdn-lxd-ha-orange-pod1-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
name: 'joid-os-nosdn-lxd-ha-orange-pod2-master-trigger'
triggers:
- timed: ''
@@ -409,20 +335,24 @@
triggers:
- timed: ''
-# os-nosdn-lxd-ha trigger - branch: stable/brahmaputra
+# os-nosdn-nofeature-noha trigger - branch: master
+- trigger:
+ name: 'joid-os-nosdn-nofeature-noha-baremetal-master-trigger'
+ triggers:
+ - timed: '0 4 * * *'
- trigger:
- name: 'joid-os-nosdn-lxd-ha-baremetal-brahmaputra-trigger'
+ name: 'joid-os-nosdn-nofeature-noha-virtual-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-nosdn-lxd-ha-virtual-brahmaputra-trigger'
+ name: 'joid-os-nosdn-nofeature-noha-orange-pod1-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-nosdn-lxd-ha-orange-pod2-brahmaputra-trigger'
+ name: 'joid-os-nosdn-nofeature-noha-orange-pod2-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-nosdn-lxd-ha-juniper-pod1-brahmaputra-trigger'
+ name: 'joid-os-nosdn-nofeature-noha-juniper-pod1-master-trigger'
triggers:
- timed: ''
diff --git a/jjb/opnfv/slave-params.yml b/jjb/opnfv/slave-params.yml
index 641ae4e51..7c2d5c784 100644
--- a/jjb/opnfv/slave-params.yml
+++ b/jjb/opnfv/slave-params.yml
@@ -403,6 +403,28 @@
default: /srv
description: "Disks to use by ceph (comma separated list)"
- parameter:
+ name: 'orange-pod1-defaults'
+ parameters:
+ - node:
+ name: SLAVE_NAME
+ description: 'Slave name on Jenkins'
+ allowed-slaves:
+ - orange-pod1
+ default-slaves:
+ - orange-pod1
+ - string:
+ name: GIT_BASE
+ default: https://gerrit.opnfv.org/gerrit/$PROJECT
+ description: 'Git URL to use on this Jenkins Slave'
+ - string:
+ name: CEPH_DISKS
+ default: /dev/sdb /dev/sdc
+ description: "Disks to use by ceph by default (space separated list)"
+ - string:
+ name: EXTERNAL_NETWORK
+ default: ext-net;flat;161.105.231.2;161.105.231.62;161.105.231.1;161.105.231.0/26
+ description: "External network to create (name;type;first ip;last ip; gateway;network)"
+- parameter:
name: 'orange-pod2-defaults'
parameters:
- node:
diff --git a/jjb/yardstick/yardstick-ci-jobs.yml b/jjb/yardstick/yardstick-ci-jobs.yml
index c8d50a0ea..0d2937c1c 100644
--- a/jjb/yardstick/yardstick-ci-jobs.yml
+++ b/jjb/yardstick/yardstick-ci-jobs.yml
@@ -111,11 +111,11 @@
#--------------------------------
# None-CI PODs
#--------------------------------
- - orange-pod2:
+ - orange-pod1:
slave-label: '{pod}'
installer: joid
auto-trigger-name: 'daily-trigger-disabled'
- <<: *brahmaputra
+ <<: *master
- zte-pod1:
slave-label: '{pod}'
installer: fuel
@@ -349,6 +349,14 @@
description: 'Arguments to use in order to choose the backend DB'
- parameter:
+ name: 'yardstick-params-orange-pod1'
+ parameters:
+ - string:
+ name: YARDSTICK_DB_BACKEND
+ default: '-i 104.197.68.199:8086'
+ description: 'Arguments to use in order to choose the backend DB'
+
+- parameter:
name: 'yardstick-params-orange-pod2'
parameters:
- string:
diff --git a/prototypes/bifrost/README.md b/prototypes/bifrost/README.md
new file mode 100644
index 000000000..fffd1de3d
--- /dev/null
+++ b/prototypes/bifrost/README.md
@@ -0,0 +1,48 @@
+=====================
+How to deploy bifrost
+=====================
+The scripts and playbooks defined on this repo, need to be combined with proper `Bifrost <http://git.openstack.org/cgit/openstack/bifrost>`_ code.
+
+Please follow that steps:
+
+1. Clone bifrost::
+
+ git clone https://git.openstack.org/openstack/bifrost /opt/bifrost
+
+2. Clone releng::
+
+ git clone https://gerrit.opnfv.org/gerrit/releng /opt/releng
+
+3. Clone infracloud::
+
+ git clone https://git.openstack.org/openstack-infra/puppet-infracloud /opt/puppet-infracloud
+
+4. Combine releng scripts and playbooks with bifrost::
+
+ cp -R /opt/releng/prototypes/bifrost/* /opt/bifrost/
+
+5. Run destroy script if you need to cleanup previous environment::
+
+ cd /opt/bifrost
+ ./scripts/destroy_env.sh
+
+6. Run deployment script to spin up 3 vms with bifrost: jumphost, controller and compute::
+
+ cd /opt/bifrost
+ ./scripts/test-bifrost-deployment.sh
+
+It is likely that the script will show some errors due to timeout. Please ignore the errors, and wait until the vms are completely bootstrapped. To verify it you can check with ironic::
+
+ cd /opt/bifrost
+ source env-vars
+ ironic node-list
+
+And wait until all the vms are in **active** Provisioning State.
+
+7. Check the IPs assigned to each of the VMS. You can check it by looking at inventory:
+
+ cat /tmp/baremetal.csv
+
+8. You can enter into the vms with devuser login/pass:
+
+ ssh devuser@192.168.122.2
diff --git a/prototypes/bifrost/playbooks/test-bifrost-infracloud.yaml b/prototypes/bifrost/playbooks/test-bifrost-infracloud.yaml
new file mode 100644
index 000000000..f193ea8d0
--- /dev/null
+++ b/prototypes/bifrost/playbooks/test-bifrost-infracloud.yaml
@@ -0,0 +1,66 @@
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2016 RedHat 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
+##############################################################################
+---
+- hosts: localhost
+ connection: local
+ name: "Setting pre-test conditions"
+ become: yes
+ ignore_errors: yes
+ tasks:
+ - name: Remove pre-existing leases file
+ file: path=/var/lib/misc/dnsmasq.leases state=absent
+- hosts: localhost
+ connection: local
+ name: "Executes install, enrollment, and testing in one playbook"
+ become: no
+ gather_facts: yes
+ pre_tasks:
+ - name: "Override the ipv4_gateway setting"
+ set_fact:
+ ipv4_gateway: "192.168.122.1"
+ roles:
+ - { role: bifrost-prep-for-install, when: skip_install is not defined }
+ environment:
+ http_proxy: "{{ lookup('env','http_proxy') }}"
+ https_proxy: "{{ lookup('env','https_proxy') }}"
+- hosts: localhost
+ connection: local
+ name: "Executes install, enrollment, and testing in one playbook"
+ become: yes
+ gather_facts: yes
+ roles:
+ - role: bifrost-ironic-install
+ cleaning: false
+ testing: true
+ # NOTE(TheJulia): While the next step creates a ramdisk, some elements
+ # do not support ramdisk-image-create as they invoke steps to cleanup
+ # the ramdisk which causes ramdisk-image-create to believe it failed.
+ - { role: bifrost-create-dib-image, dib_imagename: "{{ http_boot_folder }}/ipa", build_ramdisk: false, dib_os_element: "{{ ipa_dib_os_element|default('debian') }}", dib_os_release: "jessie", dib_elements: "ironic-agent {{ ipa_extra_dib_elements | default('') }}", when: create_ipa_image | bool == true }
+ - { role: bifrost-create-dib-image, dib_imagetype: "qcow2", dib_imagename: "{{deploy_image}}", dib_os_element: "ubuntu-minimal", dib_os_release: "trusty", dib_elements: "vm serial-console simple-init devuser infra-cloud-bridge puppet growroot {{ extra_dib_elements|default('') }}", dib_packages: "openssh-server,vlan,vim,less,bridge-utils,language-pack-en,iputils-ping,rsyslog", when: create_image_via_dib | bool == true and transform_boot_image | bool == false }
+ environment:
+ http_proxy: "{{ lookup('env','http_proxy') }}"
+ https_proxy: "{{ lookup('env','https_proxy') }}"
+- hosts: baremetal
+ name: "Enroll node with Ironic"
+ become: no
+ connection: local
+ roles:
+ - role: ironic-enroll-dynamic
+ - { role: ironic-inspect-node, when: inspect_nodes | default('false') | bool == true }
+- hosts: baremetal
+ vars:
+ multinode_testing: "{{ inventory_dhcp | bool == true }}"
+ name: "Create configuration drive files and deploy machines."
+ become: no
+ connection: local
+ roles:
+ - role: bifrost-configdrives-dynamic
+ - role: bifrost-deploy-nodes-dynamic
+ - role: bifrost-prepare-for-test-dynamic
+ serial: 1
diff --git a/prototypes/bifrost/scripts/destroy_env.sh b/prototypes/bifrost/scripts/destroy_env.sh
new file mode 100644
index 000000000..aef4ccba3
--- /dev/null
+++ b/prototypes/bifrost/scripts/destroy_env.sh
@@ -0,0 +1,38 @@
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2016 RedHat 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
+##############################################################################
+#!/bin/bash
+virsh destroy jumphost.opnfvlocal || true
+virsh destroy controller00.opnfvlocal || true
+virsh destroy compute00.opnfvlocal || true
+virsh undefine jumphost.opnfvlocal || true
+virsh undefine controller00.opnfvlocal || true
+virsh undefine compute00.opnfvlocal || true
+
+service ironic-conductor stop
+
+echo "removing from database"
+mysql -u root ironic --execute "truncate table ports;"
+mysql -u root ironic --execute "delete from node_tags;"
+mysql -u root ironic --execute "delete from nodes;"
+mysql -u root ironic --execute "delete from conductors;"
+echo "removing leases"
+> /var/lib/dnsmasq/dnsmasq.leases
+echo "removing logs"
+rm -rf /var/log/libvirt/baremetal_logs/*.log
+
+# clean up images
+rm -rf /httpboot/*
+rm -rf /tftpboot/*
+rm -rf /var/lib/libvirt/images/*.qcow2
+
+echo "restarting services"
+service libvirtd restart
+service ironic-api restart
+service ironic-conductor start
+service ironic-inspector restart
diff --git a/prototypes/bifrost/scripts/test-bifrost-deployment.sh b/prototypes/bifrost/scripts/test-bifrost-deployment.sh
new file mode 100644
index 000000000..807d823e0
--- /dev/null
+++ b/prototypes/bifrost/scripts/test-bifrost-deployment.sh
@@ -0,0 +1,120 @@
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2016 Ericsson 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
+##############################################################################
+#!/bin/bash
+
+set -eux
+set -o pipefail
+export PYTHONUNBUFFERED=1
+SCRIPT_HOME="$(cd "$(dirname "$0")" && pwd)"
+BIFROST_HOME=$SCRIPT_HOME/..
+ANSIBLE_INSTALL_ROOT=${ANSIBLE_INSTALL_ROOT:-/opt/stack}
+ENABLE_VENV="false"
+USE_DHCP="false"
+USE_VENV="false"
+BUILD_IMAGE=true
+
+# Set defaults for ansible command-line options to drive the different
+# tests.
+
+# NOTE(TheJulia/cinerama): The variables defined on the command line
+# for the default and DHCP tests are to drive the use of Cirros as the
+# deployed operating system, and as such sets the test user to cirros,
+# and writes a debian style interfaces file out to the configuration
+# drive as cirros does not support the network_info.json format file
+# placed in the configuration drive. The "build image" test does not
+# use cirros.
+
+TEST_VM_NUM_NODES=3
+export TEST_VM_NODE_NAMES="jumphost.opnfvlocal controller00.opnfvlocal compute00.opnfvlocal"
+export VM_DOMAIN_TYPE="kvm"
+export VM_CPU=4
+TEST_PLAYBOOK="test-bifrost-infracloud.yaml"
+USE_INSPECTOR=true
+USE_CIRROS=false
+TESTING_USER=root
+VM_MEMORY_SIZE="8192"
+DOWNLOAD_IPA=true
+CREATE_IPA_IMAGE=false
+INSPECT_NODES=true
+INVENTORY_DHCP=false
+INVENTORY_DHCP_STATIC_IP=false
+WRITE_INTERFACES_FILE=true
+
+# Set BIFROST_INVENTORY_SOURCE
+export BIFROST_INVENTORY_SOURCE=/tmp/baremetal.csv
+
+# DIB custom elements path
+export ELEMENTS_PATH=/usr/share/diskimage-builder/elements:/opt/puppet-infracloud/files/elements
+
+# settings for console access
+export DIB_DEV_USER_PWDLESS_SUDO=yes
+export DIB_DEV_USER_PASSWORD=devuser
+
+# Source Ansible
+# NOTE(TheJulia): Ansible stable-1.9 source method tosses an error deep
+# under the hood which -x will detect, so for this step, we need to suspend
+# and then re-enable the feature.
+set +x +o nounset
+$SCRIPT_HOME/env-setup.sh
+source ${ANSIBLE_INSTALL_ROOT}/ansible/hacking/env-setup
+ANSIBLE=$(which ansible-playbook)
+set -x -o nounset
+
+# Change working directory
+cd $BIFROST_HOME/playbooks
+
+# Syntax check of dynamic inventory test path
+${ANSIBLE} -vvvv \
+ -i inventory/localhost \
+ test-bifrost-create-vm.yaml \
+ --syntax-check \
+ --list-tasks
+${ANSIBLE} -vvvv \
+ -i inventory/localhost \
+ ${TEST_PLAYBOOK} \
+ --syntax-check \
+ --list-tasks \
+ -e testing_user=${TESTING_USER}
+
+# Create the test VMS
+${ANSIBLE} -vvvv \
+ -i inventory/localhost \
+ test-bifrost-create-vm.yaml \
+ -e test_vm_num_nodes=${TEST_VM_NUM_NODES} \
+ -e test_vm_memory_size=${VM_MEMORY_SIZE} \
+ -e enable_venv=${ENABLE_VENV} \
+ -e test_vm_domain_type=${VM_DOMAIN_TYPE}
+
+# Execute the installation and VM startup test.
+${ANSIBLE} -vvvv \
+ -i inventory/bifrost_inventory.py \
+ ${TEST_PLAYBOOK} \
+ -e use_cirros=${USE_CIRROS} \
+ -e testing_user=${TESTING_USER} \
+ -e test_vm_num_nodes=${TEST_VM_NUM_NODES} \
+ -e inventory_dhcp=${INVENTORY_DHCP} \
+ -e inventory_dhcp_static_ip=${INVENTORY_DHCP_STATIC_IP} \
+ -e enable_venv=${ENABLE_VENV} \
+ -e enable_inspector=${USE_INSPECTOR} \
+ -e inspect_nodes=${INSPECT_NODES} \
+ -e download_ipa=${DOWNLOAD_IPA} \
+ -e create_ipa_image=${CREATE_IPA_IMAGE} \
+ -e write_interfaces_file=${WRITE_INTERFACES_FILE} \
+ -e ipv4_gateway=192.168.122.1
+EXITCODE=$?
+
+if [ $EXITCODE != 0 ]; then
+ echo "****************************"
+ echo "Test failed. See logs folder"
+ echo "****************************"
+fi
+
+$SCRIPT_HOME/collect-test-info.sh
+
+exit $EXITCODE