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 foremanctl flavor for build targets katello, orcharhino, and satellite
  • Adding the foremanct-katello build target to web navigation. The list of guides on the website now includes Quickstart and skeleton previews of two high-impact guides: server installation and upgrading (both empty, to be filled with foremanctl content later)
  • Updating the Quickstart guide to drop tabs and leave only the foremanctl content in place (for foremanctl build targets) and old installer content (for the non-foremanctl build targets) (goodbye tabs 😢)

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

To prepare the underlying documentation structure for developing foremanctl documentation in parallel to documentation based on the existing installer.

The expected future state when foremanctl becomes more mature is described in #4506 (comment) This documentation PR is developed to support that future, while also allowing downstream teams to continuously review the state of their foremanctl-powered documentation sets.

Anything else to add? (Considerations, potential downsides, alternative solutions you have explored, 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 was raised to investigate an alternative approach where a new build target is created instead of a new separate guide.

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 foremanctl-specific build targets and documentation structure alongside existing installer-based guides.

New Features:

  • Add foremanctl build targets for katello, orcharhino, and satellite guides and include the foremanctl-katello variant in the web navigation.

Enhancements:

  • Restructure documentation to support foremanctl variants via new attribute and repository snippet files instead of a separate Installing Server guide for foremanctl.

Build:

  • Extend the top-level html make target and deployment workflow to build the new foremanctl-* documentation variants.

CI:

  • Update the deploy GitHub Actions workflow to generate and publish the new foremanctl-based builds.

Documentation:

  • Update README and web index to document and surface the new foremanctl build variants in the published site, and remove the standalone foremanctl Installing Server guide in favor of variant-based docs.

@sourcery-ai
Copy link

sourcery-ai bot commented Nov 28, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds new foremanctl-specific build targets for katello, orcharhino, and satellite, wires them into CI, site navigation, and nightly metadata, introduces corresponding attribute/repository snippets, refactors key guides to conditionally render foremanctl vs legacy installer content without tabs, and removes the previously separate foremanctl-specific Installing Server guide in favor of the new build-target approach.

Flow diagram for build target selection and foremanctl content rendering

flowchart TD
  A[Start make html] --> B[Iterate over build targets]

  B --> C{BUILD value}

  C --> D[foreman-el]
  C --> E[foreman-deb]
  C --> F[foremanctl-katello]
  C --> G[foremanctl-orcharhino]
  C --> H[foremanctl-satellite]
  C --> I[katello]
  C --> J[satellite]
  C --> K[orcharhino]

  subgraph Guides_build
    D --> L[Use common attributes-foreman-el.adoc]
    E --> M[Use common attributes-foreman-deb.adoc]
    F --> N[Use attributes-foremanctl-katello.adoc]
    G --> O[Use attributes-foremanctl-orcharhino.adoc]
    H --> P[Use attributes-foremanctl-satellite.adoc]
    I --> Q[Use attributes-katello.adoc]
    J --> R[Use attributes-satellite.adoc]
    K --> S[Use attributes-orcharhino.adoc]
  end

  subgraph Repository_snippets
    N --> N1[Use snip_configuring-repositories-foremanctl-katello.adoc]
    O --> O1[Use snip_configuring-repositories-foremanctl-orcharhino.adoc]
    H --> P1[Use snip_configuring-repositories-foremanctl-satellite.adoc]
    Q --> Q1[Use snip_configuring-repositories-el.adoc]
    R --> R1[Use snip_configuring-repositories-el.adoc]
    S --> S1[Use snip_configuring-repositories-el.adoc]
  end

  subgraph Quickstart_and_installing_guides
    N1 --> T{Is BUILD foremanctl flavor}
    O1 --> T
    P1 --> T
    L --> T
    M --> T
    Q1 --> T
    R1 --> T
    S1 --> T

    T --> U[Yes: render foremanctl content only]
    T --> V[No: render legacy installer content]
  end

  U --> W[HTML output with foremanctl guides]
  V --> X[HTML output with legacy installer guides]
Loading

File-Level Changes

Change Details Files
Introduce foremanctl-specific build targets and wire them into the build system and CI.
  • Extend the root Makefile html aggregate target to include build-foremanctl-katello and ensure new BUILD variants are handled via the existing build-% pattern
  • Update the GitHub Actions deploy workflow to build foremanctl-katello, foremanctl-orcharhino, and foremanctl-satellite alongside existing targets
  • Update README build instructions to document the new foremanctl-* BUILD contexts
Makefile
.github/workflows/deploy.yml
README.md
Expose the new foremanctl-katello docs set in the website navigation and nightly release metadata.
  • Add a nightly navigation link to the foremanctl-katello index page on the main index.adoc.erb landing page
  • Update nightly releases JSON to define the new foremanctl-katello (and likely related foremanctl) build entries so they are discoverable by the site generator
web/content/index.adoc.erb
web/releases/nightly.json
Define foremanctl-specific attribute sets and repository configuration snippets for the new build targets.
  • Add attributes-foremanctl-katello, attributes-foremanctl-orcharhino, and attributes-foremanctl-satellite with target-specific variables used by the guides
  • Add snip_configuring-repositories-foremanctl-* modules mirroring existing repo configuration snippets but tailored for the foremanctl builds
  • Adjust common attributes and shared modules to recognize or use the new foremanctl build flavors where needed
guides/common/attributes-foremanctl-katello.adoc
guides/common/attributes-foremanctl-orcharhino.adoc
guides/common/attributes-foremanctl-satellite.adoc
guides/common/modules/snip_configuring-repositories-foremanctl-katello.adoc
guides/common/modules/snip_configuring-repositories-foremanctl-orcharhino.adoc
guides/common/modules/snip_configuring-repositories-foremanctl-satellite.adoc
guides/common/attributes.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 key guides so foremanctl and non-foremanctl builds share a single guide with conditional content instead of tabs or separate guides.
  • Update Quickstart master.adoc to drop tabbed content and instead conditionally include either foremanctl content or legacy installer content based on BUILD target
  • Introduce placeholder/empty server installation and upgrading sections for foremanctl within the existing Installing Server and Upgrading guides so structure is shared but content can diverge per build
  • Ensure Release Notes and other shared guide entrypoints are compatible with the new build flavors and include the right modules for each target
guides/doc-Quickstart/master.adoc
guides/doc-Installing_Server/master.adoc
guides/doc-Upgrading_Project/master.adoc
guides/doc-Release_Notes/master.adoc
Remove the previously separate foremanctl-specific Installing Server guide in favor of the new build-target approach and keep tooling in sync.
  • Delete the standalone doc-Installing_Server_foremanctl directory (Makefile, master.adoc, docinfo.xml, and images/common) now that foremanctl builds reuse the main Installing Server guide
  • Update the find_unused_modules script and related common metadata so module usage tracking remains correct after the structural changes to guides
guides/doc-Installing_Server_foremanctl/Makefile
guides/doc-Installing_Server_foremanctl/common
guides/doc-Installing_Server_foremanctl/docinfo.xml
guides/doc-Installing_Server_foremanctl/images/common
guides/doc-Installing_Server_foremanctl/master.adoc
guides/scripts/find_unused_modules

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 a989ce9 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

@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.

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.

@aneta-petrova aneta-petrova force-pushed the foremanctl-flavor branch 2 times, most recently from a9dc74e to d7070f0 Compare December 1, 2025 18:41
@aneta-petrova
Copy link
Member Author

In #4506 (comment), @ekohl wrote this:

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.

In the latest commit, I added some content to the server installation guide: https://theforeman-foreman-documentation-preview-pr-4506.surge.sh/nightly/Installing_Server/index-foremanctl.html Because there is just one "foremanctl" build target, this would mean that all of our existing build targets (Foreman on EL, Foreman on Deb, Foreman+Katello, downstreams) would share one preview upstream for foremanctl. Per @ekohl's idea, the foremanctl target is where we would be creating foremanctl content (which would be the same for all existing build targets in a containerized world?), and then add the foremanctl attribute to those existing build targets when ready.

However, this means that this foremanctl build will not respect conditionals for our existing build targets. In other words, the foremanctl build target will not show content within conditionals such as ifdef::katello[] or ifdef::foreman-el[].

In the other PR I raised, #4507, I also added the same server installation guide content. Except that in that PR, each existing build target (EL, Deb, Katello, downstreams) get their own foremanctl-friendly build targets and previews:

This means that we can add foremanctl conditionals while still respecting the conditionals for existing build targets (for example, a katello-foremanctl preview will still show all content with ifdef::katello[]).

Based on my knowledge of the foremanctl-powered future (which, I admit, is undoubtedly incomplete), I believe the second approach fits our needs better because we can add foremanctl bits and pieces to our existing build targets, and always have a reliable preview for each of them.

@aneta-petrova aneta-petrova force-pushed the foremanctl-flavor branch 5 times, most recently from e97dedb to 9b9f171 Compare December 5, 2025 11:04
@aneta-petrova aneta-petrova marked this pull request as ready for review December 5, 2025 11:44
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • The html target in the root Makefile only builds foremanctl-katello, but the README and deploy workflow list all three foremanctl-* contexts; align these so the documented behavior, CI build, and local make html output are consistent.
  • There is a fair amount of repetition between the new attributes-foremanctl-* and snip_configuring-repositories-foremanctl-* files and existing variants; consider extracting shared content into common includes to reduce duplication and the risk of future drift between flavors.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `html` target in the root `Makefile` only builds `foremanctl-katello`, but the README and deploy workflow list all three `foremanctl-*` contexts; align these so the documented behavior, CI build, and local `make html` output are consistent.
- There is a fair amount of repetition between the new `attributes-foremanctl-*` and `snip_configuring-repositories-foremanctl-*` files and existing variants; consider extracting shared content into common includes to reduce duplication and the risk of future drift between flavors.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@aneta-petrova
Copy link
Member Author

I've made some changes to the initial PoC based on conversations with @ekohl and @maximiliankolb. The PR's description has been updated to reflect that and the PR itself is now ready for review. I'm looking forward to more comments, feedback, and thoughts. To summarize: In this PR, we are looking at what the future documentation structure will look like and how we can make sure it efficiently reflects the future state of things in the Foreman+Katello world as described in #4506 (comment).

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.

I'd like to explore #4506 before we add more flavors, but overall 👍

@aneta-petrova
Copy link
Member Author

I'd like to explore #4506 before we add more flavors, but overall 👍

Did you mean #4517? In general, I don't mind, but I'd also like to wrap this PR up one way or another within the current (downstream) sprint.

@ekohl
Copy link
Member

ekohl commented Dec 5, 2025

Yes, I meant #4517. That's what I get for quickly trying to wrap up something before a meeting.

Copy link
Contributor

@maximiliankolb maximiliankolb left a comment

Choose a reason for hiding this comment

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

Thanks Anet, LGTM!

README.md Outdated
To build both the static site and the guides for easy local testing, a global `Makefile` is provided in the root directory with the following targets:

* `html`: builds HTML guides with all contexts (`foreman-el`, `foreman-deb`, `katello`, `satellite`, and `orcharhino`)
* `html`: builds HTML guides with all contexts (`foreman-el`, `foreman-deb`, `foremanctl-katello`, `foremanctl-orcharhino`, `foremanctl-satellite`, `katello`, `satellite`, and `orcharhino`)
Copy link
Member

Choose a reason for hiding this comment

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

The build target only depends on build-foreman-el build-foreman-deb build-foremanctl-katello build-katello -- so no satellite and no orchanirno (neither classic nor foremanctl), which one is correct?

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 went with the definition in the README: builds HTML guides with all contexts so I added the missing items to the makefile.

Copy link
Member

@evgeni evgeni left a comment

Choose a reason for hiding this comment

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

it'd be cool if readme vs makefile definition would be resolved, but it's not a new issue, so I'm OK with ignoring it

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.

One thing I noticed: in the "affected files" comment: we link to removed files too. That was a bit confusing. It's rather rare we remove files so probably not important to address.

I think this is now largely doing what we want and a solid base to build on. Now the the hard part starts: actually filling the content.

@aneta-petrova
Copy link
Member Author

it'd be cool if readme vs makefile definition would be resolved, but it's not a new issue, so I'm OK with ignoring it

Resolved now (by extending the line in the makefile). I'll leave space for further comments and merge tomorrow if there aren't any.

Thanks everyone!

@aneta-petrova aneta-petrova merged commit b27cba4 into theforeman:master Dec 11, 2025
10 of 11 checks passed
@aneta-petrova aneta-petrova deleted the foremanctl-flavor branch December 11, 2025 08:44
ekohl added a commit to ekohl/foreman-documentation that referenced this pull request Jan 5, 2026
This fixes previews.

Fixes: b27cba4 ("Add new build target for foremanctl (theforeman#4506)")
evgeni pushed a commit that referenced this pull request Jan 6, 2026
This fixes previews.

Fixes: b27cba4 ("Add new build target for foremanctl (#4506)")
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.

4 participants