/[adm]/puppet/deployment/websites/manifests/init.pp
ViewVC logotype

Contents of /puppet/deployment/websites/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2110 - (show annotations) (download)
Tue Dec 20 15:16:14 2011 UTC (12 years, 4 months ago) by boklm
File size: 3652 byte(s)
remove www_outage redirection and setup mageia website on champagne
1 class websites {
2 class base {
3 $webdatadir = '/var/www/vhosts'
4 }
5
6 # vhost to host static files used by web sites
7 class static inherits base {
8 $vhostdir = "$webdatadir/static.$domain"
9 $svn_location = "svn://svn.$domain/svn/web/www/trunk/g/"
10 apache::vhost_other_app { "static.$domain":
11 vhost_file => 'websites/vhost_static.conf',
12 }
13
14 file { $vhostdir:
15 ensure => directory,
16 mode => 655,
17 }
18
19 subversion::snapshot { "$vhostdir/g":
20 source => $svn_location
21 }
22 }
23
24 class www inherits base {
25 include apache::mod_php
26 include apache::mod_geoip
27 $vhost = "www.$domain"
28 $vhostdir = "$webdatadir/www.$domain"
29 $svn_location = "svn://svn.$domain/svn/web/www/trunk"
30
31 subversion::snapshot { $vhostdir:
32 source => $svn_location
33 }
34
35 file { "$vhostdir/var/tmp/cache":
36 ensure => directory,
37 owner => root,
38 group => $apache::base::apache_group,
39 mode => 0660,
40 }
41
42 apache::vhost_base { "$vhost":
43 content => template('websites/vhost_www.conf'),
44 location => $vhostdir,
45 options => ['FollowSymLinks'],
46 }
47 apache::vhost_base { "ssl_$vhost":
48 use_ssl => true,
49 vhost => $vhost,
50 content => template('websites/vhost_www.conf'),
51 location => $vhostdir,
52 options => ['FollowSymLinks'],
53 }
54
55 apache::vhost_redirect { $domain:
56 url => 'http://www.mageia.org/',
57 }
58 apache::vhost_redirect { "ssl_$domain":
59 use_ssl => true,
60 vhost => $domain,
61 url => 'https://www.mageia.org/',
62 }
63
64 package { ['php-mbstring', 'php-mcrypt', 'php-gettext']:
65 ensure => "installed",
66 }
67 }
68
69 class hugs inherits base {
70 $vhostdir = "$webdatadir/hugs.$domain"
71 $svn_location = "svn://svn.$domain/svn/web/hugs/public/"
72 apache::vhost_base { "hugs.$domain":
73 location => $vhostdir,
74 }
75
76 subversion::snapshot { "$vhostdir":
77 source => $svn_location
78 }
79
80 package { php-exif:
81 ensure => "installed",
82 }
83 }
84
85 class releases inherits base {
86 $vhostdir = "$webdatadir/releases.$domain"
87 $svn_location = "svn://svn.$domain/svn/web/releases/"
88 apache::vhost_base { "releases.$domain":
89 location => $vhostdir,
90 options => [ "FollowSymLinks" ]
91 }
92 apache::vhost_base { "ssl_releases.$domain":
93 vhost => "releases.$domain",
94 use_ssl => true,
95 location => $vhostdir,
96 options => [ "FollowSymLinks" ]
97 }
98
99 subversion::snapshot { "$vhostdir":
100 source => $svn_location
101 }
102 }
103
104 class svn {
105 apache::vhost_redirect { "svn.$domain":
106 url => "http://svnweb.$domain/",
107 }
108 }
109
110 class forum_proxy {
111
112 $web_domain = "forums.$domain"
113 host { "$web_domain":
114 ip => '192.168.122.131',
115 ensure => 'present',
116 }
117
118 apache::vhost_reverse_proxy { "$web_domain":
119 url => "http://$web_domain/",
120 }
121
122 apache::vhost_reverse_proxy { "ssl_$web_domain":
123 vhost => $web_domain,
124 use_ssl => true,
125 url => "http://$web_domain/",
126 }
127 }
128
129 class pkgcpan inherits base {
130 $vhost = "pkgcpan.$domain"
131 $vhostdir = "$webdatadir/$vhost"
132
133 apache::vhost_base { "$vhost":
134 location => $vhostdir,
135 options => [ "Indexes" ]
136 }
137
138 file { $vhostdir:
139 ensure => directory,
140 }
141
142 package { "perl-Module-Packaged-Generator":
143 ensure => installed,
144 }
145
146 cron { "update cpanpkg":
147 hour => 23,
148 require => Package['perl-Module-Packaged-Generator'],
149 command => "pkgcpan -q -f $vhostdir/cpan_Mageia.db -d Mageia",
150 }
151 }
152 }

  ViewVC Help
Powered by ViewVC 1.1.30