OOM Component

Brian's cheatsheet for Helm commands: K8S / helm basic commands for ONAP integration



#git pull in OOM repo

git pull with submodule
Yangs-MacBook-Air:src yang$ git clone "https://gerrit.onap.org/r/oom" Yangs-MacBook-Air:src yang$ cd oom Yangs-MacBook-Air:oom yang$ git submodule update --init --recursive Yangs-MacBook-Air:oom yang$ git pull



#find all unreleased ONAP images used by OOM charts

Unrelease image list in OOM
Yangs-MacBook-Air:oom yang$ find . -name 'values.yaml' -exec grep -Hn image {} \; | grep onap | grep image | grep -E -i "staging|snapshot" | grep -v helm | sort ./kubernetes/aai/charts/aai-elasticsearch/values.yaml:22:image: onap/elasticsearch-sg:1.4-STAGING-latest



#ONAP installation from Windriver jumpserver. Git clone integration repo or pull the latest from repo first, then

ONAP Installation
xuyang11@pod-onap-01-vjhost:~$ cd integration/ xuyang11@pod-onap-01-vjhost:~/src/integration$ git pull xuyang11@pod-onap-01-vjhost:~/src/integration$ source deployment/heat/onap-oom/env/windriver/Integration-SB-XX-openrc xuyang11@pod-onap-01-vjhost:~/src/integration$ cd deployment/heat/onap-oom xuyang11@pod-onap-01-vjhost:~/src/integration/deployment/heat/onap-oom$ nohup ./scripts/deploy.sh -m docker-manifest-staging.csv -q env/windriver/onap-oom.env & or xuyang11@pod-onap-01-vjhost:~/src/integration/deployment/heat/onap-oom$ nohup ./scripts/deploy.sh -m docker-manifest.csv -q env/windriver/onap-oom.env &



#Update a project configuration or simply restart a project. For example, change GLOBAL_AAI_USERNAME parameter in integration_robot_properties.py

Update a project Chart



#Undeploy the whole ONAP  (not tested yet) - use 'kubectl -n onap get all' and then delete any dangling parts like below

Undeploy ONAP



#Deploy and undeploy a chart. See OOM Helm (un)Deploy plugins

If it fails, try to delete the release, and deploy again



#Another way to install one chart (deprecated due to memory size limit of configmap)

Install



#Edit deployment. Very useful to change deployment parameters, like docker image version so you can pick a previous working docker image. K8S will restart the pod after the change is made

Helm edit



#Edit statefulset. Sometimes image version is in statefulset, use describe pod command and search for Controlled by keyword. You need to bounce pod after change



#Find AAI endpoint IP and port. IP can be ANY cluster node IP, and port is 30233

AAI Port



#List all pods

List pods



#Check container log. First find containers in the pod

logs



#Restart a pod by deleting it and let Helm to restart one automatically

Restart pod by deleting it



#Delete a pod with force

Delete a pod with force



#Enter pod shell

Shell



#Access ONAP portal. Get portal-app service private ip first, then go to Openstack Horizon to find public ip and update /etc/hosts with the public ip - see @Mandeep Khindahttps://onap.readthedocs.io/en/latest/submodules/oom.git/docs/oom_user_guide.html#accessing-the-onap-portal-using-oom-and-a-kubernetes-cluster

Portal Access



#Copy files to and from a pod

Copy



#Execute a command remotely

#ONAP Healthcheck from Rancher VM

Health



#Get the pod configMap



#Edit ConfigMap - e.g. chaning user name or password. Then you need to delete the pod and let k8s restart the pod to take the new values



#Add a NodePort for debug/dev purposes



#Generate encrypted openstack password