From 5969ac575c6387ef7923f69d7fcf84788a93cf37 Mon Sep 17 00:00:00 2001 From: "Lott, Christopher (cl778h)" Date: Mon, 20 Jan 2020 15:56:57 -0500 Subject: [PATCH] Extend K8S and RIC installation instructions Increase documented memory and disk requirements Add undeployment instructions. Signed-off-by: Lott, Christopher (cl778h) Change-Id: Ic977fe678a3e114b23c0a8ef144524b23ab3e1d8 (cherry picked from commit ca9b3ee64b3966fa1d20226b361b4f614434129e) --- docs/installation-k8s1node.rst | 7 +- docs/installation-ric.rst | 190 ++++++++++++++++++++++++++++----------- docs/installation-virtualbox.rst | 2 +- 3 files changed, 143 insertions(+), 56 deletions(-) diff --git a/docs/installation-k8s1node.rst b/docs/installation-k8s1node.rst index 1270337c..32abe2b2 100644 --- a/docs/installation-k8s1node.rst +++ b/docs/installation-k8s1node.rst @@ -16,17 +16,16 @@ .. ===============LICENSE_END========================================================= -Script for Setting Up 1-node Kubernetes Cluster +Script for Setting Up 1-Node Kubernetes Cluster ----------------------------------------------- The it/dep repo can be used for generating a simple script that can help setting up a one-node Kubernetes cluster for dev and testing purposes. Related files are under the -**ric-infra/00-Kubernetes** directory. To get started, clone the repository on the -target VM: +**ric-infra/00-Kubernetes** directory. Clone the it/dep git repository on the target VM. :: - git clone https://gerrit.o-ran-sc.org/r/it/dep + % git clone https://gerrit.o-ran-sc.org/r/it/dep Configurations diff --git a/docs/installation-ric.rst b/docs/installation-ric.rst index d93cf30a..54f7e09d 100644 --- a/docs/installation-ric.rst +++ b/docs/installation-ric.rst @@ -19,76 +19,164 @@ Getting and Preparing Deployment Scripts ---------------------------------------- -Run the following commands in a root shell: +Clone the it/dep git repository that has deployment scripts and support files on the target VM. +(You might have already done this in a previous step.) -.. code:: bash +:: + + % git clone https://gerrit.o-ran-sc.org/r/it/dep + +Check out the appropriate branch of the repository with the release you want to deploy. +For example: - git clone http://gerrit.o-ran-sc.org/r/it/dep - cd RECIPE_EXAMPLE +:: -Edit the recipe files RIC_INFRA_RECIPE_EXAMPLE and RIC_PLATFORM_RECIPE_EXAMPLE. In particular the following values often need adaptation to local deployments: + % git checkout Amber -#. Docker registry URL; -#. Docker registry credential; -#. Helm repo credential; -#. Component docker container image tags. +In the RECIPE_EXAMPLE directory, edit the recipe files RIC_INFRA_RECIPE_EXAMPLE and +RIC_PLATFORM_RECIPE_EXAMPLE. In particular the following values often need adaptation +to local deployments: + +#. Docker registry URL (property "repository"). This is the default source for + container images. For example, + nexus3.o-ran-sc.org:10004/o-ran-sc is the staging registry and has freshly built images; + nexus3.o-ran-sc.org:10002/o-ran-sc is the release registry and has stable images. +#. Docker registry credential. This is a name of a Kubernetes credential. Some registries + allow anonymous read access, including nexus3.o-ran-sc.org. +#. Helm repo and credential. The xApp Manager deploys xApps from charts in this repo. + No changes are required here for basic dev testing of platform components. +#. Component docker container image repository override and tag. The recipes specify + the docker image to use in terms of name and tag. These entries also allow override + of the default docker registry URL (see above); for example, the default might be the + releases registry and then a component under test is deployed from the staging registry. Deploying the Infrastructure and Platform Groups ------------------------------------------------ -After the recipes are edited, the Near Realtime RIIC is ready to be deployed. +After the recipes are edited, the Near Realtime RIC is ready to be deployed. +Perform the following steps in a root shell. .. code:: bash - cd dep/bin - ./deploy-ric-infra ../RECIPE_EXAMPLE/RIC_INFRA_RECIPE_EXAMPLE - ./deploy-ric-platform ../RECIPE_EXAMPLE/RIC_PLATFORM_RECIPE_EXAMPLE - + % sudo -i + # cd dep/bin + # ./deploy-ric-platform ../RECIPE_EXAMPLE/PLATFORM/example_recipe.yaml Checking the Deployment Status ------------------------------ -Now check the deployment status and results similar to the below indicate a complete and successful deployment. +Now check the deployment status after a short wait. Results similar to the +output shown below indicate a complete and successful deployment. Check the +STATUS column from both kubectl outputs to ensure that all are either +"Completed" or "Running", and that none are "Error" or "ImagePullBackOff". .. code:: # helm list - NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE - r1-a1mediator 1 Tue Nov 26 00:47:12 2019 DEPLOYED a1mediator-1.0.0 1.0 ricplt - r1-appmgr 1 Tue Nov 26 00:47:09 2019 DEPLOYED appmgr-1.1.0 1.0 ricplt - r1-dbaas1 1 Tue Nov 26 00:47:10 2019 DEPLOYED dbaas1-1.1.0 1.0 ricplt - r1-chartmuseum 1 Tue Nov 26 03:16:42 2019 DEPLOYED chartmuseum-0.0.1 0.1 ricinfra - r1-e2mgr 1 Tue Nov 26 00:47:10 2019 DEPLOYED e2mgr-1.1.0 1.0 ricplt - r1-e2term 1 Tue Nov 26 00:47:11 2019 DEPLOYED e2term-1.1.0 1.0 ricplt - r1-extsvcplt 1 Tue Nov 26 00:47:17 2019 DEPLOYED extsvcplt-0.2.0 1.0 ricplt - r1-jaegeradapter 1 Tue Nov 26 00:47:16 2019 DEPLOYED jaegeradapter-0.1.0 1.0 ricplt - r1-kong 1 Tue Nov 26 00:45:36 2019 DEPLOYED kong-1.0.0 1.0 ricinfra - r1-ricaux-credential 1 Tue Nov 26 00:45:42 2019 DEPLOYED credential-1.1.0 1.0 ricaux - r1-ricinfra-credential 1 Tue Nov 26 00:45:43 2019 DEPLOYED credential-1.1.0 1.0 ricinfra - r1-ricplt-credential 1 Tue Nov 26 00:45:42 2019 DEPLOYED credential-1.1.0 1.0 ricplt - r1-ricxapp-credential 1 Tue Nov 26 00:45:42 2019 DEPLOYED credential-1.1.0 1.0 ricxapp - r1-rsm 1 Tue Nov 26 00:47:15 2019 DEPLOYED rsm-2.0.6 1.0 ricplt - r1-rtmgr 1 Tue Nov 26 00:47:09 2019 DEPLOYED rtmgr-1.1.0 1.0 ricplt - r1-submgr 1 Tue Nov 26 00:47:13 2019 DEPLOYED submgr-1.1.0 1.0 ricplt - r1-vespamgr 1 Tue Nov 26 00:47:14 2019 DEPLOYED vespamgr-0.0.1 1.0 ricplt - r1-xapp-tiller 1 Tue Nov 26 00:45:44 2019 DEPLOYED xapp-tiller-0.1.0 1.0 ricinfra - # kubectl get pods -n ricplt - NAME READY STATUS RESTARTS AGE - deployment-ricplt-a1mediator-5c4df477f9-6zxxx 1/1 Running 0 132m - deployment-ricplt-appmgr-65bc8b958c-tggg7 1/1 Running 0 132m - deployment-ricplt-dbaas-74bf584449-k484v 1/1 Running 0 132m - deployment-ricplt-e2mgr-74cd9865bc-hpn6b 1/1 Running 0 132m - deployment-ricplt-e2term-cc7b5d99-pkctr 1/1 Running 0 132m - deployment-ricplt-jaegeradapter-cc49c64dc-vj622 1/1 Running 0 131m - deployment-ricplt-rsm-599cd4d6c8-4jhft 1/1 Running 0 131m - deployment-ricplt-rtmgr-85d89868d6-58wvl 1/1 Running 1 132m - deployment-ricplt-submgr-7cbd697c7f-p9x4x 1/1 Running 0 132m - deployment-ricplt-vespamgr-7bb4c7585f-9z6qm 1/1 Running 0 132m + NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE + r3-a1mediator 1 Tue Jan 28 20:11:39 2020 DEPLOYED a1mediator-3.0.0 1.0 ricplt + r3-appmgr 1 Tue Jan 28 20:10:52 2020 DEPLOYED appmgr-3.0.0 1.0 ricplt + r3-dbaas1 1 Tue Jan 28 20:11:13 2020 DEPLOYED dbaas1-3.0.0 1.0 ricplt + r3-e2mgr 1 Tue Jan 28 20:11:23 2020 DEPLOYED e2mgr-3.0.0 1.0 ricplt + r3-e2term 1 Tue Jan 28 20:11:31 2020 DEPLOYED e2term-3.0.0 1.0 ricplt + r3-infrastructure 1 Tue Jan 28 20:10:39 2020 DEPLOYED infrastructure-3.0.0 1.0 ricplt + r3-jaegeradapter 1 Tue Jan 28 20:12:14 2020 DEPLOYED jaegeradapter-3.0.0 1.0 ricplt + r3-rsm 1 Tue Jan 28 20:12:04 2020 DEPLOYED rsm-3.0.0 1.0 ricplt + r3-rtmgr 1 Tue Jan 28 20:11:02 2020 DEPLOYED rtmgr-3.0.0 1.0 ricplt + r3-submgr 1 Tue Jan 28 20:11:48 2020 DEPLOYED submgr-3.0.0 1.0 ricplt + r3-vespamgr 1 Tue Jan 28 20:11:56 2020 DEPLOYED vespamgr-3.0.0 1.0 ricplt + # kubectl get pods -n ricinfra - NAME READY STATUS RESTARTS AGE - deployment-ricinfra-chartmuseum-7d97f4b995-gkxsq 1/1 Running 0 133m - deployment-tiller-ricxapp-65f9cbc8d7-qcr5t 1/1 Running 0 133m - r1-kong-kong-84695ff65d-9sjwg 2/2 Running 2 133m - tiller-secret-generator-w6bnd 0/1 Completed 0 133m + NAME READY STATUS RESTARTS AGE + deployment-tiller-ricxapp-d4f98ff65-xxpbb 1/1 Running 0 2m46s + tiller-secret-generator-76b5t 0/1 Completed 0 2m46s + + # kubectl get pods -n ricplt + NAME READY STATUS RESTARTS AGE + deployment-ricplt-a1mediator-69f6d68fb4-ndkdv 1/1 Running 0 95s + deployment-ricplt-appmgr-845d85c989-4z7t5 2/2 Running 0 2m22s + deployment-ricplt-dbaas-7c44fb4697-6lbqq 1/1 Running 0 2m1s + deployment-ricplt-e2mgr-569fb7588b-fqfqn 1/1 Running 0 111s + deployment-ricplt-e2term-alpha-db949d978-nsjds 1/1 Running 0 103s + deployment-ricplt-jaegeradapter-585b4f8d69-gvmdf 1/1 Running 0 60s + deployment-ricplt-rsm-755f7c5c85-wdn46 0/1 ErrImagePull 0 69s + deployment-ricplt-rtmgr-c7cdb5b58-lsqw4 1/1 Running 0 2m12s + deployment-ricplt-submgr-5b4864dcd7-5k26s 1/1 Running 0 86s + deployment-ricplt-vespamgr-864f95c9c9-lj74h 1/1 Running 0 78s + r3-infrastructure-kong-79b6d8b95b-4lg58 2/2 Running 1 2m33s + + +Checking Container Health +------------------------- + +Check the health of the application manager platform component by querying it +via the ingress controller using the following command. + +.. code:: bash + + % curl -v http://localhost:32080/appmgr/ric/v1/health/ready + +The output should look as follows. + +.. code:: + + * Trying 10.0.2.100... + * TCP_NODELAY set + * Connected to 10.0.2.100 (10.0.2.100) port 32080 (#0) + > GET /appmgr/ric/v1/health/ready HTTP/1.1 + > Host: 10.0.2.100:32080 + > User-Agent: curl/7.58.0 + > Accept: */* + > + < HTTP/1.1 200 OK + < Content-Type: application/json + < Content-Length: 0 + < Connection: keep-alive + < Date: Wed, 22 Jan 2020 20:55:39 GMT + < X-Kong-Upstream-Latency: 0 + < X-Kong-Proxy-Latency: 2 + < Via: kong/1.3.1 + < + * Connection #0 to host 10.0.2.100 left intact + + +Undeploying the Infrastructure and Platform Groups +-------------------------------------------------- + +To undeploy all the containers, perform the following steps in a root shell +within the it-dep repository. + +.. code:: bash + + # cd bin + # ./undeploy-ric-platform + +Results similar to below indicate a complete and successful cleanup. + +.. code:: + # ./undeploy-ric-platform + Undeploying RIC platform components [appmgr rtmgr dbaas1 e2mgr e2term a1mediator submgr vespamgr rsm jaegeradapter infrastructure] + release "r3-appmgr" deleted + release "r3-rtmgr" deleted + release "r3-dbaas1" deleted + release "r3-e2mgr" deleted + release "r3-e2term" deleted + release "r3-a1mediator" deleted + release "r3-submgr" deleted + release "r3-vespamgr" deleted + release "r3-rsm" deleted + release "r3-jaegeradapter" deleted + release "r3-infrastructure" deleted + configmap "ricplt-recipe" deleted + namespace "ricxapp" deleted + namespace "ricinfra" deleted + namespace "ricplt" deleted + + +Restarting the VM +----------------- + +After a reboot of the VM, and a suitable delay for initialization, +all the containers should be running again as shown above. diff --git a/docs/installation-virtualbox.rst b/docs/installation-virtualbox.rst index 1ff9a3cb..2f824cb4 100644 --- a/docs/installation-virtualbox.rst +++ b/docs/installation-virtualbox.rst @@ -41,7 +41,7 @@ Creating VMs Create a VirtualBox VM: -#. "New", then enter the following in the pop-up: Name it for example **myric**, of "Linux" type, and at least 4G RAM and 10G disk; +#. "New", then enter the following in the pop-up: Name it for example **myric**, of "Linux" type, and at least 6G RAM and 20G disk; #. "Create" to create the VM. It will appear in the list of VMs. #. Highlight the new VM entry, right click on it, select "Settings". -- 2.16.6