X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Ffull_install_osm.sh;h=31a79afa6d86079d3fcd9ae99a9941d7b7b1f50d;hb=e259b321ba575dee95274b3841d5063e54f75a97;hp=8d0c13bd2371491bc4411f6f120c892e11705f21;hpb=04812569044e21e47025e833336bce9c4169203d;p=osm%2Fdevops.git diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index 8d0c13bd..31a79afa 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -803,8 +803,11 @@ function install_kube() { sudo add-apt-repository "deb https://apt.kubernetes.io/ kubernetes-xenial main" sudo apt-get update echo "Installing Kubernetes Packages ..." - K8S_VERSION=1.20.11-00 + K8S_VERSION=1.23.3-00 sudo apt-get install -y kubelet=${K8S_VERSION} kubeadm=${K8S_VERSION} kubectl=${K8S_VERSION} + cat << EOF | sudo tee -a /etc/default/kubelet + KUBELET_EXTRA_ARGS="--cgroup-driver=cgroupfs" +EOF sudo apt-mark hold kubelet kubeadm kubectl } @@ -824,10 +827,14 @@ function kube_config_dir() { } function install_k8s_storageclass() { + echo "Installing open-iscsi" + sudo apt-get update + sudo apt-get install open-iscsi + sudo systemctl enable --now iscsid echo "Installing OpenEBS" helm repo add openebs https://openebs.github.io/charts helm repo update - helm install --create-namespace --namespace openebs openebs openebs/openebs --version 1.12.0 + helm install --create-namespace --namespace openebs openebs openebs/openebs --version 3.1.0 helm ls -n openebs local storageclass_timeout=400 local counter=0 @@ -851,7 +858,7 @@ function install_k8s_storageclass() { } function install_k8s_metallb() { - METALLB_IP_RANGE=$DEFAULT_IP-$DEFAULT_IP + METALLB_IP_RANGE=$DEFAULT_IP/32 kubectl apply -f ${OSM_DEVOPS}/installers/k8s/metallb/metallb.yaml \ || FATAL "Cannot install MetalLB" echo "apiVersion: v1 @@ -871,7 +878,7 @@ data: #installs metallb from helm function install_helm_metallb() { - METALLB_IP_RANGE=$DEFAULT_IP-$DEFAULT_IP + METALLB_IP_RANGE=$DEFAULT_IP/32 echo "configInline: address-pools: - name: default @@ -879,6 +886,7 @@ function install_helm_metallb() { addresses: - $METALLB_IP_RANGE" | sudo tee -a $OSM_DOCKER_WORK_DIR/metallb-config.yaml helm repo add metallb https://metallb.github.io/metallb + helm repo update helm install --create-namespace --namespace metallb-system metallb metallb/metallb -f $OSM_DOCKER_WORK_DIR/metallb-config.yaml } @@ -1000,13 +1008,7 @@ function deploy_osm_services() { #deploy charmed services function deploy_charmed_services() { juju add-model $OSM_STACK_NAME $OSM_VCA_K8S_CLOUDNAME - # deploy mongodb charm - namespace=$OSM_STACK_NAME - juju deploy cs:~charmed-osm/mongodb-k8s \ - --config enable-sidecar=true \ - --config replica-set=rs0 \ - --config namespace=$namespace \ - -m $namespace + juju deploy ch:mongodb-k8s -m $OSM_STACK_NAME } function deploy_osm_pla_service() { @@ -1017,19 +1019,22 @@ function deploy_osm_pla_service() { } #Install Helm v3 +#Helm releases can be found here: https://github.com/helm/helm/releases function install_helm() { - helm > /dev/null 2>&1 - if [ $? != 0 ] ; then + HELM_VERSION="v3.7.2" + if ! [[ "$(helm version --short 2>/dev/null)" =~ ^v3.* ]]; then # Helm is not installed. Install helm - echo "Helm is not installed, installing ..." - curl https://get.helm.sh/helm-v3.6.3-linux-amd64.tar.gz --output helm-v3.6.3.tar.gz - tar -zxvf helm-v3.6.3.tar.gz + echo "Helm3 is not installed, installing ..." + curl https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz --output helm-${HELM_VERSION}.tar.gz + tar -zxvf helm-${HELM_VERSION}.tar.gz sudo mv linux-amd64/helm /usr/local/bin/helm rm -r linux-amd64 - rm helm-v3.6.3.tar.gz - helm repo add stable https://charts.helm.sh/stable - helm repo update + rm helm-${HELM_VERSION}.tar.gz + else + echo "Helm3 is already installed. Skipping installation..." fi + helm repo add stable https://charts.helm.sh/stable + helm repo update } function parse_yaml() { @@ -1628,8 +1633,8 @@ function parse_docker_registry_url() { } LXD_VERSION=4.0 -JUJU_VERSION=2.8 -JUJU_AGENT_VERSION=2.8.11 +JUJU_VERSION=2.9 +JUJU_AGENT_VERSION=2.9.22 UNINSTALL="" DEVELOP="" UPDATE=""