Questions tagged [chef]

For question on usage of the configuration management tool Chef

Questions about Chef on Devops should be about methods using Chef.

For assistance on recipe code not working, please post on Stack Overflow under tag. Don't forget to include a Minimal verifiable example and your error log.

Before asking, take the tutorials on https://learn.chef.io, all basis are explained.

For open ended/opinion question prefer other medium like:

63 questions
9
votes
1 answer

What steps could be taken to inherit and override some parts of a Chef cookbook?

With 3200+ cookbooks available in Chef supermarket, often there is already a cookbook that covers the need I need to solve. Almost every time there is some change required to a template, or a variable, or a resource in an existing cookbook. What are…
Evgeny Zislis
  • 8,963
  • 5
  • 38
  • 72
7
votes
3 answers

Using Chef for multi-node operations

I have an application I would like to configure using Chef that spans multiple nodes. Let's say that the process of doing it consists of Do a thing on node A capturing the output Do another thing on node B with that output Back to node A now for…
Gaius
  • 1,076
  • 9
  • 17
7
votes
2 answers

chef database cookbook deprecated

I frequently use chef database cookbook and it is being deprecated doesn't receive any updates. They even disabled issues on the github so it is not possible to check if any issues I encounter have been discussed and possible solutions were…
AlexD
  • 179
  • 5
5
votes
1 answer

Managing Data bags in different environments

Hi I got stuck with one of the scenario, I have two environments Dev and Prod. I need to pass different values in dev and different vales in prod. So how can I manage it using one Data bag. this is my general Data bag in dev environment I am using…
pandey
  • 949
  • 2
  • 9
  • 18
5
votes
2 answers

Downloading multple files from remote using chef resource

I am wondering if there is a resource to download multiple files from remote using chef resource. I want to use: remote_file 'Download remote file' do path /opt/ source http:///xxx mode '0644' action :create end ...for one file. What if I…
pandey
  • 949
  • 2
  • 9
  • 18
3
votes
2 answers

Chef username/passwords best practice for multiple nodes

I've been playing around with Chef to evaluate it as a potential CD tool for the company I work for. So far I've been using it with Vagrant to provision a VM. In my recipes I've been retrieving the username/password from data bags. I'm now looking…
Caledonia91
  • 383
  • 2
  • 10
3
votes
3 answers

Unable to create databags in chef

I am very new to chef and trying to secure passwords using databags. Unfortunately, I tried in different ways but unable to succeed. I followed different tutorials first and second. I understood only two steps but later on I was unable to move…
Sam
  • 139
  • 3
2
votes
0 answers

Logging the source of remote file when using array using Chef

We are currently using remote_file with source as an array. This allows us to check multiple servers for the file we want, in case the primary server is down. We want to log which source remote_file ended up downloading the file from. I assume the…
george
  • 21
  • 1
2
votes
1 answer

Chef 12: Error while uploading cookbook

I am using Chef and trying to upload a cookbook on chef-server but getting an error in response: {"error":["Invalid key all_files in request body"]} However, I can see the list of cookbook using knife node list My chefDK version: chef -v Chef…
2
votes
1 answer

What is special about the admin in chef?

I've read over the chef docs for a while now and I can't seem to find anything that says what an admin does in chef. I can do all sorts of things with making people admins, but there's no indication of what this does for me. Is there a clear…
chicks
  • 1,848
  • 1
  • 12
  • 29
1
vote
1 answer

How to use in Chef different attributes values for different nodes

I have a cookbook that is being used to deploy some software on a chef nodes. I use it when bootstraping a node and then remove it from the run_list since I need it only to run once. I don't know if it's proper to do thing like that in Chef or if…
Learner
  • 123
  • 5
1
vote
2 answers

Chef14 Load a provider in a recipe Chef::Provider::DeployKeyGithub

I have a problem during migration of chef-client 12 to chef-client 14 and seems that the old way to load Providers is different in chef14 Chef::Provider::DeployKeyGithub cannot be load deploy_key deploy_key_name do provider…
1
vote
1 answer

Chef remote_file set maximum number of re-directions to zero

I am trying to implement the below wget download command using chef remote_file resource. But I couldn't find a way to avoid the re-directions. The URL that I am trying to access may sometimes be redirected to my ISP bill reminder page. And chef…
Yuge
  • 21
  • 1
  • 7
1
vote
2 answers

Chef syntax with "do" statement

While reviewing a chef.io whitepaper, I encountered the following syntax: # Load your AWS credentials databag include_recipe ‘aws’ aws = data_bag_item(‘aws’, ‘main’) aws_elastic_lb ‘elb_qa’ do aws_access_key aws[‘aws_access_key_id’] …
orberkov
  • 195
  • 7
1
vote
1 answer

How to use Chef cron resource to run in minute intervals

Is it possible to set cron to run per minute? I have tried two ways below with no luck. I have reviewed the documentation: https://docs.chef.io/resources/cron. The way the documents reads to me is that I can only run cron in a specific minute within…
1
2