Skip to content

Conversation

@aneta-petrova
Copy link
Member

@aneta-petrova aneta-petrova commented Nov 28, 2025

What changes are you introducing?

  • Adding a new build target for the new deployment tool foremanctl
  • Adding the new build target to web navigation, along with a couple of empty guides that we will likely need to deliver (installation, upgrading)
  • Updating the Quickstart guide to drop tabs and replace them with a separate build target for foremanctl

Why are you introducing these changes? (Explanation, links to references, issues, etc.)

Up until now, foremanctl documentation has been developed with the expectation that with a future version, Foreman will switch from using the current Puppet-based installer to the new containerized deployment tool named foremanctl. This is why in a previous PR #3975, a new guide directory was created, with the expectation that it would at a certain point replace the existing guide.

Now it's become clear that the switch to foremanctl will be more gradual upstream and for some time, foremanctl will exists alongside non-foremanctl builds. This PR investigates an alternative approach where a new build target is created.

Anything else to add? (Considerations, potential downsides, alternative solutions you have explored, etc.)

Alternative approaches that have been considered:

Contributor checklists

  • I am okay with my commits getting squashed when you merge this PR.
  • I am familiar with the contributing guidelines.

Please cherry-pick my commits into:

  • Foreman 3.17/Katello 4.19
  • Foreman 3.16/Katello 4.18 (Satellite 6.18)
  • Foreman 3.15/Katello 4.17
  • Foreman 3.14/Katello 4.16 (Satellite 6.17; orcharhino 7.4)
  • Foreman 3.13/Katello 4.15 (EL9 only)
  • Foreman 3.12/Katello 4.14 (Satellite 6.16; orcharhino 7.2 on EL9 only; orcharhino 7.3)
  • Foreman 3.11/Katello 4.13 (orcharhino 6.11 on EL8 only; orcharhino 7.0 on EL8+EL9; orcharhino 7.1 with Leapp)
  • Foreman 3.10/Katello 4.12
  • Foreman 3.9/Katello 4.11 (Satellite 6.15; orcharhino 6.8/6.9/6.10)
  • We do not accept PRs for Foreman older than 3.9.

Summary by Sourcery

Introduce a separate foremanctl documentation build target and integrate it into builds, navigation, and guides.

New Features:

  • Add a new foremanctl build context/target alongside existing Foreman and Katello builds.
  • Expose nightly containerized Foreman (foremanctl) documentation through the web navigation.
  • Provide an initial repositories configuration snippet specific to foremanctl.

Enhancements:

  • Update Quickstart and related guides to use the new foremanctl build target instead of tab-based variants.
  • Extend CI deployment workflow to build and publish the new foremanctl documentation variant.
  • Clarify README description of the html build target to include the new foremanctl context.

@sourcery-ai
Copy link

sourcery-ai bot commented Nov 28, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Introduces a new foremanctl build target/context alongside existing Foreman builds, wires it into the build/deploy pipeline and website navigation, and refactors shared guide content (especially Quickstart and repository configuration) to support separate foremanctl-specific documentation without UI tabs.

Flow diagram for Makefile html target with new foremanctl context

flowchart TD
  A[html target] --> B[build-foreman-el]
  A --> C[build-foreman-deb]
  A --> D[build-foremanctl]
  A --> E[build-katello]

  subgraph pattern_build
    direction LR
    B --> F[make -C guides html BUILD=foreman-el]
    C --> G[make -C guides html BUILD=foreman-deb]
    D --> H[make -C guides html BUILD=foremanctl]
    E --> I[make -C guides html BUILD=katello]
  end

  F --> J[foreman-el HTML guides]
  G --> K[foreman-deb HTML guides]
  H --> L[foremanctl HTML guides]
  I --> M[katello HTML guides]
Loading

File-Level Changes

Change Details Files
Add a dedicated foremanctl build target and ensure it is built locally and in CI/CD alongside other product contexts.
  • Extend the top-level html make target to build the new foremanctl context in addition to existing contexts
  • Document the new foremanctl context in the root README so contributors know it is part of the standard HTML build
  • Update the deploy GitHub Actions workflow to build and publish the foremanctl HTML guides in nightly deployments
Makefile
.github/workflows/deploy.yml
README.md
Expose the new foremanctl documentation in the web UI navigation and nightly metadata.
  • Add a nightly index link for containerized Foreman (index-foremanctl.html) to the main web index navigation
  • Extend nightly releases JSON metadata to include the new foremanctl build so front-end and generators can discover it
web/content/index.adoc.erb
web/releases/nightly.json
Introduce foremanctl-specific snippets and attributes so guides can be built for foremanctl independently of other contexts.
  • Define or extend common attributes to support the foremanctl context (product naming, conditionals, or build flags)
  • Create a new repository-configuration snippet tailored for foremanctl deployments
  • Adjust existing EL repository configuration snippet to separate generic vs foremanctl-specific content
  • Update shared modules like system requirements and deployment-utility usage so they can render correctly for the foremanctl context
