This is a base vagrant box with a puppet provisioner. The stack used is documented at docs/technology_stack.md. The changelog is at docs/changelog.md.
Using the base box requires installing two packages on the host machine: VirtualBox and Vagrant. Both are free. On a Mac, the easiest way to install both is via Homebrew and homebrew-cask. See the technology_stack.md document to find out what versions of software are known to be compatible.
- Install vagrant-cachier
vagrant plugin install vagrant-cachier --plugin-version 1.2.1- Install vagrant-vbguest
vagrant plugin install vagrant-vbguest --plugin-version 0.11.0- Install vagrant-librarian-puppet
vagrant plugin install vagrant-librarian-puppet --plugin-version 0.9.2These plugins are often necessary for some reason (TRY WITHOUT FIRST):
- Install vagrant-puppet-install
vagrant plugin install vagrant-puppet-install --plugin-version 2.0.0Remove any existing vagrant boxes.
vagrant destroyRefresh the base box if desired. This shouldn't really be necessary.
vagrant box remove <box name>Bring up the box -- this will take a while the first time to both download and provision the box. A password may be necessary for the host to enable folder syncing.
vagrant upAdd comments about bridged network
Copy a version of any necessary ssh keys to the web VM. Be sure not to commit your ssh keys to the repository.
mkdir temp
cp -R ~/.ssh/{config,bitbucket,github,heroku} temp/.Enter the virtual development environment on the web server.
vagrant sshMove any ssh keys necessary (to connect to a github repository for example) to ~/.ssh on web VM. Be sure not to commit your ssh keys to any public repository.
mv temp/{config,bitbucket,github,heroku} ~/.ssh/.If you will be committing from the VM, be sure to set your name and email for commit messages, and keep git from being chatty (substitute your data).
git config --global user.name "Your Name"
git config --global user.email "your.name@example.com"
git config --global push.default simpleEnable ssh-agent if you have added ssh keys.
eval `ssh-agent -s` && ssh-add ~/.ssh/**/*id_rsaWhen done, exit the virtual environment and vagrant halt to stop the virtual machine. Use vagrant destroy to reclaim the disk space (although this will require you to re-provision the machine again later). vagrant remove should be used to remove the base box from the system as well. vagrant up and vagrant ssh web to start another development session later.
Linting of the puppet scripts can be done via puppet-lint with:
./scripts/manage.sh lintThis will lint manifests and local_modules.
Puppet script validation can be performed with:
./scripts/manage.sh pvalidatePuppet provisioning can be applied with:
sudo ./scripts/manage.sh papplyThe environment can be tested with:
sudo ./scripts/manage.sh test