Skip to content

use Ansible/Quadlet to deploy the main app#1011

Closed
evgeni wants to merge 5 commits into
developfrom
frankenstein
Closed

use Ansible/Quadlet to deploy the main app#1011
evgeni wants to merge 5 commits into
developfrom
frankenstein

Conversation

@evgeni

@evgeni evgeni commented Feb 24, 2025

Copy link
Copy Markdown
Member

what is this?

a playground to test out deploying a Foreman/Katello with the following "adjustments":

  • certs generated by puppet-certs
  • Foreman, Pulp, Candlepin, PostgreSQL, Redis deployed by foreman-quadlet
  • Foreman Proxy deployed by puppet-foreman_proxy

details, gory details

problems

  • many, probably
  • one that I know of: for some reason foreman-tasks gets listed as failed, it gets fixed by systemctl restart dynflow*, so probably some ordering issue or something

testing

# foreman-installer --scenario katello --foreman-proxy-oauth-consumer-key abcdefghijklmnopqrstuvwxyz123456 --foreman-proxy-oauth-consumer-secret abcdefghijklmnopqrstuvwxyz123456 --tuning development

@evgeni

evgeni commented Feb 24, 2025

Copy link
Copy Markdown
Member Author

/packit build

@ekohl

ekohl commented Feb 24, 2025

Copy link
Copy Markdown
Member

If you're lazy, you could also write a migration that removes all entries you don't want instead of removing all individual migrations.

answers.delete_if! do |key, _value|
  ['foreman', 'foreman_proxy_content', 'apache::mod::status'].include?(key) || key.start_with?('foreman::')
end

Will be easier if you need to rebase this more often.

Comment thread Puppetfile
mod 'katello/foreman_proxy_content', :git => 'https://github.com/theforeman/puppet-foreman_proxy_content'
mod 'katello/certs', :git => 'https://github.com/theforeman/puppet-certs'
mod 'katello/katello', :git => 'https://github.com/theforeman/puppet-katello'
mod 'katello/katello', :git => 'https://github.com/theforeman/puppet-katello', branch: 'frankenstein'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@evgeni evgeni force-pushed the frankenstein branch 4 times, most recently from 46c7f84 to 83bcc4b Compare February 26, 2025 16:00
@evgeni

evgeni commented Feb 26, 2025

Copy link
Copy Markdown
Member Author
foreman-installer --scenario katello --foreman-proxy-oauth-consumer-key abcdefghijklmnopqrstuvwxyz123456 --foreman-proxy-oauth-consumer-secret abcdefghijklmnopqrstuvwxyz123456 --tuning development

this should give you a working Frankenstein 🎉

@ehelms

ehelms commented Feb 26, 2025

Copy link
Copy Markdown
Member

this uses a rather hackish patch to puppet-katello to achieve the following:

  • generate all certs

Oh look... more fun code that was attempting what you wanted way back:

theforeman/puppet-certs#449

This was input to my idea to have a stand-alone to generate certificates the way puppet-certs generates them to be able to use the certs as input rather than coupling generation and deployment:

#935

@evgeni

evgeni commented Feb 27, 2025

Copy link
Copy Markdown
Member Author

You're saying we could've had a command that goes "prepare me a certs bundle" and use that certs bundle as a dedicated input to both the "foreman" and the "internal proxy" installations? THAT WOULD HAVE BEEN AWESOME! Where is my 🦄?

@ehelms

ehelms commented Feb 27, 2025

Copy link
Copy Markdown
Member

I don't want to lose track of some changes I was testing on your frankenstein class in puppet-katello and made these updates:

  $katello_server_ca_cert = $certs::ca::server_ca_path

  include trusted_ca
  trusted_ca::ca { 'katello_server-host-cert':
    source  => $katello_server_ca_cert,
    require => File[$katello_server_ca_cert],
  }

  class { 'certs::foreman_proxy':
    deploy => true,
  }

This allowed setting this at the answer file level:

certs:
  deploy: false
  group: root

This inspired me to start working on some puppet-certs updates that should decouple things more and help.

@evgeni

evgeni commented Mar 3, 2025

Copy link
Copy Markdown
Member Author

/packit build

@evgeni

evgeni commented Mar 3, 2025

Copy link
Copy Markdown
Member Author

I don't want to lose track of some changes I was testing on your frankenstein class in puppet-katello and made these updates:

  $katello_server_ca_cert = $certs::ca::server_ca_path

  include trusted_ca
  trusted_ca::ca { 'katello_server-host-cert':
    source  => $katello_server_ca_cert,
    require => File[$katello_server_ca_cert],
  }

  class { 'certs::foreman_proxy':
    deploy => true,
  }

This allowed setting this at the answer file level:

certs:
  deploy: false
  group: root

What am I missing?

2025-03-03 08:22:54 [ERROR ] [configure] Could not find resource 'File[/etc/pki/katello/certs/katello-default-ca.crt]' in parameter 'require' (file: /usr/share/foreman-installer/modules/certs/manifests/foreman_proxy.pp, line: 129) on node almalinux9.tanso.example.com

This inspired me to start working on some puppet-certs updates that should decouple things more and help.

@evgeni

evgeni commented Mar 3, 2025

Copy link
Copy Markdown
Member Author

What am I missing?

2025-03-03 08:22:54 [ERROR ] [configure] Could not find resource 'File[/etc/pki/katello/certs/katello-default-ca.crt]' in parameter 'require' (file: /usr/share/foreman-installer/modules/certs/manifests/foreman_proxy.pp, line: 129) on node almalinux9.tanso.example.com

Using group: root and deploy: true and then explicitly setting deploy: false for certs::candlepin and certs::foreman worked.

@evgeni

evgeni commented Mar 3, 2025

Copy link
Copy Markdown
Member Author

/packit build

@ehelms

ehelms commented Mar 3, 2025

Copy link
Copy Markdown
Member

What am I missing?
2025-03-03 08:22:54 [ERROR ] [configure] Could not find resource 'File[/etc/pki/katello/certs/katello-default-ca.crt]' in parameter 'require' (file: /usr/share/foreman-installer/modules/certs/manifests/foreman_proxy.pp, line: 129) on node almalinux9.tanso.example.com

Using group: root and deploy: true and then explicitly setting deploy: false for certs::candlepin and certs::foreman worked.

I guess I had some local changes to puppet-certs as well I didn't capture. I think all of them are captured in the flood of puppet-certs PRs I opened :)

@evgeni

evgeni commented Mar 5, 2025

Copy link
Copy Markdown
Member Author

/packit build

@evgeni evgeni closed this Sep 17, 2025
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.

3 participants