guides/common/attributes.adoc
guides/common/modules/snip_configuring-repositories-foremanctl.adoc
guides/common/modules/snip_configuring-repositories-el.adoc
guides/common/modules/ref_system-requirements-quickstart.adoc
guides/common/modules/proc_running-project-deployment-utility.adoc
Refactor top-level guides (especially Quickstart, Installing, Upgrading, and Release Notes) to support a separate foremanctl build instead of in-page tabs.
  • Update the Quickstart master guide to drop tabbed installer selection and instead rely on the foremanctl build context to generate a dedicated foremanctl Quickstart variant
  • Wire foremanctl attributes/snippets into Quickstart and related common modules to show the correct deployment tool instructions
  • Add or adjust Installing Server and Upgrading Project master guides to introduce placeholder/empty foremanctl-specific sections that can be filled in later
  • Ensure Release Notes and other top-level docs are compatible with the new foremanctl context so they build cleanly in that target
guides/doc-Quickstart/master.adoc
guides/doc-Installing_Server/master.adoc
guides/doc-Upgrading_Project/master.adoc
guides/doc-Release_Notes/master.adoc

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions github-actions bot added Needs tech review Requires a review from the technical perspective Needs style review Requires a review from docs style/grammar perspective Needs testing Requires functional testing labels Nov 28, 2025
@aneta-petrova aneta-petrova removed Needs tech review Requires a review from the technical perspective Needs style review Requires a review from docs style/grammar perspective Needs testing Requires functional testing labels Nov 28, 2025
@aneta-petrova aneta-petrova changed the title Foremanctl flavor Add new build target for foremanctl Nov 28, 2025
@github-actions
Copy link

github-actions bot commented Nov 28, 2025

The PR preview for 6386d76 is available at theforeman-foreman-documentation-preview-pr-4506.surge.sh

The following output files are affected by this PR:

show diff

show diff as HTML

}
},
{
"title": "Containerized Foreman",
Copy link
Member Author

Choose a reason for hiding this comment

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

This is almost certainly not a good name for the new build target and I'm open to suggestions.

ifdef::foremanctl[]
:FeatureName: The `foremanctl` deployment utility
include::common/modules/snip_technology-preview.adoc[]
endif::[]
Copy link
Member Author

Choose a reason for hiding this comment

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

I wonder if we should add this to every foremanctl guide we add to navigation, until the tool becomes more stable.

@aneta-petrova
Copy link
Member Author

Hi @ekohl and @jafiala, this is the result of what we discussed earlier today -- a new build target for foremanctl docs:

As @maximiliankolb correctly pointed out in #3975 (comment), any line that's currently included with other conditionals (such as ifdef::katello[]) will need to be extended with foremanctl (ifdef::foremanctl,katello[]) if we want to include it in a foremanctl guide.

Please let me know what you think. The point of this PR is to investigate whether this approach will scale in the future (compared to the other alternatives described in this PR's description) so feedback is welcome.

Includes switching Quickstart from tabs to a separate foremanctl guide
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

This indeed looks very much like what we discussed and makes it easy for others to see what we're talking about. I'm positively surprised how small the whole diff really is.

:foreman:
endif::[]
ifeval::["{build}" == "foremanctl"]
:foremanctl:
Copy link
Member

Choose a reason for hiding this comment

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

Now that I see this I'm wondering: initially we discussed a more feature flag idea. My idea was that we can modify the satellite flavor to also define foremanctl. Seeing this here makes me worried we'll break stuff. On the other hand, perhaps that's unfounded.

Testing that idea might require some real content to be in place.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can you please elaborate on how you think the satellite flavour could be made to also define foremanctl?

Copy link
Member

Choose a reason for hiding this comment

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

We can add :foremanctl: to attributes-satellite.adoc to "flip" the feature on but that can have unintended consequences. That's what I had in my head as a theory and I'd love to come up with a way to test that theory though I doubt we can without filling up the foremanctl guide first.

Copy link
Member Author

@aneta-petrova aneta-petrova Nov 29, 2025

Choose a reason for hiding this comment

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

Wouldn't that effectively make foremanctl docs development downstream first?

As an alternative, in #4507 I'm looking into creating a new foremanctl target for each existing build target to get the ability to use a feature flag. It doesn't build but shows yet another alternative approach.

Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't that effectively make foremanctl docs development downstream first?

Maybe I wasn't clear. I was saying that we start building out the foremanctl flavor (build). Once downstream is ready, we "flip the switch" and also add the foremanctl attribute to the satellite flavor. And now I'm asking (out loud) if that is feasible. That doesn't mean the foremanctl flavor goes away in upstream because that's still a valid target. It just means that the satellite flavor will then be closer to the foremanctl flavor than the katello flavor.

Copy link
Member Author

@aneta-petrova aneta-petrova Nov 29, 2025

Choose a reason for hiding this comment

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

I suspect previewing the changes might be trickier with what you're suggesting. Also extending the single foremanctl build target from being satellite-compliant to being fit for any other build target.

In the meantime #4507 started building correctly. That approach shows a separate preview for each build target + flavor combination:

  • Foreman EL
  • Foreman Deb
  • Foreman + Katello
  • orcharhino
  • Satellite
  • Foreman EL and foremanctl
  • Foreman Deb and foremanctl
  • Foreman + Katello and foremanctl
  • orcharhino and foremanctl
  • Satellite and foremanctl

Then, once any existing build target goes into full foremanctl mode, we could just drop the pre-foremanctl build and replace it with the corresponding foremanctl build. So in a way, the same thing we intended to do when we created a separate foremanctl server installation guide (in #3975), with the intention of eventually replacing the pre-foremanctl guide with it (in #4087).

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