From 435e80c712e8a4cd971e6f44ee8947467997083d Mon Sep 17 00:00:00 2001 From: Narinder Gupta Date: Wed, 28 Mar 2018 07:29:22 -0500 Subject: using the admin bridge on jumphost. Change-Id: Iced282c4024b9ed523e13b3df6b635df1a7af24e Signed-off-by: Narinder Gupta --- ci/03-maasdeploy.sh | 20 +++++++------------- ci/net.xml | 5 +++++ 2 files changed, 12 insertions(+), 13 deletions(-) create mode 100644 ci/net.xml (limited to 'ci') diff --git a/ci/03-maasdeploy.sh b/ci/03-maasdeploy.sh index a6b311dc..ab144a5f 100755 --- a/ci/03-maasdeploy.sh +++ b/ci/03-maasdeploy.sh @@ -209,16 +209,12 @@ sudo virsh pool-define-as default --type dir --target /var/lib/libvirt/images/ | sudo virsh pool-start default || true sudo virsh pool-autostart default || true -# In case of virtual install set network -if [ "$virtinstall" -eq 1 ]; then - sudo virsh net-dumpxml default > default-net-org.xml - sed -i '/dhcp/d' default-net-org.xml - sed -i '/range/d' default-net-org.xml - sudo virsh net-destroy default - sudo virsh net-define default-net-org.xml - sudo virsh net-start default - rm -f default-net-org.xml -fi +# As we use kvm so setup network on admin network +ADMIN_BR=`cat labconfig.json | jq '.opnfv.spaces[] | select(.type=="admin")'.bridge | cut -d \" -f 2 ` +sed -i "s@brAdm@$ADMIN_BR@" net.xml +sudo virsh net-destroy default +sudo virsh net-define net.xml +sudo virsh net-start default # # Cleanup, juju init and config backup @@ -465,9 +461,7 @@ addnodes(){ VIRSHIP="" # TODO: parse from $VIRSHURL if needed fi - if [ "$virtinstall" -eq 1 ]; then - netw=" --network bridge=virbr0,model=virtio" - elif ([ "$VIRSHHOST" != "" ]); then + if ([ "$VIRSHHOST" != "" ]); then # Get the bridge hosting the remote virsh brid=$(ssh $VIRSHHOST "ip a l | grep $VIRSHHOST | perl -pe 's/.* (.*)\$/\$1/g'") netw=" --network bridge=$brid,model=virtio" diff --git a/ci/net.xml b/ci/net.xml new file mode 100644 index 00000000..110428f1 --- /dev/null +++ b/ci/net.xml @@ -0,0 +1,5 @@ + + default + + + -- cgit 1.2.3-korg