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: how to manage remote systems #547

Merged

Conversation

IronCore864
Copy link
Contributor

@IronCore864 IronCore864 commented Jan 6, 2025

A new how-to guide on managing remote systems (use Pebble in containers).

As previously discussed, the current "Pebble in containers" reference doc is removed.

Preview: https://canonical-pebble--547.com.readthedocs.build/en/547/how-to/manage-a-remote-system/

@IronCore864 IronCore864 marked this pull request as ready for review January 6, 2025 08:35
@IronCore864 IronCore864 requested a review from dwilding January 6, 2025 08:37
docs/how-to/index.md Outdated Show resolved Hide resolved
@dwilding
Copy link
Contributor

dwilding commented Jan 7, 2025

Thanks @IronCore864, I like the new how-to doc! I've added some suggestions about specific parts.

There's one general question I have - this is more a question about my understanding of Pebble, rather than the doc itself. When we say "remote system/server" we're still talking about the same physical machine, right? So Pebble could be used to manage a container from the host system, but Pebble couldn't be used if data needs to go over the network. (My understanding is, the only feature of Pebble that works over the network is the open-access API endpoints to allow Juju to check health). Do I have the right understanding?

Perhaps we should state somewhere in the doc what "remote" means in the context of Pebble. What do you think?

@IronCore864
Copy link
Contributor Author

Thanks @IronCore864, I like the new how-to doc! I've added some suggestions about specific parts.

There's one general question I have - this is more a question about my understanding of Pebble, rather than the doc itself. When we say "remote system/server" we're still talking about the same physical machine, right? So Pebble could be used to manage a container from the host system, but Pebble couldn't be used if data needs to go over the network. (My understanding is, the only feature of Pebble that works over the network is the open-access API endpoints to allow Juju to check health). Do I have the right understanding?

Perhaps we should state somewhere in the doc what "remote" means in the context of Pebble. What do you think?

"Remote system" - Your understanding is correct because only very few APIs work over HTTP at the moment, most APIs only work with the UNIX socket, which is for inter-process communication within the same host where data sent through the socket is handled within the kernel.

Even in the context of charms, the charm code is in the same pod as Pebble, so it's not exactly "remote" in the sense that the client and Pebble are in two different machines.

However, if we look at this from the perspective of a Pod, the client (charms) and Pebble (built in the workload image) are in separate containers (of the same Pod), so it's kind of "remote" as long as the client can access the UNIX socket.

The current situation might change soon, especially since we are adding another type of identity for the metrics endpoint, so maybe there will be more identity types, allowing exposing all APIs over HTTP and making it truly remote.

I'm not sure how to address this in the doc, because if we add a note like "remote means the same host, or the same Pod", although accurate, it doesn't look nice...

@dwilding
Copy link
Contributor

dwilding commented Jan 13, 2025

I realized that I didn't reply to your latest comment. Thanks for adding your detailed thoughts about what "remote system" means

Looking again at the doc, I think that mentioning "remote servers" is perhaps risking confusion. This seems to be the only place in the docs that we talk about servers in this way, and it gets me thinking about managing a web server using Pebble as a direct replacement for some other tool (which it sounds like Pebble isn't)

So I think might be best to limit the discussion to "remote systems" only

@IronCore864
Copy link
Contributor Author

Changes after discussion:

  • Updated the title (remote systems -> a remote system, including all occurrences in the content).
  • Added a note on "remote system".
  • Shortened the introduction.
  • Updated the tone to be less blog-y.

@IronCore864 IronCore864 requested a review from dwilding January 20, 2025 05:40
Copy link
Contributor

@dwilding dwilding left a comment

Choose a reason for hiding this comment

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

I've finished reviewing, thanks for the updates!

Do you think we ought to mention the PEBBLE_SOCKET environment variable somewhere, so that the reader knows how to override the default socket path when using the pebble command?

@IronCore864 IronCore864 requested a review from benhoyt January 22, 2025 03:37
Copy link
Contributor

@benhoyt benhoyt left a comment

Choose a reason for hiding this comment

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

This is a lot better, thanks! I think this is very close now, just a few minor comments.

docs/how-to/manage-a-remote-system.md Outdated Show resolved Hide resolved
docs/how-to/manage-a-remote-system.md Outdated Show resolved Hide resolved
docs/how-to/manage-a-remote-system.md Show resolved Hide resolved
docs/how-to/manage-a-remote-system.md Outdated Show resolved Hide resolved
docs/how-to/manage-a-remote-system.md Outdated Show resolved Hide resolved
docs/how-to/index.md Outdated Show resolved Hide resolved
@IronCore864 IronCore864 requested a review from benhoyt January 23, 2025 01:35
Copy link
Contributor

@benhoyt benhoyt left a comment

Choose a reason for hiding this comment

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

Thanks!

@IronCore864 IronCore864 merged commit 7e159a7 into canonical:master Jan 23, 2025
13 checks passed
@IronCore864 IronCore864 deleted the docs-how-to-manage-remote-systems branch January 23, 2025 03:43
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