Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

use upstream web server modules like puppetlabs/apache #78

Closed
neoice opened this issue Sep 8, 2014 · 11 comments
Closed

use upstream web server modules like puppetlabs/apache #78

neoice opened this issue Sep 8, 2014 · 11 comments
Assignees

Comments

@neoice
Copy link

neoice commented Sep 8, 2014

many modules are now depending on upstream httpd configuration modules instead of reinventing the wheel. this makes it easier to use multiple modules together and avoid duplicate package declarations. it would be nice to have here :)

I'm not sure what the "preferred" solution for ngnix is, but puppetlabs/apache seems to be dominating the ecosystem for apache management.

@dwerder
Copy link
Member

dwerder commented Sep 9, 2014

Thats true. For apache it would be a way to do that with the apache modue. But its possible to do that right now. YOu just need to configure, that this module should not install/manage a webserver.

I will think about it for the next major release to refactore it. Or someone can send an Pull Request maybe ;)

@dwerder dwerder self-assigned this Sep 9, 2014
@dwerder dwerder added this to the ver, 6.0.0 milestone Sep 16, 2014
@scottsuch
Copy link
Contributor

I'd love to see this as well. Right now I'm using the puppetlabs-apache module with a defined vhost for graphite and have to always run puppet 2x to resolve a dependency initially. See error below:

err: /Stage[main]//Node[vagrant]/Apache::Vhost[graphite.example.com]/File[/opt/graphite/webapp]/ensure: change from absent to directory failed: Cannot create /opt/graphite/webapp; parent directory /opt/graphite does not exist

I've not had any luck getting the resource ordering of this module and the puppetlabs-apache module via the before, after, notify, and subscribe metaparameters.

@dwerder
Copy link
Member

dwerder commented Dec 15, 2014

As far as I know, something like:

class { apache: bla => blub }->
class { graphite: foo => bar }

should do the trick.
But to use puppetlabs-apache is planed for release 6.0.0, which is in progress.

dwerder added a commit that referenced this issue Jan 1, 2015
dwerder added a commit that referenced this issue Jan 1, 2015
dwerder added a commit that referenced this issue Jan 1, 2015
@dwerder
Copy link
Member

dwerder commented Jan 2, 2015

This brings me to the point, that I will just drop all that built-in Apache support and instead give an README example how to configure things with separate modules.

Like

class { apache: }
apache::vhost {foo bar}
class {graphite: }

Class[apache]->Class[graphite]

@brettswift
Copy link

@dwerder your last comment would work in my use case. The difficulty I'm finding is getting up and running with graphite and grafana on the same server. Both graphite and grafana have puppet modules but they don't work well together without a lot of intervention.

For this use case, this module could configure an apache::vhost, and then external modules (grafana) could also use the apache::vhost module. The puppet catalog would compile them at the same time as long as the vhosts were unique (great candidate for a parameter to inject) and then this module and external modules on the same server would be compatible.

I think that'd be a powerful way of utilizing the apache module.

Just a thought!

@iverberk
Copy link

I agree with @brettswift , it would be really nice to install graphite and grafana (with your modules) on the same server without running into duplicate declaration issues. Current workaround is to disable apache config and just create the vhost manually elsewhere for grafana and graphite?

@dwerder
Copy link
Member

dwerder commented Feb 24, 2015

It works right now. You can take a look here: echocat/puppet-grafana#8

@dwerder
Copy link
Member

dwerder commented Feb 24, 2015

As mention in the ticket above, the next major version 6 will use the puppetlabs/apache module if you use gr_web_server => 'apache' and the default will become 'none'. So that you can provide your own webserver config.

@brettswift
Copy link

Thanks @dwerder - that's what I was looking for. Github search-fu was not good apparently.

It might be helpful to get that example vhost configuration into the README file.

Will the next major release let you inject a vhost name, and port, and encapsulate all the graphite specifics under the hood from the example in echocat/puppet-grafana#8 ?

@dwerder
Copy link
Member

dwerder commented Feb 24, 2015

Thats the plan

@dwerder dwerder removed this from the ver, 6.0.0 milestone Mar 30, 2016
@dwerder
Copy link
Member

dwerder commented Mar 16, 2017

Should be done, but will not happen at the moment.

@dwerder dwerder closed this as completed Mar 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

5 participants