BryanDavis has uploaded a new change for review.
https://gerrit.wikimedia.org/r/119555
Change subject: Make a self-hosted puppetmaster workalike for puppet::geoip
......................................................................
Make a self-hosted puppetmaster workalike for puppet::geoip
The new puppet::self::geoip class can be applied to a self-hosted
puppetmaster to provide work-alike resources for classes that need GeoIP
data.
Change-Id: I7d561d55cab5d0cad60d88d44fba56ba3562e9b7
---
A modules/puppet/manifests/self/geoip.pp
1 file changed, 32 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/55/119555/1
diff --git a/modules/puppet/manifests/self/geoip.pp
b/modules/puppet/manifests/self/geoip.pp
new file mode 100644
index 0000000..e841def
--- /dev/null
+++ b/modules/puppet/manifests/self/geoip.pp
@@ -0,0 +1,32 @@
+class puppet::self::geoip {
+ # Fetch the GeoIP databases into puppet's volatile dir, so that other hosts
+ # can then just sync that directory into their own /usr/share/GeoIP via a
+ # normal puppet File resource (see the geoip module for more)
+
+ $volatiledir = '/var/lib/puppet/volatile'
+ $geoip_destdir = "${volatiledir}/GeoIP"
+ $environment = 'http_proxy=http://brewster.wikimedia.org:8080'
+
+ # geoip::data classes depend on this
+ file { $geoip_destdir:
+ ensure => directory,
+ }
+
+ # fetch the GeoLite databases
+ class { 'geoip::data::lite':
+ data_directory => $geoip_destdir,
+ environment => $environment,
+ }
+
+ # compatibility symlinks, so that users can use the stable paths
+ # GeoIP.dat/GeoIPCity.dat between labs and production
+ file { "$geoip_destdir/GeoIP.dat":
+ ensure => link,
+ target => 'GeoLite.dat',
+ }
+ file { "$geoip_destdir/GeoIPCity.dat":
+ ensure => link,
+ target => 'GeoLiteCity.dat',
+ }
+}
+
--
To view, visit https://gerrit.wikimedia.org/r/119555
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d561d55cab5d0cad60d88d44fba56ba3562e9b7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BryanDavis <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits