Steps described in this page are run by "ubuntu", a non-root user.
Clone the OOM project from ONAP gerrit
Run the following command to clone OOM project from ONAP gerrit at any directory you prefer, and that directory will be referred as "{$OOM}" in this page.
git clone http://gerrit.onap.org/r/oom
SDN-C Cluster Deployment
Configure SDN-C Cluster Deployment
We are using Kubernetes replicas to achieve the SDN-C cluster deployment (see details from About SDN-C Clustering for the desired goal).
This only needs to be done one time and, at the moment, all modifications are done manually (they can be automated via scripting in the future when the needs come up).
Get New startODL.sh Script From Gerrit Topic SDNC-163
The source of the new startODL.sh script, gerrit change 25475, has been merged into sdnc/oam project on December 15th, 2017.
Skip this section if your SDN-C image includes this change.
Do the following to get the new startODL.sh script which provides the configuration of ODL clustering for SDN-C cluster.
# | Purpose | Command Examples |
---|---|---|
1 | Get the shared new startODL.sh script content | Go to gerrit change 25475 click on installation/sdnc/src/main/scripts/startODL.sh under the Files section to view the details of the changes click on the Download button to download the startODL_new.sh.zip file open the sh file inside the zip file, and copy the content (to be used in step 2) |
2 | Create new startODL.sh on the Kubernetes node VM | mkdir -p /home/ubuntu/cluster/scripts vi /home/ubuntu/cluster/script/startODL.sh paste the copied content from step 1 to this file |
3 | Give execution permission to the new startODL.sh script | chmod 777 /home/ubuntu/cluster/script/startODL.sh |
Get SDN-C Cluster Templates From Gerrit Topic SDNC-163
Only do this before the SDN-C cluster code is merged into gerrit OOM project.
# | Purpose | Command and Examples | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Get the shared templates code git fetch command | Go to gerrit change 25467 Click Download downward arrow, and click the click board in the same line as Checkout to get the git commands (which includes the git fetch and checkout commands). | ||||||||||||||||||
2 | Fetch the shared template to the oom directory on the Kubernetes node VM | cd {$OOM} run the git commands got from step 1 | ||||||||||||||||||
3 | Link the new startODL.sh | vi kubernetes/sdnc/templates/sdnc-statefulset.yaml do the following changes:
| ||||||||||||||||||
4 | Enable cluster configuration | vi kubernetes/sdnc/values.yaml change the following fields with the new value:
|
Make nfs-provisioner Pod Runs On Node Where NFS Server Runs
Skip this section if you have skipped "Share the /dockerdata-nfs Folder between Kubernetes Nodes".
On the node where you have configured nfs server (from step 3. Share the /dockerdata-nfs Folder between Kubernetes Nodes), run the following:
# | Purpose | Command and Example |
---|---|---|
1 | Find the node name | kubectl get node |
2 | Set label on the node | kubectl label nodes <NODE_NAME_FROM_LAST_STEP> disktype=ssd |
3 | Check the label has been set on the node | kubectl get node --show-labels |
4 | Update nfs-provisioner pod template to force it running on the nfs server node | In nfs-provisoner-deployment.yaml file, add “spec.template.spec.nodeSelector” for pod “nfs-provisioner” |
Create the ONAP Config
# | Purpose | Command and Examples | |||
---|---|---|---|---|---|
0.1 | (Only Once) Create the ONAP config using a sample YAML file | cd {$OOM}/kubernetes/config cp onap-parameters-sample.yaml onap-parameters.yaml | |||
0 | Set the OOM Kubernetes config environment | cd {$OOM}/kubernetes/oneclick source setenv.bash | |||
1 | Run the createConfig script to create the ONAP config | cd {$OOM}/kubernetes/config | |||
2 | Wait for the config-init container to finish | Use the following command to monitor onap config init intil it reaches to Completed STATUS:
| |||
Additional checks for config-init |
|
Deploy the SDN-C Application
# | Purpose | Command and Examples | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
0 | Set the OOM Kubernetes config environment(If you have set the OOM Kubernetes config enviorment in the same terminal, you can skip this step) | cd {$OOM}/kubernetes/oneclick source setenv.bash | ||||||||
1 | Run the createAll script to deploy the SDN-C appilication | cd {$OOM}/kubernetes/oneclick ./createAll.bash -n onap -a sdnc | ||||||||
Ensure that the SDN-C appication has started | Use the kubectl get pods command to monitor the SDN-C startup; you should observe:
| |||||||||
2 | Validate that all SDN-C pods and services are created properly | helm ls --all kubectl get namespaces kubectl get deployment --all-namespaces kubectl get clusterrolebinding --all-namespaces kubectl get serviceaccounts --all-namespaces kubectl get service --all-namespaces kubectl get pods --all-namespaces -a docker ps |grep sdnc | ||||||||
3 | Validate that the SDN-C bundlers are up | |||||||||
4 | Validate that the SDN-C APIs are shown on the ODL RestConf page | Access the ODL RestConf page from the following URL:
| ||||||||
5 | Validate the SDN-C ODL cluster | Goal:Verify if the SDN-C ODL-Cluster is running properly Prerequisites
Use ODL intergration tool to monitor ODL cluster
Use testCluster RPC to test SDN-C load sharingThe testCluster-bundle.zip provides a testBundle which offers a testCluster API to help with validating SDN-C RPC load sharing in the deployed SDN-C cluster. It's just as easy as to do the following:
|
Undeploy the SDN-C Application
# | Purpose | Command and Examples |
---|---|---|
0 | Set the OOM Kubernetes config environment(If you have set OOM kubernetes config enviorment in the same terminal, you can skip this step) | cd {$OOM}/kubernetes/oneclick source setenv.bash |
1 | Run the deleteAll script to delete all SDN-C pods and services | ./deleteAll.bash -n onap -a sdnc |
2 | Validate that all SDN-C pods and servers are cleaned up | docker ps |grep sdnc kubectl get pods --all-namespaces -a kubectl get service --all-namespaces kubectl get serviceaccounts --all-namespaces kubectl get clusterrolebinding --all-namespaces kubectl get deployment --all-namespaces kubectl get namespaces helm ls --all |
Remove the ONAP Config
# | Purpose | Command and Examples | ||||||
---|---|---|---|---|---|---|---|---|
0 | Set the OOM Kubernetes config environment(If you have set OOM kubernetes config enviorment in the same terminal, you can skip this step) | cd {$OOM}/kubernetes/oneclick source setenv.bash | ||||||
1 | Remove the ONAP config and any deployed applications in one shot | ./deleteAll.bash -n onap | ||||||
2 | Manually clean upThis step is to clean up the leftover items which were created by the config/createConfig script but not cleaned up by the oneclick/deleteAll script. |
| ||||||
3 | Delete the shared folder | sudo rm -rf /dockerdata-nfs/onap |
Scripts
The following scripts help to simplify various procedures by automating them