Questions tagged [chef]

For question on usage of the configuration management tool Chef

Filter by
Sorted by
Tagged with
1 vote
1 answer
101 views

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 ...
runningraptor's user avatar
1 vote
1 answer
167 views

How does one perform systems testing against multiple interdependent machines?

I'm looking for a platform that allows me to run tests against multiple, closely-coupled systems. We deploy different products to Red Hat family machines - think Rocky Linux, CentOS, Fedora, RHEL, etc....
vpseg's user avatar
  • 11
1 vote
1 answer
319 views

Setup multiple Raspberry Pi different network configurations

For multiple projects we are setting up 2 to 6 RPi's per project. Each project runs on a different network and for some of these networks we can use DHCP, for others the RPi's have to connect using a ...
Postie's user avatar
  • 113
2 votes
2 answers
497 views

When do I have to renew an SSL certificate in Chef?

In the annual process of renewing SSL certificates, I have a list of infrastructure that needs updating. This usually included Chef. This is followed by an arduous and painful process of getting every ...
Muradin007's user avatar
1 vote
1 answer
132 views

IaC Deployment in Azure with Terraform + Chef vs. Puppet vs. Ansible for Data Engineers

I am an Azure Data Engineer and try to leverage the IaC benefits in this area of Azure Data Factory, Azure Databricks, Azure SQL & Synapse, Azure Power BI, Azure IoT. After some research I figured ...
Pirvu Georgian's user avatar
0 votes
1 answer
204 views

How to have Kitchen CI run a script on success?

I've got a Chef repo that uses test-kitchen. I have a pretty good battery of tests, and when I run the tests and they're successful, I have a vendor.sh script that does some cleanup and a Berks vendor....
Chaim Eliyah's user avatar
1 vote
2 answers
164 views

How to manage the versioning of Azure SQL Databases?

I am looking for a tool that will manage the versioning of Azure SQL Databases, and check for missing schema or migration scripts and apply those changes based on what is missing. Any other solutions ...
smorris's user avatar
  • 11
1 vote
1 answer
1k views

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 ...
Learner's user avatar
  • 123
1 vote
1 answer
102 views

Chef vs Ansible: will configuration be applied if connection is lost during configuration pulling/pushing?

Scenario Configuration management tools like Ansible or Chef often have a master/controlling machine and the machines they are controlling (agents). Question What if the connection between master ...
Tran Triet's user avatar
0 votes
1 answer
148 views

kitchen verify hangs on centOS, but not Debian

.kitchen.yml --- driver: name: vagrant provisioner: name: chef_zero platforms: - name: debian-9 - name: centos-7 suites: - name: default run_list: - recipe[foo::default] ...
Chaim Eliyah's user avatar
0 votes
1 answer
3k views

Chef - assign a value to variable in execution or converge phase

I am creating a recipe that has two resources. The initial VPN IP address is a empty valued string. Upon execution of the first resource, a IP address within the range 10.12.xx.xx is set. Then a ...
Yuge's user avatar
  • 21
1 vote
2 answers
147 views

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 ...
Carlos Catari's user avatar
1 vote
1 answer
162 views

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 ...
Yuge's user avatar
  • 21
0 votes
1 answer
67 views

Cookbook get and set dynamic URL

There is a static Artifactory URL being used to grab a semantically versioned artifact and deploy it to JBoss. The deployment aspect of the cookbook is already fleshed out. However, I would like to ...
firesalsa's user avatar
1 vote
1 answer
383 views

Running consul in the background using Chef

I am trying to create a Chef cookbook that will run Hashicorp Consul in the background and will continue with the rest of the recipe and not get hung on starting Consul. I have tried the & method ...
Josh Kirby's user avatar
3 votes
1 answer
3k views

Inspec tests conditional on OS version

What is the idiomatic way to tell Inspec to run test X on OS version A and test Y on OS version B? I'm aware of the technique of dumping the Chef node object to a JSON file in /tmp but that isn't ...
Gaius's user avatar
  • 1,086
1 vote
2 answers
45 views

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 ...
orberkov's user avatar
  • 195
1 vote
1 answer
315 views

Chef resource to register gitlab runner automatically

