Move all node configuration into site.pp, with node identifiers based

on hostnames so that puppet self-identifies which node config to use.

Refactor class hierarchy for OpenStack slaves and servers.

Add NTP to all systems.

Change-Id: Ie7695768fcdebb744a86b3dc88bc0ea71297f978
This commit is contained in:
James E. Blair 2011-08-02 12:58:08 -07:00
parent 4422664a01
commit ff8069ae51
14 changed files with 169 additions and 242 deletions

View File

@ -1,11 +0,0 @@
import "openstack_ci_admins_users"
import "jenkins_slave"
node default {
include openstack_ci_admins_users
include jenkins_slave
package { "python-eventlet":
ensure => latest
}
}

View File

@ -1,11 +0,0 @@
import "openstack_ci_admins_users"
import "jenkins_slave"
node default {
include openstack_ci_admins_users
include jenkins_slave
package { "maven2":
ensure => latest
}
}

View File

@ -1,11 +0,0 @@
import "openstack_ci_admins_users"
import "jenkins_slave"
node default {
include openstack_ci_admins_users
include jenkins_slave
package { "python-virtualenv":
ensure => present
}
}

View File

@ -1,7 +0,0 @@
import "openstack_ci_admins_users"
import "doc_server"
node default {
include openstack_ci_admins_users
include doc_server
}

View File

@ -1,81 +0,0 @@
import "openstack_ci_admins_users"
import "jenkins_slave"
node default {
include openstack_ci_admins_users
include jenkins_slave
apt::ppa { "ppa:glance-core/trunk":
ensure => present
}
apt::builddep { "glance":
ensure => present,
require => Apt::Ppa["ppa:glance-core/trunk"]
}
package { "python-argparse":
ensure => latest
}
package { "python-decorator":
ensure => latest
}
package { "python-eventlet":
ensure => latest
}
package { "python-formencode":
ensure => latest
}
package { "python-greenlet":
ensure => latest
}
package { "python-migrate":
ensure => latest
}
package { "python-mox":
ensure => latest
}
package { "python-netifaces":
ensure => latest
}
package { "python-openid":
ensure => latest
}
package { "python-openssl":
ensure => latest
}
package { "python-paste":
ensure => latest
}
package { "python-pastedeploy":
ensure => latest
}
package { "python-pastescript":
ensure => latest
}
package { "python-routes":
ensure => latest
}
package { "python-scgi":
ensure => latest
}
package { "python-sqlalchemy":
ensure => latest
}
package { "python-sqlalchemy-ext":
ensure => latest
}
package { "python-swift":
ensure => latest
}
package { "python-tempita":
ensure => latest
}
package { "python-webob":
ensure => latest
}
package { "python-xattr":
ensure => latest
}
}

View File

@ -1,7 +0,0 @@
import "openstack_ci_admins_users"
import "jenkins_slave"
node default {
include openstack_ci_admins_users
include jenkins_slave
}

View File

@ -1,27 +0,0 @@
import "openstack_ci_admins_users"
import "jenkins_slave"
node default {
include openstack_ci_admins_users
include jenkins_slave
package { "build-essential":
ensure => latest
}
package { "libcurl4-gnutls-dev":
ensure => latest
}
package { "libtool":
ensure => latest
}
package { "autoconf":
ensure => latest
}
package { "automake":
ensure => latest
}
}

View File

@ -1,11 +0,0 @@
import "openstack_ci_admins_users"
import "jenkins_slave"
node default {
include openstack_ci_admins_users
include jenkins_slave
package { "maven2":
ensure => latest
}
}

View File

@ -1,16 +0,0 @@
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,
require => Apt::Ppa["ppa:nova-core/trunk"]
}
}

View File

@ -1,7 +0,0 @@
import "openstack_ci_admins_users"
import "jenkins_slave"
node default {
include openstack_ci_admins_users
include jenkins_slave
}

View File

@ -1,30 +0,0 @@
import "openstack_admins_users"
node default {
include openstack_admins_users
include ssh
package { "python-software-properties":
ensure => latest
}
package { "puppet":
ensure => latest
}
package { "bzr":
ensure => latest
}
package { "git":
ensure => latest
}
package { "python-setuptools":
ensure => latest
}
package { "byobu":
ensure => latest
}
}

