Use this to configure and deploy our VMs and develop cookbooks.
This configuration has been tested (and works) on Windows 7 and Windows 10. It should work on other platforms provided your environment is set up the same:
- ChefDK 1.0.3
- knife-zero 1.17.1
- Install ChefDK
- add ChefDK & Ruby to path
chef gem install knife-zero
- Ready to go!
We use the knife-zero
gem to deploy and configure remote nodes. More documentation is available here.
- Set up data bags and/or roles of the node
knife zero bootstrap root@SERVER_IP -N NODENAME -r "RUN_LIST"
- Update the data bags and/or roles of the node
knife zero converge 'name:NODENAME'
Example: If you wanted to develop on the lits_vm cookbook
mkdir site-cookbooks && cd site-cookbooks
git clone https://github.com/ryersonlibrary/lits_vm.git
- Add this line to the Berksfile
cookbook 'lits_vm', path: 'site-cookbooks/lits_vm'
- Remove or comment the existing line
cookbook 'lits_vm', github: 'ryersonlibrary/lits_vm', tag: 'v0.3.4'
- Delete Berksfile.lock file
berks
More documentation about Chef here