Tear Down the Environment

Finally, we will undeploy the Oracle SOA deployment and destroy the infrastructure provisioned. Use this is a two-step process when you just want to clean up the SOA domain—either by using Helm or Terraform—then decommission the Infrastructure. If you want to destory everything, use terraform destroy.

Option 1: Clean Up the SOA Domain by Using Terraform

If you deployed everything with Terraform, and you want to clean up the SOA domain only but keep the cluster up use this method.

  1. Enter:
    terraform destroy --target=null_resource.deploy_soa
  2. Type yes at the prompt and wait for the process to finish.
  3. Verify that the pods are gone (or Terminating) by entering:
    kubectl get pods -n soans

Option 2: Clean Up the SOA Domain by Using Helm

To remove the SOA domain by using Helm, using Terraform, run this procedure;

  1. Remove the domain manifest::
    helm upgrade mysoa oracle/soa-suite -n soans \
        --reuse-values \
        --set domain.enabled=false \
        --wait
    This removes the domain, and terminates the SOA servers. This is necessary as the chart deletion runs a process to delete the installation files on the file storage, as well as the database schemas. With the pods still running, the file deletion process would fails as the files are still being accessed by the pods.
  2. Wait until the pods are terminated:
    kubectl get pods -n soans
  3. Delete the chart:
    helm delete mysoa -n soans

Decommission the Infrastructure

With the SOA domain cleaned up, you can decommission the infrastructure.

  1. To decommission the entire infrastructure, enter:
    terraform destroy
  2. When prompted, type yes.
  3. If destroy fails for some reason, run the command again.