Charmed OSM preparation for 10.1.0
[osm/devops.git] / installers / charmed_install.sh
index fcb8c25..6d7d4be 100755 (executable)
@@ -17,7 +17,7 @@
 
 LXD_VERSION=4.0
 JUJU_VERSION=2.9
-JUJU_AGENT_VERSION=2.9.22
+JUJU_AGENT_VERSION=2.9.25
 K8S_CLOUD_NAME="k8s-cloud"
 KUBECTL="microk8s.kubectl"
 MICROK8S_VERSION=1.23
@@ -30,7 +30,7 @@ MODEL_NAME=osm
 
 OSM_BUNDLE=ch:osm
 OSM_HA_BUNDLE=ch:osm-ha
-CHARMHUB_CHANNEL=10.0/edge
+CHARMHUB_CHANNEL=10.0/candidate
 unset TAG
 
 function check_arguments(){
@@ -281,6 +281,9 @@ function deploy_charmed_osm(){
     juju config -m $MODEL_NAME prometheus site_url=https://prometheus.${API_SERVER}.nip.io
 
     echo "Waiting for deployment to finish..."
+    grafana_leader=`juju status -m $MODEL_NAME grafana | grep "*" | cut -d "*" -f 1`
+    grafana_admin_password=`juju run -m $MODEL_NAME --unit $grafana_leader "echo \\$GF_SECURITY_ADMIN_PASSWORD"`
+    juju config -m $MODEL_NAME mon grafana_password=$grafana_admin_password
     check_osm_deployed
     echo "OSM with charms deployed"
 }