Skip to content

Added information on installing Foreman w/ OpenVox#534

Open
binford2k wants to merge 3 commits intovoxpupuli:masterfrom
binford2k:foreman_install_updates
Open

Added information on installing Foreman w/ OpenVox#534
binford2k wants to merge 3 commits intovoxpupuli:masterfrom
binford2k:foreman_install_updates

Conversation

@binford2k
Copy link
Member

The big trick is that you have to start by installing OpenVox and then
installing the oauth gem. Then the installer just works.

This page is getting a little unwieldy again. We'll need another cleanup
pass on it soon.

The big trick is that you have to start by installing OpenVox and then
installing the oauth gem. Then the installer just works.

This page is getting a little unwieldy again. We'll need another cleanup
pass on it soon.
@binford2k binford2k requested a review from ekohl August 18, 2025 20:20
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 is a quick review of things that jumped out, but it's late and I may be missing something.

Comment on lines +82 to +87
foreman::providers::oauth: false
```
Then manually install the `oauth` gem into OpenVox's gempath.

```
# /opt/puppetlabs/puppet/bin/gem install oauth
Copy link
Member

Choose a reason for hiding this comment

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

This isn't needed anymore now that openvox-agent provides puppet-agent

Suggested change
foreman::providers::oauth: false
```
Then manually install the `oauth` gem into OpenVox's gempath.
```
# /opt/puppetlabs/puppet/bin/gem install oauth

Copy link
Member Author

Choose a reason for hiding this comment

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

8.18.1 is only a few months old. I don't think we can drop docs for it yet. I'll make a note about this not being needed on current though.

Copy link
Member Author

Choose a reason for hiding this comment

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

actually, I'm not convinced that what we have is sufficient. I kept getting errors while it was trying to install this package. I'm going to leave it as is until we can confirm that all dependencies are always resolved correctly.

Copy link
Member

Choose a reason for hiding this comment

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

@binford2k do you still see issues? foreman + openvox is working fine for me without manually installing the gem

### Porting a Foreman infra to OpenVox

If you're already running Foreman and you want to switch it to be backed by OpenVox then you have a little bit of housekeeping to do first.
First, use your system package manager to remove the `puppet-agent-oauth` package.
Copy link
Member

Choose a reason for hiding this comment

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

Not needed anymore.

Suggested change
First, use your system package manager to remove the `puppet-agent-oauth` package.

Comment on lines +78 to +79
puppet::client_package: openvox-agent
puppet::server_package: openvox-server
Copy link
Member

Choose a reason for hiding this comment

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

These are answers and shouldn't be overridden via Hiera. The real way is to provide them options:

foreman-installer --puppet-client-package openvox-agent --puppet-server-package openvox-server

This also should solve your "caching" issue with the answers.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hrm. This gets complex when describing how to do something as simple as including the puppetdb plugin. As far as I can tell, there's no CLI options for

puppetdb::puppetdb_package: openvoxdb
puppetdb::master::config::terminus_package: openvoxdb-termini

Copy link
Member

Choose a reason for hiding this comment

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

Correct - ideally they would also be updated to add Provides: statements so a dnf install puppetdb-termini will end up installing openvoxdb-termini. Puppet added support for that a long time ago and it also helps migrations.

Then in a new major version we can update theforeman-puppet to become focused on OpenVox so none of this is needed.

Copy link
Member

Choose a reason for hiding this comment

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

those packages now all have proper 'Provides: ` attributes, the hiera keys aren't needed anymore.

Comment on lines 102 to 106
If you use the `foreman-installer` to manage and upgrade your setup, then ensure that you remove the cached scenario file, or it will continue to use old package names.

```
# rm /etc/foreman-installer/scenarios.d/last_scenario.yaml
```
Copy link
Member

Choose a reason for hiding this comment

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

This is never a good idea. It's a symlink pointing to the real scenario. This deselects the scenario, but that really isn't of any use. Especially if you only have a single scenario available.

