Added docker-compose ranpm
[nonrtric/plt/ranpm.git] / install / install-nrt.sh
index 6cb2caf..906fd31 100755 (executable)
@@ -81,18 +81,10 @@ check_error() {
     fi
 }
 
-##################################################################################
-echo "##### Installing chart: namespaces"
-##################################################################################
-
-helm install --wait namespaces helm/namespaces
-
-echo ""
-
 ##################################################################################
 echo "##### Installing chart: nrt-base-0"
 ##################################################################################
-helm install --wait -n nonrtric nrt-base-0 helm/nrt-base-0
+helm install --wait --create-namespace -n nonrtric nrt-base-0 helm/nrt-base-0
 
 # Create realm in keycloak
 
@@ -150,7 +142,11 @@ while [ $retcode -eq 1 ]; do
 done
 
 # Save influx user api-token to secret
-INFLUXDB2_TOKEN=$(get_influxdb2_token influxdb2-0 nonrtric | base64)
+B64FLAG="-w 0"
+case "$OSTYPE" in
+  darwin*)  B64FLAG="" ;;
+esac
+INFLUXDB2_TOKEN=$(get_influxdb2_token influxdb2-0 nonrtric | base64 $B64FLAG)
 PATCHDATA='[{"op": "add", "path": "/data/token", "value": "'$INFLUXDB2_TOKEN'"}]'
 kubectl patch secret influxdb-api-token -n nonrtric --type json -p "$PATCHDATA"
 
@@ -177,7 +173,7 @@ echo "##### Installing: chart ran"
 ./helm/ran/certs/gen-certs.sh 10
 check_error $?
 
-helm install --wait -f helm/global-values.yaml -n ran ran helm/ran
+helm install --wait --create-namespace -n ran -f helm/global-values.yaml ran helm/ran
 
 echo ""
 
@@ -261,4 +257,4 @@ echo "ranpm installed"
 echo "Wait until all pods are running before installation additional charts"
 echo "Do: 'kubectl get po -n nonrtric' and verify that all pods are in status Running"
 echo " and all included containers are Ready"
-echo "######################################################################"
+echo "######################################################################"
\ No newline at end of file