Minor fixes for linux compatabilty 46/11246/3
authorBjornMagnussonXA <bjorn.magnusson@est.tech>
Tue, 30 May 2023 23:46:20 +0000 (01:46 +0200)
committerBjornMagnussonXA <bjorn.magnusson@est.tech>
Fri, 2 Jun 2023 06:35:02 +0000 (08:35 +0200)
Document updates  - required tools

Issue-ID: NONRTRIC-851
Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech>
Change-Id: I31b42e21e43f5c44ab257576c90906983a555a63

install/README.md
install/helm/global-values.yaml
install/helm/nrt-base-1/charts/ves-mr/templates/app-deployment-message-router.yaml
install/helm/ran/certs/gen-certs.sh
install/install-nrt.sh

index 3d616a8..e5b3ab2 100644 (file)
@@ -16,13 +16,16 @@ The demo set can be run on local or remote kubernetes.
 Kubectl must be configured to point to the applicable kubernetes instance.
 Nodeports exposed by the kubernetes instance must be accessible by the local machine - basically the kubernetes control plane IP needs to be accessible from the local machine.
 
-- Latest version of istio install
+- Latest version of istio installed
 
 # Other requirements
 - helm3
 - bash
 - cmd 'envsubst' must be installed (check by cmd: 'type envsubst' )
 - cmd 'jq' must be installed (check by cmd: 'type jq' )
+- keytool
+- openssl
+
 
 ## Before installation
 The following images need to be built manually. If remote or multi node cluster is used, then an image repo needs to be available to push the built images to.
index fb58a79..7b4aa38 100644 (file)
@@ -16,5 +16,5 @@
 #
 
 global:
-  extimagerepo: bjornmagnussonest/
+  extimagerepo:
   numhttpsservers: 10
index ec58eee..705b1f3 100755 (executable)
@@ -49,15 +49,8 @@ openssl genrsa 2048 > ca.key  2> /dev/null
 check_error $?
 
 echo " Generating ca cert"
-cat <<__EOF__ | openssl req -new -x509 -nodes -days 365000  -key ca.key  -out httpsca.crt 2> /dev/null
-SE
-.
-.
-EST
-EST
-$SRV
-.
-__EOF__
+openssl req -new -x509 -nodes -days 365000  -key ca.key -subj "/C=SE/ST=./L=./O=EST/OU=EST/CN=$SRV/emailAddress=a@example.com" -out httpsca.crt 2> /dev/null
+
 check_error $?
 
 
@@ -65,16 +58,8 @@ for (( i=0; i<${1}; i++ )); do
     SRV="pm-https-server-$i.pm-https-server.ran"
 
     echo " Generating cert and key  for server $SRV"
-cat <<__EOF__ | openssl req -newkey rsa:2048 -nodes -days 365000  -keyout https-$i.key -out https-req$i.crt 2> /dev/null
-SE
-.
-.
-ERIC
-ERIC
-$SRV
-.
-
-__EOF__
+    openssl req -newkey rsa:2048 -nodes -days 365000 -subj "/C=SE/ST=./L=./O=ERIC/OU=ERIC/CN=$SRV/emailAddress=a@example.com" -keyout https-$i.key -out https-req$i.crt 2> /dev/null
+
     check_error $?
 
     openssl x509 -req -days 365000 -set_serial 01 -in https-req$i.crt -out https-$i.crt -CA httpsca.crt -CAkey ca.key
@@ -86,4 +71,5 @@ __EOF__
 done
 
 echo "DONE"
-exit 0
\ No newline at end of file
+exit 0
+
index 6cb2caf..5bc4ae8 100755 (executable)
@@ -150,7 +150,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"