-
Notifications
You must be signed in to change notification settings - Fork 84
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
Updates first-pass proposal #368
Conversation
73b2ff3
to
35f0c54
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two very minor changes. All looks good, I like the updates_to
section of the graph. Too bad you couldn't incorporate the arrow (->) in the apb.yml :)
docs/proposals/updates-first-pass.md
Outdated
|
||
NOTE: The Service Catalog currently does **not** implement update, so triggering | ||
these from the UI is not possible. Updates should be considered very "alpha". | ||
To demonstrate , plan is to enhance `asbcli` for update support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change "plan is to enhance asbcli for update support" to read:
the plan is to enhance asbcli
to support update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, apparently I can't speak english.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmrodri @rthallisey @shawn-hurley RE: asbcli
It's the butt of our jokes because it was a load of crap python I hammered out on a Friday afternoon for a Monday demo expecting it to die on Tuesday, but it's proven to be a very useful tool for broker authors, and I'm finding myself now wanting to implement update support. @rthallisey implemented bind support because he needed it. It's clear ASB authors want this kind of tool, we should work together to define what we're looking for out of it and make that happen. IMO, python remains perfect for this. I'm going to log an issue so we have a distinct place to air desires for what we want this tool to be, and let's support it given the collective interest.
docs/proposals/updates-first-pass.md
Outdated
### Broker | ||
|
||
As outlined in the spec, broker must support both async and sync update variants. | ||
Async is requested via `accepts_incomplete` qparam. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change qparam to query param.
@jmrodri Addressed your comments 👍 I'm going to be moving off update to look into some upstream catalog things, so this should get merged with the expectation that an implementation may not happen for a sprint or two. This represents the initial design work and requirements for a first pass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
docs/proposals/updates-first-pass.md
Outdated
parameters: *_p # param anchor | ||
updates_to: | ||
- gold | ||
- name: silver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming this is supposed to say Gold?
@eriknelson +1 on This looks good to me. My only question is: Does the APB author need to write two paths for the Gold plan? How does the Gold plan know which plan he is transitioning from? I guess I'm a little uncertain how an APB author would control the logic for upgrading different versions.
I only bring this up in an instance where knowing the previous plan (state of the app) is necessary for the APB. I only see that information being passed around in the broker to manage state. Overall this looks great, ACK, just bringing up a concern. Sorry if its been worked through :) |
docs/proposals/updates-first-pass.md
Outdated
parameters: *_p # param anchor | ||
updates_to: | ||
- gold | ||
- name: silver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: gold
plans as the nodes. APBs will need to define this graph in their `apb.yml` | ||
so the broker is able to validate a requested transition. | ||
|
||
Proposal is to add an optional `updates_to` list on `Plan` objects that indicates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about using updates_from
(or updates
or can_update
) on the destination plan instead of the source plan. It might give some additional flexibility and the logic for updating seems like it would reside in the destination plan. Putting an updates_to
on an old version requires that the old version knows all future versions that it would be able to update to. That's workable on a single apb that only upgrades from one plan to another, but in future use cases, that might not be the case. For example, by using updates_from
you can use the same syntax to update previous APBs.
# Postgres 9.5 APB
name: rhscl-postgresql-9.5-apb
# ...snip
plans:
- name: dev
description: A single DB server with no storage
free: true
metadata: # ...snip
parameters: *_p
updates_from:
- version: 9.4
plan: dev
- name: silver
description: Silver DB plan with persistence
free: false
metadata: # ...snip
parameters: *_p # param anchor
updates_from:
- dev # defaults to same version and changes plan
- version: 9.4
plan: dev
- version: 9.4
plan: silver
- name: gold
description: A single DB server with persistent storage
free: false
metadata: # ...snip
parameters: *_p # param anchor
updates_from:
- dev # defaults to same version and changes plan
- silver # defaults to same version and changes plan
- version: 9.4
plan: dev
- version: 9.4
plan: silver
- version: 9.4
plan: gold
In this case, the gold plan knows what it can update from and is responsible for the logic for doing so. We may not use this, but it'd be nice to have the option. Also, it feels better putting the option on the plan that will know what to do with the info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK, like the flexibility update_from
supports. It feels a little backwards in my mind but your arguments are solid.
WRT versions, I think we need to think through and possibly decouple versions from plans for these reasons. At the very least, that sounds like a problem discussion in-scope for the next pass proposal.
|
||
NOTE: The Service Catalog currently does **not** implement update, so triggering | ||
these from the UI is not possible. Updates should be considered very "alpha". | ||
To demonstrate , the plan is to enhance `asbcli` to support update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you be more specific about how the service catalog does not implement update?
From my perspective, using the service catalog I can create a resource with plan X and variables Y and Z. If I re-provision the exact same app with the same plan and parameters, I should expect and error because it's already there. If I re-provision with a different parameter it's the same error, correct? Is that what is missing?
How long until the catalog supports update?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update is a distinct operation/request the platform (service-catalog in this case) is expected to implement. It is not a re-provision. @jmrodri any idea on a timeline? I was not present for the meeting where this came up.
``` | ||
|
||
* Q: Is there any value in versioning this object? Ex: `_apb_creds_version` field | ||
somewhere that begins at 1 and increments each time an update occurs? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to have rollbacks in the future, it would come in handy. But, that's not part of this spec and can be added then.
free: true | ||
metadata: # ...snip | ||
parameters: *_p | ||
updates_to: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at this file from a 100ft view, there's a lot of yaml options here. I would be nice if we didn't need updates_to
and let the APB writer document that so we don't have to carry as many options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need some way for the APBs to express a valid plan transition graph. In the absence of any of these, that implicitly says to me "I don't support plan updates".
will allow that transition. | ||
|
||
## Next steps | ||
* Updating instances with outstanding bindings, consider both binding consumers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also multi app updates, which is a whole can of worms.
|
||
#### APB | ||
|
||
Overall, the goal with update should be to push the complexity of what an update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Completely agree with this sentence
The
This is a much bigger question. The spec reads to me like plans and plan updates were originally designed for tiers of service (multi-tenant DB vs dedicated instance) rather than versions and their updates. I don't know that it makes sense to couple versions to plans, because then you start talking about having a I have an instance of
These are both fair game for the next pass at this that takes active bindings into account, IMO. |
Think this is a decent starting point, there is a lot to this that I think we'll discover as we move through implementation. I'll try to continue to update this document for anything major. IMO we'll probably be iterating on this a bunch.