Faidon has submitted this change and it was merged.
Change subject: contint::website regroups apache + basic files
......................................................................
contint::website regroups apache + basic files
We have several websites hosted on gallium, move the definition from
manifests/misc/contint under the contint::website module class. That
will make it easier to handle.
The manifest pass puppet-lint
Some files (such as .html and .css) are left behind, they will
ultimately be moved to integration/htdocs.git so we no more have to pass
via ops to update the websites.
Change-Id: Ic3babee9e05c2500b7871026d12b2f3c653aa01c
---
M manifests/misc/contint.pp
M manifests/site.pp
R modules/contint/files/apache/integration.mediawiki.org
R modules/contint/files/apache/qunit.localhost
A modules/contint/manifests/website.pp
5 files changed, 74 insertions(+), 49 deletions(-)
Approvals:
Faidon: Looks good to me, approved
jenkins-bot: Verified
diff --git a/manifests/misc/contint.pp b/manifests/misc/contint.pp
index 5bd0957..100cc6c 100644
--- a/manifests/misc/contint.pp
+++ b/manifests/misc/contint.pp
@@ -81,13 +81,13 @@
include contint::packages
}
- # Common apache configuration
- apache_site { integration: name => "integration.mediawiki.org" }
-
class jenkins {
# Load the Jenkins module
include ::jenkins
+
+ # We need a basic site to publish nightly builds in
+ include contint::website
# Get several OpenJDK packages including the jdk.
# (openjdk is the default distribution for the java define.
@@ -133,22 +133,6 @@
group => "wikidev",
mode => 0775,
ensure => directory;
- # Let wikidev users maintain the homepage
- "/srv/org":
- mode => 0755,
- owner => www-data,
- group => wikidev,
- ensure => directory;
- "/srv/org/mediawiki":
- mode => 0755,
- owner => www-data,
- group => wikidev,
- ensure => directory;
- "/srv/org/mediawiki/integration":
- mode => 0755,
- owner => jenkins,
- group => wikidev,
- ensure => directory;
# Welcome page
"/srv/org/mediawiki/integration/index.html":
owner => www-data,
@@ -198,12 +182,6 @@
ensure => directory,
source =>
"puppet:///files/misc/jenkins/WLMMobile",
recurse => "true";
-
"/etc/apache2/sites-available/integration.mediawiki.org":
- mode => 0444,
- owner => root,
- group => root,
- source =>
"puppet:///files/apache/sites/integration.mediawiki.org";
-
}
# run jenkins behind Apache and have pretty URLs / proxy port 80
@@ -225,29 +203,6 @@
mode => 0444,
source => "puppet:///files/zuul/apache_proxy";
}
- }
-
- class qunit {
-
- file {
- "/srv/localhost":
- mode => 0755,
- owner => www-data,
- group => wikidev,
- ensure => directory;
- "/srv/localhost/qunit":
- mode => 0755,
- owner => jenkins,
- group => wikidev,
- ensure => directory;
- "/etc/apache2/sites-available/qunit.localhost":
- mode => 0444,
- owner => root,
- group => root,
- source =>
"puppet:///files/apache/sites/qunit.localhost";
- }
-
- apache_site { 'qunit localhost': name => 'qunit.localhost' }
}
# prevent users from accessing port 8080 directly (but still allow from
localhost and own net)
diff --git a/manifests/site.pp b/manifests/site.pp
index 3570566..73a0e24 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -791,13 +791,13 @@
include standard,
nrpe,
+ contint::website,
misc::contint::test,
misc::contint::test::packages,
misc::contint::analytics::packages,
misc::contint::test::jenkins,
misc::contint::android::sdk,
testswarm::systemuser,
- misc::contint::test::qunit,
misc::docsite,
misc::docs::puppet,
role::zuul::production,
diff --git a/files/apache/sites/integration.mediawiki.org
b/modules/contint/files/apache/integration.mediawiki.org
similarity index 100%
rename from files/apache/sites/integration.mediawiki.org
rename to modules/contint/files/apache/integration.mediawiki.org
diff --git a/files/apache/sites/qunit.localhost
b/modules/contint/files/apache/qunit.localhost
similarity index 100%
rename from files/apache/sites/qunit.localhost
rename to modules/contint/files/apache/qunit.localhost
diff --git a/modules/contint/manifests/website.pp
b/modules/contint/manifests/website.pp
new file mode 100644
index 0000000..667626a
--- /dev/null
+++ b/modules/contint/manifests/website.pp
@@ -0,0 +1,70 @@
+# Class for website hosted on the continuous integration server
+# https://integration.mediawiki.org/
+# https://doc.wikimedia.org/
+# https://doc.mediawiki.org/
+class contint::website {
+
+ # This is mostly to get the files properly setup
+ file { '/srv/org':
+ ensure => directory,
+ mode => '0755',
+ owner => 'www-data',
+ group => 'wikidev',
+ }
+
+ file { '/srv/org/mediawiki':
+ ensure => directory,
+ mode => '0755',
+ owner => 'www-data',
+ group => 'wikidev',
+ }
+ file { '/srv/org/mediawiki/integration':
+ ensure => directory,
+ mode => '0755',
+ owner => 'www-data',
+ group => 'wikidev',
+ }
+
+ # Apache configuration for integration.mediawiki.org
+ file { '/etc/apache2/sites-available/integration.mediawiki.org':
+ mode => '0444',
+ owner => 'root',
+ group => 'root',
+ source => 'puppet:///modules/contint/apache/integration.mediawiki.org',
+ }
+ apache_site { 'integration.mediawiki.org':
+ name => 'integration.mediawiki.org'
+ }
+
+ file { '/srv/org/wikimedia':
+ ensure => directory,
+ mode => '0755',
+ owner => 'www-data',
+ group => 'wikidev',
+ }
+
+ file { '/srv/localhost':
+ ensure => directory,
+ mode => '0755',
+ owner => 'www-data',
+ group => 'wikidev',
+ }
+ file { '/srv/localhost/qunit':
+ ensure => directory,
+ mode => '0755',
+ owner => 'jenkins',
+ group => 'wikidev',
+ }
+
+ # Apache configuration for a virtual host on localhost
+ file { '/etc/apache2/sites-available/qunit.localhost':
+ mode => '0444',
+ owner => 'root',
+ group => 'root',
+ source => 'puppet:///modules/contint/apache/qunit.localhost',
+ }
+ apache_site { 'qunit localhost':
+ name => 'qunit.localhost'
+ }
+
+}
--
To view, visit https://gerrit.wikimedia.org/r/47742
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic3babee9e05c2500b7871026d12b2f3c653aa01c
Gerrit-PatchSet: 13
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Faidon <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits