Added module for builddep. Do nova and swift build-deps.

Change-Id: Ia76920d01da1ea8946362aeb1c0ad3f6847213da
This commit is contained in:
Monty Taylor 2011-07-23 02:23:30 -04:00
parent 255d17904c
commit 3dea64b5c0
5 changed files with 61 additions and 4 deletions

15
manifests/nova.pp Normal file
View File

@ -0,0 +1,15 @@
import "openstack_ci_admins_users"
import "jenkins_slave"
node default {
include openstack_ci_admins_users
include jenkins_slave
apt::ppa { "ppa:nova-core/trunk":
ensure => present
}
apt::builddep { "nova":
ensure => present
}
}

15
manifests/swift.pp Normal file
View File

@ -0,0 +1,15 @@
import "openstack_ci_admins_users"
import "jenkins_slave"
node default {
include openstack_ci_admins_users
include jenkins_slave
apt::ppa { "ppa:swift-core/trunk":
ensure => present
}
apt::builddep { "swift":
ensure => present
}
}

View File

@ -0,0 +1,17 @@
define apt::builddep($ensure = present) {
case $ensure {
present: {
exec { "Install build-deps for $name":
path => "/bin:/usr/bin",
environment => "HOME=/root",
command => "apt-get -y --force-yes build-dep $name",
user => "root",
group => "root",
logoutput => on_failure,
}
}
default: {
fail "Invalid 'ensure' value '$ensure' for apt::builddep"
}
}
}

View File

@ -1,10 +1,10 @@
define ppa($ensure = present) {
define apt::ppa($ensure = present) {
case $ensure {
present: {
exec { "Add $name PPA":
path => "/bin:/usr/bin",
environment => "HOME=/root",
command => "add-apt-repository $name",
command => "add-apt-repository $name ; apt-get update",
user => "root",
group => "root",
logoutput => on_failure,
@ -14,7 +14,7 @@ define ppa($ensure = present) {
exec { "Add $name PPA":
path => "/bin:/usr/bin",
environment => "HOME=/root",
command => "add-apt-repository --remove $name",
command => "add-apt-repository --remove $name ; apt-get update",
user => "root",
group => "root",
logoutput => on_failure,

View File

@ -9,10 +9,15 @@ class jenkins_slave {
require => [ Package[git], Jenkinsuser[jenkins] ]
}
apt::ppa { "ppa:tarmac/ppa":
ensure => present,
}
cron { "updatepuppet":
user => root,
minute => "*/15",
command => "cd /root/openstack-ci-puppet && /usr/bin/git pull && /var/lib/gems/1.8/bin/puppet apply -l /tmp/manifest.log --modulepath=/root/openstack-ci-puppet/modules manifests/this.pp"
command => "cd /root/openstack-ci-puppet && /usr/bin/git pull && /var/lib/gems/1.8/bin/puppet apply -l /tmp/manifest.log --modulepath=/root/openstack-ci-puppet/modules manifests/this.pp",
require => [ Jenkinsuser[jenkins] ]
}
cron { "updateci":
@ -91,6 +96,11 @@ class jenkins_slave {
ensure => latest
}
package { "tarmac":
ensure => latest,
require => Apt::Ppa["ppa:tarmac/ppa"]
}
package { "python-pip":
ensure => latest,
require => Package[python-dev]