169
manifests/site.pp Normal file
View File

@ -0,0 +1,169 @@
import "openstack_admins_users" #TODO: refactor
import "openstack_ci_admins_users" #TODO: refactor
import "doc_server" # TODO: refactor out of module
#
# Abstract classes:
#
class openstack_base {
include ssh
package { "ntp":
ensure => installed
}
service { 'ntpd':
name => 'ntp',
ensure => running,
enable => true,
hasrestart => true,
require => Package['ntp'],
}
$packages = ["python-software-properties",
"puppet",
"bzr",
"git",
"python-setuptools",
"byobu"]
package { $packages: ensure => "latest" }
}
class openstack_server {
include openstack_base
include openstack_admins_users
}
class openstack_jenkins_slave {
include openstack_base
include openstack_ci_admins_users
include jenkins_slave
}
#
# Long lived servers:
#
node "gerrit.openstack.org", "gerrit-dev.openstack.org" {
include openstack_server
}
node "docs.openstack.org" {
include openstack_server
include doc_server
}
#
# Jenkins slaves:
#
node /^burrow-java(-\d+)?\.slave\.openstack\.org$/ {
include openstack_jenkins_slave
package { "maven2":
ensure => latest
}
}
node /^burrow(-\d+)?\.slave\.openstack\.org$/ {
include openstack_jenkins_slave
package { "python-eventlet":
ensure => latest
}
}
node /^libburrow(-\d+)?\.slave\.openstack\.org$/ {
include openstack_jenkins_slave
$slave_packages = ["build-essential",
"libcurl4-gnutls-dev",
"libtool",
"autoconf",
"automake"]
package { $slave_packages: ensure => "latest" }
}
node /^dashboard(-\d+)?\.slave\.openstack\.org$/ {
include openstack_jenkins_slave
package { "python-virtualenv":
ensure => present
}
}
node /^glance(-\d+)?\.slave\.openstack\.org$/ {
include openstack_jenkins_slave
apt::ppa { "ppa:glance-core/trunk":
ensure => present
}
apt::builddep { "glance":
ensure => present,
require => Apt::Ppa["ppa:glance-core/trunk"]
}
$slave_packages = ["python-argparse",
"python-decorator",
"python-eventlet",
"python-formencode",
"python-greenlet",
"python-migrate",
"python-mox",
"python-netifaces",
"python-openid",
"python-openssl",
"python-paste",
"python-pastedeploy",
"python-pastescript",
"python-routes",
"python-scgi",
"python-sqlalchemy",
"python-sqlalchemy-ext",
"python-swift",
"python-tempita",
"python-webob",
"python-xattr"]
package { $slave_packages: ensure => "latest" }
}
node /^keystone(-\d+)?\.slave\.openstack\.org$/ {
include openstack_jenkins_slave
}
node /^manuals(-\d+)?\.slave\.openstack\.org$/ {
include openstack_jenkins_slave
package { "maven2":
ensure => latest
}
}
node /^nova(-\d+)?\.slave\.openstack\.org$/ {
include openstack_jenkins_slave
apt::ppa { "ppa:nova-core/trunk":
ensure => present
}
apt::builddep { "nova":
ensure => present,
require => Apt::Ppa["ppa:nova-core/trunk"]
}
}
node /^openstack-ci(-\d+)?\.slave\.openstack\.org$/ {
include openstack_jenkins_slave
}
node /^swift(-\d+)?\.slave\.openstack\.org$/ {
include openstack_jenkins_slave
apt::ppa { "ppa:swift-core/trunk":
ensure => present
}
apt::builddep { "swift":
ensure => present,
require => Apt::Ppa["ppa:swift-core/trunk"]
}
}

View File

@ -1,7 +0,0 @@
import "openstack_ci_admins_users"
import "jenkins_slave"
node default {
include openstack_ci_admins_users
include jenkins_slave
}

View File

@ -1,16 +0,0 @@
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,
require => Apt::Ppa["ppa:swift-core/trunk"]
}
}