(From Brian Freeman's notes)
Helm.notes.txt (this is also on SB04 /root)
...
Frankfurt Notes
In addition to the mechanisms from El Alto for deploy/undeply the standard helm commands also work. For example in the case to upgrade a specific component like AAI without having to do a helm delete/heml deploy you can use the following:
Example with aai charts
Precondition:
helm deploy has previously been run with override files on the command line so that the .helm/plugins/deploy/cache has been populated
git clone aai to an aai_oom directory since it is a recursive submodule of oom and upgrade using these newly cloned charts
Helm command:
helm upgrade -i onap-aai ./aai_oom --namespace onap --timeout 900 -f ${HOME}/.helm/plugins/deploy/cache/onap/global-overrides.yaml -f ${HOME}/.helm/plugins/deploy/cache/onap-subcharts/aai/subchart-overrides.yaml
El Alto Notes with new Deploy/Undeploy plugin from OOM Team
helm deploy dev local/onap -f /root/integration-override.yaml--namespace onap
For slower cloud environment use this to use longer interval for readiness
helm deploy dev local/onap -f /root/oom/kubernetes/onap/resources/environments/public-cloud.yaml -f /root/integration-override.yaml --namespace onap
Example per prodjest with SO:
helm deploy dev-so local/onap -f /root/oom/kubernetes/onap/resources/environments/public-cloud.yaml -f /root/integration-override.yaml --namespace onap --verbose
If you are using the SNAPSHOT image override file:
helm deploy dev-sdnc local/onap -f /root/oom/kubernetes/onap/resources/environments/public-cloud.yaml -f /root/integration-override.yaml -f /root/integration/deployment/heat/onap-rke/staging-image-override.yaml --namespace onap --verbose
- After editing a chart
- cd /root/oom/kubernetes
- make project
- note that for cds/sdnc you need to do make cds; make sdnc
- make onap
- helm del project --purge
- helm list -a to confirm its gone
- also check pvc's for applications like sdnc/appc and kubectl -n onap delete pvc any remaining ones
- kubectl -n onap get pv | grep project
- kubectl -n onap get pvc | grep project
- ...
- "delete /dockerdata-nfs/dev-project"
- Cleanup shared cassandra (aai, sdc) and shared maiadb (sdnc, so)
- /root/integration/deployment/heat/onap-rke/cleanup.sh project(without dev-)
- example: ./cleanup.sh sdc
- this script cleans up the shared cassandra and mariadb as well as pvc, pv, jobs etc.
- if you get an error when doing aai or sdc check to make sure cassandra cleaned up correctly. We have known problem where the cluster does not let schema's to be replicated and you get a Timeout back to cleanup.sh
- Rebuild helm charts as necessary
- cd /root/oom/kubernetes
- make project
- make onap
- helm deploy dev local/onap -f /root/oom/kubernetes/onap/resources/environments/public-cloud.yaml -f /root/integration-override.yaml --namespace onap --verbose
- list pods and ports (with k8 host)
- kubectl -n onap get pods -o=wide
- kubectl -n onap get services
- Find out why pod is stuck in initializing or crash loopback
- kubectl -n onap describe pod dev-blah-blah-blah
- kubectl -n onap logs dev-blah-blah-blah
complete removal steps (same as Beijing)
### Faster method to do a delete for reinstall
kubectl delete namespace onap
kubectl delete pods -n onap --all
kubectl delete secrets -n onap --all
kubectl delete persistentvolumes -n onap --all
kubectl -n onap delete clusterrolebindings --all
helm del --purge dev
helm list -a
helm del --purge dev-[project] ← use this if helm list -a shows lingering releases in DELETED state
if you have pods stuck terminating for a long time
kubectl delete pod --grace-period=0 --force --namespace onap --all
CDS Specific Notes (Dublin) - In Dublin release, the CDS charts are added as a subchat in OOM. However, the deployment of CDS charts is achieved as part of the SDN-C deployment in Dublin release. Thus, if any changes required to be made in the CDS chart the following steps taking: "make cds; make sdnc ; make onap"
104 # dependency / sub-chart configuration
105 cds:
106 enabled: true
Beijing Notes
kubectl config get-contexts
...
# if docker container changes uese use the enable:false/true
helm upgrade -i dev local/onap --namespace onap -f integration-override.yaml --set robot.enabled=false
helm upgrade -i dev local/onap --namespace onap -f integration-override.yaml --set robot.enabled=true
# if both the config and the docker container changes use the enable:false, do the make component, make onap then enable:true
...
Confirm the assets are removed with get pods , get pv, get pvc, get secret, get configmap for those pieces you dont want to preserve
cd /root/oom/kubernetieskubernetes
make robot
make onap
helm upgrade -i dev local/onap --namespace onap -f /root/integration-override.yaml --set robot.enabled=true
...
pullPolicy: Always IfNotPresent option to allow us to
### Faster method to do a delete for reinstall
kubectl deletenamespace onap
kubectl delete pods -n onap --all
kubectl delete secrets -n onap --all
kubectl delete persistentvolumes -n onap --all
kubectl -n onap delete clusterrolebindings --all
helm del --purge dev
helm list -a
helm del --purge dev-[project] ← use this if helm list -a shows lingering releases in DELETED state
if you have pods stuck terminating for a long time
kubectl delete pod --grace-period=0 --force --namespace onap --all
# of NAME=dev release
helm upgrade -i dev local/onap --namespace onap -f integration-override.yaml
To test with a smaller ConfigMap try to disable some things like:
helm upgrade -i dev local/onap --namespace onap -f /root/integration-override.yaml --set log.enabled=false --set clamp.enabled=false --set pomba.enabled=false --set vnfsdk.enabled=false
(aaf is needed by alot of modules in Casablanca but this is a near equivalent)
helm upgrade -i dev local/onap --namespace onap -f /root/integration-override.yaml --set log.enabled=false --set aaf.enabled=false --set pomba.enabled=false --set vnfsdk.enabled=false
Note: setting log.enabled=false means that you will need to hunt down /var/log/onap logs on each docker container - instead of using the kibana search on the ELK stack deployed to port 30253 that consolidates all onap logs
## Slower method to delete full deployedeploy
helm del dev --purge
kubectl get pods --all-namespaces -o=wide
...
helm upgrade -i dev local/onap --namespace onap -f integration-override.yaml
# update vm_properties.py
...
Remember: Do the enabled=false BEFORE doing the make onap so that the kubectl processing will use the old chart to delete the POD
# make robot; make onap
# helm upgrade -i dev local/onap --namespace onap -f integration-override.yaml - this would just redeploy robot becuase its configMap only
Container debugging commands
kubectl -n onap logs pod/dev-sdnc-0 -c sdnc