Nor is it needed. The scenario file is describing the scenario to be used. The answers file (which you're not using) is

Suggested change
If you use the `foreman-installer` to manage and upgrade your setup, then ensure that you remove the cached scenario file, or it will continue to use old package names.
```
# rm /etc/foreman-installer/scenarios.d/last_scenario.yaml
```

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'm not convinced this it's enough to specify the CLI parameters. I can validate later, but what happens now is that someone on Debian does

  1. apt install foreman-installer (which pulls in Debian packaged puppet-agent, non-AIO)
  2. configures hiera data (which I believe is roughly equivalent to passing CLI args)
  3. runs the installer
  4. everything breaks because /etc/puppet/<stuff> exists even after the openvox-agent package replaces the system puppet-agent package and foreman-installer continues to use the /etc/puppet directory.

Even after deleting the /etc/puppet directory it still breaks, even with the proper package names. That's what we're trying to address here.

Copy link
Member Author

Choose a reason for hiding this comment

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

If you follow ☝️ then this is the error you get.

2025-08-26 15:18:35 [ERROR ] [configure] Evaluation Error: Error while evaluating a Virtual Query, Resource type cron doesn't exist (file: /usr/share/foreman-installer/modules/foreman_proxy/manifests/register.pp, line: 38, column: 60) on node debian.overlookinfra.home

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 added instructions for resetting the answers file to default. I'd love for there to be a better way.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not convinced this it's enough to specify the CLI parameters. I can validate later, but what happens now is that someone on Debian does

Oh yes, I couldn't quite get it to work with Debian (OpenVoxProject/openvox-agent#21). I as assuming RPM.

apt install foreman-installer (which pulls in Debian packaged puppet-agent, non-AIO)

If you change that to apt install openvox-agent foreman-installer I suspect it does work.

configures hiera data (which I believe is roughly equivalent to passing CLI args)

If you look at https://github.com/theforeman/foreman-installer/blob/develop/config/foreman-hiera.yaml you can see that the answers are a layer. Custom user answers should override those though (custom.yaml ends up being /etc/foreman-installer/custom-hiera.yaml).

everything breaks because /etc/puppet/<stuff> exists even after the openvox-agent package replaces the system puppet-agent package and foreman-installer continues to use the /etc/puppet directory.

Yes, our module supports non-AIO Puppet on Debian so if you install that package then it uses those. Switching between them is painful because so many of those paths end up being stored in the answers file. My recommendation is to start with the right package from the beginning.

If you follow ☝️ then this is the error you get.

2025-08-26 15:18:35 [ERROR ] [configure] Evaluation Error: Error while evaluating a Virtual Query, Resource type cron doesn't exist (file: /usr/share/foreman-installer/modules/foreman_proxy/manifests/register.pp, line: 38, column: 60) on node debian.overlookinfra.home

This is because on Debian the non-AIO puppet-agent package doesn't include the vendored Puppet modules. You need to install puppet-module-puppetlabs-cron-core and friends for that to work. It's awkward and IMHO a packaging bug.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, if you install the proper package to begin with, then it works great. But we can't require perfection from our users! The only way to get from system puppet-agent -> AIO openvox-agent is to start with a fresh answers file or to edit some 500 lines of data and correct each and every legacy path.

@binford2k binford2k force-pushed the foreman_install_updates branch from b4391d8 to 2954bae Compare August 27, 2025 06:17
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 missed this part at first, but I really insist we don't merge any instructions to reset the answer file.

My preference is still to add the right metadata to packages to replace the old Puppet packages and then tell users to install the latest version. Then it should really be a drop in replacement. No work needed for users other than to swap the package.


<details class="card" >
<summary class="card-header">Debian Family</summary>
<pre><code># rm /etc/foreman-installer/scenarios.d/foreman-answers.yaml
Copy link
Member

Choose a reason for hiding this comment

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

Please don't recommend users to do this. It wipes all answers and can break installations. You're better off telling them to reinstall.

Copy link
Member Author

Choose a reason for hiding this comment

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

tbh, if they're reading this part of the docs, they're already in a broken state.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also, even with correct metadata, that doesn't fix the fact that foreman-installer still tries to use the incorrect paths in the cached answers file!

Copy link
Member Author

Choose a reason for hiding this comment

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

@ekohl Came back and poked a little bit this week. It seems now that this is sufficient on redhat flavored machines that don't have the puppet repos enabled.

  1. dnf install https://yum.voxpupuli.org/openvox8-release-el-9.noarch.rpm
  2. dnf install https://yum.theforeman.org/releases/3.16/el9/x86_64/foreman-release.rpm
  3. dnf install foreman-installer
  4. foreman-installer --puppet-client-package openvox-agent --puppet-server-package openvox-server

But it still doesn't seem to correct derived values that get cached in the answers file if you mess up the first time around. What's Foreman's approach to fixing those?

My preference is still to reset the answers file and recreate it. I don't see the possibility of breaking a system being a problem because they've just installed and can just ⬆️ a few times and re-run the installer.

Cautions people about ramifications of removing the answers file and has
more instructions about handling critical configuration files.
@ekohl
Copy link
Member

ekohl commented Aug 29, 2025

Today we made progress on the Debian side:

### Installing Foreman with OpenVox

There are some cases in which you might have to take more steps to safely remove legacy Puppet from your system.
> 🚨 Tip: When using Foreman and OpenVox together, you must install OpenVox first.
Copy link
Member

Choose a reason for hiding this comment

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

you only need the repo, the packages don't have to be installed yet.

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