Alexandros Kosiaris has submitted this change and it was merged.

Change subject: url_downloader: Add port as a hierable parameter
......................................................................


url_downloader: Add port as a hierable parameter

Adding the url_downloader_port configuration
Remove a TODO as well. That clause has been verified as fine

Change-Id: I7638f9f07513071c774d0029c76056067aa6d771
---
M manifests/role/url_downloader.pp
M templates/url_downloader/squid.conf.erb
2 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/manifests/role/url_downloader.pp b/manifests/role/url_downloader.pp
index 9518a08..caa59da 100644
--- a/manifests/role/url_downloader.pp
+++ b/manifests/role/url_downloader.pp
@@ -28,6 +28,7 @@
     include network::constants
 
     $url_downloader_ip = hiera('url_downloader_ip', $::ipaddress)
+    $url_downloader_port = hiera('url_downloader_port', 8080)
 
     if $::realm == 'production' {
         $wikimedia = [
@@ -66,7 +67,6 @@
     }
     $towikimedia = $wikimedia
 
-    # TODO: Evaluate if jessie's squid is fine with those rules
     if os_version('ubuntu >= trusty') or os_version('debian >= jessie') {
         $config_content = template('url_downloader/squid.conf.erb')
     } else {
@@ -81,13 +81,13 @@
     # macro
     ferm::service { 'url_downloader':
         proto  => 'tcp',
-        port   => '8080',
+        port   => $url_downloader_port,
         srange => '$ALL_NETWORKS',
     }
 
     # Monitoring
     monitoring::service { 'url_downloader':
         description   => 'url_downloader',
-        check_command => 'check_tcp_ip!url-downloader.wikimedia.org!8080',
+        check_command => 
"check_tcp_ip!url-downloader.wikimedia.org!${url_downloader_port}",
     }
 }
diff --git a/templates/url_downloader/squid.conf.erb 
b/templates/url_downloader/squid.conf.erb
index 6e53ba8..a5b9c6e 100644
--- a/templates/url_downloader/squid.conf.erb
+++ b/templates/url_downloader/squid.conf.erb
@@ -2,7 +2,7 @@
 ### THIS FILE IS MANAGED BY PUPPET
 ######################################################################
 
-http_port <%= @url_downloader_ip %>:8080
+http_port <%= @url_downloader_ip %>:<%= @url_downloader_port %>
 hierarchy_stoplist cgi-bin ?
 
 acl everything src all

-- 
To view, visit https://gerrit.wikimedia.org/r/191379
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7638f9f07513071c774d0029c76056067aa6d771
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to