X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Fcharmed_install.sh;h=3ef2f5fb623baab67b25671d9a0a9d3ea5b8b84c;hb=72ac65cee3fd3307338c96036f5c0ed06daa3617;hp=770dd6ee03ec10e7244d2a62d3d602b052729369;hpb=7b65802df2bce0f945360953a4446a746c93d542;p=osm%2Fdevops.git diff --git a/installers/charmed_install.sh b/installers/charmed_install.sh index 770dd6ee..3ef2f5fb 100755 --- a/installers/charmed_install.sh +++ b/installers/charmed_install.sh @@ -15,19 +15,27 @@ # set -eux -JUJU_AGENT_VERSION=2.8.9 +LXD_VERSION=4.0 +JUJU_VERSION=2.9 +JUJU_AGENT_VERSION=2.9.17 K8S_CLOUD_NAME="k8s-cloud" KUBECTL="microk8s.kubectl" -MICROK8S_VERSION=1.19 -OSMCLIENT_VERSION=9.0 +MICROK8S_VERSION=1.20 +OSMCLIENT_VERSION=10.0 IMAGES_OVERLAY_FILE=~/.osm/images-overlay.yaml PATH=/snap/bin:${PATH} MODEL_NAME=osm -OSM_BUNDLE=cs:osm-67 -OSM_HA_BUNDLE=cs:osm-ha-52 -TAG=testing-daily +# Latest bundles using old mongodb-k8s +# OSM_BUNDLE=cs:osm-68 +# OSM_HA_BUNDLE=cs:osm-ha-54 +# The charm store does not support referencing charms from CharmHub, +# therefore we will point to the local bundles until we migrate all +# charms to CharmHub. +OSM_BUNDLE=/usr/share/osm-devops/installers/charm/bundles/osm/bundle.yaml +OSM_HA_BUNDLE=/usr/share/osm-devops/installers/charm/bundles/osm-ha/bundle.yaml +TAG=11 function check_arguments(){ while [ $# -gt 0 ] ; do @@ -71,7 +79,7 @@ function install_snaps(){ export KUBECONFIG=${KUBECFG} KUBEGRP=$(id -g -n) fi - sudo snap install juju --classic --channel=2.8/stable + sudo snap install juju --classic --channel=$JUJU_VERSION/stable } function bootstrap_k8s_lxd(){ @@ -151,7 +159,7 @@ EOF sudo sysctl --system # Install LXD snap sudo apt-get remove --purge -y liblxc1 lxc-common lxcfs lxd lxd-client - sudo snap install lxd + sudo snap install lxd --channel $LXD_VERSION/stable # Configure LXD sudo usermod -a -G lxd `whoami` cat /usr/share/osm-devops/installers/lxd-preseed.conf | sed 's/^config: {}/config:\n core.https_address: '$LXDENDPOINT':8443/' | sg lxd -c "lxd init --preseed" @@ -278,6 +286,10 @@ function deploy_charmed_osm(){ echo "Waiting for deployment to finish..." check_osm_deployed + 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" } @@ -458,7 +470,7 @@ if [ -v ONLY_VCA ]; then hostname=`cat /etc/hostname` echo "Use the following command to register the installed VCA to your OSM:" - echo -e " osm vca-add --endpoints $vca_host:$vca_port \ \n --user $vca_user \ \n --secret $vca_secret \ \n --cacert $vca_cacert \ \n --lxd-cloud lxd-cloud \ \n --lxd-credentials lxd-cloud \ \n --k8s-cloud microk8s \ \n --k8s-credentials microk8s\ \n $hostname-vca" + echo -e " osm vca-add --endpoints $vca_host:$vca_port \\\n --user $vca_user \\\n --secret $vca_secret \\\n --cacert $vca_cacert \\\n --lxd-cloud lxd-cloud \\\n --lxd-credentials lxd-cloud \\\n --k8s-cloud microk8s \\\n --k8s-credentials microk8s\\\n $hostname-vca" else deploy_charmed_osm install_osmclient