Questions tagged [chef]
Chef is an open source configuration management framework for infrastructure automation.
635
questions
2
votes
0
answers
1k
views
Chef Server 12 on Debian Jessy fails with "unable to change to service directory"
While not being officially supported, I want to run Chef Server 12 (12.3.0) on Debian Jessie.
After fixing Debian's systemd ego trip as described in chef-cookbooks/chef-server#86, it is installing ...
1
vote
0
answers
50
views
My cloned Chef server has a problems with syncronising of recipies
I have inherit a complex company cloud based server system with several Nodes that is using Chef for the setup of the different nodes.
Chef + Ironfan + Berksshelf are the most important elements on ...
0
votes
1
answer
151
views
Can I upgrade nodes to chef 12.5.1 client in chef server 11.1.3 environment?
We are running opensource chef-server 11.1.3 (we are testing chef-server-core 12.2.0-1). Can I upgrade the client nodes in my 11.1.3 server environment to chef-client 12.5.1?
Would anything ...
0
votes
1
answer
677
views
save all ohai information from selected nodes
I'm running the open source version of chef server 12.
While reading some docs I came across ohai, which collects information on each node and - as far as I understand - provides this information to ...
1
vote
1
answer
209
views
How can I serialize postgresql.conf multiple times during a Chef run when using cookbook postgresql?
I am creating a Chef recipe that does a couple of things, amongst others a big import of data into a Postgresql database.
I am using the Supermarket 'postgresql' cookbook which allows me to create a ...
1
vote
3
answers
2k
views
Chef 12.5 Custom Resources - Accessing Resources in Recipes
I am writing a cookbook that uses the Custom Resources present in Chef 12.5. I have a custom resource that uses a template resource and as such has a notifies that reloads the associated service.
...
1
vote
1
answer
703
views
What is the best workflow to build and test your aws opsworks chef cookbooks locally?
For months I've been struggling to find the best workflow for building and testing my aws opsworks cookbooks locally prior to pushing to opsworks.
After a lot of stalled attempts I found a blog post ...
1
vote
1
answer
2k
views
chef: How do I increase the CommandTimout for Mixlib::ShellOut in a ruby block?
I'm trying to perform a database data load in a chef recipe on an Ubuntu 14.04 system with a Chef 11.10.4 based client. I'm doing the data load in a ruby block and here are the relevant portions of ...
0
votes
1
answer
224
views
Chef best practices - assessing/picking a cookbook
Obviously, one of the nicest things about Chef is re-using proven components via cookbooks, especially via the wrapper cookbook approach.
However, how do you choose the cookbook to wrap? Some ...
-1
votes
1
answer
408
views
Encountered error "in `recv': Operation timed out " when creating an aws instance with vagrant and chef
I have used the vagrantfile to create a Virtualbox instance and it did not have any issue.
However when I added the switch --provider aws I got this error message:
==> server-1: Loading Berkshelf ...
0
votes
1
answer
2k
views
Why the chef recipe cannot read the values from bash environment variables?
This is the content of my shell script:
export TARGET_ROLE=play
vagrant up
I am using the script to export environment variables in order to set some variables inside my chef cookbook
role = ENV['...
0
votes
1
answer
1k
views
chef: How to modify autogenerated file
I have to modify autogenerated nginx config, based on some conditions:
Now in recipe i include template:
template "#{node['nginx']['dir']}/sites-available/#{node['fqdn']}" do
source '...
0
votes
2
answers
457
views
Can I uninstall a chef cookbook I installed with `knife cookbook site install`?
I have installed a chef cookbook with knife cookbook site install. But I don't want/need that one. Is it possible to uninstall a cookbook like this? To clean up my cookbooks directory?
6
votes
1
answer
18k
views
Which way is the correct way to pass variables to chef templates?
Looking at this official documentation: https://docs.chef.io/resource_template.html I see examples of passing variables to the Template resource that use either "{", "({" or "(" to scope the variables....
1
vote
0
answers
38
views
Can I use Chef for Desired State Configuration (DSC) of MSIs?
I am trying to figure out how to work with MSIs using Chef. What I would like is to have something where I can specify a product, version, and download link. Chef would then query the MSI database, ...
1
vote
0
answers
35
views
Generating configuration file in chef using 2 custom resources
I would like to describe my server like
my-container("name")
my-feature("name", "config")
The my-container describes a docker container with some custom Dockerfile in name folder. When I add my-...
1
vote
3
answers
5k
views
Unattended chef client installation
Has anyone tried performing an unattended chef client install - installing chef client from the node itself?
There is not much information provided in the documentation. Also, I don't want chef-solo ...
0
votes
2
answers
1k
views
Chef recipe - To remove a package when you don't know the exact package name
I am aware of the package resources, what I am struggling with is how do I find the exact package name? Since there will different versions of OS in different nodes, how to write a recipe to uninstall ...
0
votes
1
answer
173
views
Unattended install (upgrade) of cassandra via chef
I'm creating a cassandra upgrade/install recipe with chef.
package "cassandra" do
version "2.1.8"
action :install
end
When I install over the top of an existing version I get prompted about new ...
1
vote
1
answer
1k
views
Create chef recipe by passing values dynamically, from properties file
I created a chef recipe which has the installation of a specific rpm mentioned in it. This rpm has a version number which needs to be loaded dynamically from a properties file (which is itself created ...
1
vote
1
answer
256
views
knife client list does not list the workstation
I have a chef server installed on a CentOS VM anf I have workstation setup on another CentOS VM.
When I run the 'knife client list' I see:
org-validator.pem and my workstation does not get listed.
...
4
votes
2
answers
3k
views
How to specify both a recipe and a version of a cookbook at the same time?
I'm trying to specify both a cookbook version and a recipe on a nodes run_list and so far haven't been able to figure out how to do so. I can specify the version just fine and that works, and I can ...
5
votes
1
answer
290
views
What do the default opsworks cookbooks actually do?
The company I'm working for is making a move to AWS and so I've been given the opportunity to start investigating the various services they provide. OpsWorks looks really good for rolling out mass ...
0
votes
2
answers
227
views
Can CHEF have different databags in different datacenters
Chef 12 has the notion of organizations, and environments.
How would you logically model different data centers?
For example, if you have two data centers, with 2 environments.
us-datacenter
\...
0
votes
0
answers
5k
views
Windows Server 2012 R2 Automatic Login
I'm trying to setup automatic login on a Windows Server with a chef script however all the answers I have found thus far don't seem to be working for Windows Server 2012 R2.
I followed the registry ...
0
votes
2
answers
867
views
How can I use the apache2 cookbook from supermarket.chef.io in AWS OpsWorks?
I have a cookbook that is setting up some simple apache configuration and I am using the apache2 cookbook from SuperMarket.
I'm trying to run my cookbook's recipes using AWS OpsWorks with Chef 11.10....
1
vote
1
answer
387
views
Conditional dependencies in CHEF
I have a complicated software stack that I manage with 2 recipes.
recipe[stack::foo]
recipe[stack::bar]
foo is installed on every server, whereas bar is installed on only a subset of servers. bar ...
0
votes
1
answer
84
views
Opsworks & Chef - Customize each app deployed with same recipes
I have a set of recipes that deploy python apps to AWS instances, they work well. I want to deploy two different apps with slight differences, like one needs async worker code installed and the other ...
0
votes
0
answers
177
views
chef nagios monitor node outside VPC in AWS
I used the chef community cookbook to setup nagios inside a VPC in AWS. All my nodes in my chef setup are found correctly and added to nagios automatically, and the nodes that are inside the VPC with ...
0
votes
1
answer
703
views
get chef template path from template
In my chef erb template, I want to get the path the template is being copied to. So it looks like like:
MY_PATH=<%= ###HOW DO I GET THE TEMPLATE PATH### %>
Is there a way to get that?
0
votes
1
answer
1k
views
ERROR: OpenSSL::PKey::RSAError: data is too large for key size", when trying to upload cookbook 'learn_chef_iis'
I am receiving the following error message: "ERROR: OpenSSL::PKey::RSAError: data is too large for key size", when trying to upload cookbook 'learn_chef_iis'. I was following a CHEF tutorial and now I ...
1
vote
1
answer
2k
views
How to retrieve an organization's private key?
I've just installed Chef Server version 12, and created an admin user and default organization myorg. I see the organization in the Chef Manage GUI, and its public key. Using a workstation that's ...
0
votes
1
answer
1k
views
ChefSpec - Coverage when testing for include_reciepe
I' am trying to write ChefSpec tests for some of our Cookbooks. One of those is including a lot of other cookbooks, to setup an Jenkins CI Enviroment.
Iam wondering how other people are testing the ...
4
votes
1
answer
4k
views
Where on the filesystem are cookbooks stored on a chef server
I am playing around with orchestration and set mysef the challenge to:
build a chef server
build loads of nodes after that that are configured by the chef server
The issue is that the chef server ...
0
votes
1
answer
196
views
Chef / Vagrant - Kitchen cant connect to Update Jenkins
Iam getting crazy with Chef, Vagrant and Test-Kitchen.
We have an customized Jenkins Cookbook, it works on "normal" Clients without Cooperate Network Proxys, but fails behind with the following error....
0
votes
1
answer
267
views
How to get Get Amazon User Name / User ID from Opsworks deployment hooks?
I'm trying to convert a Capistrano deploy script to OpsWorks recipes. I'm doing so far so good, except for Slack integration. In the Capistrano script, it says
John Doe is deploying FooProject ...
1
vote
2
answers
1k
views
how to configure jenkins via chefzero vagrant provisioner
using the jenkins cookbook 2.2.2
==> https://supermarket.chef.io/cookbooks/jenkins
i can bring up jenkins in vagrant vm using chef_zero provisioner with
chef.run_list = [
'recipe[jenkins::...
0
votes
1
answer
71
views
Run community chef cookbook [closed]
I want to configure a mailserver on AWS with this cookbook: https://supermarket.chef.io/cookbooks/postfix-dovecot
I have chef-client and chef-dk installed. I have downloaded the package and changed ...
1
vote
2
answers
882
views
How to run chef-client on relevant nodes when cookbook is uploaded?
I want my chef-client to run when something is changed in cookbooks. Is it possible?
I find this "run once in X min" not very optimal. When I change something I want it to be applied immediately so I ...
5
votes
1
answer
367
views
Can you use configuration management (Puppet/Chef) behind a firewall?
I'm tasked with designing and implementing configuration management (Chef) for a infrastructure where the production servers are completely segmented and isolated behind a jump box.
----------------...
0
votes
1
answer
79
views
Protect Chef config when a node is compromised
Imagine that one node of a system gets compromised. If I understand correctly hacker will be able to get all configs for all servers in a system using chef's API. Is that correct? If yes, is there a ...
2
votes
2
answers
965
views
Any way to re-run the chef-solo provisioner on a packer built machine?
I'm building VirtualBox machines using Packer and the chef-solo provisioner. Is there a way to re-run chef from within the VM as recipes are updated without needing to re-run packer build?
6
votes
1
answer
6k
views
How to check if chef databag exists?
I want to check if there is a slaves databag. If there is one, and it contains data then I want to execute an action for every slave.
I have the following code:
slaves = data_bag('slaves')
if ...
3
votes
2
answers
1k
views
chef-shell as chef-client in chef-zero mode (local mode)
Can I run chef-shell as chef-client when my chef-client is running in chef-zero (chef-local) mode?
The parameter used to run chef-client in zero mode is -z. However using -z with chef-shell just ...
2
votes
1
answer
5k
views
What's the difference between Chef Cookbooks and Chef Roles?
My current understanding:
You can add a recipe to a client. A recipe can contain other recipes.
You can add a role to a client. A role can contain other roles and recipes.
Then what's the practical ...
0
votes
1
answer
765
views
Chef: mongodb::user_management failing in aws opsworks with "NameError: uninitialized constant Mongo::MongoClient"
I have been using the mongodb cookbook successfully to create user accounts for months but recently something has changed and I can't figure out what it is. The default recipe completes without ...
1
vote
2
answers
138
views
Managing thousands of machines with approval controls [closed]
We are a startup that is just getting up to speed and running into the problem of managing hundreds of machines, and having to do nightly and weekly releases to all of them as well as managing their ...
0
votes
1
answer
3k
views
chef remote_directory permissions
I have checked https://docs.chef.io/resource_remote_directory.html and http://joerussbowman.tumblr.com/post/58241535331/chef-remote-directory-is-basically first of all.
chef-client version 12.2.1
...
17
votes
5
answers
2k
views
When is it appropriate to use a configuration manager (eg Puppet / Chef / Ansible)?
At my current workplace, I look after two VMware host machines, an OpenBSD physical machine, three Debian VM's, and six Windows Server VM's (2008/2012).
I'm considering implementing a configuration ...
0
votes
0
answers
308
views
Chef: Cookbook website not found
I've been following several guides and read thru documentation trying to get knife-solo to provision a VM for me.
Knife solo will work with Berkshelf (used to manage a library of chef cookbooks), so ...