File tree Expand file tree Collapse file tree 8 files changed +89
-4
lines changed
Expand file tree Collapse file tree 8 files changed +89
-4
lines changed Original file line number Diff line number Diff line change @@ -26,3 +26,8 @@ fixtures:
2626 puppet_version : ' >= 6.0.0'
2727 systemd : " https://github.com/camptocamp/puppet-systemd"
2828 rhsm : " https://github.com/voxpupuli/puppet-rhsm"
29+ podman :
30+ repo : ' https://github.com/ehelms/puppet-podman'
31+ branch : ' allow-disabled-quadlet'
32+ iop : " https://github.com/ehelms/puppet-iop"
33+ hashfile : " https://github.com/southalc/hashfile"
Original file line number Diff line number Diff line change 66 String $user = $katello_devel::user,
77 Stdlib::Absolutepath $cwd = $katello_devel::foreman_dir,
88 Integer[0] $timeout = 600,
9+ Optional[String] $command = undef ,
910) {
11+ $bundle_command = pick($command , $title )
12+
1013 exec { "bundle-${title}" :
11- command => " bundle ${title } " ,
14+ command => " bundle ${bundle_command } " ,
1215 environment => $environment + [" HOME=/home/${user} " ],
1316 cwd => $cwd ,
1417 user => $user ,
Original file line number Diff line number Diff line change 3838 database => ' all' ,
3939 user => ' all' ,
4040 address => ' 127.0.0.1/32' ,
41- order => 2 ,
41+ order => 4 ,
4242 auth_method => ' trust' ,
4343 }
4444
4747 database => ' all' ,
4848 user => ' all' ,
4949 address => ' ::1/128' ,
50- order => 3 ,
50+ order => 5 ,
5151 auth_method => ' trust' ,
5252 }
5353
Original file line number Diff line number Diff line change 7373#
7474# @param rails_cache_store
7575# Manage the type of cache used for Rails, default is Redis.
76+ #
77+ # @param enable_iop
78+ # Enable iop integration
79+ #
7680class katello_devel (
7781 String $user = undef ,
7882 Stdlib::Absolutepath $deployment_dir = ' /home/vagrant' ,
98102 Boolean $katello_manage_repo = true ,
99103 Boolean $rex_manage_repo = true ,
100104 Hash[String, Any] $rails_cache_store = { ' type' => ' redis' },
105+ Boolean $enable_iop = false ,
101106) inherits katello_devel::params {
102107 $group = $user
103108
175180 group => $group ,
176181 mode => ' 0755' ,
177182 }
183+
184+ if $enable_iop {
185+ include katello_devel::iop
186+ }
178187}
Original file line number Diff line number Diff line change 1+ # @summary Insights on Premise (IoP) integration for Katello development
2+ # @api private
3+ class katello_devel::iop {
4+ postgresql::server::pg_hba_rule { 'inventory_db IPV4' :
5+ type => ' host' ,
6+ database => ' inventory_db' ,
7+ user => ' all' ,
8+ address => ' 127.0.0.1/32' ,
9+ order => 2,
10+ auth_method => ' md5' ,
11+ }
12+
13+ postgresql::server::pg_hba_rule { 'inventory_db IPV6' :
14+ type => ' host' ,
15+ database => ' inventory_db' ,
16+ user => ' all' ,
17+ address => ' ::1/128' ,
18+ order => 3,
19+ auth_method => ' md5' ,
20+ }
21+
22+ # Create directory structure for Foreman assets
23+ file {
24+ [
25+ ' /var/lib/foreman' ,
26+ ' /var/lib/foreman/public' ,
27+ ' /var/lib/foreman/public/assets' ,
28+ ' /var/lib/foreman/public/assets/apps' ,
29+ ]:
30+ ensure => directory ,
31+ owner => ' root' ,
32+ group => ' root' ,
33+ mode => ' 0755' ,
34+ } ->
35+ Katello_devel::Git_repo[' foreman' ] ->
36+ katello_devel::plugin { 'theforeman/foreman_rh_cloud' : } ->
37+ Katello_devel::Bundle[' exec rake db:migrate' ] ->
38+ class { 'iop' : }
39+ }
Original file line number Diff line number Diff line change 88 String $admin_password = $katello_devel::admin_password,
99 Integer[0] $npm_timeout = $katello_devel::npm_timeout,
1010) {
11- $pidfile = " ${foreman_dir} /tmp/pids/server.pid"
11+ $pidfile = " ${foreman_dir} /tmp/pids/main- server.pid"
1212
1313 $seed_env = [
1414 " SEED_ORGANIZATION=${initial_organization} " ,
2929
3030 if defined (Class[' foreman_proxy::register' ]) {
3131 katello_devel::bundle { 'exec rails s -d' :
32+ command => " exec rails s -d -P ${pidfile} " ,
3233 unless => " /usr/bin/pgrep --pidfile ${pidfile} " ,
3334 subscribe => Katello_devel::Bundle[' exec rake db:seed' ],
3435 } ->
3738 command => " /usr/bin/pkill -9 --pidfile ${pidfile} " ,
3839 logoutput => ' on_failure' ,
3940 timeout => ' 600' ,
41+ } ->
42+ file { $pidfile:
43+ ensure => absent ,
4044 }
4145 }
4246}
Original file line number Diff line number Diff line change 1+ require 'spec_helper_acceptance'
2+
3+ describe 'Scenario: install katello_devel' do
4+ let ( :manifest ) do
5+ <<-PUPPET
6+ class { 'katello_devel':
7+ user => 'vagrant',
8+ enable_iop => true,
9+ }
10+ PUPPET
11+ end
12+
13+ it 'applies with no errors' do
14+ apply_manifest ( manifest , catch_failures : true )
15+ end
16+ end
Original file line number Diff line number Diff line change 1212 ensure => present ,
1313 managehome => true ,
1414}
15+
16+ package { [' rubygem-oauth' , ' puppet-agent-oauth' ]:
17+ ensure => installed,
18+ require => Class[' foreman::repo' ],
19+ }
20+
21+ package { 'podman' :
22+ ensure => latest,
23+ }
You can’t perform that action at this time.
0 commit comments