From 15b364382ae5160a1f053e0f2aba48ff9104ead0 Mon Sep 17 00:00:00 2001 From: dfitzmau Date: Thu, 2 Mar 2023 15:37:52 +0000 Subject: [PATCH] OSDOCS-4810: Added module for deleting AWS LZ cluster --- .../installing-aws-localzone.adoc | 9 --- .../uninstalling-cluster-aws.adoc | 11 ++++ modules/installation-aws-delete-cluster.adoc | 57 +++++++++++++++++++ 3 files changed, 68 insertions(+), 9 deletions(-) create mode 100644 modules/installation-aws-delete-cluster.adoc diff --git a/installing/installing_aws/installing-aws-localzone.adoc b/installing/installing_aws/installing-aws-localzone.adoc index 54bfc707fb..df223a2c4d 100644 --- a/installing/installing_aws/installing-aws-localzone.adoc +++ b/installing/installing_aws/installing-aws-localzone.adoc @@ -110,15 +110,6 @@ include::modules/cluster-telemetry.adoc[leveloffset=+1] * See xref:../../support/remote_health_monitoring/about-remote-health-monitoring.adoc#about-remote-health-monitoring[About remote health monitoring] for more information about the Telemetry service. -[role="_additional-resources"] -[id="installing-localzone-additional-resources"] -== Additional resources - -* See link:https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacks.html[Working with stacks] in the AWS documentation for more information about AWS CloudFormation stacks. -* link:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#opt-in-local-zone[Opt into AWS Local Zones] -* link:https://aws.amazon.com/about-aws/global-infrastructure/localzones/locations[AWS Local Zones available locations] -* link:https://aws.amazon.com/about-aws/global-infrastructure/localzones/features[AWS Local Zones features] - [id="installing-aws-localzone-next-steps"] == Next steps diff --git a/installing/installing_aws/uninstalling-cluster-aws.adoc b/installing/installing_aws/uninstalling-cluster-aws.adoc index 4487f38417..1a856732af 100644 --- a/installing/installing_aws/uninstalling-cluster-aws.adoc +++ b/installing/installing_aws/uninstalling-cluster-aws.adoc @@ -11,3 +11,14 @@ You can remove a cluster that you deployed to Amazon Web Services (AWS). include::modules/installation-uninstall-clouds.adoc[leveloffset=+1] include::modules/cco-ccoctl-deleting-sts-resources.adoc[leveloffset=+1] + +include::modules/installation-aws-delete-cluster.adoc[leveloffset=+1] + +[role="_additional-resources"] +[id="installing-localzone-additional-resources"] +.Additional resources + +* See link:https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacks.html[Working with stacks] in the AWS documentation for more information about AWS CloudFormation stacks. +* link:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#opt-in-local-zone[Opt into AWS Local Zones] +* link:https://aws.amazon.com/about-aws/global-infrastructure/localzones/locations[AWS Local Zones available locations] +* link:https://aws.amazon.com/about-aws/global-infrastructure/localzones/features[AWS Local Zones features] \ No newline at end of file diff --git a/modules/installation-aws-delete-cluster.adoc b/modules/installation-aws-delete-cluster.adoc new file mode 100644 index 0000000000..1fc057646a --- /dev/null +++ b/modules/installation-aws-delete-cluster.adoc @@ -0,0 +1,57 @@ +// Module included in the following assemblies: +// +// * installing/installing_aws/uninstalling-cluster-aws.adoc + +:_content-type: PROCEDURE +[id="installation-aws-delete-cluster"] += Deleting a cluster with a configured AWS Local Zone infrastructure + +After you install a cluster on Amazon Web Services (AWS) into an existing Virtual Private Cloud (VPC), and you set subnets for each Local Zone location, you can delete the cluster and any AWS resources associated with it. + +The example in the procedure assumes that you created a VPC and its subnets by using a CloudFormation template. + +.Prerequisites + +* You know the name of the CloudFormation stacks, `` and ``, that were used during the creation of the network. You need the name of the stack to delete the cluster. +* You have access rights to the directory that contains the installation files that were created by the installation program. +* Your account includes a policy that provides you with permissions to delete the CloudFormation stack. + +.Procedure + +. Change to the directory that contains the stored installation program, and delete the cluster by using the `destroy cluster` command: ++ +[source,terminal] +---- +$ ./openshift-install destroy cluster --dir \//<1> + --log-level=debug <2> +---- +<1> For ``, specify the directory that stored any files created by the installation program. +<2> To view different log details, specify `error`, `info`, or `warn` instead of `debug`. + +. Delete the CloudFormation stack for the Local Zone subnet: ++ +[source,terminal] +---- +$ aws cloudformation delete-stack --stack-name +---- + +. Delete the stack of resources that represent the VPC: ++ +[source,terminal] +---- +$ aws cloudformation delete-stack --stack-name +---- + +.Verification + +* Check that you removed the stack resources by issuing the following commands in the AWS CLI. The AWS CLI outputs that no template component exists. ++ +[source,terminal] +---- +$ aws cloudformation describe-stacks --stack-name +---- ++ +[source,terminal] +---- +$ aws cloudformation describe-stacks --stack-name +---- \ No newline at end of file