How to Uninstall an AWS Marketplace installed version of Odin Engine - Cluster Edition#
All the resources required by Odin Engine Cluster are deployed by the CloudFormation stack. However, simply going to CloudFormation service in AWS Management Console and deleting the stack will not completely remove all the resources of the cluster. A few manual steps are required before you can delete the stack in the CloudFormation service. This is because, for example, running ECS (Elastic Container Service) tasks will not be stopped by CloudFormation if a stack deletion is requested, and the stack will simply end up in the DELETE_FAILED state.
Delete ECS Cluster#
The first step is to manually delete the ECS cluster. Navigate to ECS service in AWS Management Console, and select the ECS stack prefixed with OdinEngineStack.
Click on the stack. You will need to stop all tasks before you can delete the cluster.
When the tasks are stopped, click Delete cluster in the top right-hand corner of this page.
Delete EC2 Auto Scaling Groups and Delete EBS Volumes#
Next, you will need to manually delete the auto scaling groups and terminate the EC2 instances they provisioned. Navigate to EC2 Auto Scaling Groups, select all groups, and click delete.
The EC2 instances will now start getting terminated by AWS, but to speed up this process, you can go to EC2 Instances and click Terminate Instances.
There are 13 EBS volumes that the CloudFormation stack creates.
The volumes prefixed with OdinEngineStack will be automatically deleted by AWS when the instances are terminated. The remaining volumes without this prefix will need to be manually terminated.
Select all the remaining volumes when they become Available and delete them.
Delete the CloudFormation Stack#
You are now ready to delete the stack in the CloudFormation service. This will delete the cluster’s VPC, subnets, security groups, and all other remaining resources.
After you click Delete on this page, wait for the cluster’s status to transition to DELETE_COMPLETE. You have now successfully removed all Odin Engine’s resources that were created by the CloudFormation stack. Please remember to manually clean up any other resources/configurations you changed after deploying the stack, e.g. DNS records, SSL certificates, etc., as deleting the cluster will not delete any resources not originally created by it.