Puppet Forge question

509 views
Skip to first unread message

llo...@oreillyauto.com

unread,
Jun 15, 2012, 1:47:14 PM6/15/12
to puppet...@googlegroups.com
I'm running puppet in a local VM to do some testing, and all of our systems are behind a proxy. I've got the http_proxy environment variable set properly, but when I try to use puppet module install <foo> it doesn't seem to honor it and can't connect.

I used wget to download it, but even when I use modulepath it still tries to connect to the forge and fails.

I've tried:

sudo puppet module install --modulepath . puppetlabs-stdlib-2.3.3.tar.gz
sudo puppet module install --modulepath . puppetlabs/stdlib
sudo puppet module install --modulepath . puppetlabs-stdlib

I consistently get:

Preparing to install into . ...
Downloading from http://forge.puppetlabs.com ...
Error: Network is unreachable - connect(2)
Error: Try 'puppet help module install' for usage

According to the documentaion,

  --modulepath MODULEPATH        - Which directories to look for modules in
  --target-dir DIR | -i DIR      - The directory into which modules are installed.

but it seems to be trying to install FROM the web into the current directory.

I'm using puppet 2.7.16 on Ubuntu 12.04 LTS.

What do I need to do to either install it from the local source, or install it manually?

Thank you.

llo...@oreillyauto.com

unread,
Jun 15, 2012, 2:01:23 PM6/15/12
to puppet...@googlegroups.com
Please disregard, I dug deeper into the online docs and discovered that I had to set this in a config file and not just rely on the env variables.

llo...@oreillyauto.com

unread,
Jun 15, 2012, 2:10:52 PM6/15/12
to puppet...@googlegroups.com



Please disregard, I dug deeper into the online docs and discovered that I had to set this in a config file and not just rely on the env variables.


My apologies.. I spoke too soon.

In my puppet.conf, I have:

http_proxy_host=http://user:pass...@proxy-address.tld
http_proxy_port=3128

The proxy info is correct, as I can use wget and apt etc.

Thank you for the assistance.

Ryan Coleman

unread,
Jun 15, 2012, 2:21:44 PM6/15/12
to puppet...@googlegroups.com
Hello,

Unfortunately, there looks to be a couple of bugs impacting this.

One is http://projects.puppetlabs.com/issues/14939 affecting
--modulepath . and the other is related to but not exactly
http://projects.puppetlabs.com/issues/show/14528.

These are both bugs on our queue to address. I apologize for the
inconvenience these bugs are causing, your use case is certainly
valid. Are you able to curl or wget against the forge.puppetlabs.com?
At this point, the module tool wants to examine the Forge for
dependencies though you can try the --ignore-dependencies flag to skip
that step.

I'm looking into this more closely, will attempt to mimic your setup
and get back to you when I have more information.

--Ryan
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/-6W9W9b-WUsJ.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.

llo...@oreillyauto.com

unread,
Jun 15, 2012, 3:01:26 PM6/15/12
to puppet...@googlegroups.com
Comments inline


On Friday, June 15, 2012 1:21:44 PM UTC-5, Ryan Coleman wrote:
Hello,

Unfortunately, there looks to be a couple of bugs impacting this.

One is http://projects.puppetlabs.com/issues/14939 affecting
--modulepath . and the other is related to but not exactly
http://projects.puppetlabs.com/issues/show/14528.


I'm glad to know it wasn't just something stupid on my part.
 
These are both bugs on our queue to address. I apologize for the
inconvenience these bugs are causing, your use case is certainly
valid. Are you able to curl or wget against the forge.puppetlabs.com?
At this point, the module tool wants to examine the Forge for
dependencies though you can try the --ignore-dependencies flag to skip
that step.

Yes, I am able to wget to the forge, and have already downloaded a copy of the module I was trying to install.

I tried using the --ignore dependencies flag, as well as changing my '.' to `pwd`, but still got the network error.

sudo puppet module install --ignore-dependencies --modulepath `pwd` puppetlabs-stdlib
Preparing to install into /etc/puppet ...

Downloading from http://forge.puppetlabs.com ...
Error: Error: Could not connect to http://forge.puppetlabs.com
  There was a network communications problem
    Check your network connection and try again

 
I'm looking into this more closely, will attempt to mimic your setup
and get back to you when I have more information.

--Ryan


