|
4 | 4 |
|
5 | 5 | - [Introduction](#introduction)
|
6 | 6 | - [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) |
7 | 13 |
|
8 | 14 | ## Introduction
|
9 | 15 |
|
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. |
11 | 17 |
|
12 | 18 | ## AWS
|
13 | 19 |
|
| 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 | + |
| 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 | + |
14 | 51 | In order to cleanup an OCP cluster provisioned through OpenShift CI in AWS, follow these steps:
|
15 | 52 |
|
16 | 53 | 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.
|
|
0 commit comments