/[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 2106 - (hide annotations) (download)
Tue Dec 20 14:41:10 2011 UTC (12 years, 4 months ago) by boklm
File size: 3700 byte(s)
remove line added by error
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     subversion::snapshot { $vhostdir:
32     source => $svn_location
33     }
34    
35 boklm 2105 file { "$vhostdir/var/tmp/cache":
36     ensure => directory,
37     owner => root,
38     group => $apache::base::apache_group,
39     mode => 0660,
40     }
41    
42 boklm 2103 apache::vhost_base { "$vhost":
43 boklm 2100 content => template('websites/vhost_www.conf'),
44 boklm 2101 location => $vhostdir,
45 boklm 2102 options => ['FollowSymLinks'],
46 boklm 2100 }
47 boklm 2103 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 boklm 2100
55     package { ['php-mbstring', 'php-mcrypt', 'php-gettext']:
56     ensure => "installed",
57     }
58     }
59    
60 boklm 1583 class hugs inherits base {
61     $vhostdir = "$webdatadir/hugs.$domain"
62     $svn_location = "svn://svn.$domain/svn/web/hugs/public/"
63     apache::vhost_base { "hugs.$domain":
64     location => $vhostdir,
65     }
66    
67     subversion::snapshot { "$vhostdir":
68     source => $svn_location
69     }
70 boklm 1643
71     package { php-exif:
72     ensure => "installed",
73     }
74 boklm 1583 }
75    
76 boklm 1592 class releases inherits base {
77     $vhostdir = "$webdatadir/releases.$domain"
78     $svn_location = "svn://svn.$domain/svn/web/releases/"
79     apache::vhost_base { "releases.$domain":
80     location => $vhostdir,
81 pterjan 1599 options => [ "FollowSymLinks" ]
82 boklm 1592 }
83 boklm 1607 apache::vhost_base { "ssl_releases.$domain":
84     vhost => "releases.$domain",
85     use_ssl => true,
86     location => $vhostdir,
87     options => [ "FollowSymLinks" ]
88     }
89 boklm 1592
90     subversion::snapshot { "$vhostdir":
91     source => $svn_location
92     }
93     }
94    
95 boklm 2094 class www_outage {
96     apache::vhost_redirect { "www.$domain":
97     url => 'http://blog.mageia.org/en/2011/12/19/server-outage/#'
98     }
99 boklm 2096 apache::vhost_redirect { "$domain":
100     url => 'http://blog.mageia.org/en/2011/12/19/server-outage/#'
101     }
102 boklm 2094 }
103    
104 misc 955 class svn {
105     apache::vhost_redirect { "svn.$domain":
106     url => "http://svnweb.$domain/",
107     }
108     }
109 misc 1104
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 misc 1825
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 misc 656 }

  ViewVC Help
Powered by ViewVC 1.1.30