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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30