diff options
author | Tim Rozet <trozet@redhat.com> | 2017-08-01 17:20:29 -0400 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2017-08-09 02:28:21 +0000 |
commit | 5597f9921bd46f5f0a100e64ed927f7170fe7725 (patch) | |
tree | 2aae35ff17c33a3fb78ecf6d0d89fd43edeb5c89 /lib | |
parent | a36df896ab212bc3fc1705d1ead949a5fabcd77e (diff) |
Enables SFC scenarios
apex-tripleo-heat-templates: I230b31dc9ed0ecc5046064628ba2f2505e589522
apex-puppet-tripleo: Icd433ddc6ae7de19a09f9e33b410a362c317138a
Change-Id: I0b17b4e86eb90b949bd62f7e73944adad77ef1a3
Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/overcloud-deploy-functions.sh | 15 | ||||
-rwxr-xr-x | lib/undercloud-functions.sh | 9 |
2 files changed, 22 insertions, 2 deletions
diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh index bfa98e54..7b08d18a 100755 --- a/lib/overcloud-deploy-functions.sh +++ b/lib/overcloud-deploy-functions.sh @@ -28,7 +28,7 @@ function overcloud_deploy { # Custom Deploy Environment Templates if [[ "${#deploy_options_array[@]}" -eq 0 || "${deploy_options_array['sdn_controller']}" == 'opendaylight' ]]; then if [ "${deploy_options_array['sfc']}" == 'True' ]; then - DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight_sfc.yaml" + DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-sfc-opendaylight.yaml" elif [ "${deploy_options_array['vpn']}" == 'True' ]; then DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-bgpvpn-opendaylight.yaml" if [ "${deploy_options_array['gluon']}" == 'True' ]; then @@ -448,6 +448,19 @@ fi EOF done EOI + elif [ "${deploy_options_array['sfc']}" == 'True' ]; then + ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI || (echo "SFC config failed, exiting..."; exit 1) +source stackrc +set -o errexit +for node in \$(nova list | grep controller | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"); do +echo "Configuring networking_sfc.conf on \$node" +ssh -T ${SSH_OPTIONS[@]} "heat-admin@\$node" <<EOF +set -o errexit +sudo ln -s /etc/neutron/networking_sfc.conf /etc/neutron/conf.d/neutron-server/networking_sfc.conf +sudo systemctl restart neutron-server +EOF +done +EOI fi if [ "$debug" == 'TRUE' ]; then diff --git a/lib/undercloud-functions.sh b/lib/undercloud-functions.sh index 44bd3903..08e1b7cf 100755 --- a/lib/undercloud-functions.sh +++ b/lib/undercloud-functions.sh @@ -147,7 +147,14 @@ function configure_undercloud { ovs_dpdk_bridge='' fi - if ! controller_nic_template=$(python3 -B $LIB/python/apex_python_utils.py nic-template -r controller -s $NETSETS -t $BASE/nics-template.yaml.jinja2 -e "br-ex" --deploy-settings-file $DEPLOY_SETTINGS_FILE); then + # for some reason putting IP on the bridge fails with pinging validation in OOO + if [ "${deploy_options_array['sfc']}" == 'True' ]; then + controller_external='interface' + else + controller_external='br-ex' + fi + + if ! controller_nic_template=$(python3 -B $LIB/python/apex_python_utils.py nic-template -r controller -s $NETSETS -t $BASE/nics-template.yaml.jinja2 -e $controller_external --deploy-settings-file $DEPLOY_SETTINGS_FILE); then echo -e "${red}ERROR: Failed to generate controller NIC heat template ${reset}" exit 1 fi |