可以改变厨师客户的宝石来源? [英] Possible to change gem sources for chef-client?

查看:112
本文介绍了可以改变厨师客户的宝石来源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有人知道改变厨师客户运行的宝石来源的方法?

我关心的节点位于防火墙后面,因此我想用内部Nexus代码库替换rubygems.org( https://github.com/sonatype/nexus-ruby-support )。我尝试更新chef embedded gem的源代码列表,但违规的chef_gem调用似乎使用了仍然引用rubygems.org的不同源列表。

解决方案

您可以覆盖/root/.gemrc中的源URL



格式如下:

 :来源:
- http://your.mirror.com/

文档非常简洁,但如果您查阅gem source命令,您最终可以追查到它。请记住,Chef嵌入自己的gem解释器,所以厨师使用的gem命令不在系统路径中。


Is any one aware of a way to change the gem sources for a chef-client run?

My node of concern is behind a firewall, so I want to replace rubygems.org with an internal Nexus repo (https://github.com/sonatype/nexus-ruby-support). I tried updating the source list for 'chef embedded gem', but the offending chef_gem calls seem to be using a different source list that still refers to rubygems.org.

解决方案

You can override the source URLs in /root/.gemrc

The format is as follows:

:sources:
- http://your.mirror.com/

The documentation is very spartan, but if you look up the "gem source" command you can eventually hunt this up. Remember that Chef embeds its own gem interpreter, so the gem command used by chef is NOT in the system path.

这篇关于可以改变厨师客户的宝石来源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