Deploy in three stages - certs, Ansible, puppet#1015
Deploy in three stages - certs, Ansible, puppet#1015ehelms wants to merge 6 commits intotheforeman:developfrom
Conversation
55b4762 to
d06c4f9
Compare
ekohl
left a comment
There was a problem hiding this comment.
At this point I'm wondering if we shouldn't simply create a content proxy like scenario and then call the installer from Ansible.
That's the tactic @evgeni is exploring. |
hooks/pre/40-exacto.rb
Outdated
| def apply_installer_puppet(manifest) | ||
| bin_path = Kafo::PuppetCommand.search_puppet_path('puppet') | ||
| command = "echo \"#{manifest}\" | #{bin_path} apply --detailed-exitcodes --modulepath=/usr/share/foreman-installer/modules" | ||
|
|
||
| stdout, stderr, status = Open3.capture3(*Kafo::PuppetCommand.format_command(command)) | ||
| if status != 1 | ||
| puts stdout | ||
| else | ||
| puts stderr | ||
| end | ||
| end | ||
|
|
||
| generate_manifest = <<~MANIFEST | ||
| class { 'certs::generate': | ||
| foreman => true, | ||
| apache => true, | ||
| candlepin => true, | ||
| foreman_proxy => true, | ||
| } | ||
| MANIFEST | ||
|
|
||
| deploy_manifest = <<~MANIFEST | ||
| class { 'certs::foreman_proxy': | ||
| deploy => true, | ||
| } | ||
| MANIFEST | ||
|
|
||
| apply_installer_puppet(generate_manifest) | ||
| apply_installer_puppet(deploy_manifest) |
There was a problem hiding this comment.
Ideally this would use #935 instead?
Also, why deploying Proxy certs already? The proxy is not yet installed so this should fail?
There was a problem hiding this comment.
You are likely right, I added this after I had run it a few times.
In this use case, I think #935 is probably overkill for what we need. Unless the tactic was to have the user run the three stages rather than the installer orchestrating it.
There was a problem hiding this comment.
I added a deploy class (https://github.com/theforeman/puppet-certs/pull/449/files#diff-e6327449f108163297d1ce69ca08f3a4d8013b01d772a4be3aba628b223bd8c5) that now handles this within the puppet properly. It's added to the answers file and this part is dropped.
I think you could drop katello from your Ansible based version now, and rely on this same mechanism as well.
d06c4f9 to
8375635
Compare
Signed-off-by: Eric D. Helms <ericdhelms@gmail.com>
8375635 to
f12584f
Compare
|
Testing steps: |
This is built on top of #1011
To run this: