[PATCH] expose MM crawler logs on bapp01

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



My goal here is to expose the mirrormanager crawler logs, which are on
bapp01:/var/log/mirrormanager/crawler/
via the web URL:
http://admin.fedoraproject.org/mirrormanager/crawler/

Does this look right to do that?  I can't easily test this in staging,
so want an additional set of eyes.

Thanks,
Matt

>From d6f45bf2fa9165712f9ce9032050c51c68e75db0 Mon Sep 17 00:00:00 2001
From: Matt Domsch <mdomsch@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Mar 2010 15:47:17 +0000
Subject: [PATCH] MM: expose crawler logs on bapp01

---
 manifests/servergroups/proxy.pp                    |    6 ++++++
 modules/mirrormanager/manifests/init.pp            |   16 ++++++++++++++++
 .../templates/mirrormanager-crawlerlogs.conf.erb   |    4 ++++
 3 files changed, 26 insertions(+), 0 deletions(-)
 create mode 100644 modules/mirrormanager/templates/mirrormanager-crawlerlogs.conf.erb

diff --git a/manifests/servergroups/proxy.pp b/manifests/servergroups/proxy.pp
index 33f83f4..8efbd45 100644
--- a/manifests/servergroups/proxy.pp
+++ b/manifests/servergroups/proxy.pp
@@ -679,6 +679,12 @@ class proxy {
         proxyurl => "http://localhost:10008";,
     }
 
+    mirrormanager::proxy::crawlerlogs { "admin.fedoraproject.org/mirrormanager":
+        website  => "admin.fedoraproject.org",
+        path     => "/mirrormanager/crawler",
+        proxyurl => "http://bapp01";,
+    }
+
     mirrormanager::proxy::mirrorlist { "mirrors.fedoraproject.org":
         website  => "mirrors.fedoraproject.org",
         proxyurl => "http://localhost:10002";,
diff --git a/modules/mirrormanager/manifests/init.pp b/modules/mirrormanager/manifests/init.pp
index 4666231..979170a 100644
--- a/modules/mirrormanager/manifests/init.pp
+++ b/modules/mirrormanager/manifests/init.pp
@@ -278,6 +278,22 @@ define mirrormanager::proxy::mirrorlist(
     }
 }
 
+define mirrormanager::proxy::crawlerlogs(
+    $website,
+    $path,
+    $proxyurl
+) {
+    include httpd::base
+
+    file { "/etc/httpd/conf.d/$website/mirrormanager-crawlerlogs.conf":
+        owner   => "root",
+        group   => "root",
+        mode    => 0644,
+        content => template("mirrormanager/mirrormanager-crawlerlogs.conf.erb"),
+        notify  => Service["httpd"],
+        require => Httpd::Website[$website],
+    }
+}
 
 class mirrormanager::sync {
     package { 'mirrormanager-client': ensure => present }
diff --git a/modules/mirrormanager/templates/mirrormanager-crawlerlogs.conf.erb b/modules/mirrormanager/templates/mirrormanager-crawlerlogs.conf.erb
new file mode 100644
index 0000000..e9b8769
--- /dev/null
+++ b/modules/mirrormanager/templates/mirrormanager-crawlerlogs.conf.erb
@@ -0,0 +1,4 @@
+RewriteEngine On
+
+RewriteRule ^<%= path %>(.+) <%= proxyurl %><%= path %>$1 [P,QSA,L]
+ProxyPassReverse / <%= proxyurl %>/
-- 
1.5.5.6


-- 
Matt Domsch
Technology Strategist, Dell Office of the CTO
linux.dell.com & www.dell.com/linux
_______________________________________________
infrastructure mailing list
infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/infrastructure

[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux