Using the foreman-installer (scenario katello) to make incremental config changes without loosing current config

Problem:
Hi folks,

it’s not clear to me if the “foreman-installer --scenario katello” can be used again, after the installation, to make incremental changes to the current configuration without loosing/resetting or “ruining” the current setup/data.

Being more specific, let’s say after the installation I’ve made some changes and now I only want to add the “http proxy” URL (for syncing packages with remote repos, something that I didn’t in the first place).

Can I use the “foreman-installer --scenario katello --katello-proxy-url …” command safely, or should I make changes directly to the config files? (such as /etc/foreman/plugins/katello.yaml, /etc/pulp/server/plugins.conf.d/yum_importer.json etc., as someone suggested here: https://access.redhat.com/discussions/1348283)

Foreman and Proxy versions:
I’m using foreman-1.20/katello-3.10 on a CentOS 7 VM as a lab machine in our datacenter and the internet access is permitted only through an http proxy server. The 3.10 version was chosen with the intention to be close as much as possible to Satellite 6.5 (not sure however if this assumption is right).

Other relevant data:
installation command:

foreman-installer --scenario katello --enable-foreman-plugin-ansible --enable-foreman-plugin-bootdisk --enable-foreman-plugin-discovery --enable-foreman-plugin-hooks --enable-foreman-plugin-openscap --enable-foreman-plugin-remote-execution --enable-foreman-plugin-templates

I’ve also tried by changing the http proxy setting in the administration section via the Web/UI, but I’m unable to tell if it is working correctly: a quick check on the netstat/ss ouptput does not show any connection towards the http proxy server and the sync task always hangs on 0%.

Regards,
Alessandro

Hi Alessandro,

in general, you can rerun foreman-installer safely. It will not ruin your current setup als long as you did not fiddle with the config files by hand.
If you did change the configfiles yourself, there is indeed a high possibililty that rerunning foreman-installer will override those. I would generally advise against doing so in any case, since upgrading to a new Foreman/Katello version requires running foreman-installer.

If you are uncertain whether this might affect you, you can run “foreman-installer --scenario katello -v --noop” (dryrun with verbose output) to check what would be changed by the installer.

Regards

Hi Areyus,

thanks for your support, it makes sense now! I didn’t consider the upgrade case.
I was in doubt since the installer can do so many things (like reset config, regenerate keys and so on) that can be a bit overwhelming at first. Maybe the documentation could be more explicit on that? (Just thinking out loud :slight_smile: )

Anyway, before your reply, I edited manually the config files ( /etc/foreman/plugins/katello.yaml , /etc/pulp/server/plugins.conf.d/yum_importer.json) and I can report that repo sync works as expected through the http proxy server now.

Nonetheless I’ve made a backup copy of the config files before the edit, so I will revert them back as soon as I get the chance and try using the installer instead in order to keep things “consistent” and “upgrade proof”.

Regards,
Alessandro