Last active
August 29, 2015 14:26
-
-
Save mallow111/0d86a49c9b8c7cfcb5b0 to your computer and use it in GitHub Desktop.
How to setup upstream gate for octavia
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://wiki.openstack.org/wiki/Neutron/FunctionalGateSetup | |
By defualt Neutron LbaaS runs against haproxy, but we want to know if we install octavia plugin, is that possible for Neutron LBaaS to pass tempest test, that is the goal of this task. | |
Octavia is just the backend same as haproxy, so we dont need to setup new job for it, but we need to set in the section of Neutron-lbaas in project.yaml to make it pass octavia gate, also need to mark the expriemental gate in layout.yaml, the details are listed in the below: | |
step 0: add octavia in PROJECT env list otherwise, octavia plugin is not able to git cloned in the following step, this file is located in devstack-gate/devstack-vm-gate-wrap.sh | |
step1: setup Jenkins/jobs/projects.yaml: | |
under the section add octavia gate: | |
- project: | |
name: neutron-lbaas | |
node: 'bare-precise || bare-trusty' | |
tarball-site: tarballs.openstack.org | |
doc-publisher-site: docs.openstack.org | |
jobs: | |
.......... skip other jobs | |
- '{pipeline}-neutron-{lbaasversion}-dsvm-{lbaastest}{branch-designator}': | |
pipeline: gate | |
node: 'devstack-precise || devstack-trusty' | |
branch-designator: '' | |
branch-override: default | |
lbaasversion: lbaasv2-octavia ---- here we customerize the gate as lbaasv2-octavia, we dont need to set for lbaas v1. | |
lbaastest: api | |
step2: setup gate in zuul/layout.yaml to add the expriemental gate for octavia gate, here we dont add jenkins check only jenkins gate | |
- name: openstack/neutron-lbaas | |
....... | |
experimental: | |
- gate-neutron-lbaasv2-octavia-dsvm-api | |
step 3: go to neutron_lbaas/tests/contrib/gate_hook.sh and neutron_lbaas/tests/contrib/post_test_hook.sh to enable plugin octavia | |
inside of gate_hook.sh we add octavia plugin: | |
if [ "$1" = "lbaasv1" ]; then | |
... | |
elif [ "$1" = "lbaasv2" ]; then | |
..... | |
elif [ "$1" = "lbaasv2-octavia" ]; then | |
testenv="apiv2" | |
............................................................................................................................... | |
if [ "$1" = "lbaasv2-octavia" ]; then | |
DEVSTACK_LOCAL_CONFIG=$'enable_plugin neutron-lbaas https://review.openstack.org/openstack/neutron-lbaas refs/changes/14/174114/16\n' | |
DEVSTACK_LOCAL_CONFIG+=$'enable_plugin octavia https://git.openstack.org/openstack/octavia\n' | |
export DEVSTACK_LOCAL_CONFIG | |
else | |
export DEVSTACK_LOCAL_CONFIG="enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas" | |
fi | |
if [ "$testenv" != "apiv1" ]; then | |
# Override enabled services, so we can turn on lbaasv2. | |
# While we're at it, disable cinder and swift, since we don't need them. | |
..... | |
if [ "$1" = "lbaasv2-octavia" ]; then | |
ENABLED_SERVICES+=",octavia,o-cw,o-hk,o-hm,o-api" | |
fi | |
export ENABLED_SERVICES | |
fi | |
inside of the file post_test_hook.sh, we set the testenv based on the first argument($1) and then set permission for stack owner for the file octavia: | |
OCTAVIA_DIR="$BASE/new/octavia"----set the path for octavia | |
if [ "$1" = "lbaasv1" ]; then | |
... | |
elif [ "$1" = "lbaasv2" ]; then | |
..... | |
elif [ "$1" = "lbaasv2-octavia" ]; then | |
testenv="apiv2" | |
// set the permission for stack ownership | |
if [ "$1" = "lbaasv2-octavia" ]; then | |
cd $OCTAVIA_DIR | |
sudo chown -R $owner:stack $OCTAVIA_DIR | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment