summaryrefslogtreecommitdiffstats
path: root/ci/deploy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/deploy.sh')
-rwxr-xr-xci/deploy.sh45
1 files changed, 31 insertions, 14 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index df528f50..3143aae9 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -282,7 +282,7 @@ parse_inventory_file() {
for entry in $inventory; do
if echo $entry | grep -Eo "^nodes_node[0-9]+_" > /dev/null; then
this_node=$(echo $entry | grep -Eo "^nodes_node[0-9]+_")
- if [[ $inventory_list != *"$this_node"* ]]; then
+ if [[ "$inventory_list" != *"$this_node"* ]]; then
inventory_list+="$this_node "
fi
fi
@@ -296,7 +296,7 @@ parse_inventory_file() {
node_total=$node_count
- if [[ "$node_total" -lt 5 && ha_enabled == "TRUE" ]]; then
+ if [[ "$node_total" -lt 5 && ( ha_enabled == "TRUE" || "$ha_enabled" == "true" ) ]]; then
echo -e "${red}ERROR: You must provide at least 5 nodes for HA baremetal deployment${reset}"
exit 1
elif [[ "$node_total" -lt 2 ]]; then
@@ -659,11 +659,11 @@ function configure_network_environment {
sed -i 's#^.*Controller::Net::SoftwareConfig:.*$# OS::TripleO::Controller::Net::SoftwareConfig: nics/controller'${nic_ext}'.yaml#' $1
# check for ODL L3
- if [ ${deploy_options_array['sdn_l3']} == 'true' ]; then
+ if [ "${deploy_options_array['sdn_l3']}" == 'true' ]; then
nic_ext+=_br-ex
fi
- if [ ${deploy_options_array['sdn_controller']} == 'onos' ]; then
+ if [ "${deploy_options_array['sdn_controller']}" == 'onos' ]; then
nic_ext+=_no-public-ip
fi
@@ -779,27 +779,30 @@ sleep 15
##preping it for deployment and launch the deploy
##params: none
function undercloud_prep_overcloud_deploy {
- if [[ ${#deploy_options_array[@]} -eq 0 || ${deploy_options_array['sdn_controller']} == 'opendaylight' ]]; then
- if [ ${deploy_options_array['sdn_l3']} == 'true' ]; then
+ if [[ "${#deploy_options_array[@]}" -eq 0 || "${deploy_options_array['sdn_controller']}" == 'opendaylight' ]]; then
+ if [ "${deploy_options_array['sdn_l3']}" == 'true' ]; then
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight_l3.yaml"
+ elif [ "${deploy_options_array['sfc']}" == 'true' ]; then
+ DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight_sfc.yaml"
else
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight.yaml"
fi
SDN_IMAGE=opendaylight
- if [ ${deploy_options_array['sfc']} == 'true' ]; then
+ if [ "${deploy_options_array['sfc']}" == 'true' ]; then
SDN_IMAGE+=-sfc
fi
- elif [ ${deploy_options_array['sdn_controller']} == 'opendaylight-external' ]; then
+ elif [ "${deploy_options_array['sdn_controller']}" == 'opendaylight-external' ]; then
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight-external.yaml"
SDN_IMAGE=opendaylight
- elif [ ${deploy_options_array['sdn_controller']} == 'onos' ]; then
+ elif [ "${deploy_options_array['sdn_controller']}" == 'onos' ]; then
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/onos.yaml"
SDN_IMAGE=opendaylight
- elif [ ${deploy_options_array['sdn_controller']} == 'opencontrail' ]; then
+ elif [ "${deploy_options_array['sdn_controller']}" == 'opencontrail' ]; then
echo -e "${red}ERROR: OpenContrail is currently unsupported...exiting${reset}"
exit 1
- elif [[ -z ${deploy_options_array['sdn_controller']} || ${deploy_options_array['sdn_controller']} == 'false' ]]; then
+ elif [[ -z "${deploy_options_array['sdn_controller']}" || "${deploy_options_array['sdn_controller']}" == 'false' ]]; then
echo -e "${blue}INFO: SDN Controller disabled...will deploy nosdn scenario${reset}"
+ SDN_IMAGE=opendaylight
else
echo "${red}Invalid sdn_controller: ${deploy_options_array['sdn_controller']}${reset}"
echo "${red}Valid choices are opendaylight, opendaylight-external, onos, opencontrail, false, or null${reset}"
@@ -816,7 +819,7 @@ function undercloud_prep_overcloud_deploy {
total_nodes=$(ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" "cat /home/stack/instackenv.json | grep -c memory")
# check if HA is enabled
- if [[ "$ha_enabled" == "TRUE" ]]; then
+ if [[ "$ha_enabled" == "TRUE" || "$ha_enabled" == "true" ]]; then
DEPLOY_OPTIONS+=" --control-scale 3"
compute_nodes=$((total_nodes - 3))
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/puppet-pacemaker.yaml"
@@ -837,7 +840,7 @@ function undercloud_prep_overcloud_deploy {
DEPLOY_OPTIONS+=" -e network-environment.yaml"
fi
- if [[ "$ha_enabled" == "TRUE" ]] || [[ "$net_isolation_enabled" == "TRUE" ]]; then
+ if [[ "$ha_enabled" == "TRUE" || "$ha_enabled" == "true" ]] || [[ "$net_isolation_enabled" == "TRUE" ]]; then
DEPLOY_OPTIONS+=" --ntp-server $ntp_server"
fi
@@ -957,6 +960,20 @@ EOI
echo -e "${blue}INFO: Undercloud (instack VM) has been setup to NAT Overcloud public network${reset}"
fi
fi
+
+ # for sfc deployments we need the vxlan workaround
+ if [ "${deploy_options_array['sfc']}" == 'true' ]; then
+ ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+source stackrc
+set -o errexit
+for node in \$(nova list | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"); do
+ssh -T ${SSH_OPTIONS[@]} "heat-admin@\$node" <<EOF
+sudo ifconfig br-int up
+sudo ip route add 123.123.123.0/24 dev br-int
+EOF
+done
+EOI
+ fi
}
display_usage() {
@@ -1131,7 +1148,7 @@ main() {
echo -e "${blue}INFO: Post Install Configuration Complete${reset}"
fi
fi
- if [[ ${deploy_options_array['sdn_controller']} == 'onos' ]]; then
+ if [[ "${deploy_options_array['sdn_controller']}" == 'onos' ]]; then
if ! onos_update_gw_mac ${public_network_cidr} ${public_network_gateway}; then
echo -e "${red}ERROR:ONOS Post Install Configuration Failed, Exiting.${reset}"
exit 1