Merge "Changes to get nodepool working with trusty"
This commit is contained in:
commit
cd59f2e483
@ -63,8 +63,11 @@ EOF
|
||||
yum install -y redhat-lsb-core git puppet
|
||||
else
|
||||
#defaults to Ubuntu
|
||||
# NB: keep in sync with openstack_project/files/00-puppet.pref
|
||||
cat > /etc/apt/preferences.d/00-puppet.pref <<EOF
|
||||
|
||||
lsbdistcodename=`lsb_release -c -s`
|
||||
if [ $lsbdistcodename != 'trusty' ] ; then
|
||||
# NB: keep in sync with openstack_project/files/00-puppet.pref
|
||||
cat > /etc/apt/preferences.d/00-puppet.pref <<EOF
|
||||
Package: puppet puppet-common puppetmaster puppetmaster-common puppetmaster-passenger
|
||||
Pin: version 2.7*
|
||||
Pin-Priority: 501
|
||||
@ -73,8 +76,10 @@ Package: facter
|
||||
Pin: version 1.*
|
||||
Pin-Priority: 501
|
||||
EOF
|
||||
|
||||
lsbdistcodename=`lsb_release -c -s`
|
||||
rubypkg=rubygems
|
||||
else
|
||||
rubypkg=ruby
|
||||
fi
|
||||
puppet_deb=puppetlabs-release-${lsbdistcodename}.deb
|
||||
wget http://apt.puppetlabs.com/$puppet_deb -O $puppet_deb
|
||||
dpkg -i $puppet_deb
|
||||
@ -84,5 +89,5 @@ EOF
|
||||
DEBIAN_FRONTEND=noninteractive apt-get --option 'Dpkg::Options::=--force-confold' \
|
||||
--assume-yes dist-upgrade
|
||||
DEBIAN_FRONTEND=noninteractive apt-get --option 'Dpkg::Options::=--force-confold' \
|
||||
--assume-yes install -y --force-yes puppet git rubygems
|
||||
--assume-yes install -y --force-yes puppet git $rubypkg
|
||||
fi
|
||||
|
@ -140,14 +140,6 @@ class jenkins::slave(
|
||||
require => Class[pip],
|
||||
}
|
||||
|
||||
file { '/etc/profile.d/rubygems.sh':
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
source => 'puppet:///modules/jenkins/rubygems.sh',
|
||||
}
|
||||
|
||||
file { '/usr/local/bin/gcc':
|
||||
ensure => link,
|
||||
target => '/usr/bin/ccache',
|
||||
|
@ -103,13 +103,23 @@ class openstack_project::base(
|
||||
key_server => 'pgp.mit.edu',
|
||||
}
|
||||
|
||||
file { '/etc/apt/preferences.d/00-puppet.pref':
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0444',
|
||||
source => 'puppet:///modules/openstack_project/00-puppet.pref',
|
||||
replace => true,
|
||||
case $::lsbdistcodename {
|
||||
'trusty': {
|
||||
file { '/etc/apt/preferences.d/00-puppet.pref':
|
||||
ensure => absent,
|
||||
}
|
||||
}
|
||||
|
||||
default: {
|
||||
file { '/etc/apt/preferences.d/00-puppet.pref':
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0444',
|
||||
source => 'puppet:///modules/openstack_project/00-puppet.pref',
|
||||
replace => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
file { '/etc/default/puppet':
|
||||
|
@ -47,7 +47,11 @@ class openstack_project::jenkins_params {
|
||||
$python_magic_package = 'python-magic'
|
||||
$python_requests_package = 'python-requests'
|
||||
$python_zmq_package = 'python-zmq'
|
||||
$rubygems_package = 'rubygems'
|
||||
if ($::lsbdistcodename) == 'trusty' {
|
||||
$rubygems_package = 'ruby'
|
||||
} else {
|
||||
$rubygems_package = 'rubygems'
|
||||
}
|
||||
# Common Lisp interpreter, used for cl-openstack-client
|
||||
$sbcl_package = 'sbcl'
|
||||
$sqlite_package = 'sqlite'
|
||||
|
@ -57,11 +57,25 @@ class openstack_project::thick_slave(
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
if ($::lsbdistcodename == 'trusty') {
|
||||
file { '/etc/profile.d/rubygems.sh':
|
||||
ensure => absent,
|
||||
}
|
||||
} else {
|
||||
file { '/etc/profile.d/rubygems.sh':
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
source => 'puppet:///modules/openstack_project/rubygems.sh',
|
||||
}
|
||||
}
|
||||
|
||||
package { 'rake':
|
||||
ensure => '10.1.1',
|
||||
provider => gem,
|
||||
before => Package['puppetlabs_spec_helper'],
|
||||
require => Package['rubygems'],
|
||||
require => Package[$::openstack_project::jenkins_params::rubygems_package],
|
||||
}
|
||||
|
||||
$gem_packages = [
|
||||
@ -73,7 +87,7 @@ class openstack_project::thick_slave(
|
||||
package { $gem_packages:
|
||||
ensure => latest,
|
||||
provider => gem,
|
||||
require => Package['rubygems'],
|
||||
require => Package[$::openstack_project::jenkins_params::rubygems_package],
|
||||
}
|
||||
|
||||
if ($::operatingsystem == 'Fedora') and ($::operatingsystemrelease >= 19) {
|
||||
@ -151,6 +165,13 @@ class openstack_project::thick_slave(
|
||||
system => true,
|
||||
}
|
||||
|
||||
if ($::lsbdistcodename == 'trusty') {
|
||||
class { 'postgresql::globals':
|
||||
version => '9.3',
|
||||
before => Class['postgresql::server'],
|
||||
}
|
||||
}
|
||||
|
||||
class { 'postgresql::server':
|
||||
postgres_password => 'insecure_slave',
|
||||
manage_firewall => false,
|
||||
|
Loading…
Reference in New Issue
Block a user