diff options
author | Narinder Gupta <narinder.gupta@canonical.com> | 2016-12-21 12:24:09 -0600 |
---|---|---|
committer | Narinder Gupta <narinder.gupta@canonical.com> | 2016-12-21 12:28:47 -0600 |
commit | d34b7dfbcee799533c25735db0e8aa47f433c0c7 (patch) | |
tree | 6eb5dc4ab98ef3ebf0c008dd31b26410a6790445 /ci/03-maasdeploy.sh | |
parent | 735846bdb8e4623c24fc045a79ce82389fdff70c (diff) |
modfiied to have space support in the juju2 configuration.
Change-Id: I2ccdee8604ef41ef79bb76eb9a165b1c02147d10
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'ci/03-maasdeploy.sh')
-rwxr-xr-x | ci/03-maasdeploy.sh | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/ci/03-maasdeploy.sh b/ci/03-maasdeploy.sh index 1e5fcf69..b7e684f5 100755 --- a/ci/03-maasdeploy.sh +++ b/ci/03-maasdeploy.sh @@ -164,14 +164,14 @@ fi mkdir ~/joid_config/ || true mkdir ~/.juju/ || true -sudo mkdir -p ~maas || true -sudo chown maas:maas ~maas -if [ ! -e ~maas/.ssh/id_rsa ]; then - sudo -u maas ssh-keygen -N '' -f ~maas/.ssh/id_rsa -y +sudo mkdir -p ~/maas || true +sudo chown maas:maas ~/maas +if [ ! -e ~/maas/.ssh/id_rsa ]; then + sudo -u maas ssh-keygen -N '' -f ~/maas/.ssh/id_rsa -y fi # Ensure virsh can connect without ssh auth -sudo cat ~maas/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys +sudo cat ~/maas/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys sudo cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys # @@ -213,7 +213,7 @@ configuremaas(){ maas $PROFILE tags create name='storage' } -enablesubnetand dhcp(){ +enablesubnetanddhcp(){ SUBNET_PREFIX="192.168.122" SUBNET_CIDR="($SUBNET_PREFIX).0/24" @@ -243,7 +243,6 @@ enablesubnetand dhcp(){ maas $PROFILE subnet update $SUBNET_CIDR gateway_ip=$MY_GATEWAY maas $PROFILE subnet update $SUBNET_CIDR dns_servers=$MY_NAMESERVER - } ## derived from https://gist.github.com/epiloque/8cf512c6d64641bde388 @@ -458,6 +457,8 @@ if [ -e ./deployconfig.yaml ]; then # split EXTERNAL_NETWORK=first ip;last ip; gateway;network + maas maas spaces create internal "Using for pxe network within the lab" + if [ "$datanet" != "''" ]; then EXTNET=(${enableiflist//,/ }) i="0" @@ -466,6 +467,8 @@ if [ -e ./deployconfig.yaml ]; then enableautomode ${EXTNET[i]} AUTO $datanet || true i=$[$i+1] done + maas maas spaces create admin "Using for admin network within the lab" + fi if [ "$stornet" != "''" ]; then EXTNET=(${enableiflist//,/ }) @@ -484,6 +487,7 @@ if [ -e ./deployconfig.yaml ]; then enableautomode ${EXTNET[i]} AUTO $pubnet || true i=$[$i+1] done + maas maas spaces create public "Using for public network within the lab" fi fi |