From c655713c15263848b5af8fc8d8b6b41e69cb8d1c Mon Sep 17 00:00:00 2001 From: varac Date: Wed, 9 Oct 2013 14:55:16 +0200 Subject: don't remove dev-packages on webapp node they are needed for building gems --- puppet/modules/site_config/manifests/packages/base.pp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/puppet/modules/site_config/manifests/packages/base.pp b/puppet/modules/site_config/manifests/packages/base.pp index d93e194b..94ff679b 100644 --- a/puppet/modules/site_config/manifests/packages/base.pp +++ b/puppet/modules/site_config/manifests/packages/base.pp @@ -6,7 +6,7 @@ class site_config::packages::base { } # base set of packages that we want to remove everywhere - package { [ 'acpi', 'acpid', 'acpi-support-base', 'eject', 'ftp', + package { [ 'acpi', 'acpid', 'acpi-support-base', 'eject', 'ftp', 'fontconfig-config', 'laptop-detect', 'lpr', 'nfs-common', 'nfs-kernel-server', 'portmap', 'pppconfig', 'pppoe', 'pump', 'qstat', 'rpcbind', 'samba-common', 'samba-common-bin', 'smbclient', 'tcl8.5', @@ -15,14 +15,17 @@ class site_config::packages::base { ensure => absent; } - if $::virtual == 'virtualbox' { - $virtualbox_ensure = present + if $::virtual == 'virtualbox' or $::services =~ /\bwebapp\b/ { + $dev_packages_ensure = present } else { - $virtualbox_ensure = absent + $dev_packages_ensure = absent } - package { [ 'build-essential', 'fontconfig-config', 'g++', 'g++-4.7', 'gcc', + # g++ and ruby1.9.1-dev are needed for nickserver/eventmachine (#4079) + # dev_packages are needed for building gems on the webapp node + + package { [ 'build-essential', 'g++', 'g++-4.7', 'gcc', 'gcc-4.6', 'gcc-4.7', 'cpp', 'cpp-4.6', 'cpp-4.7', 'libc6-dev' ]: - ensure => $virtualbox_ensure + ensure => $dev_packages_ensure } } -- cgit v1.2.3 From 23304bbc281ef25b9ad2a607631aaa728e9c7b29 Mon Sep 17 00:00:00 2001 From: varac Date: Thu, 10 Oct 2013 15:32:26 +0200 Subject: install ruby-dev for nickserver/webapp (#4079 + #4080) --- puppet/modules/site_config/manifests/ruby.pp | 4 +++- puppet/modules/site_config/manifests/ruby/dev.pp | 6 ++++++ puppet/modules/site_nickserver/manifests/init.pp | 9 +++++---- puppet/modules/site_webapp/manifests/init.pp | 8 ++++++-- 4 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 puppet/modules/site_config/manifests/ruby/dev.pp diff --git a/puppet/modules/site_config/manifests/ruby.pp b/puppet/modules/site_config/manifests/ruby.pp index 2a720114..9c005032 100644 --- a/puppet/modules/site_config/manifests/ruby.pp +++ b/puppet/modules/site_config/manifests/ruby.pp @@ -1,6 +1,8 @@ class site_config::ruby { Class[Ruby] -> Class[rubygems] -> Class[bundler::install] - class { '::ruby': ruby_version => '1.9.3' } + class { '::ruby': + ruby_version => '1.9.3', + } class { 'bundler::install': install_method => 'package' } include rubygems } diff --git a/puppet/modules/site_config/manifests/ruby/dev.pp b/puppet/modules/site_config/manifests/ruby/dev.pp new file mode 100644 index 00000000..dbc77ae7 --- /dev/null +++ b/puppet/modules/site_config/manifests/ruby/dev.pp @@ -0,0 +1,6 @@ +class site_config::ruby::dev inherits site_config::ruby { + Class['::ruby'] { + ruby_version => '1.9.3', + install_dev => true + } +} diff --git a/puppet/modules/site_nickserver/manifests/init.pp b/puppet/modules/site_nickserver/manifests/init.pp index bf0511d5..59613f7b 100644 --- a/puppet/modules/site_nickserver/manifests/init.pp +++ b/puppet/modules/site_nickserver/manifests/init.pp @@ -13,7 +13,7 @@ class site_nickserver { tag 'leap_service' Class['site_config::default'] -> Class['site_nickserver'] - include site_config::ruby + include site_config::ruby::dev # # VARIABLES @@ -65,7 +65,7 @@ class site_nickserver { # package { - 'libssl-dev': ensure => installed; + [ 'libssl-dev' ]: ensure => installed; } vcsrepo { '/srv/leap/nickserver': @@ -85,8 +85,9 @@ class site_nickserver { unless => '/usr/bin/bundle check', user => 'nickserver', timeout => 600, - require => [ Class['bundler::install'], Vcsrepo['/srv/leap/nickserver'], - Package['libssl-dev'] ], + require => [ + Class['bundler::install'], Vcsrepo['/srv/leap/nickserver'], + Package['libssl-dev'], Package['ruby-dev'] ], notify => Service['nickserver']; } diff --git a/puppet/modules/site_webapp/manifests/init.pp b/puppet/modules/site_webapp/manifests/init.pp index c85a5ddc..f305f1a9 100644 --- a/puppet/modules/site_webapp/manifests/init.pp +++ b/puppet/modules/site_webapp/manifests/init.pp @@ -13,7 +13,7 @@ class site_webapp { Class['site_config::default'] -> Class['site_webapp'] - include site_config::ruby + include site_config::ruby::dev include site_webapp::apache include site_webapp::couchdb include site_webapp::haproxy @@ -55,7 +55,11 @@ class site_webapp { unless => '/usr/bin/bundle check', user => 'leap-webapp', timeout => 600, - require => [ Class['bundler::install'], Vcsrepo['/srv/leap/webapp'], Service['shorewall'] ], + require => [ + Class['bundler::install'], + Vcsrepo['/srv/leap/webapp'], + Package['ruby-dev'], + Service['shorewall'] ], notify => Service['apache']; } -- cgit v1.2.3 From da6cb0546f91444d8c4e059eaa99f17fafe9c5a2 Mon Sep 17 00:00:00 2001 From: varac Date: Fri, 11 Oct 2013 18:02:59 +0200 Subject: fixed issues from https://review.leap.se/r/98/ --- puppet/modules/site_config/manifests/ruby.pp | 4 +--- puppet/modules/site_nickserver/manifests/init.pp | 7 +++---- puppet/modules/site_webapp/manifests/init.pp | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/puppet/modules/site_config/manifests/ruby.pp b/puppet/modules/site_config/manifests/ruby.pp index 9c005032..2a720114 100644 --- a/puppet/modules/site_config/manifests/ruby.pp +++ b/puppet/modules/site_config/manifests/ruby.pp @@ -1,8 +1,6 @@ class site_config::ruby { Class[Ruby] -> Class[rubygems] -> Class[bundler::install] - class { '::ruby': - ruby_version => '1.9.3', - } + class { '::ruby': ruby_version => '1.9.3' } class { 'bundler::install': install_method => 'package' } include rubygems } diff --git a/puppet/modules/site_nickserver/manifests/init.pp b/puppet/modules/site_nickserver/manifests/init.pp index 59613f7b..81482a55 100644 --- a/puppet/modules/site_nickserver/manifests/init.pp +++ b/puppet/modules/site_nickserver/manifests/init.pp @@ -64,9 +64,7 @@ class site_nickserver { # before EventMachine gem is built/installed. # - package { - [ 'libssl-dev' ]: ensure => installed; - } + package { 'libssl-dev': ensure => installed } vcsrepo { '/srv/leap/nickserver': ensure => present, @@ -87,7 +85,8 @@ class site_nickserver { timeout => 600, require => [ Class['bundler::install'], Vcsrepo['/srv/leap/nickserver'], - Package['libssl-dev'], Package['ruby-dev'] ], + Package['libssl-dev'], Class['site_config::ruby::dev'] ], + notify => Service['nickserver']; } diff --git a/puppet/modules/site_webapp/manifests/init.pp b/puppet/modules/site_webapp/manifests/init.pp index f305f1a9..6c5bda4c 100644 --- a/puppet/modules/site_webapp/manifests/init.pp +++ b/puppet/modules/site_webapp/manifests/init.pp @@ -58,7 +58,7 @@ class site_webapp { require => [ Class['bundler::install'], Vcsrepo['/srv/leap/webapp'], - Package['ruby-dev'], + Class['site_config::ruby::dev'], Service['shorewall'] ], notify => Service['apache']; } -- cgit v1.2.3