Add NFV orchestration services CI job
Change-Id: I33484d0961f1cd17ed05dd124eba68d99b4db83f
This commit is contained in:
parent
e73fe77d7d
commit
535aba79a9
@ -22,6 +22,16 @@ function deploy {
|
|||||||
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv deploy > /tmp/logs/ansible/deploy
|
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv deploy > /tmp/logs/ansible/deploy
|
||||||
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv post-deploy > /tmp/logs/ansible/post-deploy
|
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv post-deploy > /tmp/logs/ansible/post-deploy
|
||||||
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv check > /tmp/logs/ansible/check-deploy
|
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv check > /tmp/logs/ansible/check-deploy
|
||||||
|
. /etc/kolla/admin-openrc.sh
|
||||||
|
# Wait for service ready
|
||||||
|
sleep 15
|
||||||
|
|
||||||
|
if ! openstack image show cirros >/dev/null 2>&1; then
|
||||||
|
echo "Initialising OpenStack resources via init-runonce"
|
||||||
|
tools/init-runonce
|
||||||
|
else
|
||||||
|
echo "Not running init-runonce - resources exist"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -174,6 +174,14 @@
|
|||||||
chdir: "{{ kolla_ansible_src_dir }}"
|
chdir: "{{ kolla_ansible_src_dir }}"
|
||||||
environment:
|
environment:
|
||||||
ACTION: "{{ scenario }}"
|
ACTION: "{{ scenario }}"
|
||||||
|
when: scenario not in ['scenario_nfv']
|
||||||
|
|
||||||
|
- name: Run test-scenario-nfv.sh script
|
||||||
|
shell:
|
||||||
|
cmd: tests/test-scenario-nfv.sh
|
||||||
|
executable: /bin/bash
|
||||||
|
chdir: "{{ kolla_ansible_src_dir }}"
|
||||||
|
when: scenario == "scenario_nfv"
|
||||||
|
|
||||||
- name: Run reconfigure.sh script
|
- name: Run reconfigure.sh script
|
||||||
shell:
|
shell:
|
||||||
|
@ -42,3 +42,12 @@ enable_kuryr: "yes"
|
|||||||
enable_etcd: "yes"
|
enable_etcd: "yes"
|
||||||
docker_custom_option: " -H unix:///var/run/docker.sock -H tcp://{{ api_interface_address }}:2375 --cluster-store=etcd://{{ api_interface_address }}:2379 --cluster-advertise={{ api_interface_address }}:2375"
|
docker_custom_option: " -H unix:///var/run/docker.sock -H tcp://{{ api_interface_address }}:2375 --cluster-store=etcd://{{ api_interface_address }}:2379 --cluster-advertise={{ api_interface_address }}:2375"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if scenario == "scenario_nfv" %}
|
||||||
|
glance_api_hosts: ["{{ inventory_hostname }}"]
|
||||||
|
enable_tacker: "yes"
|
||||||
|
enable_neutron_sfc: "yes"
|
||||||
|
enable_mistral: "yes"
|
||||||
|
enable_redis: "yes"
|
||||||
|
enable_barbican: "yes"
|
||||||
|
{% endif %}
|
||||||
|
@ -8,21 +8,11 @@ export PYTHONUNBUFFERED=1
|
|||||||
|
|
||||||
|
|
||||||
function test_openstack_logged {
|
function test_openstack_logged {
|
||||||
# Wait for service ready
|
|
||||||
sleep 15
|
|
||||||
|
|
||||||
. /etc/kolla/admin-openrc.sh
|
. /etc/kolla/admin-openrc.sh
|
||||||
|
|
||||||
openstack --debug compute service list
|
openstack --debug compute service list
|
||||||
openstack --debug network agent list
|
openstack --debug network agent list
|
||||||
|
|
||||||
if ! openstack image show cirros >/dev/null 2>&1; then
|
|
||||||
echo "Initialising OpenStack resources via init-runonce"
|
|
||||||
tools/init-runonce
|
|
||||||
else
|
|
||||||
echo "Not running init-runonce - resources exist"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "TESTING: Server creation"
|
echo "TESTING: Server creation"
|
||||||
openstack server create --wait --image cirros --flavor m1.tiny --key-name mykey --network demo-net kolla_boot_test
|
openstack server create --wait --image cirros --flavor m1.tiny --key-name mykey --network demo-net kolla_boot_test
|
||||||
openstack --debug server list
|
openstack --debug server list
|
||||||
|
78
tests/test-scenario-nfv.sh
Executable file
78
tests/test-scenario-nfv.sh
Executable file
@ -0,0 +1,78 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -o xtrace
|
||||||
|
set -o errexit
|
||||||
|
|
||||||
|
# Enable unbuffered output for Ansible in Jenkins.
|
||||||
|
export PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
|
|
||||||
|
function test_tacker {
|
||||||
|
echo "TESTING: Tacker VIM,VNFD and VNF creation"
|
||||||
|
sh contrib/demos/tacker/deploy-tacker-demo
|
||||||
|
openstack vim list
|
||||||
|
openstack vnf list
|
||||||
|
openstack vnf descriptor list
|
||||||
|
|
||||||
|
while [[ $(openstack vnf show kolla-sample-vnf -f value -c status) != "ACTIVE" ]]; do
|
||||||
|
echo "VNF not running yet"
|
||||||
|
attempt=$((attempt+1))
|
||||||
|
if [[ $attempt -eq 10 ]]; then
|
||||||
|
echo "VNF failed to start"
|
||||||
|
openstack vnf show kolla-sample-vnf
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
sleep 10
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_barbican {
|
||||||
|
echo "TESTING: Barbican"
|
||||||
|
openstack secret list
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_mistral {
|
||||||
|
echo "TESTING: Mistral"
|
||||||
|
openstack workflow list
|
||||||
|
openstack workflow execution list
|
||||||
|
openstack action execution list
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_nova {
|
||||||
|
echo "TESTING: Nova"
|
||||||
|
openstack server list
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_heat {
|
||||||
|
echo "TESTING: Heat"
|
||||||
|
openstack stack list
|
||||||
|
}
|
||||||
|
|
||||||
|
function install_requirements {
|
||||||
|
echo "TESTING: Install requirements"
|
||||||
|
sudo -H pip install --ignore-installed -U "python-tackerclient" "python-heatclient" "networking-sfc" "python-mistralclient" "python-barbicanclient"
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_scenario_nfv_logged {
|
||||||
|
. /etc/kolla/admin-openrc.sh
|
||||||
|
install_requirements
|
||||||
|
test_tacker
|
||||||
|
test_barbican
|
||||||
|
test_mistral
|
||||||
|
test_nova
|
||||||
|
test_heat
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_scenario_nfv {
|
||||||
|
echo "Testing Scenario NFV"
|
||||||
|
test_scenario_nfv_logged > /tmp/logs/ansible/test-scenario-nfv 2>&1
|
||||||
|
result=$?
|
||||||
|
if [[ $result != 0 ]]; then
|
||||||
|
echo "Testing Scenario NFV failed. See ansible/test-scenario-nfv for details"
|
||||||
|
else
|
||||||
|
echo "Successfully Scenario NFV. See ansible/test-scenario-nfv for details"
|
||||||
|
fi
|
||||||
|
return $result
|
||||||
|
}
|
||||||
|
|
||||||
|
test_scenario_nfv
|
@ -48,6 +48,10 @@ EOF
|
|||||||
GATE_IMAGES+=",zun,kuryr,etcd"
|
GATE_IMAGES+=",zun,kuryr,etcd"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $ACTION == "scenario_nfv" ]]; then
|
||||||
|
GATE_IMAGES+=",tacker,mistral,redis,barbican"
|
||||||
|
fi
|
||||||
|
|
||||||
cat <<EOF | sudo tee /etc/kolla/kolla-build.conf
|
cat <<EOF | sudo tee /etc/kolla/kolla-build.conf
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
include_header = /etc/kolla/header
|
include_header = /etc/kolla/header
|
||||||
|
@ -98,3 +98,14 @@
|
|||||||
base_distro: ubuntu
|
base_distro: ubuntu
|
||||||
install_type: source
|
install_type: source
|
||||||
scenario: zun
|
scenario: zun
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: kolla-ansible-centos-source-scenario-nfv
|
||||||
|
parent: kolla-ansible-base
|
||||||
|
nodeset: kolla-ansible-centos-multi
|
||||||
|
description: CI scenario to test NFV orchestration
|
||||||
|
voting: false
|
||||||
|
vars:
|
||||||
|
base_distro: centos
|
||||||
|
install_type: source
|
||||||
|
scenario: scenario_nfv
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
files: ^ansible\/roles\/bifrost\/.*
|
files: ^ansible\/roles\/bifrost\/.*
|
||||||
- kolla-ansible-ubuntu-source-zun:
|
- kolla-ansible-ubuntu-source-zun:
|
||||||
files: ^ansible\/roles\/zun\/.*
|
files: ^ansible\/roles\/zun\/.*
|
||||||
|
- kolla-ansible-centos-source-scenario-nfv:
|
||||||
|
files: ^ansible\/roles\/(barbican|heat|mistral|redis|tacker)\/.*
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- kolla-ansible-centos-source
|
- kolla-ansible-centos-source
|
||||||
@ -29,3 +31,5 @@
|
|||||||
periodic:
|
periodic:
|
||||||
jobs:
|
jobs:
|
||||||
- kolla-ansible-bifrost-centos-source
|
- kolla-ansible-bifrost-centos-source
|
||||||
|
- kolla-ansible-ubuntu-source-zun
|
||||||
|
- kolla-ansible-centos-source-scenario-nfv
|
||||||
|
Loading…
Reference in New Issue
Block a user