Uninstalling a cluster on RHOSP from your own infrastructure

You can remove a cluster that you deployed to Red Hat OpenStack Platform (RHOSP) on user-provisioned infrastructure.

Downloading playbook dependencies

The Ansible playbooks that simplify the removal process on user-provisioned infrastructure require several Python modules. On the machine where you will run the process, add the modules’ repositories and then download them.

These instructions assume that you are using Fedora 8.

Prerequisites

  • Python 3 is installed on your machine.

Procedure

  1. On a command line, add the repositories:

    1. Register with Red Hat Subscription Manager:

      1. $ sudo subscription-manager register # If not done already
    2. Pull the latest subscription data:

      1. $ sudo subscription-manager attach --pool=$YOUR_POOLID # If not done already
    3. Disable the current repositories:

      1. $ sudo subscription-manager repos --disable=* # If not done already
    4. Add the required repositories:

      1. $ sudo subscription-manager repos \
      2. --enable=rhel-8-for-x86_64-baseos-rpms \
      3. --enable=openstack-16-tools-for-rhel-8-x86_64-rpms \
      4. --enable=ansible-2.9-for-rhel-8-x86_64-rpms \
      5. --enable=rhel-8-for-x86_64-appstream-rpms
  2. Install the modules:

    1. $ sudo yum install python3-openstackclient ansible python3-openstacksdk
  3. Ensure that the python command points to python3:

    1. $ sudo alternatives --set python /usr/bin/python3

Removing a cluster from RHOSP that uses your own infrastructure

You can remove an OKD cluster on Red Hat OpenStack Platform (RHOSP) that uses your own infrastructure. To complete the removal process quickly, run several Ansible playbooks.

Prerequisites

  • Python 3 is installed on your machine.

  • You downloaded the modules in “Downloading playbook dependencies.”

  • You have the playbooks that you used to install the cluster.

  • You modified the playbooks that are prefixed with down- to reflect any changes that you made to their corresponding installation playbooks. For example, changes to the bootstrap.yaml file are reflected in the down-bootstrap.yaml file.

  • All of the playbooks are in a common directory.

Procedure

  1. On a command line, run the playbooks that you downloaded:

    1. $ ansible-playbook -i inventory.yaml \
    2. down-bootstrap.yaml \
    3. down-control-plane.yaml \
    4. down-compute-nodes.yaml \
    5. down-load-balancers.yaml \
    6. down-network.yaml \
    7. down-security-groups.yaml
  2. Remove any DNS record changes you made for the OKD installation.

OKD is removed from your infrastructure.