Bug 1118824 - Support Puppet environmentpath and environment config files
Summary: Support Puppet environmentpath and environment config files
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Capsule
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: Unspecified
Assignee: Dominic Cleal
QA Contact: Katello QA List
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-11 15:41 UTC by Bryan Kearney
Modified: 2016-04-22 15:33 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-11 12:26:14 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 4699 None None None 2016-04-22 15:33:54 UTC

Description Bryan Kearney 2014-07-11 15:41:31 UTC
Puppet 3.5 added support for an environmentpath (very much like our own default /etc/puppet/environments/) and 3.6 adds an environment.conf to configure the modulepath etc within each environment.  The proxy should understand these layouts.

https://groups.google.com/d/msg/puppet-dev/2QDi2ThnRJQ/EWrFJXa92i8J
https://tickets.puppetlabs.com/browse/PUP-1596

Comment 1 Bryan Kearney 2014-07-11 15:41:32 UTC
Created from redmine issue http://projects.theforeman.org/issues/4699

Comment 2 Bryan Kearney 2014-07-11 15:41:34 UTC
Upstream bug assigned to dcleal@redhat.com

Comment 4 Bryan Kearney 2014-07-23 14:04:22 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/4699 has been closed
-------------
Dominic Cleal
https://github.com/theforeman/smart-proxy/pull/168
-------------
Dominic Cleal
For anybody wanting to test this on 1.5, here's a rebased patch - please back up your proxy config before using, it's new!  This queries Puppet's v2.0 API on localhost to fetch the list of environments, and defaults to the usual hostname and certificate locations, so hopefully it'll work out of the box for most people - unusual setups may need to change settings.yml, see the example.

https://github.com/domcleal/smart-proxy/compare/theforeman:1.5-stable...4699-environmentpath-15.patch
-------------
Jason Smith
Dominic Cleal wrote:
> For anybody wanting to test this on 1.5, here's a rebased patch - please back up your proxy config before using, it's new!  This queries Puppet's v2.0 API on localhost to fetch the list of environments, and defaults to the usual hostname and certificate locations, so hopefully it'll work out of the box for most people - unusual setups may need to change settings.yml, see the example.
> 
> https://github.com/domcleal/smart-proxy/compare/theforeman:1.5-stable...4699-environmentpath-15.patch

I applied this patch to our test puppet server, with foreman-proxy-1.5.1 & puppet-server-3.6.2 installed and environmentpath set to $confdir/environments, it appears to work perfectly. Tested by running "ruby193-rake RAILS_ENV=production puppet:import:puppet_classes" on the Foreman server. Thanks!
-------------
Evgeny Vasilchenko
Dominic Cleal wrote:
> For anybody wanting to test this on 1.5, here's a rebased patch - please back up your proxy config before using, it's new!  This queries Puppet's v2.0 API on localhost to fetch the list of environments, and defaults to the usual hostname and certificate locations, so hopefully it'll work out of the box for most people - unusual setups may need to change settings.yml, see the example.
> 
> https://github.com/domcleal/smart-proxy/compare/theforeman:1.5-stable...4699-environmentpath-15.patch

The patch worked fine for me: Ubuntu 12.04.04 LTS, x86_64, Puppet 3.6.2, Foreman 1.5.1 (upgraded from 1.5.0)

cd /usr/share/foreman-proxy
curl https://github.com/domcleal/smart-proxy/compare/theforeman:1.5-stable...4699-environmentpath-15.patch | patch -p1

It gives an error about patching files in tests/ but it can be ignored...
I can import Puppet modules and environments now.

-------- /etc/puppet.conf --------
[main]
...
### Enable Directory Environemnts
    environmentpath = $confdir/environments
    basemodulepath = $confdir/modules:/usr/share/puppet/modules

-------- /etc/puppet.conf --------

Thank you very much! 
-------------
Dominic Cleal
Applied in changeset commit:16db7a9c74abfba21b65d9f0e9a05096c3c7f8fb.

Comment 6 Bryan Kearney 2014-09-11 12:26:14 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.


Note You need to log in before you can comment on or make changes to this bug.