From fcabaaae2c73c8062824004252af1773fe898228 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Fri, 10 Aug 2012 15:38:08 -0700 Subject: [PATCH] Add node definition for static.openstack.org. Add node definition for static.openstack.org and create first simple implementation of what the static.openstack.org host would look like. Change-Id: I04952154246c4985e7ff44909e892918a1336fba Reviewed-on: https://review.openstack.org/11193 Approved: Monty Taylor Reviewed-by: Monty Taylor Tested-by: Jenkins --- manifests/site.pp | 5 ++ modules/openstack_project/manifests/static.pp | 47 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 modules/openstack_project/manifests/static.pp diff --git a/manifests/site.pp b/manifests/site.pp index e24e6b75d0..756afa4db7 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -96,6 +96,11 @@ node 'puppet-dashboard.openstack.org' { } } +# A machine to serve static content. +node 'static.openstack.org' { + include openstack_project::static +} + # A bare machine, but with a jenkins user node /^.*\.template\.openstack\.org$/ { include openstack_project::slave_template diff --git a/modules/openstack_project/manifests/static.pp b/modules/openstack_project/manifests/static.pp new file mode 100644 index 0000000000..406b498f63 --- /dev/null +++ b/modules/openstack_project/manifests/static.pp @@ -0,0 +1,47 @@ +class openstack_project::static +{ + + class { 'openstack_project::server': + iptables_public_tcp_ports => [22, 80, 443] + } + + include apache + + apache::vhost { 'tarballs.openstack.org': + port => 80, + priority => '50', + docroot => '/srv/static/tarballs', + require => File['/srv/static/tarballs'], + } + + apache::vhost { 'ci.openstack.org': + port => 80, + priority => '50', + docroot => '/srv/static/ci', + require => File['/srv/static/ci'], + } + + apache::vhost { 'logs.openstack.org': + port => 80, + priority => '50', + docroot => '/srv/static/logs', + require => File['/srv/static/logs'], + } + + file { '/srv/static': + ensure => directory + } + + file { '/srv/static/tarballs': + ensure => directory + } + + file { '/srv/static/ci': + ensure => directory + } + + file { '/srv/static/logs': + ensure => directory + } + +}