Uninstall automation orchestrator

Remove the automation orchestrator deployment and operator from your cluster using the aapctl CLI.

Before you begin

  • You have the aapctl binary installed.
  • You have oc CLI access to the cluster.

About this task

By default, aapctl uninstall preserves namespaces. If you use the --force flag, it deletes the namespaces and all resources inside them, including PVCs and manually created resources. For more information, see the Uninstall section of aapctl command reference.

Procedure

  1. Optional: Preview the resources that aapctl will delete.
    $ aapctl uninstall ao --dry-run -o yaml
  2. Run the uninstall command for your deployment target.

    To uninstall automation orchestrator only:

    $ aapctl uninstall ao

    This command deletes 4 resources:

    Table 1. Resources deleted by aapctl uninstall ao
    Resource Kind Namespace Description
    automation-orchestrator AutomationOrchestrator automation-orchestrator Automation orchestrator instance
    automation-orchestrator-operator ClusterServiceVersion automation-orchestrator Operator CSV (created by OLM during installation)
    automation-orchestrator-operator Subscription automation-orchestrator Automation orchestrator operator subscription
    automation-orchestrator-operator OperatorGroup automation-orchestrator OLM OperatorGroup

    To uninstall the full Ansible Automation Platform Plus stack:

    $ aapctl uninstall aap-with-ao

    This command deletes the same 4 automation orchestrator resources plus 4 Ansible Automation Platform resources (8 total). aapctl removes the automation orchestrator resources first.

    To uninstall Ansible Automation Platform only:

    $ aapctl uninstall aap

    This command deletes 4 resources:

    Table 2. Resources deleted by aapctl uninstall aap
    Resource Kind Namespace Description
    aap AnsibleAutomationPlatform aap Ansible Automation Platform instance
    ansible-automation-platform-operator ClusterServiceVersion aap Operator CSV (created by OLM during installation)
    ansible-automation-platform-operator Subscription aap Ansible Automation Platform operator subscription
    ansible-automation-platform-operator OperatorGroup aap OLM OperatorGroup
  3. If you used custom configuration during installation, pass the same configuration so that aapctl knows which optional operators are enabled and where to look.
    $ aapctl uninstall ao --config my-config.yaml

    If you enabled CloudNativePG during installation, pass --set cloudnative-pg-operator.enabled=true so that aapctl also removes the CloudNativePG resources. This deletes 10 additional resources:

    Table 3. CloudNativePG resources deleted
    Resource Kind Namespace Description
    temporal-visibility Database (CloudNativePG) automation-orchestrator Temporal visibility database
    temporal Database (CloudNativePG) automation-orchestrator Temporal database
    orchestrator Database (CloudNativePG) automation-orchestrator Backend database
    orchestrator-postgres Cluster (CloudNativePG) automation-orchestrator PostgreSQL cluster
    temporal-visibility-postgres-secret Secret automation-orchestrator Temporal visibility database credentials
    temporal-postgres-secret Secret automation-orchestrator Temporal database credentials
    orchestrator-postgres-secret Secret automation-orchestrator Backend database credentials
    cloudnative-pg ClusterServiceVersion cloudnative-pg Operator CSV (created by OLM during installation)
    cloudnative-pg Subscription cloudnative-pg CloudNativePG operator subscription
    cloudnative-pg OperatorGroup cloudnative-pg OLM OperatorGroup

Uninstall automation orchestrator manually

Remove automation orchestrator without aapctl by deleting the custom resource and uninstalling the operator through Operator Lifecycle Manager (OLM).

Before you begin

  • You have oc CLI access to the cluster.
  • You have cluster administrator access.

Procedure

  1. Delete the AutomationOrchestrator custom resource to remove all operator-created resources.
    $ oc delete automationorchestrator instance-name -n namespace
    Note:

    Your PostgreSQL data is not affected by deleting the custom resource.

  2. Remove the automation orchestrator operator through Operator Lifecycle Manager (OLM) by deleting the operator subscription and ClusterServiceVersion (CSV) from the namespace where the operator is installed.
    $ oc delete subscription automation-orchestrator-operator -n operator-namespace
    $ oc delete csv -n operator-namespace -l operators.coreos.com/automation-orchestrator-operator.operator-namespace=''

    Alternatively, navigate to Operators > Installed Operators in the OpenShift web console, select automation orchestrator, and click Uninstall Operator.

    Note:

    If you uninstall the operator before deleting the custom resources, your automation orchestrator deployment continues to run but is no longer managed by the operator.