Download and run a script that deletes the IBM® Maximo® Application Suite stack,
virtual infrastructure, VPCs, and EC2 instances from your Amazon Web Services
(AWS) account.
When you install an instance of the
Maximo Application Suite, several virtual
infrastructure resources are created in your AWS account, such as virtual private clouds (VPC),
Amazon EC2 instances, and a CloudFormation stack. To uninstall the
Maximo Application Suite, you download and run a script that deletes these resources. You can
use this script to uninstall the
Maximo Application Suite regardless of whether the
installation succeeded or failed.
Attention: Do not delete the CloudFormation stack
before running the script to uninstall Maximo Application Suite. The script deletes
the stack. If the stack is deleted manually, the uninstallation might fail.
You run the script on your local machine or on a server that is not located in a VPC that the
installation process created, such as the VPC that contains the Red Hat® OpenShift® cluster.
Note: Do not run the script in any of the EC2 instances that the Maximo Application Suite installation process created, such as the Bootnode, the bastion host,
or any of the cluster nodes. The script deletes these EC2 instances. If you run it in any of them,
it fails.
Procedure
- In a browser window, open the script, right-click the page and save the script to your local
machine by using the name
cleanup-mas-deployment.sh
.
- If you do not want to run the script locally, use SCP or any file transfer tool to copy the
script to the machine where you want to run it.
- On the machine where you want to run the script, in a command shell, log in to the AWS service
by running the following command:
aws configure
You are
prompted for your identity and access management (IAM) user credentials. Enter the credentials for
an IAM user that has the permissions to run the script, such as the IAM user that installed the
Maximo Application Suite. For more information, see Configuring the installation permissions.
- Make the script executable by entering the following command:
chmod +x cleanup-mas-deployment.sh
- View the script's usage information by running the following command:
./cleanup-mas-deployment.sh -h
- Run the script.
- You must specify the region code of the region where the Maximo Application Suite
was installed by using the
-r
option, for example: -r
ap-northeast-3
- To delete the virtual resources by using the CloudFormation stack name, use the
-s
option.
For example, if the CloudFormation stack name is
sp-manage-12
and the
region code is
ap-northeast-3
, run the following command:
./cleanup-mas-deployment.sh -s sp-manage-12 -r ap-northeast-3
- Verify that the script completed successfully.
If the script is successful,
output that is similar to the following text is displayed:
$ ./cleanup-mas-deployment.sh -s sp-manage-12 -r ap-northeast-3
Stack name: sp-manage-12
Unique string:
Region: ap-northeast-3
Supported region provided
Deleting by stack-name sp-manage-12
Execution started at Mon Mar 7 22:46:48 IST 2022
MAS instance unique string: nove9h
Checking for EC2 instances
…
EC2 instances found for this MAS instance
…
Terminate request submitted
Waiting for instances to be terminated
Deleted EC2 instances
Checking for volumes
…
Found volumes for this MAS instance
…
Checking for VPC
VPC_ID = vpc-0851c8fc0523cac86
Found VPC with Id vpc-0851c8fc0523cac86 for this MAS instance, it will be deleted at the end
Checking for NAT gateways
…
Found NAT gateways for this MAS instance
…
Checking for EIPs
…
Checking for load balancers
…
Checking for v2 load balancers
…
Checking for network interfaces
…
Checking for internet gateways
…
Checking for subnets
…
Checking for routing tables
…
Checking for network ACLs
…
Checking for security groups
…
Checking for S3 buckets
…
Checking for IAM users
…
Checking for IAM instance profiles
…
Checking for IAM policies
…
Checking for IAM roles
…
Checking for private hosted zones
…
Checking for CloudWatch log groups
…
Checking for CloudFormation stack
…
Execution completed at Mon Mar 7 23:02:47 IST 2022
- In the AWS CloudFormation console, verify that the stack that you created when you
installed the Maximo Application Suite is deleted.
- In the AWS VPC console, verify that the virtual infrastructure that was created when the
Maximo Application Suite was installed is deleted.
- Verify that no VPCs exist that contain
<unique-string>
in the VPC
name, for example: masocp-<unique-string>-vpc
- Verify that no EC2 instances exist that contain
<unique-string>
in
the EC2 instance name. For more information on
<unique-string>
and
other identifiers that are used in this documentation, see
Unique
identifiers.