From 3bd235bfccb52a392b4e32e3ea29229a8f3d3465 Mon Sep 17 00:00:00 2001 From: Spencer Krum Date: Wed, 18 Jun 2014 15:44:01 -0700 Subject: [PATCH 1/5] Fixing deprecation warnings Non instance variable representation is deprecated so needs to be changed. This change changes varibles to their instance variable representation. See more details see: http://docs.puppetlabs.com/guides/templating.html Change-Id: Ib77827e01011ef6c0380c9ec7a9d147eafd8ce2f --- templates/cgconfig.erb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/cgconfig.erb b/templates/cgconfig.erb index 055c225..7fe0687 100644 --- a/templates/cgconfig.erb +++ b/templates/cgconfig.erb @@ -1,7 +1,7 @@ -<% if operatingsystem == "Fedora" then +<% if @operatingsystem == "Fedora" then # Fedora auto-mounts subsystems under /sys/fs/cgroup/ already, so no # mount section is needed. %> -<% elsif osfamily == "RedHat" then %> +<% elsif @osfamily == "RedHat" then %> mount { cpuset = /cgroup/cpuset; @@ -14,7 +14,7 @@ mount { blkio = /cgroup/blkio; } -<% elsif ( operatingsystemrelease < '12.10' ) or ( operatingsystem != 'Ubuntu' ) then %> +<% elsif ( @operatingsystemrelease < '12.10' ) or ( @operatingsystem != 'Ubuntu' ) then %> mount { cpu = /sys/fs/cgroup/cpu; cpuacct = /sys/fs/cgroup/cpuacct; @@ -49,13 +49,13 @@ group jenkins/children { } } memory { - memory.soft_limit_in_bytes = <%= (memorytotalbytes.to_f * 0.75).to_i %>; - memory.limit_in_bytes = <%= (memorytotalbytes.to_f * 0.9).to_i %>; -<% if (operatingsystem == "Fedora") and (operatingsystemrelease == "18") then + memory.soft_limit_in_bytes = <%= (@memorytotalbytes.to_f * 0.75).to_i %>; + memory.limit_in_bytes = <%= (@memorytotalbytes.to_f * 0.9).to_i %>; +<% if (@operatingsystem == "Fedora") and (@operatingsystemrelease == "18") then # Because of Red Hat bug 918951, swap management doesn't # work in Fedora 18 but should be fixed in 19. %> <% else %> - memory.memsw.limit_in_bytes = <%= (memorytotalbytes.to_f * 0.9).to_i %>; + memory.memsw.limit_in_bytes = <%= (@memorytotalbytes.to_f * 0.9).to_i %>; <% end %> } } From 7a9cee8b50eb89650336168ce85a4fdf4a648c89 Mon Sep 17 00:00:00 2001 From: K Jonathan Harker Date: Fri, 27 Jun 2014 15:19:01 -0700 Subject: [PATCH 2/5] Revert "Downgrade puppetlabs-apache to version 0.0.4." This reverts commit 7b9ea298cf4ae941af74381925b17a4b29337eb9. Upgrading puppetlabs-apache to version 0.4.0 will give us important variables in apache::params (specifically $conf_dir and $vdir) which will allow us to modify the cgit module to run on both Debuntu and RHEL systems -- which is useful because test.sh should be testing all modules on both systems. Of the two issues that 7b9ea298 addresses, I believe that our Oneiric hosts have all gone the way of the dinosaur and we can work around the docroot check by replacing 'MEANINGLESS ARGUMENT' with '/tmp/meaningless_docroot'. Conflicts: install_modules.sh Change-Id: I7c08f85db6810ab28fa044f1923833359271e8ec --- manifests/master.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/master.pp b/manifests/master.pp index 13e0ad5..b0ed058 100644 --- a/manifests/master.pp +++ b/manifests/master.pp @@ -45,7 +45,7 @@ class jenkins::master( apache::vhost { $vhost_name: port => 443, - docroot => 'MEANINGLESS ARGUMENT', + docroot => '/tmp/meaningless_docroot', priority => '50', template => 'jenkins/jenkins.vhost.erb', ssl => true, From d268adba105475399c354ac953e831f31186fbb2 Mon Sep 17 00:00:00 2001 From: K Jonathan Harker Date: Tue, 1 Jul 2014 17:35:00 -0700 Subject: [PATCH 3/5] Revert "Revert "Downgrade puppetlabs-apache to version 0.0.4."" This reverts commit 3afc75132aa3a7d3cae911ae5e7166383b9ee4ba. The new apache module has started managing /etc/httpd/conf/httpd.conf with a template that has some significant differences than our template in the cgit module. Change-Id: I99795d35596f35dfc34e89891155dd2b83e465fe --- manifests/master.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/master.pp b/manifests/master.pp index b0ed058..13e0ad5 100644 --- a/manifests/master.pp +++ b/manifests/master.pp @@ -45,7 +45,7 @@ class jenkins::master( apache::vhost { $vhost_name: port => 443, - docroot => '/tmp/meaningless_docroot', + docroot => 'MEANINGLESS ARGUMENT', priority => '50', template => 'jenkins/jenkins.vhost.erb', ssl => true, From 1c02305f7d31f951834a78e29be6391f18e9bcc7 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 2 Jul 2014 17:35:02 +0000 Subject: [PATCH 4/5] Revert "Fixing deprecation warnings" This reverts commit 82b9b59522928863ddadeacfec819e287303ef20. Change-Id: I746d7ae57802dc76618db9024a0cf94c43774c02 --- templates/cgconfig.erb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/cgconfig.erb b/templates/cgconfig.erb index 7fe0687..055c225 100644 --- a/templates/cgconfig.erb +++ b/templates/cgconfig.erb @@ -1,7 +1,7 @@ -<% if @operatingsystem == "Fedora" then +<% if operatingsystem == "Fedora" then # Fedora auto-mounts subsystems under /sys/fs/cgroup/ already, so no # mount section is needed. %> -<% elsif @osfamily == "RedHat" then %> +<% elsif osfamily == "RedHat" then %> mount { cpuset = /cgroup/cpuset; @@ -14,7 +14,7 @@ mount { blkio = /cgroup/blkio; } -<% elsif ( @operatingsystemrelease < '12.10' ) or ( @operatingsystem != 'Ubuntu' ) then %> +<% elsif ( operatingsystemrelease < '12.10' ) or ( operatingsystem != 'Ubuntu' ) then %> mount { cpu = /sys/fs/cgroup/cpu; cpuacct = /sys/fs/cgroup/cpuacct; @@ -49,13 +49,13 @@ group jenkins/children { } } memory { - memory.soft_limit_in_bytes = <%= (@memorytotalbytes.to_f * 0.75).to_i %>; - memory.limit_in_bytes = <%= (@memorytotalbytes.to_f * 0.9).to_i %>; -<% if (@operatingsystem == "Fedora") and (@operatingsystemrelease == "18") then + memory.soft_limit_in_bytes = <%= (memorytotalbytes.to_f * 0.75).to_i %>; + memory.limit_in_bytes = <%= (memorytotalbytes.to_f * 0.9).to_i %>; +<% if (operatingsystem == "Fedora") and (operatingsystemrelease == "18") then # Because of Red Hat bug 918951, swap management doesn't # work in Fedora 18 but should be fixed in 19. %> <% else %> - memory.memsw.limit_in_bytes = <%= (@memorytotalbytes.to_f * 0.9).to_i %>; + memory.memsw.limit_in_bytes = <%= (memorytotalbytes.to_f * 0.9).to_i %>; <% end %> } } From 74290001e338a23ecc97221a9a95de60acc452bb Mon Sep 17 00:00:00 2001 From: Khai Do Date: Tue, 29 Apr 2014 16:17:23 -0700 Subject: [PATCH 5/5] puppetize installation of gerrit third party plugins This change automates the installation of gerrit third party plugins. This does not include core plugins, which have already been automated. The first third party plugin that we automate is the javamelody plugin. Change-Id: I163353c2e9d59e4815b4544f983b54d68ede70a8 --- manifests/plugin.pp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/manifests/plugin.pp b/manifests/plugin.pp index f1b5f30..639df96 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -1,3 +1,16 @@ +# Copyright (C) 2014 R. Tyler Croy +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # # Defined resource type to install jenkins plugins. #