Add verbosity and debug mode to juju bootstrap 54/11654/2
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 28 Jan 2022 11:17:53 +0000 (12:17 +0100)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 21 Feb 2022 22:58:28 +0000 (23:58 +0100)
Change-Id: Iff1ccfa88acabf0097dc30eb8d6cfcd6a241d619
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
installers/install_juju.sh

index 3b878a7..72c08ce 100755 (executable)
@@ -55,7 +55,7 @@ function juju_createcontroller_k8s(){
     [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function
     cat $HOME/.kube/config | juju add-k8s $OSM_VCA_K8S_CLOUDNAME --client \
     || FATAL "Failed to add K8s endpoint and credential for client in cloud $OSM_VCA_K8S_CLOUDNAME"
-    juju bootstrap $OSM_VCA_K8S_CLOUDNAME $OSM_STACK_NAME  \
+    juju bootstrap -v --debug $OSM_VCA_K8S_CLOUDNAME $OSM_STACK_NAME  \
             --config controller-service-type=loadbalancer \
             --agent-version=$JUJU_AGENT_VERSION \
     || FATAL "Failed to bootstrap controller $OSM_STACK_NAME in cloud $OSM_VCA_K8S_CLOUDNAME"
@@ -107,9 +107,9 @@ EOF
 function juju_createcontroller() {
     [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function
     if ! juju show-controller $OSM_STACK_NAME &> /dev/null; then
-        # Not found created, create the controller
+        # Controller not found, create the controller
         sudo usermod -a -G lxd ${USER}
-        sg lxd -c "juju bootstrap --bootstrap-series=xenial --agent-version=$JUJU_AGENT_VERSION $OSM_VCA_CLOUDNAME $OSM_STACK_NAME"
+        sg lxd -c "juju bootstrap -v --debug --bootstrap-series=xenial --agent-version=$JUJU_AGENT_VERSION $OSM_VCA_CLOUDNAME $OSM_STACK_NAME"
     fi
     [ $(juju controllers | awk "/^${OSM_STACK_NAME}[\*| ]/{print $1}"|wc -l) -eq 1 ] || FATAL "Juju installation failed"
     juju controller-config features=[k8s-operators]