diff options
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/deploy.sh | 13 | ||||
-rwxr-xr-x | ci/util.sh | 2 |
2 files changed, 8 insertions, 7 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh index 996ca071..e11d6ee0 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -29,7 +29,6 @@ ntp_server="pool.ntp.org" net_isolation_enabled="TRUE" post_config="TRUE" debug="FALSE" -nics_cfg='' declare -i CNT declare UNDERCLOUD @@ -48,6 +47,8 @@ NET_MAP['admin_network']="br-admin" NET_MAP['private_network']="br-private" NET_MAP['public_network']="br-public" NET_MAP['storage_network']="br-storage" +ext_net_type="interface" +ip_address_family=4 ##FUNCTIONS ##translates yaml into variables @@ -607,7 +608,6 @@ function configure_network_environment { sed -i 's#^.*Compute::Ports::TenantPort:.*$# OS::TripleO::Compute::Ports::TenantPort: '${tht_dir}'/ports/tenant.yaml#' $1 sed -i "/TenantAllocationPools/c\\ TenantAllocationPools: [{'start': '${private_network_usable_ip_range%%,*}', 'end': '${private_network_usable_ip_range##*,}'}]" $1 sed -i '/TenantNetCidr/c\\ TenantNetCidr: '${private_network_cidr}'' $1 - nics_cfg+=_private else sed -i 's#^.*Network::Tenant.*$# OS::TripleO::Network::Tenant: '${tht_dir}'/noop.yaml#' $1 sed -i 's#^.*Controller::Ports::TenantPort:.*$# OS::TripleO::Controller::Ports::TenantPort: '${tht_dir}'/ports/noop.yaml#' $1 @@ -622,7 +622,6 @@ function configure_network_environment { sed -i 's#^.*Compute::Ports::StoragePort:.*$# OS::TripleO::Compute::Ports::StoragePort: '${tht_dir}'/ports/storage.yaml#' $1 sed -i "/StorageAllocationPools/c\\ StorageAllocationPools: [{'start': '${storage_network_usable_ip_range%%,*}', 'end': '${storage_network_usable_ip_range##*,}'}]" $1 sed -i '/StorageNetCidr/c\\ StorageNetCidr: '${storage_network_cidr}'' $1 - nics_cfg+=_storage else sed -i 's#^.*Network::Storage:.*$# OS::TripleO::Network::Storage: '${tht_dir}'/noop.yaml#' $1 sed -i 's#^.*Network::Ports::StorageVipPort:.*$# OS::TripleO::Network::Ports::StorageVipPort: '${tht_dir}'/ports/noop.yaml#' $1 @@ -632,7 +631,7 @@ function configure_network_environment { # check for ODL L3 if [ "${deploy_options_array['sdn_l3']}" == 'true' ]; then - nics_cfg+=_br-ex_no-public-ip + ext_net_type=br-ex fi } @@ -650,10 +649,10 @@ function configure_undercloud { ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" << EOI mkdir nics/ cat > nics/controller.yaml << EOF -$(nics_cfg=$nics_cfg sh $CONFIG/nics-controller.yaml.template) +$(python3.4 -B $CONFIG/lib/python/apex-python-utils.py nic_template -d $CONFIG -f nics-controller.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family) EOF cat > nics/compute.yaml << EOF -$(nics_cfg=$nics_cfg sh $CONFIG/nics-compute.yaml.template) +$(python3.4 -B $CONFIG/lib/python/apex-python-utils.py nic_template -d $CONFIG -f nics-compute.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family) EOF EOI fi @@ -1166,6 +1165,8 @@ parse_cmdline() { ##END FUNCTIONS main() { + # Make sure jinja2 is installed + easy_install-3.4 jinja2 > /dev/null parse_cmdline "$@" echo -e "${blue}INFO: Parsing network settings file...${reset}" parse_network_settings @@ -5,7 +5,7 @@ CONFIG=${CONFIG:-'/var/opt/opnfv'} VALID_CMDS="undercloud debug-stack -h --help" -source $CONFIG/utility-functions.sh +source $CONFIG/lib/utility-functions.sh resolve_cmd() { local given=$1 |