jasonmimick / atlas-osb

DEPRECATED: See https://github.com/mongodb/atlas-osb

Home Page:https://github.com/mongodb/atlas-osb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Basic Plan Provision & Deprovision

jasonmimick opened this issue · comments

Ensure the broker can successfully provision and deprovision the Basic Plan.

Provisioning

P0 - support single region provision
P0 - support enable backups by default
P1 - support multi-region

Deprovisioning

When deleting a service instance, what is the desired behavior. Deleting a service instance is really deleting a "plan instance" which means all the Atlas resources associated with that plan instance, for example a Project, Cluster, DBUser and such.

  • Should the broker delete all the Atlas resource for a plan instance by default?

  • Should the broker allow deleting all the Atlas resource for a plan instance by default?

Maps to Manulife Use cases:

Use case 3: As a user, I should be able to create a service instance within a single-region (Sprint 2)

Note: Backup should be enabled by default.

Use case 4: As a user, I should be able to create a service instance that spans multi-regions (Sprint 2 or Sprint 3?)

note about cf delete-service: it deletes a cluster, but the project remains, it can lead to some problems if we create a service with the same name, but different configuration, for example, whitelist that consists of old ones + new ones

We should add a bool for EnablePlanTerminationProtection and add this as a field to Plan.
The field in Plan should support a default value, which can some from an env variable ATLAS_BROKER_ENABLE_PLAN_TERMINATION_PROTECTION default is false.

Then if the termination protection is enabled, then when deleting a plan we should:

  • Stop the cluster (if any)
  • Deactivate user (is this possible)
  • Deactivate apikey (if possible)
  • Tag the project as "deleted" or something.

then log all this, but really delete the service instance and don't fail the /deprovision broker call

@vasilevp - please review this and provide any feedback.

Fixed for Alpha

Currently the broker only deletes the cluster when Deprovision() is called.
The related Atlas Project cannot be deleted until the cluster terminates and clears up, which takes a few minutes.
Since the Deprovision() call is expected to return in "real-time" we need to find a way to trigger the deletion of the other resources for a given plan instance once the cluster is cleared up.

@jasonmimick researching this with Atlas team

Adding fix to wait for cluster cleanup and then delete the project.

this has been validated