X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=scripts%2Finstall%2Finstall-acm.sh;h=e4cac49009ce3b586210c8e762b2dcaa70307cc9;hb=40ecfaebdeaf1e4c97994b8ed3cce468b3f3c066;hp=7535c1faaaa1d98d68fdf0acc2465113c73272ba;hpb=77a08f7b9a97e0c6fcce5729cdcc3c18ea90c002;p=nonrtric%2Fplt%2Frappmanager.git diff --git a/scripts/install/install-acm.sh b/scripts/install/install-acm.sh index 7535c1f..e4cac49 100755 --- a/scripts/install/install-acm.sh +++ b/scripts/install/install-acm.sh @@ -29,11 +29,11 @@ K8S_CONFIGURATION_FILE="docker/helm/policy/components/policy-clamp-ac-k8s-ppnt/v K8S_VERSIONS_FILE="docker/compose/get-k8s-versions.sh" KAFKA_DIR="docker/helm/cp-kafka" -IP_ADDRESS=$(hostname -I | awk '{print $1}') +IP_ADDRESS=$(hostname -I | sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4 | awk '{print $1}') echo "IP Address : $IP_ADDRESS" A1PMS_HOST=${A1PMS_HOST:-http://policymanagementservice.nonrtric:9080} -CHART_REPO_HOST=${CHART_REPO_HOST:-'http://'$IP_ADDRESS':8879/charts'} +CHART_REPO_GET_URI=${CHART_REPO_GET_URI:-'http://'$IP_ADDRESS':8879/charts'} function wait_for_pods_to_be_running() { while [[ $TIME -lt 2000 ]]; do @@ -52,14 +52,21 @@ function wait_for_pods_to_be_running() { } git clone "https://gerrit.onap.org/r/policy/docker" +pushd docker +git fetch https://gerrit.onap.org/r/policy/docker refs/changes/46/137546/1 && git checkout FETCH_HEAD +popd CWD=$(pwd) export WORKSPACE="$CWD/docker" # Kafka installation echo "Installing Confluent kafka" -kubectl apply -f $KAFKA_DIR/zookeeper.yaml -kubectl apply -f $KAFKA_DIR/kafka.yaml +# Using "default" as namespace for kafka installation. As the policy CSIT helm charts contains the namespace "default" inbuilt. +# ACM installation fails to run, If the kubernetes cluster setup with a different default namespace, +# Expected kafka service is "kafka.default.svc.cluster.local" +# This can be removed when the kafka charts provided with "default" namespace or when policy CSIT charts can be configurable with different namespace. +kubectl apply -f $KAFKA_DIR/zookeeper.yaml -n default +kubectl apply -f $KAFKA_DIR/kafka.yaml -n default wait_for_pods_to_be_running echo "Updating policy docker image versions..." @@ -82,7 +89,7 @@ echo "Updating A1PMS Participant" yq eval '.a1pms.baseUrl="'$A1PMS_HOST'"' -i $A1PMS_CONFIGURATION_FILE echo "Updating the k8s participant repo list" -yq eval '.repoList.helm.repos += {"repoName":"local","address":"'$CHART_REPO_HOST'"}' -i $K8S_CONFIGURATION_FILE +yq eval '.repoList.helm.repos += {"repoName":"local","address":"'$CHART_REPO_GET_URI'"}' -i $K8S_CONFIGURATION_FILE echo "Building policy helm charts..." helm dependency build docker/helm/policy/