summaryrefslogtreecommitdiffstats
path: root/ci/deploy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/deploy.sh')
-rwxr-xr-xci/deploy.sh49
1 files changed, 46 insertions, 3 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 6d75bac0..abf3866b 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -143,6 +143,17 @@ parse_deploy_settings() {
echo -e "${red}ERROR: Failed to parse deploy settings file $DEPLOY_SETTINGS_FILE ${reset}"
exit 1
fi
+
+ if [ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' ]; then
+ if [ "$net_isolation_enabled" == "FALSE" ]; then
+ echo -e "${red}ERROR: flat network is not supported with ovs-dpdk ${reset}"
+ exit 1
+ fi
+ if [[ ! $enabled_network_list =~ "private_network" ]]; then
+ echo -e "${red}ERROR: tenant network is not enabled for ovs-dpdk ${reset}"
+ exit 1
+ fi
+ fi
}
##parses baremetal yaml settings into compatible json
@@ -484,7 +495,6 @@ function setup_undercloud_vm {
# extra space to overwrite the previous connectivity output
echo -e "${blue}\r ${reset}"
sleep 1
- ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" "if ! ip a s eth2 | grep ${public_network_provisioner_ip} > /dev/null; then ip a a ${public_network_provisioner_ip}/${public_network_cidr##*/} dev eth2; ip link set up dev eth2; fi"
# ssh key fix for stack user
ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" "restorecon -r /home/stack"
@@ -654,12 +664,12 @@ function configure_undercloud {
ovs_dpdk_bridge=''
fi
- if ! controller_nic_template=$(python3.4 -B $LIB/python/apex-python-utils.py nic-template -t $CONFIG/nics-controller.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family); then
+ if ! controller_nic_template=$(python3.4 -B $LIB/python/apex-python-utils.py nic-template -r controller -s $NETSETS -i $net_isolation_enabled -t $CONFIG/nics-template.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family); then
echo -e "${red}ERROR: Failed to generate controller NIC heat template ${reset}"
exit 1
fi
- if ! compute_nic_template=$(python3.4 -B $LIB/python/apex-python-utils.py nic-template -t $CONFIG/nics-compute.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family -d "$ovs_dpdk_bridge"); then
+ if ! compute_nic_template=$(python3.4 -B $LIB/python/apex-python-utils.py nic-template -r compute -s $NETSETS -i $net_isolation_enabled -t $CONFIG/nics-template.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family -d "$ovs_dpdk_bridge"); then
echo -e "${red}ERROR: Failed to generate compute NIC heat template ${reset}"
exit 1
fi
@@ -762,6 +772,30 @@ sudo sed -i '/#workers\s=/c\workers = 2' /etc/heat/heat.conf
sudo systemctl restart openstack-heat-engine
sudo systemctl restart openstack-heat-api
EOI
+
+# configure external network
+ ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" << EOI
+if [[ "$public_network_vlan" != "native" ]]; then
+ cat <<EOF > /etc/sysconfig/network-scripts/ifcfg-vlan${public_network_vlan}
+DEVICE=vlan${public_network_vlan}
+ONBOOT=yes
+DEVICETYPE=ovs
+TYPE=OVSIntPort
+BOOTPROTO=static
+IPADDR=${public_network_provisioner_ip}
+PREFIX=${public_network_cidr##*/}
+OVS_BRIDGE=br-ctlplane
+OVS_OPTIONS="tag=${public_network_vlan}"
+EOF
+ ifup vlan${public_network_vlan}
+else
+ if ! ip a s eth2 | grep ${public_network_provisioner_ip} > /dev/null; then
+ ip a a ${public_network_provisioner_ip}/${public_network_cidr##*/} dev eth2
+ ip link set up dev eth2
+ fi
+fi
+EOI
+
# WORKAROUND: must restart the above services to fix sync problem with nova compute manager
# TODO: revisit and file a bug if necessary. This should eventually be removed
# as well as glance api problem
@@ -780,6 +814,8 @@ function undercloud_prep_overcloud_deploy {
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight_sfc.yaml"
elif [ "${deploy_options_array['vpn']}" == 'True' ]; then
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight_sdnvpn.yaml"
+ elif [ "${deploy_options_array['vpp']}" == 'True' ]; then
+ DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight_fdio.yaml"
else
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight.yaml"
fi
@@ -1054,11 +1090,18 @@ echo "Configuring Neutron external network"
neutron net-create external --router:external=True --tenant-id \$(openstack project show service | grep id | awk '{ print \$4 }')
neutron subnet-create --name external-net --tenant-id \$(openstack project show service | grep id | awk '{ print \$4 }') --disable-dhcp external --gateway ${public_network_gateway} --allocation-pool start=${public_network_floating_ip_range%%,*},end=${public_network_floating_ip_range##*,} ${public_network_cidr}
+echo "Removing sahara endpoint and service"
+sahara_service_id=\$(openstack service list | grep sahara | cut -d ' ' -f 2)
+sahara_endpoint_id=\$(openstack endpoint list | grep sahara | cut -d ' ' -f 2)
+openstack endpoint delete \$sahara_endpoint_id
+openstack service delete \$sahara_service_id
+
echo "Removing swift endpoint and service"
swift_service_id=\$(openstack service list | grep swift | cut -d ' ' -f 2)
swift_endpoint_id=\$(openstack endpoint list | grep swift | cut -d ' ' -f 2)
openstack endpoint delete \$swift_endpoint_id
openstack service delete \$swift_service_id
+
EOI
echo -e "${blue}INFO: Checking if OVS bridges have IP addresses...${reset}"