summaryrefslogtreecommitdiffstats
path: root/foreman
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2015-04-21 18:46:01 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2015-04-21 18:46:01 +0000
commit982f222862a1b1f2773152c535677931334ce60d (patch)
tree0394913b8ab2a73ff0d9c789baffbee23f8c0b15 /foreman
parentd6eec52319daa7756b455fb6500d2ab14c841cb6 (diff)
parentb9497a48a87a77c3ac4568a48cc8ec1f104f4ccd (diff)
Merge "Includes fixes that remove need for interface hardcoding and adds support for Foreman REST API access"
Diffstat (limited to 'foreman')
-rwxr-xr-xforeman/ci/deploy.sh25
1 files changed, 18 insertions, 7 deletions
diff --git a/foreman/ci/deploy.sh b/foreman/ci/deploy.sh
index 82fbef7..49e1590 100755
--- a/foreman/ci/deploy.sh
+++ b/foreman/ci/deploy.sh
@@ -280,6 +280,9 @@ for interface in ${output}; do
private_subnet_mask=$subnet_mask
private_short_subnet_mask=$(find_short_netmask $interface)
fi
+ if [ "$if_counter" -eq 3 ]; then
+ storage_subnet_mask=$subnet_mask
+ fi
sed -i 's/^.*eth_replace'"$if_counter"'.*$/ config.vm.network "public_network", ip: '\""$new_ip"\"', bridge: '\'"$interface"\'', netmask: '\""$subnet_mask"\"'/' Vagrantfile
((if_counter++))
done
@@ -343,7 +346,6 @@ sed -i 's/^.*default_gw:.*$/default_gw:'" $defaultgw"'/' opnfv_ksgen_settings.ym
##we add biosdevname=0, net.ifnames=0 to the kickstart to use regular interface naming convention on hosts
##replace IP for parameters with next IP that will be given to controller
if [ "$deployment_type" == "single_network" ]; then
- sed -i 's/^.*ovs_tunnel_if:.*$/ ovs_tunnel_if: eth0/' opnfv_ksgen_settings.yml
##we also need to assign IP addresses to nodes
##for single node, foreman is managing the single network, so we can't reserve them
##not supporting single network anymore for now
@@ -351,13 +353,9 @@ if [ "$deployment_type" == "single_network" ]; then
exit 0
elif [[ "$deployment_type" == "multi_network" || "$deployment_type" == "three_network" ]]; then
- sed -i 's/^.*ovs_tunnel_if:.*$/ ovs_tunnel_if: eth1/' opnfv_ksgen_settings.yml
if [ "$deployment_type" == "three_network" ]; then
- sed -i 's/^.*storage_iface:.*$/ storage_iface: eth1/' opnfv_ksgen_settings.yml
sed -i 's/^.*network_type:.*$/network_type: three_network/' opnfv_ksgen_settings.yml
- else
- sed -i 's/^.*storage_iface:.*$/ storage_iface: eth3/' opnfv_ksgen_settings.yml
fi
##get ip addresses for private network on controllers to make dhcp entries
@@ -392,8 +390,10 @@ elif [[ "$deployment_type" == "multi_network" || "$deployment_type" == "three_ne
fi
done
- ##replace public_vips
+ ##replace foreman site
next_public_ip=${interface_ip_arr[2]}
+ sed -i 's/^.*foreman_url:.*$/ foreman_url:'" https:\/\/$next_public_ip"'\/api\/v2\//' opnfv_ksgen_settings.yml
+ ##replace public vips
next_public_ip=$(increment_ip $next_public_ip 10)
grep -E '*public_vip' opnfv_ksgen_settings.yml | while read -r line ; do
sed -i 's/^.*'"$line"'.*$/ '"$line $next_public_ip"'/' opnfv_ksgen_settings.yml
@@ -404,8 +404,19 @@ elif [[ "$deployment_type" == "multi_network" || "$deployment_type" == "three_ne
fi
done
- ##replace private_subnet param
+ ##replace private_network param
private_subnet=$(find_subnet $next_private_ip $private_subnet_mask)
+ sed -i 's/^.*private_network:.*$/ private_network:'" $private_subnet"'/' opnfv_ksgen_settings.yml
+ ##replace storage_network
+ if [ "$deployment_type" == "three_network" ]; then
+ sed -i 's/^.*storage_network:.*$/ storage_network:'" $private_subnet"'/' opnfv_ksgen_settings.yml
+ else
+ next_storage_ip=${interface_ip_arr[3]}
+ storage_subnet=$(find_subnet $next_storage_ip $storage_subnet_mask)
+ sed -i 's/^.*storage_network:.*$/ storage_network:'" $storage_subnet"'/' opnfv_ksgen_settings.yml
+ fi
+
+ ##replace private_subnet param
private_subnet=$private_subnet'\'$private_short_subnet_mask
sed -i 's/^.*private_subnet:.*$/ private_subnet:'" $private_subnet"'/' opnfv_ksgen_settings.yml
else