Skip to content
This repository

All you need for cooking with Chef and Vagrant on Windows you will find in Bill's Kitchen

README.md

Bill's Kitchen

All you (or Bill Gates would) need for cooking with Chef and Vagrant on Windows, shrink-wrapped in a portable package.

Bill's Kitchen Screenshot

What's inside?

Main Tools

The main tools for cooking with Chef / Vagrant:

Plugins

These plugins are pre-installed:

  • bundler is the only pre-installed gem, use project-specific Gemfile for everything else
  • bindler is the only pre-installed vagrant plugin, use project-specific plugins.json for everyting else
  • knife-audit and knife-server are exemplary pre-installed knife plugins. Use W:/tools/chef/opscode/chef/embedded/bin/gem install <plugin> to install more

Supporting Tools

Useful additions for a better cooking experience:

  • ConEmu - a better windows console with colours, tabs, etc...
  • SublimeText2 - a better editor (trial version) with additional packages for Chef and Cucumber installed
  • PortableGit - git client for windows (preconfigured with kdiff3 as diff/merge tool)
  • putty - the SSH client for windows
  • Cygwin-based ssh.exe and rsync.exe to make rsync-based Vagrant synced folders work on Windows

Environmental Changes

The following changes are applied to your environment by running W:\set-env.bat:

  • Constraining as much as possible to the W:\ drive:
    • %HOME% points to W:\home
    • %VAGRANT_HOME% points to W:\home\.vagrant.d
    • %PATH% is preprended with the bin dirs of the tools in W:\tools\
    • exception: %VBOX_USER_HOME% points to %USERPROFILE%, i.e. VirtualBox VMs are still stored under %USERPROFILE%
  • Fixing annoyances:
    • set TERM=rxvt to fix vagrant ssh issues
    • set ANSICON=true to get coloured output with Vagrant on Windows
    • set SSL_CERT_FILE=W:\home\cacert.pem pointing to recent CA certs avoiding Ruby SSL errors

Aliases

Registered doskey aliases:

  • run be <command> for bundle exec <command>
  • run vi <file_or_dir> for sublime_text <file_or_dir>

Examples

These repositories are used for acceptance-testing the common usage scenarios:

Prerequisites

The only requirement for using the devpack is a recent version of VirtualBox (couldn't make that one portable).

Installation

As a prerequisite for building bill's kitchen you need 7zip installed in C:\Program Files\7-Zip\7z.exe.

Building Bill's Kitchen

To build the kitchen (make sure you don't have spaces in the path):

$ gem install bundler
$ bundle install
$ rake build

This might take a while (you can go fetch a coffee). It will download the external dependencies, install the tools and prepare everything else we need in the kitchen into the target/build directory. Finally it runs the spec/integration examples to ensure everything is properly installed.

Running the Acceptance Tests

To run the more comprehensive spec/acceptance tests:

$ rake acceptance

This will use various of the tools in combination by running the main usage scenarios, e.g.:

  • cloning a sample application cookbook and sample infrastructure repository
  • running various commands like bundle install, vagrant plugin install, vagrant up
  • running different kinds of cookbook tests via knife cookbook test, foodcritic, chefspec and test-kitchen

Packaging

Finally, if all the tests pass you can create a portable zip package:

$ rake package

This will and finally package everything in the target/build directory into target/bills-kitchen-<version>.7z.

Usage

Make sure you have VirtualBox installed, then:

  1. unzip the target/bills-kitchen-<version>.7z somewhere
  2. mount the kitchen to the W:\ drive by double-clicking the mount-w-drive.bat file
  3. click W:\Launch ConEmu.lnk to open a command prompt
  4. in the command prompt run W:\set-env.bat to set up the environment
  5. start hacking!
Something went wrong with that request. Please try again.