Skip to content

Conversation

@dwilding
Copy link
Contributor

@dwilding dwilding commented Dec 31, 2025

This is an intermediate PR for switching the Kubernetes charm tutorial to use uv and the latest Charmcraft profiles. Target branch is k8s-tutorial-uv


This PR copies the environment setup instructions and adapts them for MicroK8s instead of LXD.

Preview doc

I'm calling the VM juju-sandbox-k8s instead of juju-sandbox to make it easier for people to complete both tutorials.

I'm making one drive-by update to the machine charm tutorial (see comment).

@dwilding dwilding changed the title wip: copy environment setup instructions from machine tutorial docs: copy environment setup instructions from machine tutorial Dec 31, 2025
Comment on lines -84 to +85
- **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.
Copy link
Contributor Author

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).

@dwilding dwilding requested a review from Copilot December 31, 2025 02:49
Copy link
Contributor

Copilot AI left a 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-dev to juju-sandbox-k8s throughout 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:
Copy link

Copilot AI Dec 31, 2025

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:"

Suggested change
Finally, start your virtual machine and switch to your virtual machine:
Finally, start and connect to your virtual machine:

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

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.

@dwilding dwilding marked this pull request as ready for review December 31, 2025 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant