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

Implement process for upgrading old service instances on cloud.gov #3083

Closed
1 task
mogul opened this issue Apr 7, 2021 · 7 comments
Closed
1 task

Implement process for upgrading old service instances on cloud.gov #3083

mogul opened this issue Apr 7, 2021 · 7 comments

Comments

@mogul
Copy link
Contributor

mogul commented Apr 7, 2021

User Story

In order to ensure existing instances get updates relating to compliance or security, the SSB should include a mechanism for updating existing instances, or helping clients migrate between plans.

Acceptance Criteria

[ACs should be clearly demoable/verifiable whenever possible. Try specifying them using BDD.]

  • GIVEN I have provisioned an EKS instance INSTANCENAME
    AND a the SSB is updated to include a new brokerpak version implementing a new feature
    WHEN I run cf update-service INSTANCENAME
    THEN I can see the new feature is available in INSTANCENAME

Background

[Any helpful contextual notes or links to artifacts/evidence, if needed]

Security Considerations (required)

[Any security concerns that might be implicated in the change. "None" is OK, just be explicit here!]

Sketch

The CSB team is implementing this functionality upstream. See this epic in Pivotal Tracker and the set of stories attached to it.

The feature is now available, but is behind a feature flag we need to enable.

@mogul
Copy link
Contributor Author

mogul commented Mar 18, 2022

The CSB is implementing this capability upstream, and should be shipping it any day now.

@mogul
Copy link
Contributor Author

mogul commented Mar 28, 2022

Surprise!
image

@jbrown-xentity
Copy link
Contributor

@nickumia-reisys can you add link to upstream documentation

@nickumia-reisys
Copy link
Contributor

There actually isn't a good central location where this is documented. Various links,

@hkdctol
Copy link
Contributor

hkdctol commented May 12, 2022

This is relevant only if/when we move to EKS broker so moving to Icebox for now.

@nickumia-reisys nickumia-reisys changed the title Implement process for upgrading old instances Implement process for upgrading old service instances on cloud.gov Jun 23, 2022
@hkdctol hkdctol closed this as completed Jun 23, 2022
@nickumia-reisys
Copy link
Contributor

As a summary of how this works:

  • Before:
    • When a Service was created, it gets a copy of the terraform code from the Broker.
    • The Service instance code can be different from the Broker code.
    • When the Broker is updated, the Service instance code remains unchanged.
    • Running an update-service on an existing Service just re-activated the existing terraform code with new configuration parameters.
    • If the code in the Broker was updated, then new Service instances would get the code changes, but existing instances would not.
  • After:
    • When a Service is created, it gets a copy of the terraform code from the Broker.
    • The Service instance code can be different from the Broker code.
    • When the Broker is updated, the Service instance code remains unchanged.
    • Running an update-service on an existing Service installs the most recent code from the Broker into the Service instance and then activates the new code.
    • If the code in the Broker was updated, then new Service instances would get the code changes. Existing instances will not get updated unless the update-service is run.

Because we made this the default behavior, to achieve the old behavior of leaving the terraform code unchanged on update-service, the BROKERPAK_UPDATES_ENABLED variable would need to be disabled on the Broker and restarted before the update-service occurs.

This feature was critical in pushing updates to existing production instances without downtime.

  • Before:
    • There was a service instance in production with production data.
    • To get the newest code into the service, a new service would need to be created, loaded with the data and then swapped for no downtime.
    • For our CKAN application, the only way to load the data was to connect to production and rebuild the data from scratch. For this reason, having no downtime was impractical.
  • After:

Very much related to

@nickumia-reisys
Copy link
Contributor

🖖 Big shoutout to @mogul for keeping on top of the Brokerpak community and mentoring me through this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants