19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## [1.1.0](https://github.com/theforeman/puppet-pulpcore/tree/1.1.0) (2020-06-30)

[Full Changelog](https://github.com/theforeman/puppet-pulpcore/compare/1.0.0...1.1.0)

**Implemented enhancements:**

- Use the non-deprecated namedspaced pg function [\#106](https://github.com/theforeman/puppet-pulpcore/pull/106) ([ekohl](https://github.com/ekohl))
- Fixes [\#30059](https://projects.theforeman.org/issues/30059) - Add certguard plugin [\#99](https://github.com/theforeman/puppet-pulpcore/pull/99) ([sjha4](https://github.com/sjha4))
- Fixes [\#29075](https://projects.theforeman.org/issues/29075) - add pulp\_rpm plugin [\#89](https://github.com/theforeman/puppet-pulpcore/pull/89) ([wbclark](https://github.com/wbclark))

**Fixed bugs:**

- Refs [\#30133](https://projects.theforeman.org/issues/30133) - Unconditionally install RHSM for certguard [\#103](https://github.com/theforeman/puppet-pulpcore/pull/103) ([ekohl](https://github.com/ekohl))
- Fixes [\#30133](https://projects.theforeman.org/issues/30133) - Install python3-subscription-manager-rhsm [\#101](https://github.com/theforeman/puppet-pulpcore/pull/101) ([sjha4](https://github.com/sjha4))

**Merged pull requests:**

- Rename the apache vhost to match the project name [\#104](https://github.com/theforeman/puppet-pulpcore/pull/104) ([ekohl](https://github.com/ekohl))

## [1.0.0](https://github.com/theforeman/puppet-pulpcore/tree/1.0.0) (2020-05-14)

[Full Changelog](https://github.com/theforeman/puppet-pulpcore/compare/0.2.0...1.0.0)
Expand Down
2 changes: 1 addition & 1 deletion manifests/apache.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

if $pulpcore::manage_apache {
include apache
apache::vhost { 'pulp':
apache::vhost { 'pulpcore':
servername => $pulpcore::servername,
port => 80,
priority => '10',
Expand Down
2 changes: 1 addition & 1 deletion manifests/database.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
include postgresql::server
postgresql::server::db { $pulpcore::postgresql_db_name:
user => $pulpcore::postgresql_db_user,
password => postgresql_password($pulpcore::user, $pulpcore::postgresql_db_password),
password => postgresql::postgresql_password($pulpcore::user, $pulpcore::postgresql_db_password),
before => Pulpcore::Admin['migrate --noinput'],
}
}
Expand Down
8 changes: 8 additions & 0 deletions manifests/plugin/certguard.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# @summary Pulp Certguard plugin
class pulpcore::plugin::certguard {
package { 'python3-subscription-manager-rhsm':
ensure => present,
}
-> pulpcore::plugin { 'certguard':
}
}
5 changes: 5 additions & 0 deletions manifests/plugin/rpm.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# @summary Pulp RPM plugin
class pulpcore::plugin::rpm {
pulpcore::plugin { 'rpm':
}
}
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "theforeman-pulpcore",
"version": "1.0.0",
"version": "1.1.0",
"author": "theforeman",
"summary": "Installs next generation Pulp server",
"license": "GPL-3.0-or-later",
Expand All @@ -24,7 +24,7 @@
},
{
"name": "puppetlabs/postgresql",
"version_requirement": ">= 4.2.0 < 7.0.0"
"version_requirement": ">= 6.5.0 < 7.0.0"
},
{
"name": "camptocamp/systemd",
Expand Down
8 changes: 4 additions & 4 deletions spec/acceptance/basic_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ class { 'redis::globals':
its(:exit_status) { is_expected.to eq 0 }
end

describe command("DJANGO_SETTINGS_MODULE=pulpcore.app.settings PULP_SETTINGS=/etc/pulp/settings.py python3-django-admin dumpdata auth.User") do
its(:stdout) { is_expected.to match(/auth\.user/) }
its(:exit_status) { is_expected.to eq 0 }
end
describe command("DJANGO_SETTINGS_MODULE=pulpcore.app.settings PULP_SETTINGS=/etc/pulp/settings.py python3-django-admin dumpdata auth.User") do
its(:stdout) { is_expected.to match(/auth\.user/) }
its(:exit_status) { is_expected.to eq 0 }
end

end
2 changes: 2 additions & 0 deletions spec/acceptance/plugins_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class { 'redis::globals':
include pulpcore::plugin::file
include pulpcore::plugin::container
include pulpcore::plugin::migration
include pulpcore::plugin::rpm
include pulpcore::plugin::certguard
PUPPET
}

Expand Down
25 changes: 25 additions & 0 deletions spec/classes/plugin_certguard_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
require 'spec_helper'

describe 'pulpcore::plugin::certguard' do
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) { os_facts }

it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_package('python3-subscription-manager-rhsm').with(ensure: 'present') }
it { is_expected.to contain_pulpcore__plugin('certguard') }

context 'with pulpcore' do
let(:pre_condition) { 'include pulpcore' }

it do
is_expected.to compile.with_all_deps
is_expected.to contain_pulpcore__plugin('certguard')
.that_requires('Package[python3-subscription-manager-rhsm]')
.that_subscribes_to('Class[Pulpcore::Install]')
.that_notifies(['Class[Pulpcore::Database]', 'Class[Pulpcore::Service]'])
end
end
end
end
end
23 changes: 23 additions & 0 deletions spec/classes/plugin_rpm_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
require 'spec_helper'

describe 'pulpcore::plugin::rpm' do
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) { os_facts }

it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_pulpcore__plugin('rpm') }

context 'with pulpcore' do
let(:pre_condition) { 'include pulpcore' }

it do
is_expected.to compile.with_all_deps
is_expected.to contain_pulpcore__plugin('rpm')
.that_subscribes_to('Class[Pulpcore::Install]')
.that_notifies(['Class[Pulpcore::Database]', 'Class[Pulpcore::Service]'])
end
end
end
end
end
8 changes: 4 additions & 4 deletions spec/classes/pulpcore_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
.without_content(/sslmode/)
is_expected.to contain_class('postgresql::server')
is_expected.to contain_postgresql__server__db('pulpcore')
is_expected.to contain_apache__vhost('pulp')
is_expected.to contain_apache__vhost('pulpcore')
is_expected.to contain_selinux__boolean('httpd_can_network_connect')
is_expected.to contain_pulpcore__admin('reset-admin-password --random')
end
Expand All @@ -29,7 +29,7 @@

it do
is_expected.to compile.with_all_deps
is_expected.not_to contain_apache__vhost('pulp')
is_expected.not_to contain_apache__vhost('pulpcore')
is_expected.not_to contain_selinux__boolean('httpd_can_network_connect')
end
end
Expand Down Expand Up @@ -63,7 +63,7 @@
.with_content(%r{--bind '127.0.0.1:24819'})
is_expected.to contain_systemd__unit_file('pulpcore-content.service')
.with_content(%r{--bind '127.0.0.1:24818'})
is_expected.to contain_apache__vhost('pulp')
is_expected.to contain_apache__vhost('pulpcore')
.with_proxy_pass([
{
'path' => '/pulp/api/v3',
Expand Down Expand Up @@ -164,7 +164,7 @@
])
is_expected.to contain_systemd__unit_file('pulpcore-api.service')
.with_content(%r{Environment="PULP_STATIC_ROOT=/my/other/custom/directory"})
is_expected.to contain_apache__vhost('pulp')
is_expected.to contain_apache__vhost('pulpcore')
.with_docroot('/my/custom/directory')
is_expected.to contain_concat__fragment('base')
.with_content(%r{MEDIA_ROOT = "/my/custom/directory"})
Expand Down
4 changes: 4 additions & 0 deletions spec/setup_acceptance_node.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
ensure => installed,
}

package { 'epel-release':
ensure => installed,
}

package { 'rh-redis5-redis':
ensure => installed,
require => Package['centos-release-scl-rh'],
Expand Down