Uninstalling CloudBees CI from OpenShift

1 minute read

If you need to remove CloudBees CI from OpenShift, use the following steps:

  1. Stop operations center

    $ oc scale statefulsets/cjoc --replicas=0
    statefulset "cjoc" scaled
  2. Delete CloudBees CI

    $ oc delete -f cloudbees-core.yml
    configmap "cjoc-config" deleted
    configmap "cjoc-configure-jenkins-groovy" deleted
    statefulset "cjoc" deleted
    service "cjoc" deleted
    serviceaccount "cjoc" deleted
    role "master-management" deleted
    serviceaccount "jenkins" deleted
    role "pods-all" deleted
    route "cjoc" deleted
    configmap "jenkins-agent" deleted
  3. Delete remaining pods and data

    $ oc delete pod,statefulset,pvc,route,service -l com.cloudbees.cje.tenant
    persistentvolumeclaim "jenkins-home-cjoc-0" deleted
  4. Delete services, pods, persistent volume claims, etc.

    $ oc delete svc --all
    service "cjoc-jnlp" deleted
    $ oc delete statefulset --all
    No resources found
    $ oc delete pod --all
    No resources found
    $ oc delete pvc --all
    No resources found