Stack Exchange Network

Stack Exchange network consists of 174 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

0
votes
2answers
17 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
27 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
16 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
13 views

Why Chef file resource will not run? [on hold]

I am trying to figure out that why I can't get a Chef file resource will not run when notified. I am getting undefined method 'action_run' Code: bash 'pm2' do user 'root' cwd '/tmp' code <&...
0
votes
0answers
16 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
32 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
24 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
15 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
13 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
15 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 ...
0
votes
1answer
31 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
9 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 /...
2
votes
2answers
35 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 ...
0
votes
1answer
39 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 ...
2
votes
1answer
32 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
17 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'...
4
votes
1answer
87 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
78 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
48 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
195 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
95 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
51 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
157 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
34 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
42 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.
7
votes
2answers
1k 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 ...
1
vote
1answer
71 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
76 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
64 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
42 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
193 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
64 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
69 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
921 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
289 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
54 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
100 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
66 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 ...
4
votes
1answer
31 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 ...
1
vote
1answer
43 views

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 ...
2
votes
1answer
85 views

Can I run Chef/Puppet server from Azure and manage my on-premise infrastructure?

I would like to use Azure Chef server (or Puppet, or any other solution) from Azure to manage my infrastructure (around 25 servers and 20 desktops) wich is on-premise behind a corporate firewall. Is ...
4
votes
1answer
204 views

Vendoring - what is it?

In various tools there is the concept of "vendoring". i.e. Ruby's bundle, and Chef's Berkshelf. "vendor" is not a verb and in documentation it's often assumed that I know what it means. Can someone ...
-6
votes
1answer
71 views

User management using chef

I need to install a jenkins on a server using a user jenkinsuser and group jenkinsgroup. so in my recipe I defined as #group group jenkinsgroup do system true end # creates user user jenkinsuser ...
2
votes
3answers
239 views

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 ...
7
votes
2answers
430 views

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 ...
4
votes
2answers
6k views

fatal: ambiguous argument 'master': unknown revision or path not in the working tree

when I modified one of my cookbook that I tried to add a cookbook dependency in berks file cookbook name, '=0.1.0', git: 'ssh://url:xxx/cookbook', tag: '0.0.1' and then tried to converge it which ...
5
votes
2answers
2k views

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' ...
5
votes
1answer
362 views

Zip/tar a folder using chef resource

Can someone help me how to take backup for a specific folder and also zip/tar those folders. I am using this for taking a backup actually, but I would like a compressed output: bash "backup #{...
2
votes
1answer
266 views

Upgrading jenkins using chef

Can you please help me out how to upgrade an existing application which is jenkins using chef. I am trying to upgrade Jenkins from 1.x to 2.x and I have a cookbook for 1.x. what steps do I need to ...
8
votes
5answers
600 views

Are configuration management tools appropriate to use as deployment tools?

Off the back of my answer to the question: How can DevOps help to improve Software Escrow procedures? Tensibai had the question: What would necessitate Capistrano on top of puppet or chef? My ...