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
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
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