From: beierlm Date: Wed, 16 Dec 2020 13:46:40 +0000 (-0500) Subject: Fixes bug 1377 X-Git-Tag: release-v9.0-start~7 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F20%2F10120%2F2;p=osm%2Fdevops.git Fixes bug 1377 Adds the system VIM and k8s cluster the same way that the k8s installer does. Change-Id: I11ad41c35f11467c51f0edc2aba4b3cb5e048823 Signed-off-by: beierlm --- diff --git a/installers/charmed_install.sh b/installers/charmed_install.sh index 85569a31..75a7259a 100755 --- a/installers/charmed_install.sh +++ b/installers/charmed_install.sh @@ -51,6 +51,8 @@ function install_snaps(){ sudo chown -f -R `whoami` ~/.kube KUBEGRP="microk8s" sg ${KUBEGRP} -c "microk8s status --wait-ready" + KUBECONFIG=~/.osm/microk8s-config.yaml + sg ${KUBEGRP} -c "microk8s config" > ${KUBECONFIG} else KUBECTL="kubectl" sudo snap install kubectl --classic @@ -396,6 +398,25 @@ function install_osmclient() { sudo snap alias osmclient.osm osm } +function add_local_k8scluster() { + osm --all-projects vim-create \ + --name _system-osm-vim \ + --account_type dummy \ + --auth_url http://dummy \ + --user osm --password osm --tenant osm \ + --description "dummy" \ + --config '{management_network_name: mgmt}' + tmpfile=$(mktemp --tmpdir=${HOME}) + cp ${KUBECONFIG} ${tmpfile} + osm --all-projects k8scluster-add \ + --creds ${tmpfile} \ + --vim _system-osm-vim \ + --k8s-nets '{"net1": null}' \ + --version '1.19' \ + --description "OSM Internal Cluster" \ + _system-osm-k8s + rm -f ${tmpfile} +} function install_microstack() { sudo snap install microstack --classic --beta @@ -435,11 +456,13 @@ install_snaps bootstrap_k8s_lxd deploy_charmed_osm install_osmclient +OSM_HOSTNAME=$(juju config nbi site_url | sed "s/http.*\?:\/\///"):443 +add_local_k8scluster + if [ -v MICROSTACK ]; then install_microstack fi -OSM_HOSTNAME=$(juju config nbi site_url | sed "s/http.*\?:\/\///"):443 echo "Your installation is now complete, follow these steps for configuring the osmclient:" echo