+function configure_vca_integrator(){
+ if [ ! -v INSTALL_NOLXD ]; then
+ juju config vca \
+ k8s-cloud=microk8s \
+ lxd-cloud=lxd-cloud:lxd-cloud \
+ controllers="`cat ~/.local/share/juju/controllers.yaml`" \
+ accounts="`cat ~/.local/share/juju/accounts.yaml`" \
+ public-key="`cat ~/.local/share/juju/ssh/juju_id_rsa.pub`"
+ else
+ juju config vca \
+ k8s-cloud=microk8s \
+ controllers="`cat ~/.local/share/juju/controllers.yaml`" \
+ accounts="`cat ~/.local/share/juju/accounts.yaml`" \
+ public-key="`cat ~/.local/share/juju/ssh/juju_id_rsa.pub`"
+ fi
+}
+
+function expose_osm_services(){
+ juju config -m $MODEL_NAME nbi external-hostname=nbi.${API_SERVER}.nip.io
+ juju config -m $MODEL_NAME ng-ui external-hostname=ui.${API_SERVER}.nip.io
+ juju config -m $MODEL_NAME grafana web_external_url=https://grafana.${API_SERVER}.nip.io
+}
+
+function config_grafana_and_prometheus() {
+ echo "Setting Grafana and Prometheus configuration"
+ grafana_leader=`juju status -m $MODEL_NAME grafana | grep "*" | cut -d "*" -f 1`
+ grafana_admin_password=`juju run-action -m $MODEL_NAME $grafana_leader get-admin-password --wait | grep "admin-password" | cut -d ":" -f 2`
+ juju config -m $MODEL_NAME mon grafana-password="$grafana_admin_password"
+ juju config -m $MODEL_NAME mon grafana-user=admin
+ juju config -m $MODEL_NAME mon grafana-url=http://grafana:3000
+ prometheus_url="http://prometheus:9090"
+ juju config -m $MODEL_NAME mon prometheus-url=$prometheus_url
+ juju config -m $MODEL_NAME nbi prometheus-url=$prometheus_url
+ mon_leader=`juju status -m $MODEL_NAME mon | grep "*" | cut -d "*" -f 1`
+ juju run-action --m $MODEL_NAME $mon_leader create-datasource name=osm_prometheus url=$prometheus_url --wait
+}
+
+function check_osm_deployed_before_config() {