diff options
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/deploy.sh | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh index 232d8251..1ce4e186 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -47,6 +47,7 @@ NET_MAP['storage_network']="brbm3" ##LIBRARIES source $CONFIG/lib/common-functions.sh +source $CONFIG/lib/installer/onos/onos_gw_mac_update.sh ##FUNCTIONS ##translates yaml into variables @@ -650,9 +651,16 @@ function configure_network_environment { sed -i 's#^.*Compute::Ports::StoragePort:.*$# OS::TripleO::Compute::Ports::StoragePort: '${tht_dir}'/ports/noop.yaml#' $1 fi + 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 + nic_ext+=_br-ex + fi + # set nics appropriately sed -i 's#^.*Compute::Net::SoftwareConfig:.*$# OS::TripleO::Compute::Net::SoftwareConfig: nics/compute'${nic_ext}'.yaml#' $1 - sed -i 's#^.*Controller::Net::SoftwareConfig:.*$# OS::TripleO::Controller::Net::SoftwareConfig: nics/controller'${nic_ext}'.yaml#' $1 + } ##Copy over the glance images and instack json file ##params: none @@ -763,9 +771,12 @@ sleep 15 ##preping it for deployment and launch the deploy ##params: none function undercloud_prep_overcloud_deploy { - # TODO ADD ODL L3 logic here if [[ ${#deploy_options_array[@]} -eq 0 || ${deploy_options_array['sdn_controller']} == 'opendaylight' ]]; then - DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight.yaml" + if [ ${deploy_options_array['sdn_l3']} == 'true' ]; then + DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight_l3.yaml" + else + DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight.yaml" + fi elif [ ${deploy_options_array['sdn_controller']} == 'opendaylight-external' ]; then DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight-external.yaml" elif [ ${deploy_options_array['sdn_controller']} == 'onos' ]; then @@ -797,6 +808,8 @@ function undercloud_prep_overcloud_deploy { DEPLOY_OPTIONS+=" --control-flavor control --compute-flavor compute" fi + echo -e "${blue}INFO: Deploy options set:\n${DEPLOY_OPTIONS}${reset}" + ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI source stackrc set -o errexit @@ -873,6 +886,16 @@ EOI fi fi done + + # for virtual, we NAT public network through instack + if [ "$virtual" == "TRUE" ]; then + if ! configure_undercloud_nat ${public_network_cidr}; then + echo -e "${red}ERROR: Unable to NAT undercloud with external net: ${public_network_cidr}${reset}" + exit 1 + else + echo -e "${blue}INFO: Undercloud (instack VM) has been setup to NAT Overcloud public network${reset}" + fi + fi } display_usage() { @@ -1029,6 +1052,14 @@ main() { echo -e "${blue}INFO: Post Install Configuration Complete${reset}" fi fi + 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 + else + echo -e "${blue}INFO: ONOS Post Install Configuration Complete${reset}" + fi + fi } main "$@" |