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/compose server #2693

Merged
merged 4 commits into from
Mar 24, 2021
Merged

Docs/compose server #2693

merged 4 commits into from
Mar 24, 2021

Conversation

w4tsn
Copy link
Contributor

@w4tsn w4tsn commented Mar 23, 2021

I've reworked some of the online documentation on docs/compose-server motivated from #2675.

Changes are:

  • Moved the container related section to the bottom since it is not as important as other parts of that document
  • Introduced a small introduction section touching some of the mentioned topics, giving a smoother entrance to the topic
  • Introduced a section on how to split up the tree compose by usage of the other available commands

The container docs are nice to know but not the most important thing.
This section is meant to give a broad overview of this doc.

First introducing the tool in general. Then showing the distinction
between 'compose tree' and the granular approach. Finally transitioning
over to the next section.
This section goes into more detail how compose tree can be split up
using the other available commands.
@openshift-ci-robot
Copy link
Collaborator

Hi @w4tsn. Thanks for your PR.

I'm waiting for a coreos member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Member

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Thanks so much for working on this! Just a few nits.

Next we can run more postprocessing:

```
# rpm-ostree compose postprocess postprocess /var/sysroot/rootfs /path/to/manifest.yaml
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# rpm-ostree compose postprocess postprocess /var/sysroot/rootfs /path/to/manifest.yaml
# rpm-ostree compose postprocess /var/sysroot/rootfs /path/to/manifest.yaml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please note that this is stated ambiguously in the man pages:

rpm-ostree compose postprocess [OPTION…] postprocess ROOTFS [TREEFILE]

It is not clear what the second postprocess implies or what it stands for.

Copy link
Member

Choose a reason for hiding this comment

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

Nice catch! Want to inline this? :)

diff --git a/src/app/rpmostree-compose-builtin-tree.cxx b/src/app/rpmostree-compose-builtin-tree.cxx
index 00da5c5e..5474f49e 100644
--- a/src/app/rpmostree-compose-builtin-tree.cxx
+++ b/src/app/rpmostree-compose-builtin-tree.cxx
@@ -1262,7 +1262,7 @@ rpmostree_compose_builtin_postprocess (int             argc,
                                        GCancellable   *cancellable,
                                        GError        **error)
 {
-  g_autoptr(GOptionContext) context = g_option_context_new ("postprocess ROOTFS [TREEFILE]");
+  g_autoptr(GOptionContext) context = g_option_context_new ("ROOTFS [TREEFILE]");
   if (!rpmostree_option_context_parse (context,
                                        postprocess_option_entries,
                                        &argc, &argv,

When we are finished with our manual changes we can now create the commit:

```
# rpm-ostree compose tree --repo=/srv/repo /path/to/manifest.yaml /var/sysroot
Copy link
Member

Choose a reason for hiding this comment

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

# rpm-ostree compose commit --repo=/srv/repo /path/to/manifest.yaml /var/sysroot

Once we have that commit, let's export it:

```
# ostree --repo=repo pull-local build-repo exampleos/8/x86_64/stable
Copy link
Member

Choose a reason for hiding this comment

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

It looks like we already passed --repo=/srv/repo above and weren't using build-repo right? Let's be consistent here.

In the sections "Granular.." and "Running rpm..." the usage of repo
paths was inconsistent.
@w4tsn
Copy link
Contributor Author

w4tsn commented Mar 24, 2021

I've applied your suggestions. After a second look I noticed that this also applies to the section "Running rpm-ostree..." which I updated as well.

I noticed another thing: in my personal usage I'm using ostree commit -s ... -b ... with the commit ID from the rpm-ostree commit / tree commands before running ostree ... pull-local ... because as I understand this the rpm-ostree compose tree and rpm-ostree compose commit commands do not apply a branch/ref, at least not in the example from the docs. Please correct me if I'm wrong

@cgwalters
Copy link
Member

/ok-to-test

Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

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

LGTM! Will let @cgwalters have another look.

@cgwalters cgwalters merged commit dd6beaa into coreos:master Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants