Questions tagged [chef-recipe]

A recipe is the most fundamental configuration element in Chef. Recipes specify which resources to manage and the order in which those resources will be applied.

A recipe is the fundamental configuration element in the Chef configuration-management tool. Recipes specify which resources to manage and the order in which those resources will be applied. A recipe:

  • Is authored using Ruby, which is a programming language designed to read and behave in a predictable manner
  • Is mostly a collection of resources in a Ruby syntax with some helper code around it
  • Must define everything that is required to configure part of a system
  • Must be stored in a cookbook
  • May be included in a recipe
  • May use the results of a search query and read the contents of a data bag (including an encrypted data bag)
  • May have a dependency on one (or more) recipes
  • May be tagged to facilitate the creation of arbitrary groupings that exist outside of the normal naming conventions an organization may have
  • Must be added to a run-list before it can be used by the chef-client Is always executed in the same order as listed in a run-list
1255 questions
-2
votes
1 answer

How to do roll back using chef cookbook?

I have seen a resource called "deploy" resource. But i don't know how to do roll back using that resource.
Gogul Raja
  • 31
  • 2
  • 6
-2
votes
1 answer

Is it possible to set Ruby ENV with bash in Chef?

I have a Chef recipe in which I am creating a new randomly named user using a shell script and exporting the username as a variable. Is it possible to set the same user as a session variable in Ruby? Something like... ENV['CHEFUSER'] = 'echo…
Daniel K
  • 115
  • 1
  • 1
  • 13
-2
votes
1 answer

How should i use community chef cookbooks?

Should i just download finished community cookbooks from supermarket, or there is some special mechanism (or package manager) for them, and i can just import them in my recipes somehow?
avasin
  • 9,186
  • 18
  • 80
  • 127
-3
votes
1 answer

chef problems installing packages

I have written a very simple recipe. package "mysql-server" do end whenever I run chef-client on the node, it points to that particular line in my recipe and gives FATAL errors. However, when I go directly to the node and run yum install…
-3
votes
2 answers

Installing Chef [ Work Station, Chef Server, Node ]

I need to configure chef workstation, server, and node. I have questions on chef. Chef server only can be Linux machine? Can chef node be on any machine? Can chef workstation be on any machine? Am I right?
Arvind Agrahari
  • 315
  • 1
  • 3
  • 16
-3
votes
1 answer

How to launch 100 and more servers in Chef

I am new to chef. I have successfully configured chef workstation and server. So by using this below command I am able to launch only one instance: knife ec2 server create –image ami-cc5af9a5 -i ram.pem –flavor m1.small -x root –groups chef-client…
-3
votes
3 answers

Ruby convert string array to string

I have a ruby string array value and i want to get it as string value. I am using ruby with chef recipe. Running in windows platform. Code- version_string = Mixlib::ShellOut.new('some.exe -version').run_command Log.info(version.stdout.to_s) …
Biswajit Das
  • 644
  • 7
  • 26
-3
votes
2 answers

Chef recipe: syntax error,unexpected tIDENTIFIER, expecting ':'

Can someone please take a look at the below code block and let me know what is wrong in this %w"#{zookeeper_ensemble}".each_with_index do |ip, index| if node['ipaddress']?("#{ip}") template "#{zookeeper_data}/myid" do source…
Salim
  • 714
  • 1
  • 5
  • 19
-4
votes
1 answer

Need help to develop CHEF recipe to execute 4 bash scripts on 4 servers in sequence and verify if each script executed successfully

I need help to develop CHEF recipe to automate application installation. Here is my requirement - Well, I have 4 different bash scripts and need to execute on 4 different severs in sequence like script 'A' to execute on server '1' and verify that…
-7
votes
1 answer

Chef Apache2 recipe failing during server build

I've been rebuilding our Chef master server to run in a T2 instance, which means moving it into a VPC. The old master is running 11.10.4 and the new one I've been tinkering with is running 11.16.4. I've gotten close to having it build a proper…
Machavity
  • 30,841
  • 27
  • 92
  • 100
1 2 3
83
84