Revert "Dockerfile in light-ui: use deb package from repo"
[osm/devops.git] / installers / full_install_osm.sh
index e1f2ff2..146cda0 100755 (executable)
@@ -83,7 +83,7 @@ function uninstall(){
 }
 
 # takes a juju/accounts.yaml file and returns the password specific
-# for a controller. I wrote this using only bash tools to minimize 
+# for a controller. I wrote this using only bash tools to minimize
 # additions of other packages
 function parse_juju_password {
    password_file="${HOME}/.local/share/juju/accounts.yaml"
@@ -551,12 +551,16 @@ function install_osmclient(){
     #echo 'export OSM_SOL005=True' >> ${HOME}/.bashrc
     [ -z "$INSTALL_LIGHTWEIGHT" ] && export OSM_HOSTNAME=`lxc list | awk '($2=="SO-ub"){print $6}'`
     [ -z "$INSTALL_LIGHTWEIGHT" ] && export OSM_RO_HOSTNAME=`lxc list | awk '($2=="RO"){print $6}'`
-    [ -n "$INSTALL_LIGHTWEIGHT" ] && export OSM_HOSTNAME=127.0.0.1
     echo -e "\nOSM client installed"
-    echo -e "You might be interested in adding the following OSM client env variables to your .bashrc file:"
-    echo "     export OSM_HOSTNAME=${OSM_HOSTNAME}"
-    [ -n "$INSTALL_LIGHTWEIGHT" ] && echo "     export OSM_SOL005=True"
-    [ -z "$INSTALL_LIGHTWEIGHT" ] && echo "     export OSM_RO_HOSTNAME=${OSM_RO_HOSTNAME}"
+    if [ -z "$INSTALL_LIGHTWEIGHT" ]; then
+        echo -e "You might be interested in adding the following OSM client env variables to your .bashrc file:"
+        echo "     export OSM_HOSTNAME=${OSM_HOSTNAME}"
+        echo "     export OSM_RO_HOSTNAME=${OSM_RO_HOSTNAME}"
+    else
+        echo -e "OSM client assumes that OSM host is running in localhost (127.0.0.1)."
+        echo -e "In case you want to interact with a different OSM host, you will have to configure this env variable in your .bashrc file:"
+        echo "     export OSM_HOSTNAME=<OSM_host>"
+    fi
     return 0
 }
 
@@ -632,11 +636,11 @@ function install_juju() {
 }
 
 function juju_createcontroller() {
-    if ! sg lxd -c "juju show-controller $OSM_STACK_NAME &> /dev/null"; then
+    if ! juju show-controller $OSM_STACK_NAME &> /dev/null; then
         # Not found created, create the controller
         sg lxd -c "juju bootstrap --bootstrap-series=xenial localhost $OSM_STACK_NAME"
     fi
-    [ $(sg lxd -c "juju controllers" | awk "/^${OSM_STACK_NAME}[\*| ]/{print $1}"|wc -l) -eq 1 ] || FATAL "Juju installation failed"
+    [ $(juju controllers | awk "/^${OSM_STACK_NAME}[\*| ]/{print $1}"|wc -l) -eq 1 ] || FATAL "Juju installation failed"
 }
 
 function generate_docker_images() {
@@ -1399,4 +1403,3 @@ fi
 wget -q -O- https://osm-download.etsi.org/ftp/osm-4.0-four/README2.txt &> /dev/null
 track end
 echo -e "\nDONE"
-