Skip to content

Commit

Permalink
Update puppetlabs/postgresql dep to >=3.0.0 <5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
razorsedge committed Jan 21, 2015
1 parent 3591818 commit 1763ccc
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 30 deletions.
6 changes: 2 additions & 4 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ fixtures:
mysql:
repo: "https://github.com/puppetlabs/puppetlabs-mysql.git"
ref: "2.1.0"
postgresql:
repo: "https://github.com/puppetlabs/puppet-postgresql.git"
ref: "2.5.0"
concat: "https://github.com/ripienaar/puppet-concat.git"
postgresql: "https://github.com/puppetlabs/puppet-postgresql.git"
concat: "https://github.com/puppetlabs/puppetlabs-concat.git"
staging: "https://github.com/nanliu/puppet-staging.git"
epel: "https://github.com/stahnma/puppet-module-epel.git"
java_ks: "https://github.com/puppetlabs/puppetlabs-java_ks.git"
Expand Down
8 changes: 4 additions & 4 deletions manifests/cm/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
# Class['::mysql::server']
# Class['::oraclerdbms::java']
# Class['::oraclerdbms::server']
# Class['::postgresql::java']
# Class['::postgresql::lib::java']
# Class['::postgresql::server']
# Package['jdk']
# java_ks
Expand Down Expand Up @@ -267,12 +267,12 @@
$scm_prepare_database_require = [ Package['cloudera-manager-server'], Class['::postgresql::server'], ]
}

if ! defined(Class['::postgresql::java']) {
include '::postgresql::java'
if ! defined(Class['::postgresql::lib::java']) {
include '::postgresql::lib::java'
}
# TODO: Figure out postgresql auth to make Exec['scm_prepare_database'] work.
realize Exec['scm_prepare_database']
Class['::postgresql::java'] -> Exec['scm_prepare_database']
Class['::postgresql::lib::java'] -> Exec['scm_prepare_database']
}
default: { }
}
Expand Down
8 changes: 4 additions & 4 deletions manifests/cm5/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
# Class['::mysql::server']
# Class['::oraclerdbms::java']
# Class['::oraclerdbms::server']
# Class['::postgresql::java']
# Class['::postgresql::lib::java']
# Class['::postgresql::server']
# Package['jdk']
# java_ks
Expand Down Expand Up @@ -267,12 +267,12 @@
$scm_prepare_database_require = [ Package['cloudera-manager-server'], Class['::postgresql::server'], ]
}

if ! defined(Class['::postgresql::java']) {
include '::postgresql::java'
if ! defined(Class['::postgresql::lib::java']) {
include '::postgresql::lib::java'
}
# TODO: Figure out postgresql auth to make Exec['scm_prepare_database'] work.
realize Exec['scm_prepare_database']
Class['::postgresql::java'] -> Exec['scm_prepare_database']
Class['::postgresql::lib::java'] -> Exec['scm_prepare_database']
}
default: { }
}
Expand Down
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"name": "puppetlabs/mysql"
},
{
"version_requirement": ">=2.1.0 <3.0.0",
"version_requirement": ">=3.0.0 <5.0.0",
"name": "puppetlabs/postgresql"
},
{
Expand Down Expand Up @@ -75,7 +75,7 @@
"requirements": [
{
"name": "pe",
"version_requirement": ">=3.0.0 <3.3.0"
"version_requirement": ">=3.3.0 <4.0.0"
},
{
"name": "puppet",
Expand Down
15 changes: 7 additions & 8 deletions spec/classes/cloudera_cm5_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,11 @@

context 'on a supported operatingsystem, custom parameters, db_type => postgresql' do
let :facts do {
:concat_basedir => '/var/lib/puppet/concat',
:fqdn => 'myhost.example.com',
:postgres_default_version => 'somevar',
:osfamily => 'RedHat',
:operatingsystem => 'OracleLinux',
:operatingsystemrelease => '6.4'
:concat_basedir => '/var/lib/puppet/concat',
:fqdn => 'myhost.example.com',
:osfamily => 'RedHat',
:operatingsystem => 'OracleLinux',
:operatingsystemrelease => '6.4'
}
end

Expand All @@ -321,7 +320,7 @@
'com.cloudera.cmf.db.password=scm',
])
end
it { should contain_class('postgresql::java') }
it { should contain_class('postgresql::lib::java') }
it { should contain_exec('scm_prepare_database').with(
:command => '/usr/share/cmf/schema/scm_prepare_database.sh postgresql --user=root --password= scm scm scm && touch /etc/cloudera-scm-server/.scm_prepare_database',
:creates => '/etc/cloudera-scm-server/.scm_prepare_database',
Expand Down Expand Up @@ -352,7 +351,7 @@
'com.cloudera.cmf.db.password=myDbPass',
])
end
it { should contain_class('postgresql::java') }
it { should contain_class('postgresql::lib::java') }
it { should contain_exec('scm_prepare_database').with(
:command => '/usr/share/cmf/schema/scm_prepare_database.sh postgresql --host=dbhost.example.com --port=9000 --scm-host=myhost.example.com --user=dbadmin --password=myPass clouderaDB dbuser myDbPass && touch /etc/cloudera-scm-server/.scm_prepare_database',
:creates => '/etc/cloudera-scm-server/.scm_prepare_database',
Expand Down
15 changes: 7 additions & 8 deletions spec/classes/cloudera_cm_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,11 @@

context 'on a supported operatingsystem, custom parameters, db_type => postgresql' do
let :facts do {
:concat_basedir => '/var/lib/puppet/concat',
:fqdn => 'myhost.example.com',
:postgres_default_version => 'somevar',
:osfamily => 'RedHat',
:operatingsystem => 'OracleLinux',
:operatingsystemrelease => '6.4'
:concat_basedir => '/var/lib/puppet/concat',
:fqdn => 'myhost.example.com',
:osfamily => 'RedHat',
:operatingsystem => 'OracleLinux',
:operatingsystemrelease => '6.4'
}
end

Expand All @@ -317,7 +316,7 @@
'com.cloudera.cmf.db.password=scm',
])
end
it { should contain_class('postgresql::java') }
it { should contain_class('postgresql::lib::java') }
it { should contain_exec('scm_prepare_database').with(
:command => '/usr/share/cmf/schema/scm_prepare_database.sh postgresql --user=root --password= scm scm scm && touch /etc/cloudera-scm-server/.scm_prepare_database',
:creates => '/etc/cloudera-scm-server/.scm_prepare_database',
Expand Down Expand Up @@ -348,7 +347,7 @@
'com.cloudera.cmf.db.password=myDbPass',
])
end
it { should contain_class('postgresql::java') }
it { should contain_class('postgresql::lib::java') }
it { should contain_exec('scm_prepare_database').with(
:command => '/usr/share/cmf/schema/scm_prepare_database.sh postgresql --host=dbhost.example.com --port=9000 --scm-host=myhost.example.com --user=dbadmin --password=myPass clouderaDB dbuser myDbPass && touch /etc/cloudera-scm-server/.scm_prepare_database',
:creates => '/etc/cloudera-scm-server/.scm_prepare_database',
Expand Down

0 comments on commit 1763ccc

Please sign in to comment.