Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream members can be exported and collected #331

Merged
merged 2 commits into from
Jun 11, 2014

Conversation

rainopik
Copy link
Contributor

@rainopik rainopik commented Jun 7, 2014

This patch allows to declare upstream members on actual member servers.
I wanted a way to dynamically populate the members array as I spin up additional member servers (similar to haproxy::balancermember), but could not find any better way.
I've split the upstream.erb template into several parts and made the members parameter optional. If members is omitted, at least one upstream member should be declared (or the nginx will complain on reload).

Example:

# Export the resource on an upstream member server:
@@nginx::resource::upstream::member { $::fqdn:
  upstream  => 'proxypass',
  server    => $::ipaddress,
  port      => '3000',
}

# Collect resources on the NGINX server:
nginx::resource::upstream { 'proxypass':
  ensure    => present,
}

jfryman pushed a commit that referenced this pull request Jun 11, 2014
Upstream members can be exported and collected
@jfryman jfryman merged commit 6107c76 into voxpupuli:master Jun 11, 2014
@jfryman
Copy link
Contributor

jfryman commented Jun 11, 2014

Love it!

leepa added a commit to Unity-Technologies/puppet-nginx that referenced this pull request Jun 12, 2014
Upstream members can no longer be exported and collected.

The change in voxpupuli#331 was fundamentally broken. I have therefore reverted
it as it shouldn't of been merged.

Essentially you can't use ensure with this change - meaning you can no
longer REMOVE an nginx config from the system - which is part of the
tests and also sane module practice.

The idea was nice - but the implementation broke things. This reverts
back to a good state, without modifying any tests where tests pass again
with the recent commits.

This reverts commit ebf3e4e.
rabbitt added a commit to rabbitt/puppet-nginx that referenced this pull request Jun 21, 2014
- resurrecting voxpupuli#331 from @rainopik
- update (concat/stdlib) dependency version requirements based on current usage
- fix upstream tests to match rainopik's changes in what was voxpupuli#331
rabbitt added a commit to rabbitt/puppet-nginx that referenced this pull request Jun 21, 2014
- resurrecting voxpupuli#331 from @rainopik
- update (concat/stdlib) dependency version requirements based on current usage
- fix upstream tests to match rainopik's changes in what was voxpupuli#331
rabbitt added a commit to rabbitt/puppet-nginx that referenced this pull request Jun 21, 2014
- resurrecting voxpupuli#331 from @rainopik
- update (concat/stdlib) dependency version requirements based on current usage
- fix upstream tests to work with rainopik's changes in what was voxpupuli#331
jfryman pushed a commit that referenced this pull request Jun 24, 2014
Reintegrate #331 (upstream exports/collections)
janorn pushed a commit to janorn/puppet-nginx that referenced this pull request Jun 24, 2014
- resurrecting voxpupuli#331 from @rainopik
- update (concat/stdlib) dependency version requirements based on current usage
- fix upstream tests to work with rainopik's changes in what was voxpupuli#331
cegeka-jenkins pushed a commit to cegeka/puppet-nginx that referenced this pull request Oct 23, 2017
Upstream members can be exported and collected
cegeka-jenkins pushed a commit to cegeka/puppet-nginx that referenced this pull request Oct 23, 2017
Upstream members can no longer be exported and collected.

The change in voxpupuli#331 was fundamentally broken. I have therefore reverted
it as it shouldn't of been merged.

Essentially you can't use ensure with this change - meaning you can no
longer REMOVE an nginx config from the system - which is part of the
tests and also sane module practice.

The idea was nice - but the implementation broke things. This reverts
back to a good state, without modifying any tests where tests pass again
with the recent commits.

This reverts commit ebf3e4e.
cegeka-jenkins pushed a commit to cegeka/puppet-nginx that referenced this pull request Oct 23, 2017
- resurrecting voxpupuli#331 from @rainopik
- update (concat/stdlib) dependency version requirements based on current usage
- fix upstream tests to work with rainopik's changes in what was voxpupuli#331
cegeka-jenkins pushed a commit to cegeka/puppet-nginx that referenced this pull request Oct 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants