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.pp13
-rw-r--r--deployment/websites/manifests/git.pp10
-rw-r--r--deployment/websites/manifests/hugs.pp16
-rw-r--r--deployment/websites/manifests/init.pp1
-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/releases.pp22
-rw-r--r--deployment/websites/manifests/start.pp11
-rw-r--r--deployment/websites/manifests/static.pp16
-rw-r--r--deployment/websites/manifests/svn.pp10
-rw-r--r--deployment/websites/manifests/www.pp64
15 files changed, 307 insertions, 0 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
new file mode 100644
index 00000000..bd8f1fc1
--- /dev/null
+++ b/deployment/websites/manifests/forum_proxy.pp
@@ -0,0 +1,13 @@
+class websites::forum_proxy {
+ $web_domain = "forums.${::domain}"
+
+ apache::vhost::reverse_proxy { $web_domain:
+ url => "http://${web_domain}/",
+ }
+
+ apache::vhost::reverse_proxy { "ssl_${web_domain}":
+ vhost => $web_domain,
+ use_ssl => true,
+ 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
new file mode 100644
index 00000000..95246464
--- /dev/null
+++ b/deployment/websites/manifests/hugs.pp
@@ -0,0 +1,16 @@
+class websites::hugs {
+ include websites::base
+
+ $vhostdir = "${websites::base::webdatadir}/hugs.${::domain}"
+ $git_location = "git://git.${::domain}/web/hugs"
+
+ apache::vhost::base { "hugs.${::domain}":
+ location => $vhostdir,
+ }
+
+ git::snapshot { $vhostdir:
+ source => $git_location
+ }
+
+ package { 'php-exif': }
+}
diff --git a/deployment/websites/manifests/init.pp b/deployment/websites/manifests/init.pp
new file mode 100644
index 00000000..afc63997
--- /dev/null
+++ b/deployment/websites/manifests/init.pp
@@ -0,0 +1 @@
+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/releases.pp b/deployment/websites/manifests/releases.pp
new file mode 100644
index 00000000..2b25c8ec
--- /dev/null
+++ b/deployment/websites/manifests/releases.pp
@@ -0,0 +1,22 @@
+class websites::releases {
+ include websites::base
+ $vhost = "releases.${::domain}"
+ $vhostdir = "${websites::base::webdatadir}/${vhost}"
+ $git_location = "git://git.${::domain}/web/releases"
+
+ apache::vhost::base { $vhost:
+ location => $vhostdir,
+ options => [ 'FollowSymLinks' ],
+ }
+
+ apache::vhost::base { "ssl_${vhost}":
+ vhost => $vhost,
+ use_ssl => true,
+ location => $vhostdir,
+ options => [ 'FollowSymLinks' ],
+ }
+
+ 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
new file mode 100644
index 00000000..66711329
--- /dev/null
+++ b/deployment/websites/manifests/static.pp
@@ -0,0 +1,16 @@
+class websites::static {
+ include websites::base
+ $vhostdir = "${websites::base::webdatadir}/static.${::domain}"
+
+ apache::vhost::other_app { "static.${::domain}":
+ vhost_file => 'websites/vhost_static.conf',
+ }
+
+ file { $vhostdir:
+ ensure => directory,
+ }
+
+ git::snapshot { "${vhostdir}":
+ source => "git://git.${::domain}/web/www",
+ }
+}
diff --git a/deployment/websites/manifests/svn.pp b/deployment/websites/manifests/svn.pp
new file mode 100644
index 00000000..973c012d
--- /dev/null
+++ b/deployment/websites/manifests/svn.pp
@@ -0,0 +1,10 @@
+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
new file mode 100644
index 00000000..08c232f2
--- /dev/null
+++ b/deployment/websites/manifests/www.pp
@@ -0,0 +1,64 @@
+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']: }
+}