[Lsb-messages] /var/www/bzr/lsb/devel/puppet-lsb r89: Set up buildbot slaves.

Jeff Licquia licquia at linuxfoundation.org
Sat Jan 28 16:39:37 UTC 2012


------------------------------------------------------------
revno: 89
committer: Jeff Licquia <licquia at linuxfoundation.org>
branch nick: puppet-lsb
timestamp: Sat 2012-01-28 11:39:37 -0500
message:
  Set up buildbot slaves.
modified:
  modules/buildbot/manifests/slave.pp
  modules/sudo/files/sudoers/default-fedora
  modules/sudo/files/sudoers/default-sles11
  modules/user/manifests/virtual.pp
-------------- next part --------------
=== modified file 'modules/buildbot/manifests/slave.pp'
--- a/modules/buildbot/manifests/slave.pp	2012-01-28 15:43:16 +0000
+++ b/modules/buildbot/manifests/slave.pp	2012-01-28 16:39:37 +0000
@@ -1,5 +1,50 @@
 class buildbot::slave inherits buildbot {
 
+    # Here, we figure out what user and password to use to log into the
+    # master.  This differs per-architecture.
+
+    $masteruser = $architecture ? {
+        /^i386$/ => 'lfbuild-x86',
+    }
+
+    # XXX: need to set up secrets Puppet modules.
+    $masterpw = 'invalid'
+
+    # Which SDKs should we use for released and beta builds?
+
+    $releasedsdk = $architecture ? {
+        /^i386$/ => 'lsb-sdk-4.1.2-1.ia32.tar.gz',
+    }
+
+    $releasedsdkpath = 'bundles/released-4.1.0/sdk'
+
+    $betasdk = $releasedsdk
+
+    $betasdkpath = $releasedsdkpath
+
+    # Include required packages for builds here.  Some of these
+    # might be included from the base buildbot class; check init.pp
+    # for those.
+
+    include bzr
+
+    # XXX: make should be its own module, since it's used in a few
+    # places.
+    #package { 'make':
+    #    ensure => present,
+    #}
+
+    package { 'rpm-devel':
+        ensure => present,
+    }
+
+    # Set up the base infrastructure.    
+
+    file { "/opt/buildbot/lsb-slave":
+        ensure => directory,
+        owner  => 'buildbot',
+    }
+
     exec { "make-buildslave":
         command => "/opt/buildbot/bin/pip install buildbot-slave==$buildbotversion",
         cwd     => "/opt/buildbot",
@@ -8,6 +53,16 @@
         require => Exec["make-buildbot-virtualenv"],
     }
 
+    exec { "make-slave":
+        command => "/opt/buildbot/bin/buildslave create-slave --umask=022 /opt/buildbot/lsb-slave vm1.linuxbase.org $masteruser $masterpw",
+        cwd     => "/opt/buildbot",
+        creates => "/opt/buildbot/lsb-slave/buildbot.tac",
+        path    => [ "/bin", "/sbin", "/usr/bin", "/usr/sbin",
+                     "/usr/local/bin", "/opt/buildbot/bin" ],
+        user    => 'buildbot',
+        require => [ Exec["make-buildslave"], File["/opt/buildbot/lsb-slave"] ],
+    }
+
     file { "/usr/local/bin/reset-sdk":
         source => "puppet:///modules/buildbot/slavescripts/reset-sdk",
         mode   => 0755,
@@ -23,4 +78,32 @@
         mode   => 0755,
     }
 
+    exec { 'download-released-sdk':
+        command => "wget http://ftp.linuxbase.org/pub/lsb/$releasedsdkpath/$releasedsdk",
+        cwd     => '/opt/buildbot',
+        path    => [ '/bin', '/sbin', '/usr/bin', '/usr/sbin' ],
+        creates => "/opt/buildbot/$releasedsdk",
+        require => File['/opt/buildbot'],
+        notify  => File['/opt/buildbot/lsb-released-sdk.tar.gz'],
+    }
+
+    file { '/opt/buildbot/lsb-released-sdk.tar.gz':
+        ensure => link,
+        target => "/opt/buildbot/$releasedsdk",
+    }
+
+    exec { 'download-beta-sdk':
+        command => "wget http://ftp.linuxbase.org/pub/lsb/$betasdkpath/$betasdk",
+        cwd     => '/opt/buildbot',
+        path    => [ '/bin', '/sbin', '/usr/bin', '/usr/sbin' ],
+        creates => "/opt/buildbot/$betasdk",
+        require => File['/opt/buildbot'],
+        notify  => File['/opt/buildbot/lsb-beta-sdk.tar.gz'],
+    }
+
+    file { '/opt/buildbot/lsb-beta-sdk.tar.gz':
+        ensure => link,
+        target => "/opt/buildbot/$betasdk",
+    }
+
 }

=== modified file 'modules/sudo/files/sudoers/default-fedora'
--- a/modules/sudo/files/sudoers/default-fedora	2012-01-22 22:09:53 +0000
+++ b/modules/sudo/files/sudoers/default-fedora	2012-01-28 16:39:37 +0000
@@ -96,3 +96,7 @@
 
 ## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment)
 #includedir /etc/sudoers.d
+
+## Buildbot: allow the buildbot user to install packages
+buildbot ALL=NOPASSWD: /bin/rpm
+

=== modified file 'modules/sudo/files/sudoers/default-sles11'
--- a/modules/sudo/files/sudoers/default-sles11	2012-01-22 22:09:53 +0000
+++ b/modules/sudo/files/sudoers/default-sles11	2012-01-28 16:39:37 +0000
@@ -40,3 +40,7 @@
 # User privilege specification
 root	ALL = (ALL) ALL
 lfadmin	ALL = (ALL) ALL 
+
+# Buildbot: allow the buildbot user to install packages
+buildbot ALL=NOPASSWD: /bin/rpm
+

=== modified file 'modules/user/manifests/virtual.pp'
--- a/modules/user/manifests/virtual.pp	2012-01-28 13:56:23 +0000
+++ b/modules/user/manifests/virtual.pp	2012-01-28 16:39:37 +0000
@@ -4,6 +4,7 @@
 
     @user { 'buildbot':
         ensure      => present,
+        home        => '/opt/buildbot',
     }
 
     @user { 'lfadmin':



More information about the lsb-messages mailing list