From: BjornMagnussonXA Date: Tue, 30 May 2023 23:46:20 +0000 (+0200) Subject: Minor fixes for linux compatabilty X-Git-Tag: 1.0.0~3^2 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=1b0fb0b585faf0c5cbf28c4802e7513e2495ba87;p=nonrtric%2Fplt%2Franpm.git Minor fixes for linux compatabilty Document updates - required tools Issue-ID: NONRTRIC-851 Signed-off-by: BjornMagnussonXA Change-Id: I31b42e21e43f5c44ab257576c90906983a555a63 --- diff --git a/install/README.md b/install/README.md index 3d616a8..e5b3ab2 100644 --- a/install/README.md +++ b/install/README.md @@ -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. diff --git a/install/helm/global-values.yaml b/install/helm/global-values.yaml index fb58a79..7b4aa38 100644 --- a/install/helm/global-values.yaml +++ b/install/helm/global-values.yaml @@ -16,5 +16,5 @@ # global: - extimagerepo: bjornmagnussonest/ + extimagerepo: numhttpsservers: 10 diff --git a/install/helm/nrt-base-1/charts/ves-mr/templates/app-deployment-message-router.yaml b/install/helm/nrt-base-1/charts/ves-mr/templates/app-deployment-message-router.yaml index 662614c..1ead585 100644 --- a/install/helm/nrt-base-1/charts/ves-mr/templates/app-deployment-message-router.yaml +++ b/install/helm/nrt-base-1/charts/ves-mr/templates/app-deployment-message-router.yaml @@ -11,7 +11,6 @@ spec: selector: matchLabels: app: message-router - serviceName: message-router replicas: 1 template: metadata: diff --git a/install/helm/ran/certs/gen-certs.sh b/install/helm/ran/certs/gen-certs.sh index ec58eee..705b1f3 100755 --- a/install/helm/ran/certs/gen-certs.sh +++ b/install/helm/ran/certs/gen-certs.sh @@ -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 + diff --git a/install/install-nrt.sh b/install/install-nrt.sh index 6cb2caf..5bc4ae8 100755 --- a/install/install-nrt.sh +++ b/install/install-nrt.sh @@ -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"