aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/websites/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'deployment/websites/manifests')
-rw-r--r--deployment/websites/manifests/archives.pp20
-rw-r--r--deployment/websites/manifests/base.pp9
-rw-r--r--deployment/websites/manifests/doc.pp20
-rw-r--r--deployment/websites/manifests/forum_proxy.pp10
-rw-r--r--deployment/websites/manifests/git.pp10
-rw-r--r--deployment/websites/manifests/hugs.pp10
-rw-r--r--deployment/websites/manifests/init.pp6
-rw-r--r--deployment/websites/manifests/meetbot.pp14
-rw-r--r--deployment/websites/manifests/nav.pp27
-rw-r--r--deployment/websites/manifests/perl.pp54
-rw-r--r--deployment/websites/manifests/pkgcpan.pp37
-rw-r--r--deployment/websites/manifests/releases.pp34
-rw-r--r--deployment/websites/manifests/start.pp11
-rw-r--r--deployment/websites/manifests/static.pp8
-rw-r--r--deployment/websites/manifests/svn.pp13
-rw-r--r--deployment/websites/manifests/www.pp111
16 files changed, 267 insertions, 127 deletions
diff --git a/deployment/websites/manifests/archives.pp b/deployment/websites/manifests/archives.pp
new file mode 100644
index 00000000..825e082b
--- /dev/null
+++ b/deployment/websites/manifests/archives.pp
@@ -0,0 +1,20 @@
+class websites::archives {
+ include websites::base
+ $vhost = "archives.${::domain}"
+ $vhostdir = "${websites::base::webdatadir}/${vhost}"
+ $git_location = "git://git.${::domain}/web/archives"
+
+ apache::vhost::base { $vhost:
+ location => $vhostdir,
+ }
+
+ apache::vhost::base { "ssl_${vhost}":
+ vhost => $vhost,
+ use_ssl => true,
+ location => $vhostdir,
+ }
+
+ git::snapshot { $vhostdir:
+ source => $git_location,
+ }
+}
diff --git a/deployment/websites/manifests/base.pp b/deployment/websites/manifests/base.pp
new file mode 100644
index 00000000..1c2dbc64
--- /dev/null
+++ b/deployment/websites/manifests/base.pp
@@ -0,0 +1,9 @@
+class websites::base {
+ $webdatadir = '/var/www/vhosts'
+ file { $webdatadir:
+ ensure => directory,
+ mode => '0755',
+ owner => root,
+ group => root
+ }
+}
diff --git a/deployment/websites/manifests/doc.pp b/deployment/websites/manifests/doc.pp
new file mode 100644
index 00000000..01474af2
--- /dev/null
+++ b/deployment/websites/manifests/doc.pp
@@ -0,0 +1,20 @@
+class websites::doc {
+ include websites::base
+ $vhost = "doc.${::domain}"
+ $vhostdir = "${websites::base::webdatadir}/${vhost}"
+ $git_location = "git://git.${::domain}/web/doc"
+
+ apache::vhost::base { $vhost:
+ location => $vhostdir,
+ }
+
+ apache::vhost::base { "ssl_${vhost}":
+ vhost => $vhost,
+ use_ssl => true,
+ location => $vhostdir,
+ }
+
+ git::snapshot { $vhostdir:
+ source => $git_location,
+ }
+}
diff --git a/deployment/websites/manifests/forum_proxy.pp b/deployment/websites/manifests/forum_proxy.pp
index 5048b219..bd8f1fc1 100644
--- a/deployment/websites/manifests/forum_proxy.pp
+++ b/deployment/websites/manifests/forum_proxy.pp
@@ -1,13 +1,13 @@
class websites::forum_proxy {
- $web_domain = "forums.$::domain"
+ $web_domain = "forums.${::domain}"
- apache::vhost_reverse_proxy { $web_domain:
- url => "http://$web_domain/",
+ apache::vhost::reverse_proxy { $web_domain:
+ url => "http://${web_domain}/",
}
- apache::vhost_reverse_proxy { "ssl_$web_domain":
+ apache::vhost::reverse_proxy { "ssl_${web_domain}":
vhost => $web_domain,
use_ssl => true,
- url => "http://$web_domain/",
+ url => "http://${web_domain}/",
}
}
diff --git a/deployment/websites/manifests/git.pp b/deployment/websites/manifests/git.pp
new file mode 100644
index 00000000..e357dfb2
--- /dev/null
+++ b/deployment/websites/manifests/git.pp
@@ -0,0 +1,10 @@
+class websites::git {
+ apache::vhost_redirect { "git.${::domain}":
+ url => "https://gitweb.${::domain}/",
+ }
+ apache::vhost_redirect { "ssl_git.${::domain}":
+ use_ssl => true,
+ vhost => "git.${::domain}",
+ url => "https://gitweb.${::domain}/",
+ }
+}
diff --git a/deployment/websites/manifests/hugs.pp b/deployment/websites/manifests/hugs.pp
index 472066c7..95246464 100644
--- a/deployment/websites/manifests/hugs.pp
+++ b/deployment/websites/manifests/hugs.pp
@@ -1,15 +1,15 @@
class websites::hugs {
include websites::base
- $vhostdir = "$websites::base::webdatadir/hugs.$::domain"
- $svn_location = "svn://svn.$::domain/svn/web/hugs/public/"
+ $vhostdir = "${websites::base::webdatadir}/hugs.${::domain}"
+ $git_location = "git://git.${::domain}/web/hugs"
- apache::vhost_base { "hugs.$::domain":
+ apache::vhost::base { "hugs.${::domain}":
location => $vhostdir,
}
- subversion::snapshot { $vhostdir:
- source => $svn_location
+ git::snapshot { $vhostdir:
+ source => $git_location
}
package { 'php-exif': }
diff --git a/deployment/websites/manifests/init.pp b/deployment/websites/manifests/init.pp
index 5996326b..afc63997 100644
--- a/deployment/websites/manifests/init.pp
+++ b/deployment/websites/manifests/init.pp
@@ -1,5 +1 @@
-class websites {
- class base {
- $webdatadir = '/var/www/vhosts'
- }
-}
+class websites { }
diff --git a/deployment/websites/manifests/meetbot.pp b/deployment/websites/manifests/meetbot.pp
new file mode 100644
index 00000000..04bbcf70
--- /dev/null
+++ b/deployment/websites/manifests/meetbot.pp
@@ -0,0 +1,14 @@
+# We should rather have a meetbot module used to deploy
+# it, setup backups and this website
+class websites::meetbot {
+ $vhost = "meetbot.${::domain}"
+ $vhostdir = "/home/irc_bots/meetings/"
+
+ apache::vhost::other_app { "meetbot.${::domain}":
+ vhost_file => 'websites/vhost_meetbot.conf',
+ }
+
+ file { $vhostdir:
+ ensure => directory,
+ }
+}
diff --git a/deployment/websites/manifests/nav.pp b/deployment/websites/manifests/nav.pp
new file mode 100644
index 00000000..84323c26
--- /dev/null
+++ b/deployment/websites/manifests/nav.pp
@@ -0,0 +1,27 @@
+class websites::nav {
+ include websites::base
+ $vhost = "nav.${::domain}"
+ $vhostdir = "${websites::base::webdatadir}/${vhost}"
+ $git_location = "git://git.${::domain}/web/nav"
+
+ apache::vhost::base { $vhost:
+ location => $vhostdir,
+ }
+
+ apache::vhost::base { "ssl_${vhost}":
+ vhost => $vhost,
+ use_ssl => true,
+ location => $vhostdir,
+ }
+
+ git::snapshot { $vhostdir:
+ source => $git_location,
+ }
+
+ file { "${vhostdir}/var/tmp/cache":
+ ensure => directory,
+ mode => '0660',
+ group => $apache::var::apache_group,
+ require => Git::Snapshot[$vhostdir],
+ }
+}
diff --git a/deployment/websites/manifests/perl.pp b/deployment/websites/manifests/perl.pp
new file mode 100644
index 00000000..2b4849fb
--- /dev/null
+++ b/deployment/websites/manifests/perl.pp
@@ -0,0 +1,54 @@
+class websites::perl {
+ include websites::base
+ $vhost = "perl.${::domain}"
+ $vhostdir = "${websites::base::webdatadir}/${vhost}"
+ $statsdir = "${vhostdir}/stats"
+ $login = 'pkgcpan'
+ $homedir = "/var/lib/${login}"
+
+ user { $login:
+ managehome => true,
+ home => $homedir,
+ }
+
+ apache::vhost::base { $vhost:
+ location => $vhostdir,
+ options => [ 'Indexes' ],
+ }
+
+ file { $vhostdir:
+ ensure => directory,
+ owner => $login,
+ group => $login,
+ }
+
+ package { ['perl-Module-Packaged-Generator', 'magpie']: }
+
+ cron { 'update cpanpkg':
+ hour => 23,
+ minute => 0,
+ require => Package['perl-Module-Packaged-Generator'],
+ command => "pkgcpan -q -f ${vhostdir}/cpan_Mageia.db -d Mageia && chmod 644 ${vhostdir}/cpan_Mageia.db",
+ user => $login,
+ }
+
+ file { "${vhostdir}/cpan_Mageia.db":
+ owner => $login,
+ group => $login,
+ }
+
+ file { $statsdir:
+ ensure => directory,
+ owner => $login,
+ group => $login,
+ }
+
+ # https://www.mageia.org/pipermail/mageia-sysadm/2012-March/004337.html
+ cron { 'update pkgcpan stats':
+ hour => 23,
+ minute => 30,
+ require => [ Package['magpie'], File[$statsdir] ],
+ command => "magpie webstatic -qq -d ${statsdir}",
+ user => $login,
+ }
+}
diff --git a/deployment/websites/manifests/pkgcpan.pp b/deployment/websites/manifests/pkgcpan.pp
deleted file mode 100644
index 592ea92b..00000000
--- a/deployment/websites/manifests/pkgcpan.pp
+++ /dev/null
@@ -1,37 +0,0 @@
-class websites::pkgcpan {
- include websites::base
- $vhost = "pkgcpan.$::domain"
- $vhostdir = "$websites::base::webdatadir/$vhost"
- $login = 'pkgcpan'
- $homedir = "/var/lib/$login"
-
- user { $login:
- managehome => true,
- home => $homedir,
- }
-
- apache::vhost_base { $vhost:
- location => $vhostdir,
- options => [ 'Indexes' ],
- }
-
- file { $vhostdir:
- ensure => directory,
- owner => $login,
- group => $login,
- }
-
- package { 'perl-Module-Packaged-Generator': }
-
- cron { 'update cpanpkg':
- hour => 23,
- require => Package['perl-Module-Packaged-Generator'],
- command => "pkgcpan -q -f $vhostdir/cpan_Mageia.db -d Mageia",
- user => $login,
- }
-
- file { "$vhostdir/cpan_Mageia.db":
- owner => $login,
- group => $login,
- }
-}
diff --git a/deployment/websites/manifests/releases.pp b/deployment/websites/manifests/releases.pp
index 4cb88d67..2b25c8ec 100644
--- a/deployment/websites/manifests/releases.pp
+++ b/deployment/websites/manifests/releases.pp
@@ -1,22 +1,22 @@
-class websites {
- class releases inherits base {
- $vhostdir = "$webdatadir/releases.$domain"
- $svn_location = "svn://svn.$domain/svn/web/releases/"
+class websites::releases {
+ include websites::base
+ $vhost = "releases.${::domain}"
+ $vhostdir = "${websites::base::webdatadir}/${vhost}"
+ $git_location = "git://git.${::domain}/web/releases"
- apache::vhost_base { "releases.$domain":
- location => $vhostdir,
- options => [ "FollowSymLinks" ],
- }
+ apache::vhost::base { $vhost:
+ location => $vhostdir,
+ options => [ 'FollowSymLinks' ],
+ }
- apache::vhost_base { "ssl_releases.$domain":
- vhost => "releases.$domain",
- use_ssl => true,
- location => $vhostdir,
- options => [ "FollowSymLinks" ],
- }
+ apache::vhost::base { "ssl_${vhost}":
+ vhost => $vhost,
+ use_ssl => true,
+ location => $vhostdir,
+ options => [ 'FollowSymLinks' ],
+ }
- subversion::snapshot { "$vhostdir":
- source => $svn_location,
- }
+ git::snapshot { $vhostdir:
+ source => $git_location,
}
}
diff --git a/deployment/websites/manifests/start.pp b/deployment/websites/manifests/start.pp
new file mode 100644
index 00000000..9d5b77e5
--- /dev/null
+++ b/deployment/websites/manifests/start.pp
@@ -0,0 +1,11 @@
+class websites::start {
+ include websites::base
+ apache::vhost_redirect { "start.${::domain}":
+ url => "https://www.${::domain}/community/",
+ }
+ apache::vhost_redirect { "ssl_start.${::domain}":
+ use_ssl => true,
+ vhost => "start.${::domain}",
+ url => "https://www.${::domain}/community/",
+ }
+}
diff --git a/deployment/websites/manifests/static.pp b/deployment/websites/manifests/static.pp
index 41b4f332..66711329 100644
--- a/deployment/websites/manifests/static.pp
+++ b/deployment/websites/manifests/static.pp
@@ -1,8 +1,8 @@
class websites::static {
include websites::base
- $vhostdir = "$websites::base::webdatadir/static.$::domain"
+ $vhostdir = "${websites::base::webdatadir}/static.${::domain}"
- apache::vhost_other_app { "static.$::domain":
+ apache::vhost::other_app { "static.${::domain}":
vhost_file => 'websites/vhost_static.conf',
}
@@ -10,7 +10,7 @@ class websites::static {
ensure => directory,
}
- subversion::snapshot { "$vhostdir/g":
- source => "svn://svn.$::domain/svn/web/www/trunk/g/",
+ git::snapshot { "${vhostdir}":
+ source => "git://git.${::domain}/web/www",
}
}
diff --git a/deployment/websites/manifests/svn.pp b/deployment/websites/manifests/svn.pp
index 55137872..973c012d 100644
--- a/deployment/websites/manifests/svn.pp
+++ b/deployment/websites/manifests/svn.pp
@@ -1,7 +1,10 @@
-class websites {
- class svn {
- apache::vhost_redirect { "svn.$domain":
- url => "http://svnweb.$domain/",
- }
+class websites::svn {
+ apache::vhost_redirect { "svn.${::domain}":
+ url => "https://svnweb.${::domain}/",
+ }
+ apache::vhost_redirect { "ssl_svn.${::domain}":
+ use_ssl => true,
+ vhost => "svn.${::domain}",
+ url => "https://svnweb.${::domain}/",
}
}
diff --git a/deployment/websites/manifests/www.pp b/deployment/websites/manifests/www.pp
index b42d4c2c..08c232f2 100644
--- a/deployment/websites/manifests/www.pp
+++ b/deployment/websites/manifests/www.pp
@@ -1,51 +1,64 @@
-class websites {
- class www inherits base {
- $vhost = "www.$domain"
- $vhostdir = "$webdatadir/www.$domain"
- $svn_location = "svn://svn.$domain/svn/web/www/trunk"
-
- include apache::mod_php
- include apache::mod_geoip
-
- # for mailman reverse proxy, on ssl
- include apache::mod_proxy
- include apache::mod_ssl
-
- subversion::snapshot { $vhostdir:
- source => $svn_location,
- }
-
- file { "$vhostdir/var/tmp/cache":
- ensure => directory,
- owner => root,
- group => $apache::base::apache_group,
- mode => 0660,
- }
-
- apache::vhost_base { "$vhost":
- content => template('websites/vhost_www.conf', "websites/vhost_proxy_mailman.conf"),
- location => $vhostdir,
- options => ['FollowSymLinks'],
- }
-
- apache::vhost_base { "ssl_$vhost":
- use_ssl => true,
- vhost => $vhost,
- content => template('websites/vhost_www.conf', "websites/vhost_proxy_mailman_ssl.conf"),
- location => $vhostdir,
- options => ['FollowSymLinks'],
- }
-
- apache::vhost_redirect { $domain:
- url => 'http://www.mageia.org/',
- }
-
- apache::vhost_redirect { "ssl_$domain":
- use_ssl => true,
- vhost => $domain,
- url => 'https://www.mageia.org/',
- }
-
- package { ['php-mbstring', 'php-mcrypt', 'php-gettext', 'php-geoip']: }
+class websites::www {
+ include websites::base
+ $vhost = "www.${::domain}"
+ $vhostdir = "${websites::base::webdatadir}/${vhost}"
+ $git_location = "git://git.${::domain}/web/www"
+
+ include apache::var
+ include apache::mod::php
+
+ # for mailman reverse proxy, on ssl
+ include apache::mod::proxy
+ include apache::mod::ssl
+
+ git::snapshot { $vhostdir:
+ source => $git_location,
+ }
+
+ file { [ "${vhostdir}/var",
+ "${vhostdir}/var/tmp",
+ "${vhostdir}/var/tmp/cache" ] :
+ ensure => directory,
+ group => $apache::var::apache_group,
+ mode => '0660',
+ require => Git::Snapshot[$vhostdir],
+ }
+
+ file { [ "${vhostdir}/_nav",
+ "${vhostdir}/_nav/var",
+ "${vhostdir}/_nav/var/tmp",
+ "${vhostdir}/_nav/var/tmp/cache" ] :
+ ensure => directory,
+ group => $apache::var::apache_group,
+ mode => '0660',
+ require => Git::Snapshot[$vhostdir],
+ }
+
+ apache::vhost::base { $vhost:
+ content => template('websites/vhost_www.conf',
+ 'websites/vhost_www_rewrite.conf'),
+ location => $vhostdir,
+ options => ['FollowSymLinks'],
+ }
+
+ apache::vhost::base { "ssl_${vhost}":
+ use_ssl => true,
+ vhost => $vhost,
+ content => template('websites/vhost_www.conf',
+ 'websites/vhost_www_rewrite.conf'),
+ location => $vhostdir,
+ options => ['FollowSymLinks'],
+ }
+
+ apache::vhost_redirect { "${::domain}":
+ url => "https://www.${::domain}/",
+ }
+
+ apache::vhost_redirect { "ssl_${::domain}":
+ use_ssl => true,
+ vhost => "${::domain}",
+ url => "https://www.${::domain}/",
}
+
+ package { ['php-mbstring', 'php-mcrypt', 'php-gettext']: }
}