X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=docs%2Finstallation-guide.rst;h=289a7cd499b92b2ad396f4dc456229d08f26b602;hb=ac3d5fc0fba9caed9a65c3200362e68826e3e272;hp=0297aa1422bf13ffffabf9f3c9fe7b72204200f4;hpb=02e9f39bd6232f883f022731b1a141b8a6413aba;p=pti%2Fo2.git diff --git a/docs/installation-guide.rst b/docs/installation-guide.rst index 0297aa1..289a7cd 100644 --- a/docs/installation-guide.rst +++ b/docs/installation-guide.rst @@ -38,7 +38,7 @@ The following instruction must be done over INF platform controller host (contro - Please see the O-RAN INF documentation to find out how to ssh to controller host of INF platform. -:: +.. code:: shell USER="admin-user" NAMESPACE="kube-system" @@ -74,20 +74,22 @@ The following instruction must be done over INF platform controller host (contro The following instruction should be done outside of INF platform controller host -:: +.. code:: shell sudo apt-get install -y apt-transport-https echo "deb http://mirrors.ustc.edu.cn/kubernetes/apt kubernetes-xenial main" | \ sudo tee -a /etc/apt/sources.list.d/kubernetes.list + gpg --keyserver keyserver.ubuntu.com --recv-keys 836F4BEB + gpg --export --armor 836F4BEB | sudo apt-key add - sudo apt-get update sudo apt-get install -y kubectl 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. - https://get.helm.sh/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 + sudo cp linux-amd64/helm /usr/local/bin/ source <(helm completion bash) echo "source <(helm completion bash)" >> ~/.bashrc @@ -100,40 +102,45 @@ The following instruction should be done outside of INF platform controller host kubectl config set-cluster inf-cluster --server=https://${OAM_IP}:6443 --insecure-skip-tls-verify kubectl config set-credentials ${USER} --token=$TOKEN_DATA - kubectl config set-context ${USER}@inf-cluster --cluster=inf-cluster --user ${USER} --namespace=${NAMESPACE} + kubectl config set-context ${USER}@inf-cluster --cluster=inf-cluster --user ${USER} --namespace=${NAMESPACE} kubectl config use-context ${USER}@inf-cluster kubectl get pods -A -2. Deploy O2 service --------------------- +2. Deploy INF O2 service +------------------------ 2.1 Retrieve Helm chart for deploying of O2 service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -:: +.. code:: shell - git clone -b e-release "https://gerrit.o-ran-sc.org/r/pti/o2" + git clone -b e-release "https://gerrit.o-ran-sc.org/r/pti/o2" 2.2 Prepare override yaml ~~~~~~~~~~~~~~~~~~~~~~~~~ -:: +.. code:: shell export NAMESPACE=orano2 kubectl create ns ${NAMESPACE} - cd /home/sysadmin/ - source /etc/platform/openrc + # default kube config location is ~/.kube/config + cp ~/.kube/config o2/charts/resources/scripts/init/k8s_kube.conf + + export OS_AUTH_URL= + export OS_USERNAME= + export OS_PASSWORD= + cat <o2service-override.yaml o2ims: imagePullSecrets: admin-orano2-registry-secret image: - repository: registry.local:9001/admin/o2imsdms - tag: 0.1.4 + repository: nexus3.o-ran-sc.org:10004/o-ran-sc/pti-o2imsdms + tag: 1.0.0 pullPolicy: IfNotPresent logginglevel: "DEBUG" @@ -141,13 +148,14 @@ 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}" + K8S_KUBECONFIG: "/opt/k8s_kube.conf" EOF 2.3 Deploy by helm cli ~~~~~~~~~~~~~~~~~~~~~~ -:: +.. code:: shell helm install o2service o2/charts/ -f o2service-override.yaml helm list |grep o2service @@ -155,23 +163,42 @@ The following instruction should be done outside of INF platform controller host kubectl -n ${NAMESPACE} get services |grep o2service -2.4 Verify O2 service -~~~~~~~~~~~~~~~~~~~~~ +2.4 Verify INF O2 service +~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code:: shell -:: + curl -k http(s)://:30205/o2ims_infrastructureInventory/v1/ - curl -k http(s)://:30205 - curl -k http(s)://:30205/o2ims_infrastructureInventory/v1 +2.5 INF O2 Service API Swagger +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -3 Register O-Cloud to SMO +- Swagger UI can be found with URL: http(s)://:30205 + + +3. Register INF O2 Service to SMO +--------------------------------- - 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 O-Cloud registration data to that SMO O2 endpoint + +.. code:: shell + + curl -X 'GET' \ + 'http(s)://:30205/provision/v1/smo-endpoint' \ + -H 'accept: application/json' -:: + curl -k -X 'POST' \ + 'http(s)://:30205/provision/v1/smo-endpoint' \ + -H 'accept: application/json' \ + -H 'Content-Type: application/json' \ + -d '{"endpoint": ""}' - curl -k -X POST http(s)://:30205/provision/smo-endpoint/v1 -d '{"smo-o2-endpoint": ""}' + # Confirm SMO endpoint provision status + curl -X 'GET' \ + 'http(s)://:30205/provision/v1/smo-endpoint' \ + -H 'accept: application/json' References