diff --git a/manifests/site.pp b/manifests/site.pp
index d9823d3cd3..7c9feced1f 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -167,6 +167,12 @@ node "gerrit-dev.openstack.org" {
}
}
+node "jenkins.openstack.org" {
+ $iptables_public_tcp_ports = [80, 443]
+ include openstack_server
+ include jenkins_master
+}
+
node "community.openstack.org" {
$iptables_public_tcp_ports = [80, 443, 8099, 8080]
include openstack_server
@@ -198,3 +204,4 @@ node /^deploy.*.openstack\.org$/ {
include openstack_jenkins_slave
include orchestra
}
+
diff --git a/modules/jenkins_master/files/apache.conf b/modules/jenkins_master/files/apache.conf
new file mode 100644
index 0000000000..d2b6c32de9
--- /dev/null
+++ b/modules/jenkins_master/files/apache.conf
@@ -0,0 +1,47 @@
+
+ ServerAdmin webmaster@openstack.org
+
+ ErrorLog ${APACHE_LOG_DIR}/jenkins-error.log
+
+ # Possible values include: debug, info, notice, warn, error, crit,
+ # alert, emerg.
+ LogLevel warn
+
+ CustomLog ${APACHE_LOG_DIR}/jenkins-access.log combined
+
+ Redirect / https://jenkins.openstack.org/
+
+
+
+
+ ServerAdmin webmaster@openstack.org
+
+ ErrorLog ${APACHE_LOG_DIR}/jenkins-ssl-error.log
+
+ # Possible values include: debug, info, notice, warn, error, crit,
+ # alert, emerg.
+ LogLevel warn
+
+ CustomLog ${APACHE_LOG_DIR}/jenkins-ssl-access.log combined
+
+ # SSL Engine Switch:
+ # Enable/Disable SSL for this virtual host.
+ SSLEngine on
+
+ SSLCertificateFile /etc/ssl/certs/jenkins.openstack.org.pem
+ SSLCertificateKeyFile /etc/ssl/private/jenkins.openstack.org.key
+ SSLCertificateChainFile /etc/ssl/certs/intermediate.pem
+
+ BrowserMatch "MSIE [2-6]" \
+ nokeepalive ssl-unclean-shutdown \
+ downgrade-1.0 force-response-1.0
+ # MSIE 7 and newer should be able to use keepalive
+ BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
+
+ RewriteEngine on
+ RewriteCond %{HTTP_HOST} !jenkins.openstack.org
+ RewriteRule ^.*$ https://jenkins.openstack.org/
+
+ ProxyPass / http://127.0.0.1:8080/ retry=0
+ ProxyPassReverse / http://127.0.0.1:8080/
+
diff --git a/modules/jenkins_master/manifests/init.pp b/modules/jenkins_master/manifests/init.pp
new file mode 100644
index 0000000000..b148113476
--- /dev/null
+++ b/modules/jenkins_master/manifests/init.pp
@@ -0,0 +1,52 @@
+class jenkins_master {
+
+ file { '/etc/apt/sources.list.d/jenkins':
+ owner => 'root',
+ group => 'root',
+ mode => 444,
+ ensure => 'present',
+ content => "deb http://pkg.jenkins-ci.org/debian binary/",
+ replace => 'true',
+ }
+
+ file { '/etc/apache2/sites-available/jenkins':
+ owner => 'root',
+ group => 'root',
+ mode => 444,
+ ensure => 'present',
+ source => "puppet:///modules/jenkins_server/apache.conf",
+ replace => 'true',
+ require => Package['apache2'],
+ }
+
+ file { '/etc/apache2/sites-enabled/apache2':
+ target => '/etc/apache2/site-available/jenkins',
+ ensure => link,
+ require => File['/etc/apache2/sites-available/jenkins'],
+ }
+
+ $packages = [
+ jenkins,
+ apache2
+ ]
+
+ package { $packages:
+ ensure => "latest",
+ require => File['/etc/apt/sources.list.d/jenkins'],
+ }
+
+ exec { "update apt cache":
+ subscribe => [ File["/etc/apt/sources.list.d/jenkins"]],
+ refreshonly => true,
+ path => "/bin:/usr/bin",
+ command => "apt-get update",
+ }
+
+ exec { "gracefully restart apache":
+ subscribe => [ File["/etc/apache2/sites-available/jenkins"]],
+ refreshonly => true,
+ path => "/bin:/usr/bin:/usr/sbin",
+ command => "apache2ctl graceful",
+ }
+
+}