Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [chef]

For question on usage of the configuration management tool Chef

1
vote
1answer
30 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 ...
0
votes
1answer
27 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] ...
0
votes
1answer
37 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 ...
0
votes
2answers
17 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 ...
1
vote
1answer
35 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 ...
0
votes
0answers
14 views

How to exclude a receipt from a role?

We have a role and a json file which runs ex.: a zabbix install receipt. We don't want to touch these files, source code. The question: how can we exclude the zabbix receipt from the role? I ...
0
votes
0answers
31 views

Using chef go not found but manually exists

I have a fairly simple install of chef and go (golang). If I use a go install command in my chef recipe I get an error of go: command not found but when I do the exact same command manually using the ...
0
votes
1answer
21 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 ...
0
votes
0answers
7 views

Consul reporting file missing but file exists

I am trying to register a health check using the a config file but I have ran into an issue where it says a script file does not exist but it clearly does when I manually check if it exists. Checks ...
2
votes
1answer
36 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 ...
0
votes
0answers
19 views

How do I resolve this error when using chef-solo from packer?

I'm trying to figure out how to leverage Packer to streamline some stuff and I'm having issues integrating chef recipes in it. Here's the error log packer throws out amazon-ebs: =====================...
0
votes
0answers
41 views

Login to docker registry using chef

We want to create a chef recipe which can able to login to docker registry and pull some images. I have tried using docker_registry resource as mentioned here https://github.com/chef-cookbooks/docker#...
3
votes
1answer
239 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 ...
1
vote
2answers
21 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 ...
1
vote
1answer
82 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 ...
1
vote
0answers
113 views

Chef vault not working

I am trying to setup a cookbook that will pull git credentials from a chef vault but I am having trouble getting it to work. I am sure it is a typo somewhere but where I do not know. I have included ...
0
votes
0answers
115 views

Chef git private repo using username/password

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'...
2
votes
1answer
88 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 ...
0
votes
0answers
26 views

Chef - Setting Unique Node Attributes

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 ...
0
votes
0answers
17 views

Using test kitchen from above directory

I have two cookbooks I need to run for a test to work with test kitchen. They are called init_server_setup and postgres and both need to run the default recipes. I have only ever needed to run a ...
1
vote
0answers
19 views

tomcat service fail to start due to length line limit

Scenario - I am using chef and cookbooks for installing tomcat on servers. I am using the latest tomcat cookbooks. I am passing java_opts variables using env_vars. Since the number of JVM is more for ...
0
votes
1answer
24 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 ...
2
votes
1answer
133 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 ...
0
votes
0answers
12 views

Chefspec preventing cookbook upload syntax error with %w()

I am trying to upload a cookbook called 'cookbookABC' and it has the following chef spec code but I am not sure why it is failing: let(:tool_path) { '/wk/wildfly_tools' } %w(/tailLog.sh' /tailLog.sh /...
3
votes
2answers
41 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 ...
1
vote
1answer
87 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 ...
3
votes
1answer
38 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 ...
1
vote
0answers
22 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'...
5
votes
1answer
123 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 ...
0
votes
1answer
144 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 ...
-1
votes
2answers
71 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....
1
vote
1answer
362 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/...
4
votes
1answer
119 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-> ...
4
votes
1answer
55 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. ...
7
votes
3answers
214 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 ...
1
vote
1answer
75 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 (...
0
votes
2answers
45 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.
8
votes
2answers
2k 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 ...
2
votes
1answer
98 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 ...
7
votes
3answers
87 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 ...
0
votes
1answer
67 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 ...
2
votes
1answer
65 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 ...
9
votes
2answers
308 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 ...
1
vote
1answer
257 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 ...
7
votes
1answer
82 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 ...
8
votes
1answer
1k 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"...
6
votes
4answers
327 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 ...
2
votes
0answers
59 views

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 ...
1
vote
0answers
134 views

Chef 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 ...
5
votes
1answer
106 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 ...