summaryrefslogtreecommitdiffstats
path: root/ci/deploy.sh
diff options
context:
space:
mode:
authorNarinder Gupta <narinder.gupta@canonical.com>2017-08-22 11:05:41 -0500
committerNarinder Gupta <narinder.gupta@canonical.com>2017-08-22 11:25:35 -0500
commitc7410f20ae678809c9cf91af284f8c07deb4ead9 (patch)
tree19e04e2959ead2a653d8555724cf2863d2ff5151 /ci/deploy.sh
parente4212ab9dc23be9d0aa9f2593e20c78aa0e9c2c2 (diff)
removing the public gateway addition code as it was added because
ealier juju was not supported with multiple network space. Change-Id: I9fc3017c90b8ecdf9a6a1563056dad37d995ca0e Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'ci/deploy.sh')
-rwxr-xr-xci/deploy.sh26
1 files changed, 0 insertions, 26 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 066b457b..b004885d 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -304,32 +304,6 @@ echo_info "Configuring public access"
# translate bundle.yaml to json
python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' < bundles.yaml > bundles.json
-public_service() {
- # get services list having a public interface
- srv_list=$(cat bundles.json | jq -r ".services | to_entries[] | {\"key\": .key, \"value\": .value[\"bindings\"]} | select (.value!=null) | select(.value[] | contains(\"public-api\"))".key)
- # get cnt list from service list
- cnt_list=$(for cnt in $srv_list; do juju status $cnt --format=json | jq -r ".machines[].containers | to_entries[]".key; done)
- # get public network gateway (supposing it is the first ip of the network)
- public_api_gw=$(cat labconfig.json | jq --raw-output ".opnfv.spaces[] | select(.type==\"public\")".gateway)
- admin_gw=$(cat labconfig.json | jq --raw-output ".opnfv.spaces[] | select(.type==\"admin\")".gateway)
-
- if ([ $admin_gw ] && [ $admin_gw != "null" ]); then
- # set default gateway to public api gateway
- for cnt in $cnt_list; do
- echo_info "Changing default gateway on $cnt"
- if ([ $public_api_gw ] && [ $public_api_gw != "null" ]); then
- juju ssh $cnt "sudo ip r d default && sudo ip r a default via $public_api_gw";
- juju ssh $cnt "gw_dev=\$(ip r l | grep 'via $public_api_gw' | cut -d \ -f5) &&\
- sudo cp /etc/network/interfaces /etc/network/interfaces.bak &&\
- echo 'removing old default gateway' &&\
- sudo perl -i -pe 's/^\ *gateway $admin_gw\n$//' /etc/network/interfaces &&\
- sudo perl -i -pe \"s/iface \$gw_dev inet static/iface \$gw_dev inet static\\n gateway $public_api_gw/\" /etc/network/interfaces \
- ";
- fi
- done
- fi
-}
-
# Configuring deployment
if ([ $opnfvmodel == "openstack" ]); then
echo_info "Configuring OpenStack deployment"