diff options
author | Ryota MIBU <r-mibu@cq.jp.nec.com> | 2017-01-27 04:44:48 +0000 |
---|---|---|
committer | Ryota MIBU <r-mibu@cq.jp.nec.com> | 2017-01-27 04:48:17 +0000 |
commit | 50e1c44f64585abe63bd40982cb379412045fa33 (patch) | |
tree | 885484b9ccf27f0e0a18fc208e1d769c989df7e2 /ci/03-maasdeploy.sh | |
parent | 59f0f3aa4b49425e19369b2d5fe7b55688b23f7f (diff) |
improvements for default virtual pod creation
This patch includes the following improvements:
- deprecate ci/00-maasdeploy.sh
- refactor cleaner sctipts
- fix MAAS_IP in default configs
Change-Id: I60f77e18ce41573a744d79b8cf468c23a7dd3385
Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
Diffstat (limited to 'ci/03-maasdeploy.sh')
-rwxr-xr-x | ci/03-maasdeploy.sh | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/ci/03-maasdeploy.sh b/ci/03-maasdeploy.sh index 8bafea5b..2dd0c269 100755 --- a/ci/03-maasdeploy.sh +++ b/ci/03-maasdeploy.sh @@ -2,14 +2,6 @@ #placeholder for deployment script. set -ex -maasver=`apt-cache policy maas | grep Installed | cut -d ':' -f 2 | sed -e 's/ //'` - -if [[ "$maasver" > "2" ]]; then - echo "removing existing maas ..." - #sudo apt-get purge maas maas-cli maas-common maas-dhcp maas-dns maas-proxy maas-rack-controller maas-region-api maas-region-controller -y - #sudo rm -rf /var/lib/maas -fi - virtinstall=0 labname=$1 @@ -182,7 +174,10 @@ fi if [ ! -e ~maas/.ssh/id_rsa.pub ]; then - sudo su - $USER -c "echo |ssh-keygen -t rsa -f $HOME/id_rsa_maas" + if [ ! -e $HOME/id_rsa_maas.pub ]; then + [ -e $HOME/id_rsa_maas ] && rm -f $HOME/id_rsa_maas + sudo su - $USER -c "echo |ssh-keygen -t rsa -f $HOME/id_rsa_maas" + fi sudo -u maas mkdir ~maas/.ssh/ || true sudo cp $HOME/id_rsa_maas ~maas/.ssh/id_rsa sudo cp $HOME/id_rsa_maas.pub ~maas/.ssh/id_rsa.pub |