Questions tagged [chef]

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

150 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
2answers
3k 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 ...
4
votes
1answer
101 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 ...
3
votes
2answers
81 views

AWS Opsworks Chef deployment using S3 Archive without making archive public

I'm trying to use the S3 Archive method to do a Chef deployment in Opsworks. I put the Chef archive in S3 and copied the address of https://s3.us-east-2.amazonaws.com/redacted/redacted.tar.gz. I gave ...
3
votes
0answers
100 views

Install Windows Service using chef and have it run using a Group Managed Service Account

I'm trying to setup a number of dev servers using Chef. I need a Windows Service to run as a managed service account. I have the following in a recipe: windows_service 'My Windows Service' do ...
3
votes
0answers
243 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 ...
3
votes
0answers
807 views

Knife upload data bag fails with Chef::ChefFS::FileSystem::OperationNotAllowedError

I am currently doing the Chef tutorials provided at learn.chef.io. In the fourth workshop, one of the steps is to create some data bags and then upload them using: knife upload data-bags/vhosts The ...
3
votes
1answer
728 views

omnibus installed chef and rvm issues

I'm trying to figure out one thing and would like someone's else view on this. I installed chef on my Ubuntu server (11.10) via the awesome omnibus install. It worked perfectly fine. I was able to run ...
3
votes
1answer
2k 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 ...
2
votes
0answers
45 views

How to specify chef-client settings on bootstrap?

I'm trying to bootstrap nodes via knife. Executing: knife bootstrap user@server-1 -P XXX --sudo -N java-server-1 I found a bunch of properties in client.rb on the node side that I would like to ...
2
votes
0answers
1k 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::...
2
votes
1answer
99 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 ...
2
votes
0answers
247 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 ...
2
votes
0answers
970 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 ...
2
votes
1answer
64 views

Chef node.name not being set

