Chef is an open source systems integration framework built to bring the benefits of configuration management to your entire infrastructure. You write source code to describe how you want each part of your infrastructure to be built, then apply those descriptions to your servers. The result is a ...

learn more… | top users | synonyms

0
votes
1answer
8 views

knife ssh node name wild card matching

I have a chef environment "dev", We are switching our continuous integration build environment from jenkins to bamboo. So we have a bunch of nodes names "jenkins_slave_??" and "bamboo_slave_?? I ...
0
votes
1answer
6 views

chef common recipe multiple roles

i have created a mongodb chef recipe, and i am overriding the default attributes on the recipe from the role. name 'mongo_datanode_jackey' description 'this module is currently under testing...' ...
1
vote
0answers
23 views

Monit Web Service not available

I'm trying to configure monit on my server using chef solo. When I visit port 2812 response saying this webpage is not availble. config/chef/files/default/monitrc set daemon 30 set pidfile ...
0
votes
1answer
12 views

create a chef cookbook from current configuration

Im wondering if its possible with chef (or any other tool like puppet or ansible ...) to create cookbooks from current server configurations. For example i have a red hat server with an jboss 7 ...
1
vote
2answers
23 views

What is the difference between AWS OpsWorks and my own Chef server?

Is there any difference between using AWS OpsWorks, which uses Chef internally, and using my own installation of Chef? Currently I have a my own Chef server. What are the advantages or disadvantages ...
0
votes
1answer
27 views

Can't resolve chef external cookbook dependency in local mode

I'm making my first recipes in chef. I created a cookbook i called common with just one recipe (default.rb): apt_repository "mariadb-repo" do uri ...
1
vote
0answers
31 views

How to copy ssh keys on a new VM

Hello guys (and girls) I'm having the following situation: -new CentOS6 VM (created within a Hyper-v failover cluster), joined Windows AD via script I need to bootstrap this new VM in chef server ...
1
vote
1answer
42 views

Knife not parsing JSON variable in PowerShell

I am trying to create an amazon EC2 instance using "knife ec2 server create" and passing in JSON to override the default settings by using the -j option where $json is properly formed JSON text and I ...
1
vote
0answers
23 views

etcd cluster setup with chef - determining initial-cluster-state

I am writing chef scripts to setup an etcd cluster. The list of nodes (including their IPs) will be hardcoded in the chef script (as an attribute) and it will pass them to etcd using static ...
4
votes
1answer
60 views

why is apt-get install anything is asking to update nginx.conf ? How to fix this using chef?

I was trying to install few packages which are non related to nginx (for example htop) using chef script. But it was failing because its asking to update nginx.conf and nginx/sites-available/default. ...
0
votes
1answer
27 views

SSH hardening with chef test-kitchen. How to tell test-kitchen how to connect?

I wrote a chef cookbook and it runs fine with test-kitchen. Now I want to harden ssh access to the production nodes by writing a recipe that overwrites /etc/ssh/sshd_config. Among other things, it ...
-5
votes
1answer
28 views

how to decrypt a password in centos-71 [closed]

I have installed Oracle VM and on top of it Centos-71. I am logging into the centos by vigrant user and the password is also set during configuring it with chef. Is there a way to decrypt the password ...
1
vote
1answer
44 views

Chef — notify multiple packages

I'm trying to deploy postgresql 9.4 on CentOS 7 package ['postgresql94-server', 'postgresql94-contrib'] do action :nothing end execute "yum check-update" do command "yum check-update" ...
-1
votes
1answer
15 views

Deploy or shut-down nodes based on load with Chef

AWS has OpsWorks, which is their own take on Chef. We have several reasons[1] why we want to use a "normal" chef-server/-client setup. But OpsWorks has one feature that I cannot find in ...
0
votes
1answer
29 views

Knife data bag from file - is not creating encrypted file

I'm trying to create an encrypted databag. I'm using something like this as source { "id": "rds-2", "web": "adeasdeasde" } and I want the encrypted file to go on to data_bag/aws/rds-2.json, so ...
0
votes
0answers
15 views

Errors running Chef to provision Vagrant

I'm running Chefdk, chef-provision, and chef-provision-vagrant, and I've set up a recipe to create the VM, and another to provision. I'd like to point out that I am new to Chef (I'm more of a Puppet ...
0
votes
1answer
16 views

Fixed: Knife create instance failing - ERROR: uninitialized constant Chef::Mixin::Command

I'm wondering if any of you guys have a clue on what is the problem here. I'm using Chef Knife EC2 plugin to create a new instance. After completing the ssh connection step, it seems to break on ...
0
votes
1answer
42 views

Chef install local apt_package with dependencies

I try to install my locally baked package on server: cookbook_file '/var/cache/apt/archives/nfdhcpd_0.20_all.deb' do source 'nfdhcpd_0.20_all.deb' owner 'root' group 'root' mode '0755' ...
2
votes
1answer
48 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 ...
1
vote
0answers
127 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
0answers
24 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
1answer
32 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
1answer
27 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
1answer
87 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 ...
0
votes
2answers
169 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. ...
0
votes
1answer
103 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 ...
0
votes
1answer
156 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
1answer
45 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 ...
0
votes
0answers
16 views

Adding nginx SSL without adding apps in opsworks

Is there a way I can configure nginx with SSL without adding any app? What I am trying to do is to have a custom layer, then add nginx as a proxy to this in front. Is there a good way of adding SSL ...
-1
votes
1answer
41 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
0answers
11 views

vim package emits this error 'Caught InvalidVersionConstraint'

Here is part of my metadata.rb depends 'ubuntu' depends 'apt' depends 'python' depends 'vim' depends 'git' depends 'sensu' depends 'uchiwa' depends 'cron' When I bring up a vagrant instance, I got ...
0
votes
1answer
111 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 = ...
0
votes
0answers
139 views

How to setup vagrant with nginx/passenger/mysql/rvm?

Can someone please rate or help with my Vagrantfile and Chef-solo? It's an ubuntu-server 14.04LTS local VM with rvm, ruby 2.2, nginx, passenger, mysql... pretty common. All I want is to be able to ...
0
votes
1answer
40 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
2answers
50 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?
1
vote
1answer
551 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 ...
1
vote
0answers
26 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
0answers
20 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 ...
0
votes
1answer
235 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
2answers
60 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
1answer
51 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
1answer
72 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
1answer
64 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. ...
2
votes
2answers
31 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 ...
0
votes
0answers
43 views

Backup and recovery of Chef 11 server

I have found https://docs.chef.io/server_backup_restore.html. While the document mentions chef 11, the two directories it mentions to backup (/etc/opscode and /var/opt/opscode) don't exist but ...
4
votes
1answer
138 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 go for rolling out mass ...
0
votes
2answers
86 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
0answers
913 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
2answers
205 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 ...
1
vote
1answer
44 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 ...