/[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 2110 - (hide annotations) (download)
Tue Dec 20 15:16:14 2011 UTC (12 years, 6 months ago) by boklm
File size: 3652 byte(s)
remove www_outage redirection and setup mageia website on champagne
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 2110 $vhost = "www.$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 boklm 2110 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 boklm 2100 package { ['php-mbstring', 'php-mcrypt', 'php-gettext']:
65     ensure => "installed",
66     }
67     }
68    
69 boklm 1583 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 boklm 1643
80     package { php-exif:
81     ensure => "installed",
82     }
83 boklm 1583 }
84    
85 boklm 1592 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 pterjan 1599 options => [ "FollowSymLinks" ]
91 boklm 1592 }
92 boklm 1607 apache::vhost_base { "ssl_releases.$domain":
93     vhost => "releases.$domain",
94     use_ssl => true,
95     location => $vhostdir,
96     options => [ "FollowSymLinks" ]
97     }
98 boklm 1592
99     subversion::snapshot { "$vhostdir":
100     source => $svn_location
101     }
102     }
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