We would like to automate installation of gitlab runner using chef. we are successful with it. Now, the Issue is regarding registering gitlab runner with chef resource. we have gone through chef ...
DevOps's user avatar
  • 13
1 vote
0 answers
633 views

Chef git private repo using username/password [closed]

I am wanting to clone a git repo using the git resource in Chef but instead of SSH like everywhere seems to show I want to use just username/password. The security of the repo is not important but don'...
Josh Kirby's user avatar
3 votes
1 answer
471 views

Configure AWS cli inside chef cookbook

I am working on setting up something with S3 and Chef, I have AWS CLI installed and working but I need to figure out how to specify the access ID and the secret access key. I know there are cookbooks ...
user avatar
0 votes
1 answer
222 views

Chef - Setting Unique Node Attributes [duplicate]

I'm fairly new to Chef and have been writing recipes for Kiosks that we use at work. I've created a role for the Kiosk that contains a set of attributes, however one of these attributes is a unique ...
Caledonia91's user avatar
0 votes
1 answer
63 views

Planning a backup system using postgress, chef and vault

As the title says I am working on planning a way to backup postgres using chef and vault. Idea is that we already encrypt the backups from postgres using a key (random binary string) and we would like ...
user avatar
2 votes
1 answer
771 views

How do I run the InSpec using a wrapper profile?

This blog post describes wrapper profiles in detail: https://blog.chef.io/2017/07/06/understanding-inspec-profile-inheritance/ At the very end of the post, it references a Git repo that contains an ...
james.garriss's user avatar
3 votes
2 answers
164 views

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 ...
Caledonia91's user avatar
1 vote
1 answer
271 views

Customizing deploy key and ssh wrapper path for git cloning through application_git cookbook

I am using Chef 12.0.3 for managing servers. Earlier I was using application cookbook for cloning repository. But now in higher version of application cookbook, this support is moved to new cookbook ...
Arora20's user avatar
  • 111
3 votes
1 answer
63 views

Tool preferences for rapidly spinning up and spinning down k8s clusters

My team hosts several completely different projects on a production k8s cluster with a given configuration. We use AWS (and are starting to use Google Cloud). We have a QA cluster as well, that "sort ...
swagrov's user avatar
  • 131
1 vote
1 answer
83 views

Does the Chef bash resource create history entries?

I know that using a password in the command line is a bad idea because bash commands can be recorded in history. If I run a command in the chef bash resource though, when I look up the history I don'...
David Eugene Pratt's user avatar
5 votes
1 answer
202 views

What is a suitable strategy for provisioning Chef Server through code?

Background I am tasked with setting up a Chef server on our Azure Cloud for a new DevOps automation project. We are using the Resource Manager model for Azure, in case it's relevant. We will likely ...
Vish's user avatar
  • 601
0 votes
1 answer
360 views

How to access ephemeral storage of EC2 instance?

I've got ephemeral storage setup in Scalr as part of the role. The instance is spinned up by Chef and it seems it is running fine (it's using ephemeral0 device mounted as D: drive). I've tried to use ...
kenorb's user avatar
  • 7,781
-2 votes
2 answers
153 views

How to create Chef Package for Redhat. I have 2 rpms agents and 2 yaml files

Installation steps. There are two ELK agents to install: Metricbeat Copy the attached file metricbeat-6.0.0-x86_64.rpm to the target server Execute the command: sudo rpm -vi metricbeat-6.0.0-x86_64....
Ilyas khan H's user avatar
1 vote
1 answer
3k views

terraform chef provisioning - cannot validate certificate for 10.90.239.223 because it doesn't contain any IP SANs

While configuring the chef provisioner I am running into the following error after running 'terraform apply' chef_environment.terraform_01: Post https://10.90.239.223/organizations/mykitchen/...
scott's user avatar
  • 466
4 votes
1 answer
263 views

difference between packer and matchbox

I have this setup to standup a baremetal machine: Terraform-> Matchbox \-> Chef-> Docker My colleague has a setup to standup VMs in AWS: Terraform-> Packer-> Chef-> ...
scott's user avatar
  • 466
4 votes
1 answer
203 views

What's missing from this simple recipe that creates a user?

I've spun many boxes in the cloud before, but was growing tired of going through the same dance; and as I'm trying to get familiar with Chef, I figured, that's a good use case to do a little learning. ...
alexakarpov's user avatar
10 votes
3 answers
468 views

