cloudfoundry / cf-deployment-concourse-tasks

Apache License 2.0
23 stars 76 forks source link

Add task to delete all bosh deployments #89

Closed sophiewigmore closed 5 years ago

sophiewigmore commented 5 years ago

What is this change about?

Its a task to delete all bosh deployments, so that we can delete the deployments without needing to specify the deployment names.

We are adding pipelines to bbl-up our existing environments and bbl-down any environments that we might someday need to destroy. As part of destroying these environments, we may have to delete the bosh deployments and we may not know the names of those bosh deployments. We created this script to do just that and thought it might be of use here!

Please check all that apply for this PR:

Did you update the README as appropriate for this change?

How should this change be described in release notes?

What is the level of urgency for publishing this change?

Tag your pair, your PM, and/or team!

@genevieve #pcf-windows and #garden-windows

cfdreddbot commented 5 years ago

:white_check_mark: Hey sophiewigmore! The commit authors and yourself have already signed the CLA.

cf-gitbot commented 5 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/164839949

The labels on this github issue will be updated when the story is started.

genevieve commented 5 years ago

I realize that this is a potentially unusual place for this task given it should be for only for the corresponding cf-deployment repo. However, we tend to change the names of our cf-deployments based on which version of the windows rootfs is being deployed or other details like that. We also tend to use environments for different deployments, so it's hard to determine which deployment is still on some environment. Anyway, totally understand if y'all would prefer to keep this more "cf" specific.

davewalter commented 5 years ago

Hi @sophiewigmore,

After discussing with the team this morning, we think that this could actually be implemented as a parameter on the existing bosh-delete-deployment task, instead of as an entirely separate task. Would y'all be open to making this change?

Regards, Dave

CC @genevieve @vitreuz @cdutra

genevieve commented 5 years ago

Hey @davewalter,

Yes we would be open to making that change! Do you have a preference for what that parameter should be so that users don't accidentally opt-in?

Thanks! Gen

davewalter commented 5 years ago

Hi @genevieve,

I would go with something like DELETE_ALL_DEPLOYMENTS, with a default value of false to maintain backwards compatibility.

Regards, Dave

sophiewigmore commented 5 years ago

Hi @davewalter, I have updated the PR to make a DELETE_ALL_DEPLOYMENTS optional paramter to the bosh-delete-deployment task as requested! Let me know if other changes are needed. Best, Sophie

davewalter commented 5 years ago

Hi @sophiewigmore,

Could you please remove the old references to bosh-delete-all-deployments task from the README? You could also update the entry for bosh-delete-deployment to mention the new DELETE_ALL_DEPLOYMENTS flag.

Thanks, Dave

sophiewigmore commented 5 years ago

@davewalter sure. do you want me to add any details to the bosh-delete-deployment part of the readme to note it can be used to delete all deployments too?

davewalter commented 5 years ago

Hi @sophiewigmore,

Yes, please! A comment to mention that the DELETE_ALL_DEPLOYMENTS parameter is now available would be great.

Thanks, Dave

sophiewigmore commented 5 years ago

Hey @davewalter,

All done!

Best, Sophie

cdutra commented 5 years ago

Hi @sophiewigmore, thanks for the PR!

would you mind squashing some of the commits, just for cleaner history. Besides that the PR looks good.

Thanks!

sophiewigmore commented 5 years ago

Hey @cdutra, All squashed!!

Thanks, Sophie