updated juju bootstrap to use xenial series
[osm/devops.git] / installers / full_install_osm.sh
index d560b4e..d9d1e7d 100755 (executable)
@@ -521,10 +521,12 @@ function install_docker_ce() {
     echo "Adding user to group 'docker'"
     sudo groupadd -f docker
     sudo usermod -aG docker $USER
-    echo "... Docker CE installation done"
     sleep 2
     sudo service docker restart
     echo "... restarted Docker service"
+    sg docker -c "docker version" || FATAL "Docker installation failed"
+    echo "... Docker CE installation done"
+    return 0
 }
 
 function install_docker_compose() {
@@ -539,7 +541,8 @@ function install_juju() {
     echo "Installing juju"
     sudo snap install juju --classic
     sudo dpkg-reconfigure -p medium lxd
-    sg lxd -c "juju bootstrap localhost osm"
+    sg lxd -c "juju bootstrap --bootstrap-series=xenial localhost osm"
+    [ $(juju status |grep "osm" |wc -l) -eq 1 ] || FATAL "Juju installation failed"
     echo "Finished installation of juju"
 }
 
@@ -647,6 +650,7 @@ function deploy_perfmon() {
 }
 
 function install_lightweight() {
+    [ "$USER" == "root" ] && FATAL "You are running the installer as root. The installer is prepared to be executed as a normal user with sudo privileges."
     echo "Installing lightweight build of OSM"
     LWTEMPDIR="$(mktemp -d -q --tmpdir "installosmlight.XXXXXX")"
     trap 'rm -rf "${LWTEMPDIR}"' EXIT