How should we automatically rebuild immutable infrastructure when new packages are available?

We're going to be using Terraform to automate our infrastructure deployment and Packer to create the machine images deployed by Terraform. By following immutable infrastructure design principles, we ...
Thuy Guevarra's user avatar
1 vote
1 answer
223 views

Chef (well, Test Kitchen) hanging when using local cookbook

I am new to Chef, trying to put together a POC for my company. So I've got a project that has two cookbooks under the cookbook folder. One cookbook is a "base" cookbook called 'hydra-base', the other (...
Kevin Milner's user avatar
0 votes
2 answers
54 views

Which Chef software do we need to install for Windows?

I am using Windows 8.1. Which Chef do I need to install to cover all Chef modes like workstation, node, and chef-server? I want all three of these in my Windows 8.1.
Vinodh Machi's user avatar
8 votes
2 answers
4k views

Why not use configuration management tool instead of Dockerfile?

I'm pretty new to Docker and configuration management tools. At first I started writing bash scripts to provision my Vagrant boxes for my development machines, but now I've switched to using Chef ...
David Eugene Pratt's user avatar
2 votes
1 answer
185 views

Chef Provisioning for canary deployment and orchestration

I am looking for best tool that, does below jobs for deployment. Configuration: 1) Configuration of deployment node machines in specific environment 2) Configure no of service instances to be alive ...
Nitul's user avatar
  • 243
7 votes
3 answers
233 views

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 ...
Gaius's user avatar
  • 1,086
0 votes
1 answer
79 views

Creativity use case scenario? [closed]

i am a devops learner, just finished graduation actively looking for jobs in the field of DevOps. I am learning many tools like GIT, Jenkins, Chef, Docker , Nagious, ELK, AWS, etc. Can anyone link ...
EDU_EVER's user avatar
  • 121
2 votes
1 answer
261 views

Sharing Gems between Chef and System Ruby

I know about the chef_gem resource obv, but in the interests of good system hygiene I would like to avoid as much as possible duplication, so I would like to share Gems between the embedded Ruby ...
Gaius's user avatar
  • 1,086
9 votes
2 answers
933 views

How to Chef things that don't exist yet

Let us say I have some Chef code like: require 'mixlib/shellout' yum_package 'somepackage' myvar = Mixlib::ShellOut.new('/bin/somecommand').run_command.stdout.strip Where /bin/somecommand does not ...
Gaius's user avatar
  • 1,086
1 vote
1 answer
918 views

Accessing attributes from within recipes

Let us say I do knife node edit mynode and within the normal section I edit the JSON to add "myattribute": "myvalue",. I save this and verify that it has taken effect by issuing knife search node -a ...
Gaius's user avatar
  • 1,086
7 votes
1 answer
112 views

Organizing Chef cookbooks

Is it 100% required to store all the cookbooks under chef-repo? This seems a little bit inconvenient for me, I'd prefer to store solution cookbooks in the application codebase, or just as a standalone ...
madhead's user avatar
  • 265
9 votes
1 answer
2k views

What is Chef Automate

I've noticed that now most of the Supermarket's recipes are using Chef Delivery (aka Chef Automate). There is little information about it on their site, and it looks for me like it is a "pig in a poke"...
madhead's user avatar
  • 265
6 votes
4 answers
389 views

DevOps practice on AWS instances

I am new to DevOps, started learning the different tools. I would like to practice all of the tools like Jenkins, Chef, GIT, Puppet, Ansible, Docker, Kubernetes, etc . My question is If I would like ...
EDU_EVER's user avatar
  • 121
2 votes
0 answers
114 views

Logging the source of remote file when using array using Chef [closed]

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 ...
george's user avatar
  • 21
2 votes
1 answer
222 views

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 ...
Gourav Singla's user avatar
5 votes
1 answer
190 views

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 ...
pandey's user avatar
  • 949
4 votes
1 answer
46 views

How to give value in runtime for chef

I got stuck with a scenario where I need to provide runtime value while restarting/starting httpd service using Chef. I installed SSL certs where it asks password for every reload or start. I tried ...
pandey's user avatar
  • 949