Refactor Dynamic tcp ports.
Change-Id: Id53f9960f0b7b5c27f3595fc6722a2a110aa88db
This commit is contained in:
parent
a4764467bd
commit
3f10f48f6f
@ -3,7 +3,7 @@ import "users"
|
||||
#
|
||||
# Abstract classes:
|
||||
#
|
||||
class openstack_base {
|
||||
class openstack_base ($iptables_public_tcp_ports) {
|
||||
include openstack_project::users
|
||||
include ssh
|
||||
include snmpd
|
||||
@ -50,8 +50,10 @@ class openstack_cron {
|
||||
}
|
||||
|
||||
# A template host with no running services
|
||||
class openstack_template {
|
||||
include openstack_base
|
||||
class openstack_template ($iptables_public_tcp_ports) {
|
||||
class { 'openstack_base':
|
||||
iptables_public_tcp_ports => $iptables_public_tcp_ports
|
||||
}
|
||||
realize (
|
||||
User::Virtual::Localuser["mordred"],
|
||||
User::Virtual::Localuser["corvus"],
|
||||
@ -62,13 +64,17 @@ class openstack_template {
|
||||
}
|
||||
|
||||
# A server that we expect to run for some time
|
||||
class openstack_server {
|
||||
include openstack_template
|
||||
class openstack_server ($iptables_public_tcp_ports) {
|
||||
class { 'openstack_template':
|
||||
iptables_public_tcp_ports => $iptables_public_tcp_ports
|
||||
}
|
||||
include openstack_cron
|
||||
}
|
||||
|
||||
class openstack_jenkins_slave {
|
||||
include openstack_server
|
||||
class { 'openstack_server':
|
||||
iptables_public_tcp_ports => []
|
||||
}
|
||||
class { 'jenkins_slave':
|
||||
ssh_key => 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtioTW2wh3mBRuj+R0Jyb/mLt5sjJ8dEvYyA8zfur1dnqEt5uQNLacW4fHBDFWJoLHfhdfbvray5wWMAcIuGEiAA2WEH23YzgIbyArCSI+z7gB3SET8zgff25ukXlN+1mBSrKWxIza+tB3NU62WbtO6hmelwvSkZ3d7SDfHxrc4zEpmHDuMhxALl8e1idqYzNA+1EhZpbcaf720mX+KD3oszmY2lqD1OkKMquRSD0USXPGlH3HK11MTeCArKRHMgTdIlVeqvYH0v0Wd1w/8mbXgHxfGzMYS1Ej0fzzJ0PC5z5rOqsMqY1X2aC1KlHIFLAeSf4Cx0JNlSpYSrlZ/RoiQ== hudson@hudson'
|
||||
}
|
||||
@ -79,15 +85,18 @@ class openstack_jenkins_slave {
|
||||
#
|
||||
|
||||
node default {
|
||||
include openstack_server
|
||||
class { 'openstack_server':
|
||||
iptables_public_tcp_ports => []
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Long lived servers:
|
||||
#
|
||||
node "gerrit.openstack.org" {
|
||||
$iptables_public_tcp_ports = [80, 443, 29418]
|
||||
include openstack_server
|
||||
class { 'openstack_server':
|
||||
iptables_public_tcp_ports => [80, 443, 29418]
|
||||
}
|
||||
class { 'gerrit':
|
||||
canonicalweburl => "https://review.openstack.org/",
|
||||
email => "review@openstack.org",
|
||||
@ -172,8 +181,9 @@ node "gerrit.openstack.org" {
|
||||
}
|
||||
|
||||
node "gerrit-dev.openstack.org" {
|
||||
$iptables_public_tcp_ports = [80, 443, 29418]
|
||||
include openstack_server
|
||||
class { 'openstack_server':
|
||||
iptables_public_tcp_ports => [80, 443, 29418]
|
||||
}
|
||||
|
||||
class { 'gerrit':
|
||||
canonicalweburl => "https://review-dev.openstack.org/",
|
||||
@ -187,8 +197,9 @@ node "gerrit-dev.openstack.org" {
|
||||
}
|
||||
|
||||
node "jenkins.openstack.org" {
|
||||
$iptables_public_tcp_ports = [80, 443, 4155]
|
||||
include openstack_server
|
||||
class { 'openstack_server':
|
||||
iptables_public_tcp_ports => [80, 443, 4155]
|
||||
}
|
||||
class { 'jenkins_master':
|
||||
site => 'jenkins.openstack.org',
|
||||
serveradmin => 'webmaster@openstack.org',
|
||||
@ -197,16 +208,18 @@ node "jenkins.openstack.org" {
|
||||
}
|
||||
|
||||
node "jenkins-dev.openstack.org" {
|
||||
$iptables_public_tcp_ports = [80, 443, 4155]
|
||||
include openstack_server
|
||||
class { 'openstack_server':
|
||||
iptables_public_tcp_ports => [80, 443, 4155]
|
||||
}
|
||||
class { 'jenkins_master':
|
||||
site => 'openstack'
|
||||
}
|
||||
}
|
||||
|
||||
node "community.openstack.org" {
|
||||
$iptables_public_tcp_ports = [80, 443, 8099, 8080]
|
||||
include openstack_server
|
||||
class { 'openstack_server':
|
||||
iptables_public_tcp_ports => [80, 443, 8099, 8080]
|
||||
}
|
||||
|
||||
realize (
|
||||
User::Virtual::Localuser["smaffulli"],
|
||||
@ -214,13 +227,16 @@ node "community.openstack.org" {
|
||||
}
|
||||
|
||||
node "docs.openstack.org" {
|
||||
include openstack_server
|
||||
class { 'openstack_server':
|
||||
iptables_public_tcp_ports => []
|
||||
}
|
||||
include doc_server
|
||||
}
|
||||
|
||||
node "paste.openstack.org" {
|
||||
$iptables_public_tcp_ports = [80]
|
||||
include openstack_server
|
||||
class { 'openstack_server':
|
||||
iptables_public_tcp_ports => [80]
|
||||
}
|
||||
include lodgeit
|
||||
lodgeit::site { "openstack":
|
||||
port => "5000",
|
||||
@ -234,8 +250,9 @@ node "paste.openstack.org" {
|
||||
}
|
||||
|
||||
node "planet.openstack.org" {
|
||||
$iptables_public_tcp_ports = [80]
|
||||
include openstack_server
|
||||
class { 'openstack_server':
|
||||
iptables_public_tcp_ports => [80]
|
||||
}
|
||||
include planet
|
||||
|
||||
planet::site { "openstack":
|
||||
@ -274,3 +291,4 @@ node /^oneiric.*\.slave\.openstack\.org$/ {
|
||||
require => Package[python-pip],
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@ import "users"
|
||||
#
|
||||
# Abstract classes:
|
||||
#
|
||||
class openstack_base {
|
||||
class openstack_base ($iptables_public_tcp_ports) {
|
||||
include openstack_project::users
|
||||
include ssh
|
||||
include snmpd
|
||||
@ -41,8 +41,10 @@ class openstack_base {
|
||||
}
|
||||
|
||||
# A template host with no running services
|
||||
class openstack_template {
|
||||
include openstack_base
|
||||
class openstack_template ($iptables_public_tcp_ports) {
|
||||
class { 'openstack_base':
|
||||
iptables_public_tcp_ports => $iptables_public_tcp_ports
|
||||
}
|
||||
realize (
|
||||
User::Virtual::Localuser["mordred"],
|
||||
User::Virtual::Localuser["corvus"],
|
||||
@ -53,12 +55,16 @@ class openstack_template {
|
||||
}
|
||||
|
||||
# A server that we expect to run for some time
|
||||
class openstack_server {
|
||||
include openstack_template
|
||||
class openstack_server ($iptables_public_tcp_ports) {
|
||||
class { 'openstack_template':
|
||||
iptables_public_tcp_ports => $iptables_public_tcp_ports
|
||||
}
|
||||
}
|
||||
|
||||
class openstack_jenkins_slave {
|
||||
include openstack_server
|
||||
class { 'openstack_server':
|
||||
iptables_public_tcp_ports => []
|
||||
}
|
||||
class { 'jenkins_slave':
|
||||
ssh_key => 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCvlHx1TM9y6Y+oWJwPQP1jDejQYLA5MaTgD2oQOgQapSAWWU3f9/xcKKF4I5cC833xrSqFCqpstuWt5FdtO6qL5KMqGeVOwTCgcH0uGHciSF/zxBVpHp2n3rHLb0Fibyz/ys2kI+9J/hD0+GlVNQ/U8h9PZPMLFoJIZz5ep5WBszLM5z4vymBZ3GeytD8hk1BW0GLYi9vYWFrwoCTH6o6xRtdKajNE/9NcRGXjkY+SW7EGvqTAfLdsQ8q23MIO2ZX6YOpnmxAmR3OyNEOMo7Y/XCWjqTGWhQ669YaFxagS65f7EGCGwhhgQPtReDwkW88yTGhU3fZjS6Rc3BymTsnx jenkins@jenkins.stackforge.org'
|
||||
}
|
||||
@ -69,20 +75,24 @@ class openstack_jenkins_slave {
|
||||
#
|
||||
|
||||
node default {
|
||||
include openstack_server
|
||||
class { 'openstack_server':
|
||||
iptables_public_tcp_ports => []
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Long lived servers:
|
||||
#
|
||||
node "puppet.stackforge.org" {
|
||||
$iptables_public_tcp_ports = [8140]
|
||||
include openstack_server
|
||||
class { 'openstack_server':
|
||||
iptables_public_tcp_ports => [8140]
|
||||
}
|
||||
}
|
||||
|
||||
node "review.stackforge.org" {
|
||||
$iptables_public_tcp_ports = [80, 443, 29418]
|
||||
include openstack_server
|
||||
class { 'openstack_server':
|
||||
iptables_public_tcp_ports => [80, 443, 29418]
|
||||
}
|
||||
class { 'gerrit':
|
||||
canonicalweburl => "https://review.stackforge.org/",
|
||||
email => "review@stackforge.org",
|
||||
@ -95,8 +105,9 @@ node "review.stackforge.org" {
|
||||
}
|
||||
|
||||
node "jenkins.stackforge.org" {
|
||||
$iptables_public_tcp_ports = [80, 443, 4155]
|
||||
include openstack_server
|
||||
class { 'openstack_server':
|
||||
iptables_public_tcp_ports => [80, 443, 4155]
|
||||
}
|
||||
class { 'jenkins_master':
|
||||
serveradmin => 'webmaster@stackforge.org',
|
||||
site => 'jenkins.stackforge.org',
|
||||
|
Loading…
Reference in New Issue
Block a user