Chad has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/344221 )
Change subject: Setup apache vhost on scap proxies as well
......................................................................
Setup apache vhost on scap proxies as well
Change-Id: I2a735937b2cc2ee351b542953802cb10cefe16c1
---
M modules/role/manifests/deployment/server.pp
M modules/scap/manifests/proxy.pp
A modules/scap/manifests/vhost.pp
R modules/scap/templates/apache-vhost.erb
4 files changed, 31 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/21/344221/1
diff --git a/modules/role/manifests/deployment/server.pp
b/modules/role/manifests/deployment/server.pp
index 5b56833..9f32c47 100644
--- a/modules/role/manifests/deployment/server.pp
+++ b/modules/role/manifests/deployment/server.pp
@@ -81,9 +81,8 @@
group => $deployment_group,
}
- apache::site { 'deployment':
- content => template('role/deployment/apache-vhost.erb'),
- require => File['/srv/deployment'],
+ class { '::scap::vhost':
+ deployable_networks => $deployable_networks,
}
$deployment_server = hiera('deployment_server', 'tin.eqiad.wmnet')
diff --git a/modules/scap/manifests/proxy.pp b/modules/scap/manifests/proxy.pp
index 66879da..4637027 100644
--- a/modules/scap/manifests/proxy.pp
+++ b/modules/scap/manifests/proxy.pp
@@ -10,4 +10,8 @@
read_only => 'yes',
hosts_allow => $::network::constants::mw_appserver_networks;
}
+
+ class { 'scap::vhost':
+ deployable_networks => $::network::constants::deployable_networks,
+ }
}
diff --git a/modules/scap/manifests/vhost.pp b/modules/scap/manifests/vhost.pp
new file mode 100644
index 0000000..42beef9
--- /dev/null
+++ b/modules/scap/manifests/vhost.pp
@@ -0,0 +1,25 @@
+# = class: scap::vhost
+#
+# Sets up an apache vhost for scap
+class scap::vhost(
+ $apache_fqdn = $::fqdn,
+ $deployable_networks = [],
+) {
+ include ::apache
+
+ if !defined(File['/srv/deployment']) {
+ # Todo: Clean this up. This ownership is disgusting. But it's
what
+ # we've got as long as trebuchet is around and we don't want to
fight
+ # ownership on the deploy masters
+ file { '/srv/deployment':
+ ensure => directory,
+ owner => 'trebuchet',
+ group => 'wikidev',
+ }
+ }
+
+ apache::site { 'deployment':
+ content => template('scap/apache-vhost.erb'),
+ require => File['/srv/deployment'],
+ }
+}
diff --git a/modules/role/templates/deployment/apache-vhost.erb
b/modules/scap/templates/apache-vhost.erb
similarity index 100%
rename from modules/role/templates/deployment/apache-vhost.erb
rename to modules/scap/templates/apache-vhost.erb
--
To view, visit https://gerrit.wikimedia.org/r/344221
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a735937b2cc2ee351b542953802cb10cefe16c1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits