- From: Marco Betti <
>
- To:
- Subject: [chef] using database cookbook behind a proxy (require 'pg')
- Date: Mon, 6 May 2013 17:43:26 +0200
Hi all,
we are trying to use database cookbook, but our node is behind a proxy
and we cannot manage how to force chef to use gem with proxy setup.
As written here:
https://github.com/opscode-cookbooks/database
"The providers use specific Ruby gems installed under Chef's Ruby
environment to execute commands and carry out actions. These gems will
need to be installed before the providers can operate correctly.
...
PostgreSQL: leverages the pg gem which is installed as part of the
postgresql::ruby recipe. You can use database::postgresql to include
this, too."
As you can see, here is the error that breaks chef run (confirmed by netstat):
MYNODE_LOG Recipe: postgresql::ruby
MYNODE_LOG * chef_gem[pg] action install
MYNODE_LOG [2013-05-06T17:16:45+02:00] INFO: Processing chef_gem[pg]
action install (postgresql::ruby line 40)
MYNODE_LOG WARNING: Error fetching data: Errno::ETIMEDOUT: Connection
timed out - connect(2) (
http://rubygems.org/latest_specs.4.8.gz)
We also tried setting up /etc/gemrc in this way:
gem: --http-proxy=
http://MYPROXY
and, while it woks calling gem directly, it is ignored during chef run.
Also our /etc/chef/client.rb is correctly configured:
log_level :auto
...
http_proxy "
http://MYPROXY"
https_proxy "
http://MYPROXY"
Any help would be appreciated :-)
Many thanks,
Marco
- [chef] using database cookbook behind a proxy (require 'pg'), Marco Betti, 05/06/2013
Archive powered by MHonArc 2.6.16.