Update O2app start with global ocloud ID
[pti/o2.git] / docs / installation-guide.rst
index ff51d0f..68f7ed0 100644 (file)
@@ -13,7 +13,7 @@ Installation Guide
 Abstract
 --------
 
 Abstract
 --------
 
-This document describes how to install O-RAN O2 service over O-RAN INF platform.
+This document describes how to install INF O2 service over O-RAN INF platform.
 
 The audience of this document is assumed to have basic knowledge in kubernetes cli, helm chart cli.
 
 
 The audience of this document is assumed to have basic knowledge in kubernetes cli, helm chart cli.
 
@@ -24,8 +24,8 @@ Preface
 Before starting the installation and deployment of O-RAN O2 service, you should have already deployed O-RAN INF platform, and you need to download the helm charts or build from source as described in developer-guide.
 
 
 Before starting the installation and deployment of O-RAN O2 service, you should have already deployed O-RAN INF platform, and you need to download the helm charts or build from source as described in developer-guide.
 
 
-ORAN O2 Service in E Release
-============================
+INF O2 Service in E Release
+===========================
 
 1. Provision remote cli for kubernetes over INF platform
 --------------------------------------------------------
 
 1. Provision remote cli for kubernetes over INF platform
 --------------------------------------------------------
@@ -87,7 +87,7 @@ The following instruction should be done outside of INF platform controller host
   source <(kubectl completion bash) # setup autocomplete in bash into the current shell, bash-completion package should be installed first.
   echo "source <(kubectl completion bash)" >> ~/.bashrc # add autocomplete permanently to your bash shell.
 
   source <(kubectl completion bash) # setup autocomplete in bash into the current shell, bash-completion package should be installed first.
   echo "source <(kubectl completion bash)" >> ~/.bashrc # add autocomplete permanently to your bash shell.
 
-  curl https://get.helm.sh/helm-v3.5.3-linux-amd64.tar.gz --output helm-v3.5.3-linux-amd64.tar.gz
+  curl -O https://get.helm.sh/helm-v3.5.3-linux-amd64.tar.gz
   tar xvf helm-v3.5.3-linux-amd64.tar.gz
   sudo cp linux-amd64/helm /usr/local/bin/
 
   tar xvf helm-v3.5.3-linux-amd64.tar.gz
   sudo cp linux-amd64/helm /usr/local/bin/
 
@@ -108,11 +108,11 @@ The following instruction should be done outside of INF platform controller host
   kubectl get pods -A
 
 
   kubectl get pods -A
 
 
-2. Deploy O2 service
---------------------
+2. Deploy INF O2 service
+------------------------
 
 
-2.1 Retrieve Helm chart for deploying of O2 service
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+2.1 Retrieve Helm chart for deploying of INF O2 service
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 .. code:: shell
 
 
 .. code:: shell
 
@@ -128,9 +128,16 @@ The following instruction should be done outside of INF platform controller host
   export NAMESPACE=orano2
   kubectl create ns ${NAMESPACE}
 
   export NAMESPACE=orano2
   kubectl create ns ${NAMESPACE}
 
-  export OS_AUTH_URL=<INF OAM Auth URL>
-  export OS_USERNAME=<INF username>
-  export OS_PASSWORD=<INF password for user>
+  # default kube config location is ~/.kube/config
+  cp ~/.kube/config o2/charts/resources/scripts/init/k8s_kube.conf
+
+  export OS_AUTH_URL=<INF OAM Auth URL e.g.: http://OAM_IP:5000/v3>
+  export OS_USERNAME=<INF username e.g.: admin>
+  export OS_PASSWORD=<INF password for user e.g.: adminpassword>
+
+  # If the external OAM IP same as OS_AUTH_URL's IP address, you can use the below command to set the environment
+  # export API_HOST_EXTERNAL_FLOATING=$(echo ${OS_AUTH_URL} | sed -e s,`echo ${OS_AUTH_URL} | grep :// | sed -e's,^\(.*//\).*,\1,g'`,,g | cut -d/ -f1 | sed -e 's,:.*,,g')
+  export API_HOST_EXTERNAL_FLOATING=<INF external_oam_floating_address e.g.: 128.10.10.10>
 
   cat <<EOF>o2service-override.yaml
   o2ims:
 
   cat <<EOF>o2service-override.yaml
   o2ims:
@@ -145,6 +152,8 @@ The following instruction should be done outside of INF platform controller host
     OS_AUTH_URL: "${OS_AUTH_URL}"
     OS_USERNAME: "${OS_USERNAME}"
     OS_PASSWORD: "${OS_PASSWORD}"
     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}"
   EOF
 
 
   EOF
 
 
@@ -159,29 +168,44 @@ The following instruction should be done outside of INF platform controller host
   kubectl -n ${NAMESPACE} get services |grep o2service
 
 
   kubectl -n ${NAMESPACE} get services |grep o2service
 
 
-2.4 Verify O2 service
-~~~~~~~~~~~~~~~~~~~~~
+2.4 Verify INF O2 service
+~~~~~~~~~~~~~~~~~~~~~~~~~
 
 .. code:: shell
 
 
 .. code:: shell
 
-  curl -k http(s)://<OAM IP>:30205
   curl -k http(s)://<OAM IP>:30205/o2ims_infrastructureInventory/v1/
 
 
   curl -k http(s)://<OAM IP>:30205/o2ims_infrastructureInventory/v1/
 
 
-3. Register O-Cloud to SMO
---------------------------
+2.5 INF O2 Service API Swagger 
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+- Swagger UI can be found with URL: http(s)://<OAM IP>:30205
+                 
+
+3. Register INF O2 Service to SMO
+---------------------------------
 
 - assumed you have setup SMO O2 endpoint for registration
 
 - assumed you have setup SMO O2 endpoint for registration
-- O2 service will post the O-Cloud registration data to that SMO O2 endpoint
+- INF O2 service will post the INF platform registration data to that SMO O2 endpoint
+
 
 .. code:: shell
 
 
 .. code:: shell
 
+  curl -X 'GET' \
+  'http(s)://<OAM IP>:30205/provision/v1/smo-endpoint' \
+  -H 'accept: application/json'
+
   curl -k -X 'POST' \
     'http(s)://<OAM IP>:30205/provision/v1/smo-endpoint' \
     -H 'accept: application/json' \
     -H 'Content-Type: application/json' \
     -d '{"endpoint": "<SMO O2 endpoint for registration>"}'
 
   curl -k -X 'POST' \
     'http(s)://<OAM IP>:30205/provision/v1/smo-endpoint' \
     -H 'accept: application/json' \
     -H 'Content-Type: application/json' \
     -d '{"endpoint": "<SMO O2 endpoint for registration>"}'
 
+  # Confirm SMO endpoint provision status
+  curl -X 'GET' \
+  'http(s)://<OAM IP>:30205/provision/v1/smo-endpoint' \
+  -H 'accept: application/json'
+
 
 References
 ----------
 
 References
 ----------