X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Fcharmed_install.sh;h=45a38c1a37b842df6b0a3bca6988a66779cf9ca7;hb=2634cd3ab6e8737d4e1e35aa02bdab9d0c51bd9b;hp=c1c46e4f301513721f21d5458b53707c587caf77;hpb=a4a37f7f9f5410ff2c7833b76bdc85f752c74849;p=osm%2Fdevops.git diff --git a/installers/charmed_install.sh b/installers/charmed_install.sh index c1c46e4f..45a38c1a 100755 --- a/installers/charmed_install.sh +++ b/installers/charmed_install.sh @@ -74,7 +74,9 @@ EOF if [ -v KUBECFG ]; then cat $KUBECFG | juju add-k8s $K8S_CLOUD_NAME $ADD_K8S_OPTS - [ -v BOOTSTRAP_NEEDED ] && juju bootstrap $K8S_CLOUD_NAME $CONTROLLER_NAME --config controller-service-type=loadbalancer + [ -v BOOTSTRAP_NEEDED ] && juju bootstrap $K8S_CLOUD_NAME $CONTROLLER_NAME \ + --config controller-service-type=loadbalancer \ + --agent-version=2.8.1 else sg ${KUBEGRP} -c "echo ${DEFAULT_IP}-${DEFAULT_IP} | microk8s.enable metallb" sg ${KUBEGRP} -c "microk8s.enable storage dns" @@ -96,7 +98,9 @@ EOF done [ ! -v BOOTSTRAP_NEEDED ] && sg ${KUBEGRP} -c "microk8s.config" | juju add-k8s $K8S_CLOUD_NAME $ADD_K8S_OPTS - [ -v BOOTSTRAP_NEEDED ] && sg ${KUBEGRP} -c "juju bootstrap microk8s $CONTROLLER_NAME --config controller-service-type=loadbalancer" && K8S_CLOUD_NAME=microk8s + [ -v BOOTSTRAP_NEEDED ] && sg ${KUBEGRP} -c \ + "juju bootstrap microk8s $CONTROLLER_NAME --config controller-service-type=loadbalancer --agent-version=2.8.1" \ + && K8S_CLOUD_NAME=microk8s fi if [ -v LXD_CLOUD ]; then @@ -210,25 +214,30 @@ function deploy_charmed_osm(){ API_SERVER="$(echo $hostport | sed -e 's,:.*,,g')" fi + # Expose OSM services + # Expose NBI juju config nbi-k8s juju-external-hostname=nbi.${API_SERVER}.xip.io juju expose nbi-k8s - wait_for_port nbi-k8s 0 - sg ${KUBEGRP} -c "${KUBECTL} get ingress -n osm -o json | jq '.items[0].metadata.annotations += {\"nginx.ingress.kubernetes.io/backend-protocol\": \"HTTPS\"}' | ${KUBECTL} --validate=false replace -f -" - sg ${KUBEGRP} -c "${KUBECTL} get ingress -n osm -o json | jq '.items[0].metadata.annotations += {\"nginx.ingress.kubernetes.io/proxy-body-size\": \"0\"}' | ${KUBECTL} replace -f -" - + # Expose NG UI juju config ng-ui juju-external-hostname=ui.${API_SERVER}.xip.io juju expose ng-ui - wait_for_port ng-ui 1 - sg ${KUBEGRP} -c "${KUBECTL} get ingress -n osm -o json | jq '.items[2].metadata.annotations += {\"nginx.ingress.kubernetes.io/proxy-body-size\": \"0\"}' | ${KUBECTL} --validate=false replace -f -" - + # Expose UI juju config ui-k8s juju-external-hostname=osm.${API_SERVER}.xip.io juju expose ui-k8s + # Wait for ingress resources to be applied + wait_for_port nbi-k8s 0 + wait_for_port ng-ui 1 wait_for_port ui-k8s 2 - sg ${KUBEGRP} -c "${KUBECTL} get ingress -n osm -o json | jq '.items[1].metadata.annotations += {\"nginx.ingress.kubernetes.io/proxy-body-size\": \"0\"}' | ${KUBECTL} --validate=false replace -f -" -} + + # Apply annotations + sg ${KUBEGRP} -c "${KUBECTL} annotate ingress nginx.ingress.kubernetes.io/backend-protocol=HTTPS -n osm -l juju-app=nbi-k8s" + sg ${KUBEGRP} -c "${KUBECTL} annotate ingress nginx.ingress.kubernetes.io/proxy-body-size=0 -n osm -l juju-app=nbi-k8s" + sg ${KUBEGRP} -c "${KUBECTL} annotate ingress nginx.ingress.kubernetes.io/proxy-body-size=0 -n osm -l juju-app=ng-ui" + sg ${KUBEGRP} -c "${KUBECTL} annotate ingress nginx.ingress.kubernetes.io/proxy-body-size=0 -n osm -l juju-app=ui-k8s" + function check_osm_deployed() { TIME_TO_WAIT=600 @@ -319,6 +328,9 @@ applications: ng-ui: options: image: opensourcemano/ng-ui:$TAG + keystone: + options: + image: opensourcemano/keystone:$TAG EOF mv /tmp/images-overlay.yaml $IMAGES_OVERLAY_FILE