Cenvup

Upload environments to chef server without being afraid of overwriting something.

This gem was created by the Devtools Team @ Lightspeed POS as an internal tool to upload environments to our chef server without being worry of overwriting it with an old local version.

Installation

Add this line to your application's Gemfile:

gem 'cenvup'

And then execute:

$ bundle

Or install it yourself as:

$ gem install cenvup

Usage

Upon first use, you will be prompt to enter the path to your "Kitchen". This tool will look for environments file under /environments.

Then you can use it from anywhere on your system and will issue the knife upload from .

cenvup list

Should give you which environment you can use, then upload it with this command (without the file extension)

cenvup <environment>

Configuration

For now only one configuration is available int $HOME/.cenvup/config.json

{
  "environments_path": "/Users/yanndavid/development/devtools/devtools-kitchen"
}

You can manually change it.

To-Do

  • Only support .json for environment files for now, will auto-detect in the futur.
  • Fix auto-discovery for kitchen path.
  • Remove requirement for environments folder under
  • Moar fixes.

Help Me

def help_me
  puts 'Usage: cenvup (option)'
  puts ''
  puts 'Available options:'
  puts '  <ENV>             Upload <ENV> to chef server'
  puts '  locate_kitchen    Do a lookup for Kitchen from $HOME'
  puts '  help              This friendly help message'
  puts '  list              List available environments'
  exit 1
end

Contributing

  1. Fork it ( https://github.com/[my-github-username]/cenvup/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request