feat: Charmhub module for upgrades without revision pins#174
feat: Charmhub module for upgrades without revision pins#174MichaelThamm wants to merge 9 commits intomainfrom
Conversation
| --overlay ./storage-small-overlay.yaml | ||
| ``` | ||
|
|
||
| (deploy-cos-ref)= |
There was a problem hiding this comment.
Iirc we haven't started using these our docs yet.
Remind me - it's an anchor or cross-sphinx ref?
I think juju had this and it turned out to be brittle and difficult to maintain, but maybe I'm missing something.
There was a problem hiding this comment.
It's an anchor, but it can also be used as a cross-sphinx/project ref for projects that have that enabled.
You haven't started using them in the COS docs yet, but it is the standard approach to cross-linking for sphinx docs projects, so at some point, you should change your links to use these refs. Juju uses them in their docs, but I don't know what conversations happened around it
Using ref targets/anchors is nicer because otherwise anytime you change the filename/path, it'll break any of those links in your docs.
IMO, it could go either way in this PR (add it or don't add it), but the future goal should be that all docs have a ref target, and you use those for linking instead of file path. (Copilot should be able to handle it well when you do make this initiative)
| ```diff | ||
| + http = { | ||
| + source = "hashicorp/http" | ||
| + version = "~> 3.0" | ||
| + } | ||
| ``` |
There was a problem hiding this comment.
Do we need to sepcify http here? Can it be a derived dependency from the charmhub module?
|
Hi @YanisaHS, could you please review this PR with me? I would appreciate some opinions on the clarity and structure of the document. |
|
@MichaelThamm Yea, I'd be happy to! 😊 I likely won't have time to review it until Tuesday though (I'm off Monday) |
@YanisaHS This PR is still a work in progress. It may be best to wait until I make some more progress before reviewing this PR. The docs still need updating before first review. |
|
@MichaelThamm Ok, sounds good! Just tag me when you're ready again |
|
I think it is ready for review now: docs link Some input I would like from you is:
I need to add a comment to the doc about not guaranteed to work across tracks. |
|
@MichaelThamm Ok! I'll review it soon (was off the end of last week) |
|
@MichaelThamm I'll go through and actually provide feedback in the doc, but first addressing your two issues:
For a tutorial, this is fine. I'd still recommend you add a note (as you suggested) describing this condition, mostly for any driveby users / people who find this without realizing they're in a Diataxis ✨ tutorial ✨. Tutorials are more of a "sandboxed" experience, so it's okay to feed the user the configurations they need. But...
Yes. The Tutorials section in the Observability docs gives the docs in order a new user should follow, so now it reads like (1) Deploy, (2) Refresh, (3) Sync .. etc. The experience feels odd for a new user - if it's important they're on this track, then that should be given to them in the previous Deploy steps, rather than deploying and refreshing right after. Actually this is something we'll discuss as a team this cycle: From a user's perspective, one of the most immediate concerns I have with the docs is that they don't clearly state how to deploy COS in the How-to guides (examples: Charmed Kafka, Charmed Postgres, Charmed K8s). When this is the first thing a user needs to do to access the product (and rest of the documentation). I'll provide feedback with this in mind as I go through your PR - assuming you'll refactor it into a how-to guide. |
YanisaHS
left a comment
There was a problem hiding this comment.
I was mostly just looking at the Refresh product module doc, although I quick scanned the README and didn't have any comments. If you want me to provide feedback on something else in the PR then LMK
| --overlay ./storage-small-overlay.yaml | ||
| ``` | ||
|
|
||
| (deploy-cos-ref)= |
There was a problem hiding this comment.
It's an anchor, but it can also be used as a cross-sphinx/project ref for projects that have that enabled.
You haven't started using them in the COS docs yet, but it is the standard approach to cross-linking for sphinx docs projects, so at some point, you should change your links to use these refs. Juju uses them in their docs, but I don't know what conversations happened around it
Using ref targets/anchors is nicer because otherwise anytime you change the filename/path, it'll break any of those links in your docs.
IMO, it could go either way in this PR (add it or don't add it), but the future goal should be that all docs have a ref target, and you use those for linking instead of file path. (Copilot should be able to handle it well when you do make this initiative)
| @@ -0,0 +1,111 @@ | |||
| # Refresh COS to a new channel | |||
|
|
|||
| In this example, you will learn how to deploy COS Lite and refresh from channel `2/stable` to `2/edge`. To do this, we can deploy COS Lite via Terraform in the same way as [in the tutorial](https://documentation.ubuntu.com/observability/track-2/tutorial/installation/cos-lite-microk8s-sandbox). | |||
There was a problem hiding this comment.
Assuming this gets refactored into a tutorial, the language/framing should change so it's not like "In this example, you'll learn...". How-to guides aren't really "learning" experiences, it's more just like "here's the steps you need to do XYZ".
Example: Charmed Kafka: How to upgrade
|
|
||
| - Know how to deploy {ref}`COS Lite with Terraform <deploy-cos-ref>` | ||
|
|
||
| ## Introduction |
There was a problem hiding this comment.
Similar to a comment I made above, this section can be less narrative if being refactored into a how-to guide
(btw I'm happy to meet and discuss my comments with you if you want!)
| terraform apply | ||
| ``` | ||
|
|
||
| At this point, you will have successfully upgraded COS Lite from `2/stable` to `2/edge`! |
There was a problem hiding this comment.
The steps overall seem fine and pretty straightforward. I can provide some better feedback once it gets refactored into a how-to
|
Blocked by this issue: |
Issue
This discourse post and TF module:
were created because there is a difference in UX between the TF provider and the Juju client for upgrading a charm's channel:
revisioninchannelchannel, leaving therevisionunchangedSolution
I asked around to see if we can host this in other repos, e.g.,
/canonical/charmcraftbut there was push back.The general recommendation is to:
but we cannot, since we want our users of COS to only specify the
channeland COS should work, i.e., easy to use. Therefore, we need this module more than other teams do, and for now, I think the best place for this module is in this repo. Eventually, we can move this elsewhere, especially if we decide to host it in the TF store/registry.Checklist
Context
Related PR for TF juju provider regarding refreshing integrations that change interfaces:
[Documentation] "Cannot upgrade application X: would break relation" juju/terraform-provider-juju#1022
In the future charms will have unique tracks and we need to expose the channel per charm to override the default we set.
Testing Instructions
COS Liteand upgrade with this module manuallyDocumentation
See the CI job for the documentation changes