Chef is an open source configuration management framework for infrastructure automation.

learn more… | top users | synonyms

2
votes
2answers
116 views

Re-bootstrap a Chef node

I've got a Chef node, bootstrapped with knife bootstrap my.example.com --ssh-user USER --ssh-password 'PASSWORD' --sudo --use-sudo-password --node-name my.example.com If I then format the node, how ...
0
votes
3answers
617 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 ...
3
votes
1answer
1k views

Why am I getting 'undefined method' exceptions when executing 'run_list add', 'run_list remove' and 'rackspace server delete'?

[Originally posted this to opscode forum, got no response] I’m testing out a free hosted chef-server account and multiple subcommands are failing with ‘Unexpected Errors’. Perhaps my version and the ...
1
vote
2answers
1k views

How to install APC on a vagrant box running Ubuntu 12.04 with PHP 5.4?

In my "Vagrant" file I have this line: chef.add_recipe("php::module_apc") But it gives me this error: [2013-01-11T22:14:53+00:00] INFO: Processing package[php-apc] action install (php::module_apc ...
0
votes
1answer
3k views

How to install tomcat for many instances with CHEF?

I would like to install tomcat with a recipe through chef at some folder, like /company/tomcat6.0.45-port8081. But sometimes I have many instances of tomcat, like /company/tomcat7.0.41-port8082, /...
2
votes
0answers
25 views

How to let chef listen on multiple IPs

I'm currently playing with chef to evaluate whether or not such a configuration tool might help us in our *nix-based environment. For the last few days I'm struggling with one problem I can't find a ...
1
vote
1answer
1k views

Multiple related resources in chef recipe

I need to run some commands depending on a result of previous execution, which again depends on some package being installed. On the first run, I'd expect something like: install package "XXX" get ...
0
votes
2answers
2k views

Chef: Knife ssh connection error

I try to run a command on all my nodes but get the following error. The chef docs say it should work like this. me$ sudo knife ssh "name:*" "uptime" -x myuser WARNING: Failed to connect to -- Errno::...
0
votes
1answer
18 views

Unable to connect to chef server

I have a Chef server running on AWS. I am able to connect to it via web browser and see the web ui from my machine which isn't the ec2. But when I bootstrap the node, also a ec2, it fails to connect ...
1
vote
1answer
1k views

Can Chef AWS cookbook query EC2 instance tags?

Chef has the official AWS cookbook (https://github.com/opscode-cookbooks/aws), which allows for spinning up of AWS resources, as well as updating of resource tags. Can the custom resources introduced ...
0
votes
0answers
28 views

Chef node not checking in with the server

I've recently moved my clients from one chef server to another, and now none of my nodes are checking in properly. I can manually run 'chef-client' successfully, and I do have the chef-client::...
0
votes
0answers
23 views

Chef and MySql: Error setting data_dir

I am trying to setup Mysql server 5.6 on Ubuntu 14.04 using Chef 12, testing using Vagrant It all goes fine till i try to set the data_dir to a custom value (It was working fine with the default ...
2
votes
1answer
1k views

How to use an SSH Gateway with Chef's Knife Bootstrap

I'm just getting started with Chef and have a few nodes in a private network that I need to first ssh into a gateway node to gain access to. For the moment i'm using purely password based ...
1
vote
2answers
33 views

Does a Chef server need to be public?

I have a Chef server running on our local network and tested it with other machines on the same network and everything worked fine. I started up a ec2 instance, and try to bootstrap and it works until ...
1
vote
1answer
2k views

Chef fails to bootstrap

I'm trying to create my first Chef node. I've got my laptop as the admin machine and VMs alaska and kentucky as the Chef server and node, respectively. This is strange because it's coming back as "No ...
0
votes
1answer
25 views

Changing a registry key's permissions from Chef

I'm attempting to automate the Jenkins Windows slave installation and I need to change the owner and permission of some keys in order to allow read/write access to certain keys for the administrator ...
1
vote
0answers
29 views

Custom AMI fo AWSr Opsworks fails setup phase but logs seem clean?

So I've followed through this userguide for creating an AMI from an EBS backed Opsworks instance and it all seemed to go smoothly until I attempted to boot an instance in Opsworks from the new AMI. ...
0
votes
2answers
76 views

How to reset password for Chef web server without email

I'm running a Chef server in the cloud. I can't log into the "Chef Manage" web interface because I forgot my password. I can still use knife to (for example) update nodes from my workstation using ...
3
votes
2answers
2k views

“one-off” use of http_proxy in a Chef remote_file resource

I have a use case where most of my remote_file resources and yum resources download files directly from an internal server. However, there is a need to download one or two files with remote_file that ...
0
votes
2answers
3k views

Ruby/Chef include_recipe and know variables from parent file?

I am trying to use a local variable in an included file. I get the error that's it's not defined. I am not sure a way to do this, do you? I have a recipe folder with: recipes/ development.rb ...
4
votes
2answers
3k views

How to create hash or yml from top level attributes values of node?

I have a chef recipe where I want to take all of the attributes under node['cfn']['environment'] and write them to a yml file. I could do something like this (it works fine): content = { "...
0
votes
2answers
2k views

Chef-solo cannot locate an nginx recipe template

I have been recently experimenting with Chef. I thought I would attempt to rebuild my personal web server using chef-solo. It's an AWS instance running the Amazon 64bit Linux AMI. My first ...
9
votes
2answers
7k views

Best strategy to keep chef cookbooks versions under control

I'm looking for ideas about chef cookbooks versions management. I know that you pin specific versions in the environment, but I'm not sure how to go about it. We use librarian-chef which installs 3rd ...
0
votes
1answer
21 views

Asterisk automatic installation

I recently started a project which I need to automate the installation of Asterisk servers for my customers in AWS infrastructure. Customers already own AWS infrastructure. I was thinking the ...
1
vote
3answers
2k views

Installing something from source using chef, should I be doing some checks

I'm installing something from source using chef and the script resource. Should I be doing a check for the resultant executable etc. as part of it? e.g. What I currently have is: remote_file "/tmp/...
0
votes
1answer
11 views

knife ignores client_key in ~/.chef/knife.rb

I am getting errors like WARN: Failed to read the private key /etc/chef/client.pem: #<Errno::ENOENT: No such file or directory @ rb_sysopen - /etc/chef/client.pem> ERROR: Your private key could ...
17
votes
3answers
18k views

Is there a more elegant way to remotely run chef-client?

This is the way recommended in the Chef Fast Start tutorial: knife ssh name:mynode -a ipaddress -x ubuntu -i mycredentials.pem "sudo chef-client" This is really clumsy. Is there really not a ...
0
votes
0answers
31 views

How to overload package_name in Chef cookbook using AWS custom JSON?

I never worked with Chef and OpsWorks before. What I'm doing, I'm trying to overwrite some Chef conf to use modern PHP 5.6. I wrote a JSON for Layer PHP App Server { "mod_php5_apache2": { "...
43
votes
3answers
15k views

Relationship between Vagrant, Docker, Chef and OpenStack (or similar products)?

I am a web developer, but I am also interested in a few administrative tasks. Hence, the new move from pure administration to dev-ops comes handy for me. Anyway, I have some problems to put a few ...
1
vote
1answer
20 views

Configure management tool to auto-configure by reading config file

The use-case is as given below: The user has a Flat File in his Linux system. This file is a human readable/editable file which contains the configurations for all the needed components of his ...
0
votes
2answers
1k views

Can't get yum repository (ius) to install because of (epel) dependency that seems to be installed

So I'm trying to install the epel repository and then also install the ius repository. I'm managing this server with chef, and my run list goes ... "recipe[yum::yum]", "recipe[yum::epel]", "recipe[...
5
votes
2answers
2k views

debugging chef recipes on opsworks instances - access to custom json / data bag attributes

I'd like to use a chef-shell session on an aws opsworks ec2 server so I can test some environment and instance specific code I'd like to include in a custom recipe. For example, I'd like to see the ...
0
votes
1answer
51 views

Chef certification check fail “cookbook upload” despite success “knife ssl check”

I had placed crt key from "Distributor", and then checked and successed. But "knife cookbook upload" failed. Chef Server Hostname : "Distributor" Cent OS 7 chef-server-core-12.4.1-1.el7.x86_64 ...
5
votes
2answers
2k views

chef-solo vs chef-client --local-mode

According to the document I should replace chef-solo by chef-client --local-mode. Local mode was added to the chef-client in the 11.8 release. If you are running that version of the chef-client (...
1
vote
1answer
35 views

How do I run chef recipe from inside ruby code?

From the Rails app I need to provision, configure and manage servers on Amazon AWS. Some time ago I've been using chef-solo and knife to do that, but from the command line. Would that be possible to ...
1
vote
1answer
32 views

How do I override a some Chef package resource properties, without needing to define ALL the other properties?

i use Chef to install RHEL 5.x packages in my nodes. I of course use the package resource, like so package 'jdk' As you can imagine, I have a LOT of package resource calls in a LOT of cookbooks. ...
0
votes
1answer
21 views

Chef attributes for multiple 'clusters' of nodes in the same 'environment'

How can attributes be organized in Chef to support multiple, isolated, clusters of nearly identical servers in an environment? My organization, and I assume many alike, has several staging instances. ...
2
votes
1answer
45 views

How to secure configuration management server

There are many configuration management software options nowadays (Chef, Puppet, CFEngine, Ansible...) which offer an architecture with their repository on a central server and clients communicating ...
9
votes
3answers
6k views

Ansible, Chef, Puppet or ____ : Which has the strongest Windows support and smallest init footprint

We do mostly (but not exclusively) win servers. Preferably, we can start the OS and do little or nothing to it to make it ready to receive commands (we know we may need to create a base image with ...
1
vote
3answers
371 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
0answers
38 views

Chef Server opscode-reporting with wrong Postgresql credentials

I'm using Chef 12.5.0 and I recently discoverd that after an update the reporting isn't working anymore. So I executed: opscode-reporting-ctl reconfigure and got the following error: FATAL: ...
0
votes
1answer
60 views

Can I include recipes in Chef deployment hooks?

It might just be me doing something horribly wrong, but I seem to be unable to use custom recipes in Chef / AWS OpsWorks deploy hooks: # before_symlink.rb include_recipe 'supervisor' OpsWorks ...
4
votes
3answers
2k views

How to use current cookbook template dir to copy all templates recursively in a loop with chef

I'm trying to figure out how can I construct the path to templates (or files, since it works the same way) folder, then I could read it and use template resource in the loop, so each template file ...
2
votes
1answer
2k 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....
0
votes
0answers
20 views

Configure alerts on failed Unicorn restart

Our setup looks like this: Ubuntu 14.04.4 LTS AWS Opsworks Chef 12 Monit 5.17 Ruby 2.3 Rails 4.0.8 And we managed to get everything working just nicely, yet however if for some reason, Unicorn ...
2
votes
1answer
79 views

How to configure network interface with chef ifconfig resource for IP determined at recipe runtime

I'm working with Chef through Amazon Opsworks and need to provision and configure additional network interfaces for some of my servers, and I'm having trouble figuring out how to properly use the ...
0
votes
0answers
47 views

icinga2 chef cookbook: idomysqlconnection LWRP creates a conflicting object

When I use the icinga2_idomysqlconnection LWRP to create /etc/icinga2/objects.d/ido-mysql.conf using the latest commit of the chef-icinga2 cookbook in order to use the icinga web 2 web interface on ...
1
vote
2answers
61 views

How to test modified chef recipe on single node?

I have a chef server managing a handful of nodes. The server has recipes and data bags with various secrets. I'd like to make changes to one of the recipes and test it on a single node only: I do not ...
0
votes
1answer
146 views

could not find recipe epel for cookbook yum

i am having trouble with nginx cookbook.. and it dependency on yum-epel. Getting error : " Chef::Exceptions::RecipeNotFound could not find recipe epel for cookbook yum" $ knife cookbook show ...
0
votes
0answers
17 views

completely remove chef off my server

I am trying to install chef onto my RHEL6 machine. I have followed a old guide that is not relevant and I am getting some errors now and I want to fully wipe chef off this server. I tried following ...