On 2010-03-17 01:25:40 PM, Mike McGrath wrote:
On Wed, 17 Mar 2010, Matt Domsch wrote:
> 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(a)puppet01.phx2.fedoraproject.org>
> 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",
> + }
> +
I think this part isn't right but I could be wrong... Ricky can you
verify?
I think so - the most consistent way to do this would probably be to add
a parameter to the mirrormanager::proxy define to indicate the bapp
server where the logs are stored. However, for the sake of simplicity,
I'd just do this for now:
diff --git a/modules/mirrormanager/templates/mirrormanager-proxy.conf.erb
b/modules/mirrormanager/temp
index 472d3b3..9472f7d 100644
--- a/modules/mirrormanager/templates/mirrormanager-proxy.conf.erb
+++ b/modules/mirrormanager/templates/mirrormanager-proxy.conf.erb
@@ -4,5 +4,8 @@ SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
</Location>
+ProxyPass <%= path %>/crawler
http://bapp01/mirrormanager/crawler
+ProxyPassReverse <%= path %>/crawler
http://bapp01/mirrormanager/crawler
+
ProxyPass <%= path %> <%= proxyurl %>/mirrormanager
ProxyPassReverse <%= path %> <%= proxyurl %>/mirrormanager
Although this organization in puppet has made our configs very consistent, we
know now that it's overcomplicated and painful to figure out. I'll
start looking for a good middle ground that's not so confusing to use.
Thanks,
Ricky