Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add s3 bucket deletion via an action engine #3

Merged
merged 8 commits into from
Mar 11, 2020

Conversation

aidenkeating
Copy link
Contributor

add a new aws action engine for deleting s3 buckets associated
with a cluster.

this s3 action engine uses the aws tagging functionality to
filter only the s3 buckets that match the cluster id and
additional specified tags on the aws side instead of performing
filtering on the client side.

this commit also includes hack files to help with s3 manual
testing and future development.

verification:

  • run 'make build/cli'
  • run './hack/aws-s3-create-bucket.sh'
  • run './cli cleanup cluster-service --region=us-east-1 --dry-run=false'
  • ensure s3 buckets are removed for the cluster

Aiden Keating added 7 commits March 10, 2020 22:51
add a new aws action engine for deleting s3 buckets associated
with a cluster.

this s3 action engine uses the aws tagging functionality to
filter only the s3 buckets that match the cluster id and
additional specified tags on the aws side instead of performing
filtering on the client side.

this commit also includes hack files to help with s3 manual
testing and future development.

verification:
- run 'make build/cli'
- run './hack/aws-s3-create-bucket.sh'
- run './cli cleanup cluster-service --region=us-east-1 --dry-run=false'
- ensure s3 buckets are removed for the cluster
the action engine interface is very vague. to help give some more
context on what the interface is for, the name has been changed in
this commit to cluster resource manager.

additionally, a refactor of rds.go and s3.go in the aws package
have been refactored to include the 'manager_' prefix in the file
name.

verification:
- run 'make test/unit'
- ensure tests pass successfully
add basic unit tests for s3 resource manager.

verification:
- run 'make test/unit'
- ensure all tests pass
add watch flag to the cli, the flag can be used by either
specifying '--watch' or '-w' to the cli.

verification:
- run 'make build/cli'
- run './cli cleanup test -w --verbose'
- ensure the cli loops indefinitely
- run './cli cleanup test'
- ensure the cli exits after one run
complete basic support for the watch flag in the cli.

add the concept of 'merging forward' to allow for resources that
no longer exist to be treated as deleted.

this merge support is an in-line merge, and will modify the
existing report.

verification:
- run 'make test/unit'
- ensure tests complete successfully
this commit performs a number of tasks:
- adds an rds snapshot cluster resource manager for aws
- refactor engines to resource manager terminology
- add flag for only deleting specific resource types
add hack scripts for setting up test subnets and replication
groups in aws with the correct tags required for basic manual
testing.

verification:
- run './hack/aws-ec2-create-subnet.sh'
- ensure a subnet is created in the default vpc in us-east-1
- run './hack/aws-elasticache-create-replicationgroup.sh'
- ensure a replication group is created in the us-east-1 region
  with appropriate tags (integreatly.org/clusterID)
@aidenkeating aidenkeating merged commit d9562e2 into integr8ly:master Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant