GithubHelp home page GithubHelp logo

bocuse's Introduction

bocuse - a new kind of chef

SYNOPSIS 

Bocuse is a special kind of chef - A front-end language to chef-solo. 

STATUS

Version 0.1.0 - This works for us. No warranties implied.

USAGE

The workflow will be 
  BOCUSE -> (bocuse compile) -> JSON -> (chef-solo) -> Machine Configuration
  
A bocuse configuration is hosted below config and looks like this:

  config/
    nodes/      # where all node descriptions live
    templates/  # where your templates live
    lib/        # helper code, will be in $:
    
To get started, create a file called 'config/node/a.rb' and put this into it: 

  node 'a' do |cfg|
    cfg.ip '1.2.3.4'
  end
  
If you now run 
  
  bocuse compile a
  
from the top-level directory, you'll get a JSON configuration like this one: 

  {"ip":"1.2.3.4"}
  
as output. 

Please see the examples directory for more examples. 

HACKING

1. Get gems: `bundle install`.
2. Verify all is ok: `rspec`.
3. Read.
4. Write spec.
5. Improve code.
6. Issue pull request with great documentation.
7. GOTO 3 UNLESS HAPPY.

AUTHORS

Florian Hanke (@ floere)
Kaspar Schiess (@ kschiess)
Jens-Christian Fischer (@ jcfischer)

LICENSE

MIT License - See LICENSE file for details. (Copyright 2012, Mobino SA)

bocuse's People

Contributors

floere avatar kschiess avatar

Stargazers

iamlos avatar Nurul Ferdous avatar John Mettraux avatar  avatar

Watchers

 avatar John Mettraux avatar James Cloos avatar

Forkers

kschiess

bocuse's Issues

Error on unknown node

The error message for node names that cannot be found is rather cryptic:

   [deletia]/.rvm/gems/ruby-1.9.3-p194/gems/bocuse-0.0.1/bin/bocuse:15:in `compile': undefined method `to_h' for nil:NilClass (NoMethodError)
    from [deletia]/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.3/lib/thor/task.rb:27:in `run'
    from [deletia]/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.3/lib/thor/invocation.rb:120:in `invoke_task'
    from [deletia]/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.3/lib/thor.rb:275:in `dispatch'
    from [deletia]/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.3/lib/thor/base.rb:425:in `start'
    from [deletia]/.rvm/gems/ruby-1.9.3-p194/gems/bocuse-0.0.1/bin/bocuse:19:in `<top (required)>'
    from [deletia]/.rvm/gems/ruby-1.9.3-p194/bin/bocuse:19:in `load'
    from [deletia]/.rvm/gems/ruby-1.9.3-p194/bin/bocuse:19:in `<main>'
    from [deletia]/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
    from [deletia]/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'

It should say:

Cannot find input file for node 'xxx.foo.com'. 

and abort with error code 1.

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.