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

Split the installer into multiple subpackages & add Pulp installer #8814

Draft
wants to merge 2 commits into
base: rpm/develop
Choose a base branch
from

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Dec 2, 2022

Needs theforeman/foreman-installer#822.

To test:

dnf install https://yum.theforeman.org/releases/latest/el8/x86_64/foreman-release.rpm https://yum.puppet.com/puppet7-release-el-8.noarch.rpm
cat <<EOF > /etc/yum.repos.d/pulp-installer.repo
[pulp-installer]
name=Pulp Installer
baseurl=https://ekohl.nl/pulp-installer
gpgcheck=0
enabled=1
EOF
dnf install foreman-installer-scenario-pulp
. /etc/profile.d/puppet-agent.sh
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/pki/tls/private/localhost.key -out /etc/pki/tls/certs/localhost.crt
foreman-installer --pulpcore-servername $HOSTNAME --pulpcore-worker-count 1 --pulpcore-content-service-worker-count 1 --pulpcore-api-service-worker-count 1 --pulpcore-django-secret-key eep4quah0iatheehah9gai3Joo2quooThotahreethahgh0AhD --pulpcore-postgresql-db-password hagoa4see6ziefahthie7peigeega9E

Note that in my repo I haven't built the latest changes yet so you still need to hack the repo yourself.

Requires: %{?scl_prefix}rubygem(kafo) >= 6.5.0
Requires: %{?scl_prefix}rubygem(kafo) < 7.0.0
Requires: %{?scl_prefix_ruby}ruby(release)
Requires: %{name}-scenario-foreman = %{epoch}:%{version}-%{release}
Copy link
Member

Choose a reason for hiding this comment

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

I was not expecting this part, that foreman-installer main package would have a requires on a scenario

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 still debated this in my head. I first wrote it here for compatibility or upgrades. Initially when I wrote this PR I really wanted to create a pulp installer and the split part was mostly to have a decent base to work on.

Perhaps we should not have foreman-installer as a real package anymore at all, just make all the scenarios Provide: foreman-installer = %{version}?


%files katello-common
%{_datadir}/%{name}/katello-certs
%{parser_cache}/foreman-proxy-certs.yaml
Copy link
Member

Choose a reason for hiding this comment

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

Note you have this line in two places, katello-common and scenario-katello. I was leaning towards these two items should be included in either:

  1. scenario-katello
  2. foreman-installer-scenario-katello-certs (new sub-package)

Copy link
Member Author

Choose a reason for hiding this comment

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

You may be right. I wasn't sure where we want to use this. Perhaps we shouldn't even name it an installer scenario and just make it katello-certs or something, since there's no separate scenario file it doesn't store any answers. It just provides a script to generate the certificates that could in theory also be used in some standalone server (like an offline CA).

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 we consider the downstream scenario then its own package makes sense.

@ekohl
Copy link
Member Author

ekohl commented Mar 9, 2023

Note to self: this is missing %post sections to run the migrations. There we should actually make sure they exit with code 0 (by using || :). We may also need to redirect stderr to /dev/null since the logger complains about an unknown terminal if executed non-interactively via Ansible, or fix that in the installer/Kafo itself.

This came up in https://bugzilla.redhat.com/show_bug.cgi?id=2162704

ekohl added 2 commits July 11, 2023 10:45
This creates separate RPMs for each scenario. This allows the user to
install just a single scenario and never use the --scenario parameter.
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.

3 participants