Merge "Refactor Dynamic tcp ports."

This commit is contained in:
Jenkins 2012-03-28 16:07:12 +00:00 committed by Gerrit Code Review
commit 52271d6546
2 changed files with 64 additions and 35 deletions

View File

@ -3,7 +3,7 @@ import "users"
# #
# Abstract classes: # Abstract classes:
# #
class openstack_base { class openstack_base ($iptables_public_tcp_ports) {
include openstack_project::users include openstack_project::users
include ssh include ssh
include snmpd include snmpd
@ -54,8 +54,10 @@ class openstack_cron {
} }
# A template host with no running services # A template host with no running services
class openstack_template { class openstack_template ($iptables_public_tcp_ports) {
include openstack_base class { 'openstack_base':
iptables_public_tcp_ports => $iptables_public_tcp_ports
}
realize ( realize (
User::Virtual::Localuser["mordred"], User::Virtual::Localuser["mordred"],
User::Virtual::Localuser["corvus"], User::Virtual::Localuser["corvus"],
@ -66,13 +68,17 @@ class openstack_template {
} }
# A server that we expect to run for some time # A server that we expect to run for some time
class openstack_server { class openstack_server ($iptables_public_tcp_ports) {
include openstack_template class { 'openstack_template':
iptables_public_tcp_ports => $iptables_public_tcp_ports
}
include openstack_cron include openstack_cron
} }
class openstack_jenkins_slave { class openstack_jenkins_slave {
include openstack_server class { 'openstack_server':
iptables_public_tcp_ports => []
}
class { 'jenkins_slave': class { 'jenkins_slave':
ssh_key => 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtioTW2wh3mBRuj+R0Jyb/mLt5sjJ8dEvYyA8zfur1dnqEt5uQNLacW4fHBDFWJoLHfhdfbvray5wWMAcIuGEiAA2WEH23YzgIbyArCSI+z7gB3SET8zgff25ukXlN+1mBSrKWxIza+tB3NU62WbtO6hmelwvSkZ3d7SDfHxrc4zEpmHDuMhxALl8e1idqYzNA+1EhZpbcaf720mX+KD3oszmY2lqD1OkKMquRSD0USXPGlH3HK11MTeCArKRHMgTdIlVeqvYH0v0Wd1w/8mbXgHxfGzMYS1Ej0fzzJ0PC5z5rOqsMqY1X2aC1KlHIFLAeSf4Cx0JNlSpYSrlZ/RoiQ== hudson@hudson' ssh_key => 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtioTW2wh3mBRuj+R0Jyb/mLt5sjJ8dEvYyA8zfur1dnqEt5uQNLacW4fHBDFWJoLHfhdfbvray5wWMAcIuGEiAA2WEH23YzgIbyArCSI+z7gB3SET8zgff25ukXlN+1mBSrKWxIza+tB3NU62WbtO6hmelwvSkZ3d7SDfHxrc4zEpmHDuMhxALl8e1idqYzNA+1EhZpbcaf720mX+KD3oszmY2lqD1OkKMquRSD0USXPGlH3HK11MTeCArKRHMgTdIlVeqvYH0v0Wd1w/8mbXgHxfGzMYS1Ej0fzzJ0PC5z5rOqsMqY1X2aC1KlHIFLAeSf4Cx0JNlSpYSrlZ/RoiQ== hudson@hudson'
} }
@ -83,15 +89,18 @@ class openstack_jenkins_slave {
# #
node default { node default {
include openstack_server class { 'openstack_server':
iptables_public_tcp_ports => []
}
} }
# #
# Long lived servers: # Long lived servers:
# #
node "gerrit.openstack.org" { node "gerrit.openstack.org" {
$iptables_public_tcp_ports = [80, 443, 29418] class { 'openstack_server':
include openstack_server iptables_public_tcp_ports => [80, 443, 29418]
}
class { 'gerrit': class { 'gerrit':
canonicalweburl => "https://review.openstack.org/", canonicalweburl => "https://review.openstack.org/",
email => "review@openstack.org", email => "review@openstack.org",
@ -176,8 +185,9 @@ node "gerrit.openstack.org" {
} }
node "gerrit-dev.openstack.org" { node "gerrit-dev.openstack.org" {
$iptables_public_tcp_ports = [80, 443, 29418] class { 'openstack_server':
include openstack_server iptables_public_tcp_ports => [80, 443, 29418]
}
class { 'gerrit': class { 'gerrit':
canonicalweburl => "https://review-dev.openstack.org/", canonicalweburl => "https://review-dev.openstack.org/",
@ -191,8 +201,9 @@ node "gerrit-dev.openstack.org" {
} }
node "jenkins.openstack.org" { node "jenkins.openstack.org" {
$iptables_public_tcp_ports = [80, 443, 4155] class { 'openstack_server':
include openstack_server iptables_public_tcp_ports => [80, 443, 4155]
}
class { 'jenkins_master': class { 'jenkins_master':
site => 'jenkins.openstack.org', site => 'jenkins.openstack.org',
serveradmin => 'webmaster@openstack.org', serveradmin => 'webmaster@openstack.org',
@ -201,16 +212,18 @@ node "jenkins.openstack.org" {
} }
node "jenkins-dev.openstack.org" { node "jenkins-dev.openstack.org" {
$iptables_public_tcp_ports = [80, 443, 4155] class { 'openstack_server':
include openstack_server iptables_public_tcp_ports => [80, 443, 4155]
}
class { 'jenkins_master': class { 'jenkins_master':
site => 'openstack' site => 'openstack'
} }
} }
node "community.openstack.org" { node "community.openstack.org" {
$iptables_public_tcp_ports = [80, 443, 8099, 8080] class { 'openstack_server':
include openstack_server iptables_public_tcp_ports => [80, 443, 8099, 8080]
}
realize ( realize (
User::Virtual::Localuser["smaffulli"], User::Virtual::Localuser["smaffulli"],
@ -218,13 +231,16 @@ node "community.openstack.org" {
} }
node "docs.openstack.org" { node "docs.openstack.org" {
include openstack_server class { 'openstack_server':
iptables_public_tcp_ports => []
}
include doc_server include doc_server
} }
node "paste.openstack.org" { node "paste.openstack.org" {
$iptables_public_tcp_ports = [80] class { 'openstack_server':
include openstack_server iptables_public_tcp_ports => [80]
}
include lodgeit include lodgeit
lodgeit::site { "openstack": lodgeit::site { "openstack":
port => "5000", port => "5000",
@ -238,8 +254,9 @@ node "paste.openstack.org" {
} }
node "planet.openstack.org" { node "planet.openstack.org" {
$iptables_public_tcp_ports = [80] class { 'openstack_server':
include openstack_server iptables_public_tcp_ports => [80]
}
include planet include planet
planet::site { "openstack": planet::site { "openstack":
@ -278,3 +295,4 @@ node /^oneiric.*\.slave\.openstack\.org$/ {
require => Package[python-pip], require => Package[python-pip],
} }
} }

View File

@ -3,7 +3,7 @@ import "users"
# #
# Abstract classes: # Abstract classes:
# #
class openstack_base { class openstack_base ($iptables_public_tcp_ports) {
include openstack_project::users include openstack_project::users
include ssh include ssh
include snmpd include snmpd
@ -45,8 +45,10 @@ class openstack_base {
} }
# A template host with no running services # A template host with no running services
class openstack_template { class openstack_template ($iptables_public_tcp_ports) {
include openstack_base class { 'openstack_base':
iptables_public_tcp_ports => $iptables_public_tcp_ports
}
realize ( realize (
User::Virtual::Localuser["mordred"], User::Virtual::Localuser["mordred"],
User::Virtual::Localuser["corvus"], User::Virtual::Localuser["corvus"],
@ -57,12 +59,16 @@ class openstack_template {
} }
# A server that we expect to run for some time # A server that we expect to run for some time
class openstack_server { class openstack_server ($iptables_public_tcp_ports) {
include openstack_template class { 'openstack_template':
iptables_public_tcp_ports => $iptables_public_tcp_ports
}
} }
class openstack_jenkins_slave { class openstack_jenkins_slave {
include openstack_server class { 'openstack_server':
iptables_public_tcp_ports => []
}
class { 'jenkins_slave': class { 'jenkins_slave':
ssh_key => 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCvlHx1TM9y6Y+oWJwPQP1jDejQYLA5MaTgD2oQOgQapSAWWU3f9/xcKKF4I5cC833xrSqFCqpstuWt5FdtO6qL5KMqGeVOwTCgcH0uGHciSF/zxBVpHp2n3rHLb0Fibyz/ys2kI+9J/hD0+GlVNQ/U8h9PZPMLFoJIZz5ep5WBszLM5z4vymBZ3GeytD8hk1BW0GLYi9vYWFrwoCTH6o6xRtdKajNE/9NcRGXjkY+SW7EGvqTAfLdsQ8q23MIO2ZX6YOpnmxAmR3OyNEOMo7Y/XCWjqTGWhQ669YaFxagS65f7EGCGwhhgQPtReDwkW88yTGhU3fZjS6Rc3BymTsnx jenkins@jenkins.stackforge.org' ssh_key => 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCvlHx1TM9y6Y+oWJwPQP1jDejQYLA5MaTgD2oQOgQapSAWWU3f9/xcKKF4I5cC833xrSqFCqpstuWt5FdtO6qL5KMqGeVOwTCgcH0uGHciSF/zxBVpHp2n3rHLb0Fibyz/ys2kI+9J/hD0+GlVNQ/U8h9PZPMLFoJIZz5ep5WBszLM5z4vymBZ3GeytD8hk1BW0GLYi9vYWFrwoCTH6o6xRtdKajNE/9NcRGXjkY+SW7EGvqTAfLdsQ8q23MIO2ZX6YOpnmxAmR3OyNEOMo7Y/XCWjqTGWhQ669YaFxagS65f7EGCGwhhgQPtReDwkW88yTGhU3fZjS6Rc3BymTsnx jenkins@jenkins.stackforge.org'
} }
@ -73,20 +79,24 @@ class openstack_jenkins_slave {
# #
node default { node default {
include openstack_server class { 'openstack_server':
iptables_public_tcp_ports => []
}
} }
# #
# Long lived servers: # Long lived servers:
# #
node "puppet.stackforge.org" { node "puppet.stackforge.org" {
$iptables_public_tcp_ports = [8140] class { 'openstack_server':
include openstack_server iptables_public_tcp_ports => [8140]
}
} }
node "review.stackforge.org" { node "review.stackforge.org" {
$iptables_public_tcp_ports = [80, 443, 29418] class { 'openstack_server':
include openstack_server iptables_public_tcp_ports => [80, 443, 29418]
}
class { 'gerrit': class { 'gerrit':
canonicalweburl => "https://review.stackforge.org/", canonicalweburl => "https://review.stackforge.org/",
email => "review@stackforge.org", email => "review@stackforge.org",
@ -102,8 +112,9 @@ node "review.stackforge.org" {
} }
node "jenkins.stackforge.org" { node "jenkins.stackforge.org" {
$iptables_public_tcp_ports = [80, 443, 4155] class { 'openstack_server':
include openstack_server iptables_public_tcp_ports => [80, 443, 4155]
}
class { 'jenkins_master': class { 'jenkins_master':
serveradmin => 'webmaster@stackforge.org', serveradmin => 'webmaster@stackforge.org',
site => 'jenkins.stackforge.org', site => 'jenkins.stackforge.org',