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

docs: small updates to machine charm tutorial #1583

Merged
merged 7 commits into from
Feb 26, 2025

Conversation

dwilding
Copy link
Contributor

@dwilding dwilding commented Feb 19, 2025

This PR is for capturing small updates to Write your first machine charm while I'm working on creating my own sample machine charm.

Summary of changes:

  • Adjusted the "What you'll need section" to tidy up the language & formatting, and to clarify that familiarity with Juju is not an absolute requirement.

  • When using curl to test the service after the initial deployment, we don't need to juju exec into the unit first. Instead, we can do curl http://10.122.219.101:8080, where 10.122.219.101 is the IP of the unit. I've updated the command and the preceding text to match.

  • Added missing context to the note that comes after using curl to test the service. This note was supposed to say that the reader should follow the four steps in case something went wrong after deploying the charm. I added this context.

    I also removed a commented-out part about inspecting hooks. In the newly-added context, I mention about juju debug-log, which is probably more useful than inspecting hooks.

Preview doc

@dwilding dwilding marked this pull request as ready for review February 25, 2025 10:56
Copy link
Contributor

@tonyandrewmeyer tonyandrewmeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

A couple of small suggestions, but happy with it as-is.

- Familiarity with Linux.
- Familiarity with the Python programming language, including Object-Oriented Programming and event handlers.

It will also help if you're familiar with Juju , but don't worry if you're new to Juju. This tutorial will guide you through each step.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It will also help if you're familiar with Juju , but don't worry if you're new to Juju. This tutorial will guide you through each step.
It will also help if you're familiar with Juju, but don't worry if you're new to Juju. This tutorial will guide you through each step.

4. Let the model know the issue is resolved (fixed): `juju resolved microsample/0`.
If the Juju status doesn't look right, for example if you see an "error" status instead of "active",
there might be an issue with the charm code. You can use a debug session (`juju debug-log`) to look
for error reports from Python. After you've identified the issue:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"error reports from Python" doesn't seem right to me. I guess in some ways it's Python providing the error, but in other ways it's ops or Juju.

What about something like "to get more detailed information about the problem. After ..."?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice suggestion, thanks! I've updated in 2e85081 (using "issue" instead of "problem" to stay consistent).

@dwilding dwilding force-pushed the update-machine-tutorial branch from 1d7beb5 to 2e85081 Compare February 26, 2025 03:37
@dwilding dwilding requested a review from IronCore864 February 26, 2025 05:08
@dwilding dwilding merged commit b1b375e into canonical:main Feb 26, 2025
32 checks passed
@dwilding dwilding deleted the update-machine-tutorial branch March 5, 2025 02:55
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.

3 participants