diff options
author | Narinder Gupta <narinder.gupta@canonical.com> | 2018-03-28 07:29:22 -0500 |
---|---|---|
committer | Narinder Gupta <narinder.gupta@canonical.com> | 2018-03-28 07:29:53 -0500 |
commit | 435e80c712e8a4cd971e6f44ee8947467997083d (patch) | |
tree | 820260d2dd7f2360384ea58ea6ab20a28b94699c | |
parent | 0a148ca506b209a890079f546fe95d2bda95b59f (diff) |
using the admin bridge on jumphost.
Change-Id: Iced282c4024b9ed523e13b3df6b635df1a7af24e
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
-rwxr-xr-x | ci/03-maasdeploy.sh | 20 | ||||
-rw-r--r-- | ci/net.xml | 5 |
2 files changed, 12 insertions, 13 deletions
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 @@ +<network> + <name>default</name> + <forward mode='bridge'/> + <bridge name='brAdm'/> +</network> |