Skip to content

Vagrant Box Image for Chef Cookbook Development Environment with ChefDK and Docker(kitchen-docker)

License

Notifications You must be signed in to change notification settings

tkak/chef-dk-box

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChefDK Box

Packer template to prepare Chef Development Environment with ChefDK and Docker(kitchen-docker)

Description

You can easily setup Chef Development Environment by the following procedure.

Create Vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|

  config.vm.define :node do |node|
    node.vm.box = "tkak/centos-6.6-x86_64-chef-dk"
  end

end

Boot VM and SSH login:

$ vagrant up
$ vagrant ssh

Start Chef cookbook development:

i.g.)
$ zsh  ## If you want to use zsh
$ git clone https://github.com/tkak/sample-chef-repo.git
$ cd sample-chef-repo
$ kitchen init --driver=kitchen-docker 

coding...

$ kitchen test

Environment

Box OS Tools
centos-6.6-x86_64-chef-dk CentOS 6.6 x86_64 Docker, ChefDK, kitchen-docker, git, vim, zsh + oh-my-zsh
ubuntu-14.04-amd64-chef-dk Ubuntu 14.04 amd64 Docker, ChefDK, kitchen-docker, git, vim, zsh + oh-my-zsh

Requirement

  • Virtual Box
  • Vagrant
  • Packer

How to make a box image

Make a vagrant box image by using Packer:

$ git clone git@github.com:tkak/chef-dk-box.git
$ cd packer
$ packer build centos-6.6-x86_64.json
$ vagrant box add centos-6.6-x86_64-chef-dk ../builds/virtualbox/centos-6.6-x86_64-chef-dk.box
$ vagrant box list

References

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Run style checks and RSpec tests (bundle exec rake)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request

About

Vagrant Box Image for Chef Cookbook Development Environment with ChefDK and Docker(kitchen-docker)

Resources

License

Stars

Watchers

Forks

Packages