Deprovision not functional yet. To manually clean things, things
like this work WARNING! this will
scrub all mongo stuff.
oc get dc | grep mongodb- | cut -f1 -d' ' |\
xargs oc delete dc --force=true
oc get pvc | grep mongo- | cut -f1 -d' ' |\
xargs oc delete pvc --force=true
oc get statefulset | grep mongodb- | cut -f1 -d' ' |\
xargs oc delete statefulset --force=true
oc get svc | grep mongodb- | cut -f1 -d' ' |\
xargs oc delete svc --force=true
oc get pods | grep apb-run-provision-mongodb | cut -f1 -d' ' |\
xargs oc delete pod --force=true
and to delete a bunch of old projects in MongoDB Ops Manager:
USER=$1
APIKEY=$2
curl -S --header "Accept: application/json" \
-vvv \
--user "${USER}:${APIKEY}" \
--digest \
"http://localhost:8080/api/public/v1.0/groups" |\
jq -r ".results[].links[].href" |\
xargs curl --header "Accept: application/json" \
-vvv \
--user "${USER}:${APIKEY}" \
--digest \
--include \
--request DELETE
Deprovision not functional yet. To manually clean things, things
like this work WARNING! this will
scrub all mongo stuff.
and to delete a bunch of old projects in MongoDB Ops Manager: