X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=docs%2Finstallation-guide.rst;h=c64535ef0a5b91b4f3ef533dd7f34e5cd4b21b48;hb=4cf8adc69fbc8f44cdd6d978cebed0119bc5a216;hp=3df00156887029ad03525c1190c35200ef541a87;hpb=9b9b1da2e26de1bc639827e10c5965b358d20b9e;p=pti%2Fo2.git diff --git a/docs/installation-guide.rst b/docs/installation-guide.rst index 3df0015..c64535e 100644 --- a/docs/installation-guide.rst +++ b/docs/installation-guide.rst @@ -179,18 +179,25 @@ The following instruction should be done outside of INF platform controller host kubectl apply -f smo-serviceaccount.yaml #export the smo account token data - export SMO_TOKEN_DATA=$(kubectl -n default describe secret $(kubectl -n default get secret | grep ${SMO_SERVICEACCOUNT} | awk '{print $1}') | grep "token:" | awk '{print $2}') + export SMO_SECRET=$(kubectl -n default get serviceaccounts $SMO_SERVICEACCOUNT -o jsonpath='{.secrets[0].name}') + export SMO_TOKEN_DATA=$(kubectl -n default get secrets $SMO_SECRET -o jsonpath='{.data.token}') #prepare the application config file cat <app.conf [DEFAULT] ocloud_global_id = 4e24b97c-8c49-4c4f-b53e-3de5235a4e37 + smo_register_url = http://127.0.0.1:8090/register smo_token_data = ${SMO_TOKEN_DATA} + [OCLOUD] + OS_AUTH_URL: ${OS_AUTH_URL} + OS_USERNAME: ${OS_USERNAME} + OS_PASSWORD: ${OS_PASSWORD} + API_HOST_EXTERNAL_FLOATING: ${API_HOST_EXTERNAL_FLOATING} + [API] - test = "hello" [WATCHER] @@ -232,34 +239,48 @@ The following instruction should be done outside of INF platform controller host echo 'keyUsage = critical, cRLSign, keyCertSign'; \ echo 'extendedKeyUsage = serverAuth, clientAuth') + + applicationconfig=`base64 app.conf -w 0` + servercrt=`base64 imsserver.crt -w 0` + serverkey=`base64 imsserver.key -w 0` + smocacrt=`base64 smoca.crt -w 0` + + echo $applicationconfig + echo $servercrt + echo $serverkey + echo $smocacrt + + cat <o2service-override.yaml + imagePullSecrets: + - default-registry-key + o2ims: serviceaccountname: admin-oran-o2 - image: - repository: nexus3.o-ran-sc.org:10004/o-ran-sc/pti-o2imsdms - tag: 1.0.0 + images: + tags: + o2service: nexus3.o-ran-sc.org:10004/o-ran-sc/pti-o2imsdms:2.0.0 + postgres: docker.io/library/postgres:9.6 + redis: docker.io/library/redis:alpine pullPolicy: IfNotPresent logginglevel: "DEBUG" - ocloud: - OS_AUTH_URL: "${OS_AUTH_URL}" - OS_USERNAME: "${OS_USERNAME}" - OS_PASSWORD: "${OS_PASSWORD}" - K8S_KUBECONFIG: "/opt/k8s_kube.conf" - API_HOST_EXTERNAL_FLOATING: "${API_HOST_EXTERNAL_FLOATING}" + applicationconfig: ${applicationconfig} + servercrt: ${servercrt} + serverkey: ${serverkey} + smocacrt: ${smocacrt} EOF + cat o2service-override.yaml + 2.3 Deploy by helm cli ~~~~~~~~~~~~~~~~~~~~~~ .. code:: shell - config_data=`cat ./path/to/app.conf` - certification_data=`cat ./path/to/imsserver.crt` - key_data=`cat ./path/to/imsserver.key` - helm install o2service o2/charts --set caconfig="$certification_data" --set applicationconfig="$config_data" --set serverkeyconfig="$key_data" -f o2service-override.yaml + helm install o2service o2/charts -f o2service-override.yaml helm list |grep o2service kubectl -n ${NAMESPACE} get pods |grep o2api kubectl -n ${NAMESPACE} get services |grep o2api