Added nginx config for doc server.

Change-Id: I6552805a1b076625b435fbec0cfa697bbadb92db
This commit is contained in:
Monty Taylor 2011-07-31 09:56:32 -07:00
parent 78fcc9f89d
commit 82acbd34be
4 changed files with 66 additions and 22 deletions

View File

@ -1,27 +1,7 @@
import "openstack_ci_admins_users"
import "jenkins_slave"
import "doc_server"
node default {
include openstack_ci_admins_users
include jenkins_slave
package { "python-storm":
ensure => present
}
package { "python-mako":
ensure => present
}
package { "python-pychart":
ensure => present
}
package { "planet-venus":
ensure => present
}
package { "nginx":
ensure => present
}
include doc_server
}

View File

@ -0,0 +1,38 @@
import "jenkins_slave"
class doc_server {
include jenkins_slave
package { 'nginx':
ensure => present;
}
package { "python-storm":
ensure => present
}
package { "python-mako":
ensure => present
}
package { "python-pychart":
ensure => present
}
package { "planet-venus":
ensure => present
}
doc_server::site { "burrow": }
doc_server::site { "ci": }
doc_server::site { "keystone": }
doc_server::site { "glance": }
doc_server::site { "nova": }
doc_server::site { "swift": }
}

View File

@ -0,0 +1,15 @@
define doc_server::site {
file { "/etc/nginx/sites-available/${name}":
ensure => 'present',
content => template("doc_server/nginx.erb"),
replace => 'true',
require => Package[nginx],
}
file { "/etc/nginx/sites-enabled/${name}":
ensure => link,
target => "/etc/nginx/sites-available/${name}",
require => Package[nginx],
}
}

View File

@ -0,0 +1,11 @@
server {
listen 80;
server_name <%= name %>.openstack.org;
DocumentRoot /srv/docs/<%= name %>;
Location ^~ /docs/ {
alias /srv/docs/<%= name %>/trunk;
}
Location ^~ /tarballs/ {
alias /srv/tarballs/<%= name %>;
}
}