Home

Awesome

gcloud-cleanup

Clean That Cloud!

gcloud-cleanup takes care of cleaning up resources from the Google Compute Platform.

Status

Actively running in production.

How does it fit into the rest of the system

What does it really do

Instance cleaning

gcloud-cleanup finds instances matching name filters that have existed for longer than a certain cutoff time and deletes them.

This ensures that instances that failed to terminate are cleaned up.

Relevant configuration:

Image cleaning

gcloud-cleanup queries Job-board for all known images matching name filters with infra=gce, then queries Google Cloud for all known images matching name filters, and deletes any images in the Google Cloud set that are not also in the Job-board set.

This ensures that images unknown to Job-board are cleaned up.

Relevant configuration:

Rate limiting

GCE is not happy if we send them a gazillion API requests. In order to prevent us from being rate limited, we throttle the amount of requests we make.

NOTE: the ./ratelimit subpacakage is a vendored copy from travis-ci/worker.