Skip to content

Commit 530dfd6

Browse files
authored
Merge pull request #41 from oharan2/aws_cleanup
Update docs with AWS cleanup dos and don'ts
2 parents 2665c49 + 309a376 commit 530dfd6

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

docs/OCP_CI_Tutorials/Cluster_Cleanup/Manual_Cluster_Cleanup_Guide.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,50 @@
44

55
- [Introduction](#introduction)
66
- [AWS](#aws)
7+
- [Prerequisites](#prerequisites)
8+
- [General cleanup dos and don'ts](#general-cleanup-dos-and-donts)
9+
- [VPCs](#vpcs)
10+
- [Hosted zones](#route-53-hosted-zones)
11+
- [S3 Buckets](#s3-buckets)
12+
- [Cleanup resources by cluster identified](#cleanup-resources-by-cluster-identified)
713

814
## Introduction
915

10-
Sometimes, a scenario can fail before a cluster is fully deprovisioned leaving stale resources in a cloud-provider (at the time of writing this, we only use AWS). If that occurs, the Interop team is responsible for cleaning that cluster up in the cloud-provider account to avoid any unwanted cost. This document will serve as a guide to how to manually cleanup a cluster in the cloud-provider platforms we use.
16+
Sometimes, a scenario can fail before a cluster is fully deprovisioned leaving stale resources in a cloud-provider (at the time of writing this, we only use AWS). If that occurs, the Interop team is responsible for cleaning up that cluster in the cloud-provider account to avoid any unwanted cost. This document serves as a guide on how to manually clean up a cluster in the cloud-provider platforms we use.
1117

1218
## AWS
1319

20+
### Prerequisites
21+
22+
In order to perform manual cleanup and be able to delete resources in the cloud-provider account, users must belong to the watchers group, which subscribes to the EC2-delete policy and necessary permissions.
23+
24+
### General cleanup dos and don'ts
25+
26+
This section provides additional cleanup instructions for each resource type
27+
28+
It is generally safe to delete any resource whose name has one of the following prefixes:
29+
30+
* `ci-op-*`
31+
* `ci-rosa-*`
32+
* `mtc-*` (The MTC scenario has a unique prefix since it's deployed by the ocp-cli-installer)
33+
34+
#### VPCs
35+
36+
* In any AWS region: **_Don't_** delete any VPC whose `Default VPC` value is `Yes`
37+
38+
![default-vpc.png](img/default-vpc.png)
39+
40+
#### Route 53: Hosted zones
41+
42+
* **_Do_** ONLY delete `A Records` safely inside available hosted zones
43+
* **_Don't_** delete any hosted zone which doesn't have the interop testing prefix mentioned above (there may be reserved resources for internal use)
44+
45+
#### S3 Buckets
46+
47+
* Similarly, **_don't_** delete any S3 bucket which doesn't have the interop testing prefix mentioned above (there may be reserved resources for internal use)
48+
49+
### Cleanup resources by cluster identified
50+
1451
In order to cleanup an OCP cluster provisioned through OpenShift CI in AWS, follow these steps:
1552

1653
1. Find the "name" of the cluster. Every cluster provisioned using OpenShift CI should have a unique name associated with it. This is how we know which AWS resources came from which Prow job.
Loading

0 commit comments

Comments
 (0)