Added nginx config for doc server.
Change-Id: I6552805a1b076625b435fbec0cfa697bbadb92db
This commit is contained in:
parent
78fcc9f89d
commit
82acbd34be
@ -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
|
||||
}
|
||||
|
38
modules/doc_server/manifests/init.pp
Normal file
38
modules/doc_server/manifests/init.pp
Normal 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": }
|
||||
}
|
15
modules/doc_server/manifests/site.pp
Normal file
15
modules/doc_server/manifests/site.pp
Normal 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],
|
||||
}
|
||||
}
|
11
modules/doc_server/templates/nginx.erb
Normal file
11
modules/doc_server/templates/nginx.erb
Normal 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 %>;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user