Once ONAP gets deployed with OOM setup, in order to just restart Portal, we can use the steps below:
Tear Down:
kubectl get deployments -n onap | grep dev-portal | sed -r 's/(^[^ ]+).*/kubectl delete deployments --grace-period=0 --force -n onap \1/' | bash
kubectl get rs -n onap | grep dev-portal | sed -r 's/(^[^ ]+).*/kubectl delete rs --grace-period=0 --force -n onap \1/' | bash
kubectl get sts -n onap | grep dev-portal | sed -r 's/(^[^ ]+).*/kubectl delete sts --grace-period=0 --force -n onap \1/' | bash
kubectl get pvc -n onap | grep dev-portal | sed -r 's/(^[^ ]+).*/kubectl delete pvc --grace-period=0 --force -n onap \1/' | bash
kubectl get pv -n onap | grep dev-portal | sed -r 's/(^[^ ]+).*/kubectl delete pv --grace-period=0 --force -n onap \1/' | bash
kubectl get cm -n onap | grep dev-portal | sed -r 's/(^[^ ]+).*/kubectl delete cm --grace-period=0 --force -n onap \1/' | bash
kubectl get secrets -n onap | grep dev-portal | sed -r 's/(^[^ ]+).*/kubectl delete secrets --grace-period=0 --force -n onap \1/' | bash
kubectl get jobs -n onap | grep dev-portal | sed -r 's/(^[^ ]+).*/kubectl delete jobs --grace-period=0 --force -n onap \1/' | bash
kubectl get pdb -n onap | grep dev-portal | sed -r 's/(^[^ ]+).*/kubectl delete pdb --grace-period=0 --force -n onap \1/' | bash
kubectl get pods -n onap | grep dev-portal | sed -r 's/(^[^ ]+).*/kubectl delete pods --grace-period=0 --force -n onap \1/' | bash
kubectl get svc -n onap | grep portal | sed -r 's/(^[^ ]+).*/kubectl delete svc --grace-period=0 --force -n onap \1/' | bash
kubectl delete cm -n onap portal-filebeat
rm -rf /dockerdata-nfs/dev/portal/
Set Up:
helm deploy dev-portal local/onap -f /root/oom/kubernetes/onap/resources/environments/public-cloud.yaml -f /root/staging-image-override.yaml -f /root/onap-overrides.yaml --namespace onap --verbose --set global.masterPassword=abcd1234
staging-image-override.yaml and onap-overrides.yaml can be found under oom repository