Coder Social home page Coder Social logo

chef-command.js's Introduction

Description

This generates both the correct Opscode chef command the corresponding json file to use.

Documentation on Chef-Solo options:

Documentation on Chef-Client options:

API

Constructor

var ChefCommand = require('chef-command');
var chefCmd = new ChefCommand();

options:

  • executable: defaults to chef-solo
  • file_cache_path:
  • dna_json_path:
  • role_path:
  • environment_path:
  • data_bag_path:
  • config_rb_path:
  • log_level:
  • cookbook_path:
  • run_list:
  • extra_json: // extra json to merge in the dna.json

Instance variables

  • settings : a hash containing all settings

Instance methods

var ChefCommand = require('chef-command');
var chefCmd = new ChefCommand();
chefCmd.addCookbookPath('/tmp/cookbooks'); // add a cookbook
chefCmd.addCookbookPath('/tmp/site-cookbooks').logLevel('debug'); // example of chainable
  • addCookbookPath(path) : adds a CookbookPath + returns chainable self
  • removeCookbookPath(path) : removes a CookbookPath + returns chainable self
  • addRolePath(path) : adds a RolePath + returns chainable self
  • removeRolePath(path) : removes a RolePath + returns chainable self
  • addDataBagPath(path) : adds a DataBagPath + returns chainable self
  • removeDataBagPath(path) : removes a DataBagPath + returns chainable self
  • setExecutable(command) : sets the executable command to command
  • setLogLevel(level) : sets the LogLevel + returns chainable self
  • addRecipe(recipe) : adds recipe to the runlist
  • addRole(role) : adds role to the run runlist
  • setRunList(array of runlist) : sets the runlist
  • setExtraJson(json) : json to merge with dna.json
  • removeRole(role): removes the role from the runlist
  • removeRecipe(recipe): removes the recipe to the runlist

Getters

var ChefCommand = require('chef-command');
var chefCmd = new ChefCommand();
chefCmd.addCookbookPath('/tmp/cookbooks'); // add a cookbook
chefCmd.generate();
  • generate() : return hash containing

  • dna_json: string containing the dna.json to use

  • config_rb: string containing the config.rb

  • command: string containing the actual CLI invocation

chef-command.js's People

Contributors

jedi4ever avatar

Stargazers

Angus H. avatar Pierre Riteau avatar kyzh avatar

Watchers

 avatar

chef-command.js's Issues

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.