Questions tagged [chef-infra]

Chef Infra (formerly just Chef) is a DevOps tool for scripting server configurations in Ruby (called cookbooks). Questions should pertain to the Ruby portions of coding. General DevOps questions may be asked on https://devops.stackexchange.com

Chef Infra (formerly just called Chef) is a systems integration framework from Chef Software (formerly Opscode) that allows you to describe the configuration of systems and infrastructure in code. It brings the benefits of configuration management to your entire infrastructure.

Chef is available as Open source and also contains solutions for both small and large scale systems, with features and pricing for the respective ranges.

Chef configuration management software written in Ruby and Erlang. It uses a pure-Ruby, domain-specific language (DSL) for writing system configuration recipes. Chef is used to streamline the task of configuring and maintaining servers, and can integrate with cloud-based platforms such as Internap, Amazon EC2, Google Cloud Platform, Oracle Cloud, OpenStack, SoftLayer, Microsoft Azure, and Rackspace to automatically provision and configure virtual machines.

Using Chef, you write cookbooks which describe the desired state of your systems and infrastructure. You then define roles, which are collections of cookbooks and attributes to be applied, and apply them to your systems.

The end result is the ability to build a system or your complete infrastructure in a fully automated fashion. To bring up a new system, you simply tell it what roles you want it to have and Chef does the rest.

Chef has 4 products that satisfies various needs of an Organisation,

  1. Chef Infra - Infrastructure automation to provision, harden and maintain configuration state.
  2. Chef InSpec - Security and Compliance automation in any environment, on any platform.
  3. Chef Habitat - Automate application dependency management to run apps at scale anywhere.
  4. Chef Automate - Provides operational visibility and organizational collaboration for everything you automate.

If you are reporting an issue, please use Chef's ticket tracker instead of StackOverflow!

Resources

Related Tags

6507 questions
85
votes
4 answers

Why do people use Puppet/Chef with Amazon Cloud Formation instead of just using CloudInit?

We're planning to use AMI EC2 instances which are not "pre-baked". I.e. when they are spun up, they are bare installs of AWS linux. Our bootstrap process will pull in the various installs that we need e.g. python, tomcat. We'll have min of 3…
BestPractices
  • 12,738
  • 29
  • 96
  • 140
70
votes
7 answers

Configuration Management for Windows

Are there any tools for windows like that *nix world has? I am looking for something like Chef or Puppet. I have found cfEngine but it still looks very *nix centric. Ideally it would be open source, and command line driven. The idea is to put…
Nathan Lee
  • 2,231
  • 2
  • 23
  • 26
70
votes
2 answers

Should I use include_recipe or add the recipe to run_list?

Trying to figure out the best approach for a large project. When is it appropriate to add recipes within a recipe by using include_recipe as opposed to adding the recipe to the run_list? Is there a good rule of thumb?
Micah
  • 111,873
  • 86
  • 233
  • 325
70
votes
1 answer

RRSet with DNS name foo. is not permitted in zone bar

I am using the route53 cookbook in Opscode Chef to add a newly created VPC node to Route 53. When I try to create a record named foo for the hosted zone bar.website.net, I get the error RRSet with DNS name foo. is not permitted in zone bar. I am…
asfallows
  • 5,998
  • 6
  • 29
  • 48
69
votes
6 answers

How to control the version of Chef that Vagrant uses to provision VMs?

A current Chef recipe isn't running because of a bug in version 0.10.10. How can I upgrade the version of Chef that Vagrant uses, to 0.10.12? I don't want to just update it for the current instance of the VM - I keep destroying and rebuilding those.…
Steve Bennett
  • 114,604
  • 39
  • 168
  • 219
63
votes
3 answers

Chef 'cookbook' in Berksfile vs 'depends' in metadata.rb

What's the difference between adding cookbooks to Berksfile using 'cookbook' and adding cookbooks to metadata.rb using 'depends'? For example, if I add to metadata.rb depends 'nginx' do I need to add it to Berksfile using cookbook 'nginx' ?
tokenvolt
  • 1,494
  • 2
  • 14
  • 14
57
votes
9 answers

Storing passwords in Chef?

What is the best practice for storing password and API keys with Chef? It's really tempting to store database passwords, AWS api keys, and other sensitive credentials as Chef Server Attributes for use in recipes -- but what about security…
erikcw
  • 10,787
  • 15
  • 58
  • 75
57
votes
5 answers

How do you abort/end a Chef run?

Under certain conditions, I need to abort/end a Chef run with a non-zero status code, that will then propagate back through our deployment chain and eventually to Jenkins resulting in a big, fat red ball. What is the best way to do this?
Jordan Dea-Mattson
  • 5,791
  • 5
  • 38
  • 53
55
votes
8 answers

How to move/copy files locally with Chef

I haven't yet come across a Chef resource that will copy/move files locally. For example, I want to download jetty hightide and unzip it. Once done, copy all the files into a particular folder, like this: # mv…
slayedbylucifer
  • 22,878
  • 16
  • 94
  • 123
49
votes
4 answers

What is the right way to do add-apt-repository via Chef?

I'm learning Chef and I'm going to do right now for Ubuntu: execute "add-apt-repository ppa:#{node[:some_repo]}" do user "root" end execute "apt-get update" do user "root" end but may be there is a better ("chef-style"?) way to do it. Also, I…
Artem
  • 7,275
  • 15
  • 57
  • 97
46
votes
12 answers

How can I get Chef to run apt-get update before running other recipes

Right now I have the following in my Vagrantfile: config.vm.provision :chef_solo do |chef| chef.cookbooks_path = "cookbooks" chef.add_recipe "apt" chef.add_recipe "build-essential" chef.add_recipe "chef-redis::source" …
ashchristopher
  • 25,143
  • 18
  • 48
  • 49
43
votes
3 answers

Overriding attributes in the recipe

Let's say I have a default attribute in a cookbook: default.nginx_upstreams = { 'service1' => ['service1.server.com'], 'service2' => ['service2.server.com'], } Then it gets modified and overridden in roles and environments until it finally…
Igor Serebryany
  • 3,307
  • 3
  • 29
  • 41
42
votes
2 answers

Vagrant + Chef: Error in provision "Shared folders that Chef requires are missing on the virtual machine."

I've installed a Vagrant + Virtualbox using Chef (+library chef). When I do vagrant up first time, cookbooks get loaded correctly. However, when I do provision afterwards (be it vagrant provision, vagrant reload --provision or vagrant up…
aribo
  • 560
  • 5
  • 7
41
votes
5 answers

Can I modify the ownership for a shared folder in vagrant?

I use vagrant and chef to develop my own blog in a virtual machine. To have easy access to the wordpress folder I created a shared folder. Basically the wordpress folder is on my host and gets mounted as shared folder in /var/www/wordpress in the…
ayckoster
  • 6,707
  • 6
  • 32
  • 45
37
votes
2 answers

Vagrant provisioning shell vs puppet vs chef

I have the following setup: Many different projects which are separate git repositories, but all have mostly the same server configuration Each project in turn depends on many other projects and we use the composer dependency manager to get them…
mpaepper
  • 3,952
  • 3
  • 21
  • 28
1
2 3
99 100