Since I have the tarball, is there a way I can a) get a list of deps and b) manually install them? Do I just unpack into /usr/share/puppet/modules ?

Ryan Coleman

unread,
Jun 15, 2012, 3:13:08 PM6/15/12
to puppet...@googlegroups.com
I won't get a chance to replicate your situation and test further
until this weekend. Apologies.

On Fri, Jun 15, 2012 at 12:01 PM, llo...@oreillyauto.com
<llo...@oreillyauto.com> wrote:
> Since I have the tarball, is there a way I can a) get a list of deps and b)
> manually install them? Do I just unpack into /usr/share/puppet/modules ?

Yes. In the meantime, you can just untar the file and move it into
your module path. You'll need to rename the unpacked folder to match
the actual module name (ex. puppetlabs-stdlib becomes just stdlib).
There should be a Modulefile inside the stdlib folder which describes
the other module dependancies (if any). puppetlabs-stdlib does not
have dependancies on other modules.

Thanks for providing your proxy information from puppet.conf. Is your
system otherwise configured for using a proxy?

--Ryan

llo...@oreillyauto.com

unread,
Jun 15, 2012, 3:19:21 PM6/15/12
to puppet...@googlegroups.com
Comments in line again


On Friday, June 15, 2012 2:13:08 PM UTC-5, Ryan Coleman wrote:
I won't get a chance to replicate your situation and test further
until this weekend. Apologies.

On Fri, Jun 15, 2012 at 12:01 PM, llowder

> Since I have the tarball, is there a way I can a) get a list of deps and b)
> manually install them? Do I just unpack into /usr/share/puppet/modules ?

Yes. In the meantime, you can just untar the file and move it into
your module path. You'll need to rename the unpacked folder to match
the actual module name (ex. puppetlabs-stdlib becomes just stdlib).
There should be a Modulefile inside the stdlib folder which describes
the other module dependancies (if any). puppetlabs-stdlib does not
have dependancies on other modules.


Good to know, so I can at least move forward.
 
Thanks for providing your proxy information from puppet.conf. Is your
system otherwise configured for using a proxy?

Yes, I have http_proxy, https_proxy and ftp_proxy environment variables set, and also the needed config changes for apt-get, and I am able to wget or curl to wherever ( I had actually already used wget to fetch the tarball from the forge).

Please let me know if there is anything else I can do to help with this.
 

llo...@oreillyauto.com

unread,
Jun 26, 2012, 12:05:08 PM6/26/12
to puppet...@googlegroups.com


On Friday, June 15, 2012 2:19:21 PM UTC-5, llo...@oreillyauto.com wrote:
Comments in line again

On Friday, June 15, 2012 2:13:08 PM UTC-5, Ryan Coleman wrote:
I won't get a chance to replicate your situation and test further
until this weekend. Apologies.

On Fri, Jun 15, 2012 at 12:01 PM, llowder
> Since I have the tarball, is there a way I can a) get a list of deps and b)
> manually install them? Do I just unpack into /usr/share/puppet/modules ?

Yes. In the meantime, you can just untar the file and move it into
your module path. You'll need to rename the unpacked folder to match
the actual module name (ex. puppetlabs-stdlib becomes just stdlib).
There should be a Modulefile inside the stdlib folder which describes
the other module dependancies (if any). puppetlabs-stdlib does not
have dependancies on other modules.

 

I have the files unpacked in  /etc/puppet/modules/stdlib as was indicated.  The documentation mentions I can do a puppet doc -r function.

When I try 'puppet doc -r validate_string' I get 'Could not run: Could not find reference validate_string'

Am I missing something, or doing something wrong?

Jeff McCune

unread,
Jun 27, 2012, 12:45:08 PM6/27/12
to puppet...@googlegroups.com
On Tue, Jun 26, 2012 at 9:05 AM, llo...@oreillyauto.com
<llo...@oreillyauto.com> wrote:
> I have the files unpacked in  /etc/puppet/modules/stdlib as was indicated.
> The documentation mentions I can do a puppet doc -r function.
>
> When I try 'puppet doc -r validate_string' I get 'Could not run: Could not
> find reference validate_string'

"function" is meant literally, not as a substitution for the function
you're looking for.

I usually do something like: `puppet doc -r function | less` then
search for the function I'm looking for.

-Jeff
Reply all
Reply to author
Forward
0 new messages