Questions tagged [chef]

Chef is an open source configuration management framework for infrastructure automation.

Chef is an open source systems integration framework built to bring the benefits of configuration management to your entire infrastructure. You write source code to describe how you want each part of your infrastructure to be built, then apply those descriptions to your servers. The result is a fully automated infrastructure: when a new server comes on line, the only thing you have to do is tell Chef what role it should play in your architecture.

More information can be found in the Documentation.

635 questions
5
votes
4 answers

How to use current cookbook template dir to copy all templates recursively in a loop with chef

I'm trying to figure out how can I construct the path to templates (or files, since it works the same way) folder, then I could read it and use template resource in the loop, so each template file could trigger notification on change. I can't use…
gansbrest
  • 835
  • 2
  • 9
  • 17
5
votes
1 answer

Vagrant / chef - nginx cookbook extend

I am fairly new to using chef, particularly with vagrant so this will most likely be a silly question to the more experienced users out there. I am using this cookbook: https://github.com/opscode-cookbooks/application_nginx I simply want to add my…
5
votes
2 answers

"one-off" use of http_proxy in a Chef remote_file resource

I have a use case where most of my remote_file resources and yum resources download files directly from an internal server. However, there is a need to download one or two files with remote_file that is outside our firewall and which must go through…
user169200
  • 51
  • 1
  • 5
5
votes
1 answer

What is preferred approach to deploy Python app using RPM?

I am new to the dev-ops side of things, and I've been working to get a Python application packaged into an RPM (using python setup.py bdist_rpm) deployed onto a centos VM via Yum. Chef is used to manage the VM. The Python app will run within a…
woodbon
  • 53
  • 3
5
votes
1 answer

How do I remove a package with Chef?

I am trying to remove packages using a chef. i.e. remove java 1.6 and install java 1.4
5
votes
2 answers

Why can't “knife data bag from file” find existing json file on chef server?

Summary: I'm running into a problem with "knife data bag from file", where knife doesn't recognize the .json data bag file pulled down from a remote git repo. Background: I'm currently trying to transition from chef-solo use to chef server while…
ellisera
  • 53
  • 1
  • 1
  • 3
5
votes
1 answer

Two chef nodes (two environments) on one machine

We are resource limited here, and want our qa and staging environments on one machine. We are going to run separate binaries and confs for our app & supporting services. According to chef docs it is possible to have a single machine be two nodes. …
Jeff V
  • 229
  • 3
  • 11
5
votes
1 answer

Looking for a Backup/Recreate Solution

I have 2 crucial servers that are running an unsupported & ancient version of Linux, and there's currently no disaster plan for them. I want to set up a backup system for them, and be able to create a foolprof disaster plan. The servers cannot be…
5
votes
5 answers

Upload everything with Knife

Let's say you have a standard Chef repository with directories as follows: cookbooks data_bags environments roles Is there way to upload it all in one go? Otherwise you have to do this: knife cookbook upload -a knife data bag from file…
Steve Bennett
  • 5,750
  • 12
  • 47
  • 59
5
votes
4 answers

Chef 'notifies' fails to restart or reload services

I'm using chef-solo v10.12.0 to configure an Ubuntu 12.04 VM, and I keep running into an issue where services don't restart or reload as expected when a configuration file is changed. There are no errors in the log although it's clearly doing…
John Debs
  • 287
  • 1
  • 4
  • 10
5
votes
2 answers

Return from Chef recipe without rising an exception

Is there a way to return from Chef recipe without rising an exception? Say I have a long recipe. I want to add a ruby block to it's beginning which will check some condition (for example directory presence) and stop processing this recipe (but…
HUB
  • 6,630
  • 3
  • 23
  • 22
5
votes
3 answers

Deploy an AWS Auto Scaling groups using Chef Server

You can, for example, to deploy an an Auto Scaling groups consists of web severs, ELB and DB using AWS CloudFormation (with Chef server): http://aws.amazon.com/cloudformation/aws-cloudformation-templates/ But, you need to initially create a CF…
Ryan
  • 5,831
  • 24
  • 72
  • 91
5
votes
3 answers

In Chef, how do I access attributes set in the environment JSON from cookbook attributes files?

I have a chef system where we have multiple environments and have attributes set in evironment JSON. I'm having trouble accessing these from within cookbook attribute files and recipes.
paul bruno
  • 51
  • 1
  • 1
  • 2
5
votes
4 answers

What configuration management solutions exist in a non-networked environment?

My servers exist in an environment without outside network connectivity (this is a requirement), so when I deploy updates all packages, binaries, config files, etc. must be included on the delivered media. And of course I want some sort of…
4
votes
1 answer

Chef large recipe vs lots of small recipes

I was wondering what the general consensus is when it comes to one large CHEF recipe vs a lot of smaller ones. As an example, say you want to deploy a Radius server, would you have seperate recipes for: MySql DB (just the software) MySql DB config…
Kosie
  • 173
  • 3