Questions tagged [chef-solo]

92 questions
2
votes
2 answers

"Network unreachable" with centos + chef + vagrant

I'm trying to write a Vagrantfile to install nginx on CentOS 6.4 images. In my Vagrantfile I have (ip's redacted): config.vm.provision :shell, :inline => "echo \"export http_proxy=http://10.0.0.1:3128\; export…
Drew
  • 263
  • 3
  • 11
2
votes
1 answer

Chef Opscode apt cookbook - apt-get install returned 100, expected 0

I'm running Chef solo (version 11.4.0) on a clean VPS with Ubuntu 12 installed, and I'm having some problems with apt. The problem was that any package command raised an error: Chef::Exceptions::Exec ---------------------- apt-get -q -y install…
blat
  • 23
  • 1
  • 4
2
votes
2 answers

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 Linux boxes, and all of them are going to require…
user130375
  • 21
  • 2
2
votes
1 answer

Overriding attributes with Chef Solo

I'm trying to install Maven 3 using Chef Solo and the following cookbook: http://community.opscode.com/cookbooks/maven The cookbook installs Maven 2 by default, and the first time I ran it, it installed Maven 2 as expected. Later on I modified my…
user19509
2
votes
2 answers

Net::SSH::AuthenticationFailed when using Chef's Knife ssh

Facts: I have a Chef server installed. I have registered a node to this server, and I can see the node in the webUI (This is an existing node, NOT bootstrapped using knife bootstrap When I execute the command $ knife ssh "role:test" "sudo…
Howard
  • 2,135
  • 13
  • 48
  • 72
1
vote
1 answer

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-dev libcap-ng-dev libcap-ng-utils…
Shailesh Sutar
  • 1,517
  • 5
  • 23
  • 41
1
vote
2 answers

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 want to download a cookbook and run…
030
  • 5,901
  • 13
  • 68
  • 110
1
vote
1 answer

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 application running on the system. For example, the user…
1
vote
1 answer

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 do the same from inside the code? Any pointers on…
misza222
  • 111
  • 2
1
vote
0 answers

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 using data in /opt my vagrantfile looks like…
Gil Zellner
  • 183
  • 1
  • 8
1
vote
1 answer

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| config.vm.box = "ubuntu-15.10" …
Shailesh Sutar
  • 1,517
  • 5
  • 23
  • 41
1
vote
1 answer

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/monit_real.pid set logfile syslog facility…
Antarr Byrd
  • 155
  • 10
1
vote
1 answer

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-key-verify --server-connect-attribute…
Ian Bamforth
  • 289
  • 3
  • 16
1
vote
1 answer

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 dynamically). This chef recipe then needs to be…
Anuj Balan
  • 111
  • 4
1
vote
0 answers

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 'kernel-update-done' do action :nothing block do …