jhoblitt / puppet-ganglia

Manages ganglia gmond & gmetad daemons + web front end
Other
12 stars 34 forks source link

'ganglia::web' doesn't link up to apache automatically #16

Open rchrd2 opened 10 years ago

rchrd2 commented 10 years ago

This is so great, but it seemed to do everything except the last step of linking up ganglia to the web.

I had to create a virtual host file named /etc/apache2/sites-available/ganglia with these settings:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost

    DocumentRoot /usr/share/ganglia-webfrontend/
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /usr/share/ganglia-webfrontend>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

And then I had to link it up and restart apache:

mv /etc/apache2/sites-enabled/000-default /etc/apache2/sites-enabled/001-default
ln -snf /etc/apache2/sites-available/ganglia /etc/apache2/sites-enabled/000-ganglia
/etc/init.d/apache2 restart

Am I missing something, or was it implied that these steps would be required? It would be helpful if this was automated with everything else.

Thoughts?

jhoblitt commented 10 years ago

Apache setup was intentionally left out of the module as there are an extraordinary number of apache modules in use, and injecting a dependency on one, doesn't matter which one, into this module means that it would become incompatible with a large number of manifests. That really should have been documented...

The situation has changed a bit since I started this module and the example42 and puppetlabs modules are now clearly the most popular options. It would probably be reasonable to introduce a dep. on either of those choices as long as there was a parameter to disable it.

Another option would be add something very similar to your comments to the documentation.

Would you be interesting in working on a PR for either of those courses of action?

rchrd2 commented 10 years ago

I think adding some documentation would be helpful for other users. I could do a PR for this.

However, I ultimately ended up installing the newer web frontend called "Ganglia Web 2". See Ganglia-Web. It seems that this is the new standard. I wonder if this puppet module should be updated to use Ganglia Web 2?

I am probably not experienced enough with Puppet to submit a PR for Ganglia Web 2.

jhoblitt commented 9 years ago

@rchrd2 What would you like to do with this issue? Do you want to make a documentation PR? Are you aware of packages for Ganglia Web 2?

rchrd2 commented 9 years ago

I agree that including Apache in here is not necessary. The simple stop-gap measure is to add a note to the documentation. I could do a pull request for that. I'll try that out when I get a free moment. Thanks for your response.

jhoblitt commented 9 years ago

@rchrd2 ping?

jhoblitt commented 4 years ago

As things have settled down and there has now been a defacto apache mod for years, I'd be willing to merge a PR to implement this.