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 use layers #548

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

IronCore864
Copy link
Contributor

@IronCore864 IronCore864 commented Jan 7, 2025

Docs: How to use layers.

As previously discussed, the layers reference doc is removed and refactored into a how-to.

Preview: https://canonical-pebble--548.com.readthedocs.build/en/548/how-to/use-layers/

@IronCore864 IronCore864 requested a review from dwilding January 7, 2025 08:47
@IronCore864 IronCore864 marked this pull request as ready for review January 7, 2025 08:47
docs/how-to/use-layers.md Outdated Show resolved Hide resolved
docs/how-to/use-layers.md Outdated Show resolved Hide resolved
docs/how-to/use-layers.md Outdated Show resolved Hide resolved
docs/how-to/use-layers.md Outdated Show resolved Hide resolved
docs/how-to/use-layers.md Outdated Show resolved Hide resolved
docs/how-to/use-layers.md Outdated Show resolved Hide resolved
docs/how-to/use-layers.md Outdated Show resolved Hide resolved
docs/how-to/use-layers.md Outdated Show resolved Hide resolved
docs/how-to/use-layers.md Outdated Show resolved Hide resolved
docs/how-to/use-layers.md Outdated Show resolved Hide resolved
docs/how-to/use-layers.md Outdated Show resolved Hide resolved
ENV: dev
```

`002-env-override-test.yaml`:
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be 003-env-override-test.yaml shouldn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The idea is that override-test will only be put into the test env and override-dev will only be put in the dev env. So it doesn't matter if they have same numeric prefixes because they will not be put into the same env.

.
└── layers
├── 001-base-layer.yaml
└── 002-env-override-test.yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

003-env-override-test.yaml ?

@dwilding
Copy link
Contributor

dwilding commented Jan 8, 2025

Thanks @IronCore864, this new doc is a helpful summary of how to use layers! I've added some suggestions and questions about specific parts.

One other observation - In the intro, the doc mentions three benefits:

  1. organize services into logical groups
  2. define one set of configurations per environment
  3. layered configurations can also accommodate imperative overrides

Of these, it seems that we only illustrate 1 and 3. Is that because 2 is pretty similar to 1 in approach?

I think it would be nice if we could match up each benefit with a corresponding section. For example, at the end of the first bullet, we could say:

For an example, see Use layers as logical groups.

And similarly for the other benefits.

We could either add a dedicated section to show how to define one set of configurations per environment. Or if it's really essentially the same as how to organize services into logical groups, at the end of benefit 2 we could say something like:

The way to achieve this in Pebble is the same as how to organize services into logical groups, with each environment set up as a separate group.

What do you think?

@IronCore864 IronCore864 requested a review from dwilding January 8, 2025 09:02
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.

2 participants