What I am working with: Debian Wheezy 7.6 Chef: 11.14.6 Up to this point, I have always used node.name to set the hostname of an instance. Example: { "name": "web-01", "chef_environment": "...
2
votes
0answers
418 views

how do I handle a URI with spaces in a chef source attributes on Windows

I am trying to copy a package from a remote server, into my system and then use chef to install the same. Following is the code I use to copy the package remote_file 'c:/repo/OpenOffice 4.1.0 (en-US)...
2
votes
1answer
578 views

Setting up SFTP users that are jailed to their home directories with Chef

I'm hoping someone can help me figure out how to chroot jail users to their home directories for SFTP with Chef. I've tried multiple SSH cookbooks and Googled for an answer for several days with no ...
2
votes
3answers
2k 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 ...
2
votes
1answer
138 views

Trying chef cookbooks before uploading

We're using Vagrant & Chef to provision the staging VM for our app. Once I have a working cookbook, I upload it to chef-server and Jenkins hook ensures the staging env gets updated. However, it'...
2
votes
2answers
890 views

Configuring Chef-Solo-different override_attributes in one role

First off, I'm using Chef Solo and I would like things to stay as automated as possible. So I have a problem that I'm not quite sure how to solve. I'm setting up the deployment of a lot of different ...
2
votes
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/...
1
vote
0answers
56 views

How to upgrade Ruby Bundle version in AWS Opsworks

I have a project running on AWS Opsworks, which has current bundler version of 1.5.3 on Ruby 2.2.2. i want to upgrade the bundle version to 1.17.3 but when i try to do it i am getting this error ...
1
vote
0answers
217 views

Using Chef for setting Windows Active Directory GPO policies on domain controller

I am looking to use Chef to automate the setting of active directory controlled group policy settings (typically on the primary PDC per forest). I cant find any specific AD GPO functions, on the ...
1
vote
1answer
105 views

Show when a Chef cookbook version changed on a node using knife

The infrastructure that I am working on uses Chef environments to manage the cookbook versions that are converged to nodes. While I can use knife to check what cookbook versions are available, and ...
1
vote
1answer
760 views

How to disable chef-server on boot

I have been trying to disable chef-server services on boot time. I looked into "/etc/init.d/" but there are no any chef related service listed. I checked service list from service --status-all but no ...
1
vote
1answer
379 views

Chef create config file based on hostname

New to chef. I have written a recipe to create a file from template based on hostname. If the hostname matches server 1 and server 2 create from template1, else create from default template. However ...
1
vote
0answers
40 views

knife azure server list returns empty result

I'm trying to set up CHEF server and workstation on Ubuntu 16.04. I've followed several guides, and so far I'm able to get it to list the available images, but "knife azure server list" returns an ...
1
vote
2answers
963 views

Where is this chef attribute coming from and why can't I change it?

An attribute for a chef node is not being updated when I change the role, the old value is persisting. The node['nagios']['custom_variables']['styleurl'] attribute is not updating to the new value of ...
1
vote
1answer
34 views

Chef: how to duplicate a log message to chat server (DevOps)

We are using chef for infrastructure management and deployment of various system applications. We'd like to "duplicate" some log statements so that the message is logged to the normal chef logger, ...
1
vote
0answers
162 views

chef-client service[nagios-nrpe-server] cannot be found

I have a node with the nrpe cookbook installed which has started failing, and I'm not exactly sure why. Running on Ubuntu 14.04 I have a simple recipe to create a NRPE check nrpe_check "check_load" ...
1
vote
0answers
64 views

Combining cat with knife ssh crashes bash

I'm trying to transfer a ssh key from one node to other using chef's knife ssh combined with the cat command on the key cat ~/.ssh/001.rsa | knife ssh -i ~/.ssh/authkey.rsa 'name:myserver' 'mkdir -p ~...
1
vote
0answers
107 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. ...
1
vote
0answers
192 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": { "...
1
vote
1answer
39 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 ...
1
vote
1answer
153 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
0answers
80 views

How do I set up omnibus builder environment on vagrant centos box using chef?

I need an omnibus builder box for building a python cli package. I would like to use this cookbook, on this vagrantbox I am running this as root since the omnibus installer needs to check something ...
1
vote
1answer
523 views

chef-client delayed until end of recipe

I have a recipe that looks like the following: service "xyz" do :action nothing end file "xyz.conf" do ... notfies :restart, "service[xyz]", delayed end file "xyz.props" do ... ...
1
vote
1answer
167 views

Chef recipe not working

I am working on chef and vagrant. I am trying to configure nginx with php-fpm and spin-up new server using chef-solo. Here is the configuration of my vagrant file. Vagrant.configure(2) do |config| ...
1
vote
0answers
37 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 ...
1
vote
0answers
35 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
31 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
1answer
91 views

Why does Web Platform installer try to repair itself every 40 mins?

I'm seeing Web Platform installer do a repair/reinstall on my win 2008 r2 server (Build: 7601: Service Pack 1). Web Platform installer has been initially installed on this machine via chef (the 'iis' ...
1
vote
0answers
70 views

Rollout approach for centOS/RHEL linux servers to achieve centralised authentication through AD

We have 3 environments testing develop and production each having more than 40 Linux servers. Need to establish centralized authentication through AD for all these environment. Which is the best ...
1
vote
0answers
958 views

Chef Issue bootstrapping windows VM using winrm via https

Chef Server(RHEL 6.5): 11.16.4 Windows endpoint: Windows 2008 The bootstrapping works fine over http (with winrm config allowUnEncrypeted = true and basic auth = true). Now we are trying same thing ...
1
vote
0answers
496 views

Requires to reboot a linux machine only if the new kernel is install/update

we have an use case where we need to reboot a linux machine only if the new kernel version is installed/upgraded through yum_package. currently I am using chef-solo for running this. ruby_block '...
1
vote
2answers
327 views

recover chef node configure from server

Does anyone know to to retrieve chef node configs from an open source chef server? I need to move node configs that where managed by an old chef server (cloud instance) that didn't update properly to ...
1
vote
0answers
3k views

Chef says cookbook doesn't exists when it does

In my runlist for one of my nodes, I have "recipe[logstash::server]". When I run chef-client on the node, the following error is thrown: The following cookbooks are required by the client but don't ...
1
vote
1answer
107 views

Assign chef roles to layer/instance

I'm trying to get the following cookbook running in OpsWorks: https://github.com/lusis/chef-logstash/ Following their documentation I have to assign roles to my server(s) to get stuff running. They ...
1
vote
1answer
387 views

Setting Samba passwords using Chef without storing plain text passwords in data bags

We have a server that is configured using Chef. Currently, the way that chef manages the passwords is by simply copying down the samba tdb databases and updating the shadow hashes of each user. ...
1
vote
2answers
1k views

How to automatically increase the partition size of multiple Ubuntu nodes in VMware vSphere?

We have dozens of Ubuntu nodes where I have to resize the hard disk drive to different sizes. Currently I’m doing all of the following steps manually: Increase the size of each node’s virtual hard ...
1
vote
0answers
68 views

Chef - handle resources changing the network interface

I'm using chef to deploy an openvpn application in bridging mode to an ubuntu node. In my recipe i'm using a bash resource to create the bridge necessary for the vpn to work. Unfortunately the bridge ...