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 |
---|
Code Block |
---|
title | Update 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# ~ |
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
|
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 |
---|
title | 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
Code Block |
---|
|
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-oomoom$ nohup ./scripts/cleanupdeploy.sh robot -m docker-manifest-staging.csv -q env/windriver/onap-oom.env &
#clean up any resource used byor robot
root@onapxuyang11@pod-onap-oom01-ranchervjhost:~/src/oom/kubernetes# rm -rf /dockerdata-nfs/dev-robot #clean up the persistent data
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 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)
Code Block |
---|
|
root@rancher: helm undeploy dev --purge
root@rancher: kubectl delete pv --all
root@rancher: kubectl delete pvc --all
root@rancher: kubectl delete secrets --all
root@rancher: kubectl delete clusterrolebinding --all
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 |
---|
title | Update 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
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 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 |
---|
|
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 delete 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
|
...