Coder Social home page Coder Social logo

chef-cookbooks's Introduction

These cookbooks depend on the silverware cookbook from https://github.com/infochimps-labs/ironfan-pantry for service discovery.

Things are still a work-in-progress. There may be bugs.

Things are mainly tested when used in conjuction with [Ironfan] (https://github.com/infochimps-labs/ironfan) on Amazon EC2.

In combination with Ironfan, these cookbooks let us do things like

knife cluster launch torquebox-frontend --bootstrap
knife cluster launch torquebox-backend-0 --bootstrap
knife cluster launch torquebox-backend-1 --bootstrap

The above commands bring up a mod_cluster server and two TorqueBox servers with all clustering setup. The nodes were launch one at a time because there are likely some race conditions in the service discovery currently being used that need to be sorted out.

New TorqueBox (torquebox-backend) servers can be added at any time and will join the cluster as expected. However, when a new mod_cluster (torquebox-frontend) cluster is added the existing TorqueBox servers won't automatically connect to it. You'll need to re-run chef-client on the TorqueBox servers then restart TorqueBox (sv restart torquebox) to get the backend servers talking to the new mod_cluster instance.

chef-cookbooks's People

Contributors

bbrowning avatar rabidtester avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

chef-cookbooks's Issues

Windows support?

I currently have the dubious pleasure of getting torquebox running on both Linux and Windows Server boxen. This cookbook will support the former, but it does a lot of Linux-specific things in server.rb that won't work on the latter. Has anyone taken a stab at porting that recipe to work on Windows?

undefined method `run_state' for Chef::Resource::RunitService

I'm getting the following error when installing the torquebox::server recipe:

================================================================================
Recipe Compile Error in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/torquebox/recipes/server.rb
================================================================================


NoMethodError
-------------
undefined method `run_state' for Chef::Resource::RunitService


Cookbook Trace:
---------------
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/torquebox/recipes/server.rb:79:in `from_file'
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/torquebox/recipes/server.rb:77:in `from_file'


Relevant File Content:
----------------------
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/torquebox/recipes/server.rb:

 72:    group "torquebox"
 73:    mode "0755"
 74:    action :create
 75:  end
 76:
 77:  runit_service "torquebox" do
 78:    options   node[:torquebox]
 79>>   run_state node[:torquebox][:run_state]
 80:  end
 81:
 82:  announce(:torquebox, :server)
 83:
 84:  # otherwise bundler won't work in jruby
 85:  gem_package 'jruby-openssl' do
 86:    gem_binary "#{current}/jruby/bin/jgem"
 87:  end
 88:



[2013-02-28T17:28:27+00:00] ERROR: Running exception handlers
[2013-02-28T17:28:27+00:00] ERROR: Exception handlers complete
[2013-02-28T17:28:27+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2013-02-28T17:28:27+00:00] FATAL: NoMethodError: undefined method `run_state' for Chef::Resource::RunitService

Torquebox 3

Could we get this updated for Torquebox 3?

Incorrect permissions when running `gem_package 'jruby-openssl'`

I'm writing a wrapper cookbook for my web app (using berkshelf and vagrant—if it makes a difference), and when I run vagrant provision, chef-solo fails when trying to install jruby-openssl. I'm not sure what user chef-solo runs the command as, but as the torquebox folder belongs to the torquebox user & group, I'm assuming it needs to be that.

Here's the last bit of the error:

[2014-02-20T10:43:07+00:00] ERROR: gem_package[jruby-openssl] (torquebox::server line 85) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '137'
---- Begin output of /opt/torquebox-current/jruby/bin/jgem install jruby-openssl -q --no-rdoc --no-ri -v "0.9.4" ----
STDOUT:
STDERR: Killed
---- End output of /opt/torquebox-current/jruby/bin/jgem install jruby-openssl -q --no-rdoc --no-ri -v "0.9.4" ----
Ran /opt/torquebox-current/jruby/bin/jgem install jruby-openssl -q --no-rdoc --no-ri -v "0.9.4" returned 137
[2014-02-20T10:43:07+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

It might be a case of just moving the gem install resource above the installation folder chown resource. Any help would be great

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.