-
Notifications
You must be signed in to change notification settings - Fork 125
docs: copy environment setup instructions from machine tutorial #2258
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
base: k8s-tutorial-uv
Are you sure you want to change the base?
docs: copy environment setup instructions from machine tutorial #2258
Conversation
| - **uv and tox** - You'll implement your charm using Python code. [uv](https://docs.astral.sh/uv/) is a Python project manager that will install dependencies for checks and tests. You'll use [tox](https://tox.wiki/en/) to select which checks or tests to run. | ||
| - **uv** - Your charm will be a Python project. You'll use [uv](https://docs.astral.sh/uv/) to manage your charm's runtime and development dependencies. | ||
| - **tox** - You'll use [tox](https://tox.wiki/en/) to run your charm's checks and tests. |
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.
I changed this because "uv [...] install dependencies for checks and tests" was incomplete. In the tutorial, we use uv to install runtime dependencies too (charmlibs and pydantic).
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.
Pull request overview
This PR adapts the Kubernetes charm tutorial's environment setup instructions to match the approach used in the machine charm tutorial, replacing the previous setup process with detailed step-by-step instructions. The changes prepare the tutorial for using uv and the latest Charmcraft profiles.
Key changes:
- Replaced generic setup instructions with detailed environment setup steps for creating a VM, installing tools via Concierge, and mounting directories
- Updated VM name from
charm-devtojuju-sandbox-k8sthroughout all tutorial files for consistency - Refined the machine charm tutorial's tool descriptions to better distinguish between uv and tox
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| docs/tutorial/write-your-first-machine-charm.md | Clarified descriptions of uv and tox to distinguish their roles |
| docs/tutorial/from-zero-to-hero-write-your-first-kubernetes-charm/set-up-your-development-environment.md | Replaced generic setup reference with comprehensive step-by-step instructions for VM creation, tool installation via Concierge, and directory mounting |
| docs/tutorial/from-zero-to-hero-write-your-first-kubernetes-charm/observe-your-charm-with-cos-lite.md | Updated VM name references from charm-dev to juju-sandbox-k8s in command prompts and examples |
| docs/tutorial/from-zero-to-hero-write-your-first-kubernetes-charm/integrate-your-charm-with-postgresql.md | Updated VM name references from charm-dev to juju-sandbox-k8s in command prompts |
| docs/tutorial/from-zero-to-hero-write-your-first-kubernetes-charm/create-a-minimal-kubernetes-charm.md | Updated VM name references from charm-dev to juju-sandbox-k8s in command prompts and added clarification about working in the VM |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| multipass mount --type native ~/k8s-tutorial juju-sandbox-k8s:~/fastapi-demo | ||
| ``` | ||
|
|
||
| Finally, start your virtual machine and switch to your virtual machine: |
Copilot
AI
Dec 31, 2025
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.
The phrase "start your virtual machine and switch to your virtual machine" is redundant. Consider simplifying to "Finally, start and connect to your virtual machine:" or "Finally, start your virtual machine and open a shell:"
| Finally, start your virtual machine and switch to your virtual machine: | |
| Finally, start and connect to your virtual machine: |
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.
I'm OK with the current wording, but agree this could be less clunky. I'll see whether anyone else has a preference.
This is an intermediate PR for switching the Kubernetes charm tutorial to use uv and the latest Charmcraft profiles. Target branch is
k8s-tutorial-uvThis PR copies the environment setup instructions and adapts them for MicroK8s instead of LXD.
Preview doc
I'm calling the VM
juju-sandbox-k8sinstead ofjuju-sandboxto make it easier for people to complete both tutorials.I'm making one drive-by update to the machine charm tutorial (see comment).