Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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


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

Code Block
titleONAP 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 &

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

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

Code Block
titleUnrelease 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

Code Block
titleONAP 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

Code Block
titleUpdate a project Chart
root@onap-oom-rancher:~# cd oom/kubernetes
root@onap-oom-rancher:~/oom/kubernetes# helm list -a
root@onap-oom-rancher:~/oom/kubernetes# helm delete dev-robot --purge
root@onap-oom-rancher:~/oom/kubernetes# ~/integration/deployment/heat/onap-oom/scripts/cleanup.sh robot                #clean up any resource used by robot
root@onap-oom-rancher:~/oom/kubernetes# rm -rf /dockerdata-nfs/dev-robot                                               #clean up the persistent data
Code Block
titleUpdate a project Chart
root@onap-oom-rancher:~# cd oom/kubernetes
root@onap-oom-rancher:~/oom/kubernetes# vi robot/resources/config/eteshare/config/integration_robot_properties.py      #make change to charts
root@onap-oom-rancher:~/oom/kubernetes# make robot
root@onap-oom-rancher:~/oom/kubernetes# make onap 
root@onap-oom-rancher:~/oom/kubernetes# helm list -a
root@onap-oom-rancher:~/oom/kubernetes# helm delete dev-robot --purge
root@oom-rancher:~# rm -rf /dockerdata-nfs/dev-robot            #if you want to clean up the persistent data
root@onap-oom-rancher:~/oom/kubernetes# helm list -a |grep robot
# check and delete any resource left for the project, i.e. pv, pvc, statefulset, configmap, service, deployment, secret, etc
root@onap-oom-rancher:~/oom/kubernetes# helm deploy dev local/onap -f /root/oom/kubernetes/onap/resources/environments/public-cloud.yaml -f /root/integration-override.yaml --namespace onap
root@onap-oom-rancher:~/oom/kubernetes# deploy dev local/onap -f /root/oom/kubernetes/onap/resources/environments/public-cloud.yaml -f /root/integration-override.yaml --namespace onap


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

Code Block
titleUndeploy ONAP
root@rancher: helm undeploy dev --purge

root@rancher: kubectl -n onap get all

root@rancher: kubectl -n onap delete services --all

root@rancher: kubectl -n onap delete pv --all

root@rancher: kubectl -n onap delete pvc --all

root@rancher: kubectl -n onap delete secrets --all

root@rancher: kubectl -n onap delete clusterrolebinding --all

root@rancher: kubectl -n onap delete statefulsets --all

root@rancher: kubectl -n onap delete deployments --all

root@rancher: kubectl -n onap delete job --all

root@rancher: kubectl -n onap getdelete pod |grep robot
dev-robot-robot-6f5b8b968f-7gwz9 1/1 Running 0 32s
pods --all

root@rancher: kubectl -n onap get all



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

...

Code Block
>echo -n <tenant_password>| openssl aes-128-ecb -e -K aa3871669d893c7fb8abbcda31b88b4f -nosalt | xxd -c 256 -p

...