Pergunta

I am using Chef-solo for my provision infrastructure.

Well I was interested in change the chef gem source repository to my local repository. I did it with these commands:

/opt/chef/embedded/bin/gem sources -r http://rubygems.org/

/opt/chef/embedded/bin/gem sources -a http://gems.localserver/

But now I want to know:

Where chef put its current gem source??

Is there something like a .gemrc for chef?

Thanks.

Foi útil?

Solução 2

If you use the gem inside /opt/chef/embedded/bin/gem to install things, it stores them by default on the local file system in

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems

As to whether using this gem utility is wise or not, @sethvargo certainly knows more about chef than me, but I've been using it to install "chef" related things like test-kitchen and so far so good.

You certainly need to be a bit careful with this since you can easily break chef with the wrong gems. But it's very handy to have a single ruby path with all the chef goodies installed for testing and development.

Outras dicas

the gemrc for chefs embedded gem is /opt/chef/embedded/etc/gemrc

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top