First, rpm doesn't obey $http_proxy. This is freaking annoying. So you have to use the --httpproxy and --httpport options.
But the big one is that chef uses OpenID to authenticate users logging into the chef server web UI. The chef web app tries to contact my OpenID provider but it can't reach it through the proxy. Luckily, the ruby OpenID library makes it easy to use an http_proxy. Just add these two lines to the init.rb file of the chef server merb app in the Merb::BootLoader.after_app_loads block.
/usr/lib/ruby/gems/1.8/gems/chef-server-0.7.10/config/init.rb:
Merb::BootLoader.after_app_loads do
# This will get executed after your app's classes have been loaded.
OpenID::Util.logger = Merb.logger
ENV['http_proxy'] = 'http://yourproxy.com:port' # <- set your http_proxy env var
OpenID.fetcher_use_env_http_proxy # <- tell OpenID to use http_proxy
end
2 comments:
ok, this doesn't work any more with 0.7.14! What did I do wrong?
Actually, I'm a dork. I just forgot to restart httpd.
Carry on.
Post a Comment