Info |
---|
Steps described in this page are run by "ubuntu", a non-root user. |
...
# | 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:
| ||||||||||||
3 | Link the ODL deploy directory |
ODL automatically install bundles/pacakges under its deploy directory, this mount point provides capability to drop a bundle/package in the Kubernetes node at /dockerdata-nfs/cluster/deploy directory and it will automativally be installed in the sdnc pods. vi kubernetes/sdnc/templates/sdnc-statefulset.yaml do the following changes:
| ||||||||||||
5 | Enable cluster configuration | vi kubernetes/sdnc/values.yaml change the following fields with the new value:
|
...
# | Purpose | Command and Examples | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 namespace
kubectl get deployment --all-namespaces
kubectl get clusterrolebinding --all-namespaces
kubectl get serviceaccounts --all-namespaces
kubectl get service -n onap-sdnc
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:
|
...
# | Purpose | Command and Examples | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 |
(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 |
| ./deleteAll.bash -n onap -a sdnc
| ||||||||||||||||||||||||||||||||||||||||
2 |
| 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 |
(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 |
| ./deleteAll.bash -n onap
| ||||||||||||||||||||||||||
2 |
This 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 |
| sudo rm -rf /dockerdata-nfs/onap |
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
########################################################################################
# This script wraps {$OOM}/kubernetes/config/createConfig.sh script #
# and will only terminated when the ONAP configuration is Completed #
# #
# Before using it, do the following to prepare the bash file: #
# 1, cd {$OOM}/kumbernetes/oneclick/tools #
# 2, vi autoCreateOnapConfig.bash #
# 3, paste the full content here to autoCreateOnapConfig.bash file and save the file #
# 4, chmod 777 autoCleanOnapConfig.bash #
# #
# To run it, just enter the following command: #
# ./autoCreateOnapConfig.bash <namespace, default is "onap"> #
########################################################################################
#!/bin/bash
NS=$1
if [[ -z $NS ]]
then
echo "Namespace is not specified, use onap namespace."
NS="onap"
fi
echo "Create $NS config under config directory..."
cd ../../config
./createConfig.sh -n $NS
cd -
echo "...done : kubectl get namespace
-----------------------------------------------
>>>>>>>>>>>>>> k8s namespace"
kubectl get namespace
echo "
-----------------------------------------------
>>>>>>>>>>>>>> helm : helm ls --all"
helm ls --all
echo "
-----------------------------------------------
>>>>>>>>>>>>>> pod : kubectl get pods -n $NS -a"
kubectl get pods -n $NS -a
while true
do
echo "wait for $NS config pod reach to Completed STATUS"
sleep 5
echo "-----------------------------------------------"
kubectl get pods -n $NS -a
status=`kubectl get pods -n $NS -a |grep config |xargs echo | cut -d' ' -f3`
if [ "$status" = "Completed" ]
then
echo "$NS config is Completed!!!"
break
fi
if [ "$status" = "Error" ]
then
echo "$NS config is failed with Error!!!
POD logs are:"
kubectl logs config -n $NS -f
break
fi
done |
...