Stack Exchange Network

Stack Exchange network consists of 175 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-solo]

The tag has no usage guidance.

0
votes
0answers
37 views

How to install RVM using chef solo?

I'm trying to install RVM via chef-client --local-mode. I've tried using the chef-rvm cookbook (https://github.com/martinisoft/chef-rvm) but I'm having a few issus: how do I specify using the ...
0
votes
1answer
21 views

chef-solo binary removed after chef upgrade, returns on reinstall

I'm setting up a server configuration for ubuntu trusty that must be compatible with our node configuration using chef-solo. This is in AWS EC2, and the base node is from the official ubuntu repo in ...
0
votes
1answer
36 views

Chef deploy not working on Ubuntu 14.04 looking for credentials

I am using Ubuntu 14.04 chef-solo stack but since today when I am running the deploy script its giving me below error. Please assist. ========== ubuntu@i-production-base:~$ sudo /var/chef/scripts/...
0
votes
0answers
39 views

Interpolation in PHP for chef automation

Hi I am using chef for deployment automation of a wordpress site where in I need to read database, host, username and password from my shared.yml for wp-config.php so I am trying below code in my ...
0
votes
1answer
491 views

Chef recipe gives error as undefined method 'split'

Hi I am using below in code in my chef recipe and it works fine with all the other existing servers however it doesn't work well with my new server. user_array = node node['user']['...
1
vote
1answer
144 views

chef recipe: fix flow of installation of packages

I am using chef for provisioning a vpn-server in my infrastructure. Below is the code which is used to install few components of libreswan-ipsec vpn. %w( libnss3-dev libnspr4-dev pkg-config libpam0g-...
0
votes
1answer
266 views

How to solve the cookbook naming mismatch between berks and chef-solo?

Follow-up to this answer. Running chef solo: sudo chef-solo -c config.rb -j config.json Starting Chef Client, version 12.16.42 resolving cookbooks for run list: ["terraform"] ======================...
0
votes
2answers
1k views

How to run a chef cookbook?

It is possible to install software using Ansible and Puppet by downloading a role from galaxy or puppetforge and run it masterless. Aim The aim is to install MongoDB using chef masterless. I just ...
0
votes
3answers
76 views

Rerunning chef after setting PermitRootLogin no

I am configuring my first server at Linode using knife-solo. Everything is working fine but I've just added a step by which I am disabling root login for extra security. My understanding is that ...
2
votes
1answer
645 views

Chef dynamic inventory like Ansible?

In Ansible, I can use a shell script to provide a list of hosts to be configured, in Chef, I knew Chef Server provide the similar features. However, I don't want to install a heavy server to provide ...
1
vote
1answer
37 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
129 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
79 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
151 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
1answer
458 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 /var/run/...
0
votes
0answers
285 views

AWS Cloudformation OpsWorks Custom Recipe SSH Key

Is there a method to pass a SSH Key through to a Cloudformation script for custom recipes repo when configuring an Amazon Web Services OpsWorks stack besides mangling the newline characters and ...
0
votes
1answer
1k 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['...
1
vote
1answer
186 views

Knife EC2 in zero mode cannot gives TypeError when ssh comes up

I am using the following command to spin up a new EC2 instance: knife ec2 server create -I ami-f0b11187 --ssh-key "mykeyid" -f t2.micro --ssh-user ubuntu --identity-file ~/.ssh/mykey.pem -z --no-host-...
1
vote
1answer
826 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 ...
2
votes
1answer
6k views

AWS CloudFormation templates and a bash init script

Up until now I've been launching EC2 instances manually, copying over a bash script that downloads my chef + chef artifacts, and calls chef-solo to provision an instance. A former AWS engineer in the ...
0
votes
1answer
55 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 ...
2
votes
2answers
646 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?
0
votes
0answers
281 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 ...
0
votes
2answers
10k 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 ...
2
votes
1answer
61 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": "...
1
vote
0answers
483 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 '...
0
votes
1answer
223 views

OpsWorks nginx namespace conflict

I want to deploy one of my cookbooks, nginx-passenger, to opsworks. I've tested the cookbooks locally already using testkitchen and all the recipes and tests passed successfully. However, when using ...
1
vote
1answer
316 views

Chef-solo: how can I install a package mailutils in ubuntu?

I want to install the command line mail in my ubuntu box in Virtual box. The command line will be sudo apt-get install mailutils. What is the best to achieve the same via chef-solo? I don't think ...
0
votes
2answers
355 views

Chef freezes on vagrant centos box

I have a centos-6.5 box. Strangely it freezes when I try to request its provision by chef. Here's a sample of what goes when I try to vagrant provision --debug it [2014-10-10T20:33:33+00:00] INFO: ...
1
vote
1answer
931 views

chef-solo with docker: Prevent services from starting during build

I am trying to reuse existing cookbooks within docker containers, but most recipes will start the service during the chef client run (e.g. tomcat, apache2). As chef-solo runs during image creation the ...
1
vote
1answer
108 views

Is there a way to get Opsworks deploy through cache and not by cloning?

Is there a way to get opsworks to deploy by doing git pull instead of git clone every time?
0
votes
1answer
2k views

Execute chef resource multiple times with variables

Consider the following code: node["cloudwatch"]["alarms"].each do |metric,keys| script_name = "/root/.cloudwatch/create_cloudwatch_alarm-#{metric}.sh" template script_name do source "...
4
votes
1answer
752 views

Cookbook not found with vagrant, berkshelf and chef-solo

I'm attempting to get a vagrant instance up and running, but when I do vagrant up --provision, it fails with the error: ERROR: Cookbook postgres not found. I'm using vagrant-berkshelf, which appears ...
0
votes
1answer
204 views

Getting particular server config from Git in Chef Solo

I don't want to use Chef Server as for now, but rather want to leverage Chef Solo. I need to keep configs (attributes and files) of particular servers in a separate Git repo. This is needed to keep ...
0
votes
1answer
766 views

chef remote_file is throwing Encoding::UndefinedConversionError

I have the following in a chef recipe: remote_file '/tmp/zint-2.4.2.zip' do source 'https://s3.amazonaws.com/mybucket/zint-2.4.2.zip' checksum '...
3
votes
1answer
1k views

restarting php5-fpm on ubuntu 14.04 with chef

I have this in my chef recipe: service 'php5-fpm' do supports :restart => true action [ :enable, :start ] end However my recipe now barfs in Ubuntu 14.04, as "/etc/init.d/php5-fpm restart" ...
0
votes
1answer
427 views

Git is not working properly when installing with chef

I'm provisioning my servers with Chef. For git I'm using the community cookbook and is installing version 1.8.3.1 in Amazon Linux. However after it gets installed I don't get any output while running ...
0
votes
1answer
43 views

Installing nginx via chef Role is not applying my changes

I wrote a role to use the default nginx cookbook. The role is not applying any of my attributes. It keeps installing nginx 1.2.1. { "name": "nginx", "json_class": "Chef::Role", "chef_type": "...
0
votes
1answer
2k views

Why chef, puppet, ansible, salt, etc.? [duplicate]

The devops tools ecosystem is puzzling to me. Instead of shell scripts that work everywhere everyone in the server orchestration/management space is bolting on their own proprietary formats. Ansible ...
2
votes
1answer
886 views

Can I use Chef-Solo to provision a server created with knife-eucalyptus

I am able to create a new server using knife-eucalyptus like so: knife euca server create The server gets created but provisioning fails with the following message: "ERROR: Errno::ENOENT: No such ...
5
votes
2answers
13k views

What is the purpose of openssl passwd

I'm reading "Reliably Deploying Rails Applications" Regarding defining users to be set up by Chef, it says: “Next we need to define users, inside data_bags/users copy the file deploy.json.example to ...
-1
votes
2answers
917 views

How to use wrapper recipes in chef?

How can I cal a custom recipe from my default recipe? If I try recipe 'my-base-server' I get an error 1 argument for 0 What I want to achieve is a logical division of my recipe into base, web-...
0
votes
2answers
3k views

Permission to write using 'deploy' user

I'm currently new to Chef and Capistrano. I'm using version 3.x of Capistrano to deploy Rails 4 application. I have successfully bootstrapped a server using chef solo. One cookbook that I'm using is ...
2
votes
3answers
5k views

How to install Redis with Chef?

I am trying to install Redis with Chef. I would think, it's easy, since I only want to have the default configuration. So, I add to a Berksfile: site :opscode cookbook 'apt' cookbook 'node' ...
0
votes
2answers
122 views

Can I still benefit from using Chef (et al) when I'm not in total control of the server?

I would like to get better control over my deployment environments, but I share the system administration responsibility with an IT department that has their own (not fully automated) processes for ...
3
votes
1answer
2k views

A chef recipe to install ruby 1.9.3 system wide without rvm nor rbenv

I'm looking for an Opscode Chef cookbook that installs system-wide Ruby version 1.9.3, patch-level latest at the time of the run_list execution. Have done some research and there is a Brightbox PPA ...
2
votes
2answers
1k views

chef deploy start service and restart service in sequence

Chef stop and start service in sequence and would like to ask different procedure. Step 1: framework bootstrap to jboss service bash "bootstrap application" do code <<-EOF ant ...
1
vote
0answers
42 views

how should I set passwords securly with chef-solo

I thought that the way to go would be encrypted data-bags but when I finally got them to work on chef-solo I found out that chef looks for a AES key on the machine that I'm provisioning. In addition ...
0
votes
1answer
747 views

How do I “duplicate” a server?

I have a EC2 and Digital Ocean servers and I want to re-create them locally (same config files and everything). By local I mean virtual box (vagrant). I had started out by managing them with Chef but ...
1
vote
2answers
1k views

Specify Chef provider for windows_feature

I originally asked this question on StackOverflow, but did not receive any working answers: https://stackoverflow.com/questions/18648713/specify-chef-provider-for-windows-feature. I'm trying to use ...