Vagrant Virtual Machine for Hammer
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
hammer
.gitignore
.vagrantplugins
README.md
Vagrantfile
bootstrap.sh

README.md

A Virtual Machine for Hammer

Introduction

This project automates the setup of a development environment for working with Hammer.

How to install

  1. Install VirtualBox (Versions above 5.0.x not tested)

  2. Install Vagrant (Versions above 1.8.4 not tested)

  3. Install Vagrant Triggers by running:

    • vagrant plugin install vagrant-triggers
  4. Install Vagrant ENV by running:

    • vagrant plugin install vagrant-env
  5. If you haven't made the Sites and cleanslate_themes folders, run:

    • cd ~ && mkdir Sites && cd ~/Sites/ && mkdir cleanslate_themes
  6. Optional Step: Custom cleanslate_themes directory location:

    1. Create a file named .env in the root directory of your hammer-vm install
    2. Add following line with path to directory:
    • export CLEANSLATE_THEMES=/full/path/to/cleanslate_themes
    • Not yet tested on Windows
  7. Next, we have to build the Hammer virtual machine. cd ~/Sites/ && git clone https://github.com/wvuweb/hammer-vm.git && cd hammer-vm && vagrant up

    • NOTE: The first time you run vagrant up, it may take 5-30 minutes to build the virtual machine. On subsequent vagrant up's it will only take a few seconds.
  8. Visit localhost:2000 in the browser at to access your CleanSlate themes.

If the build fails run vagrant provision until it completes. If you have continue to have issues, open an issue.

Commands

To be ran from the /hammer-vm/ directory

vagrant up              # Start Hammer
vagrant halt            # Stop Hammer
vagrant hammer update   # Update Hammer
vagrant status          # Is the VM running?
vagrant destroy         # Destroys the VM

Mac/Linux Alias

If you would like to have aliases for the above command add the following to your .bash_profile, .bashrc, or .profile in your user root directory.

alias hammer-start="cd ~/Sites/hammer-vm && vagrant up"
alias hammer-stop="cd ~/Sites/hammer-vm && vagrant halt"
alias hammer-update="cd ~/Sites/hammer-vm && vagrant hammer update"

Other Notes

Truth be told, you don't actually need a Sites folder—we simply suggest it for consistency. To get Hammer working, the hammer-vm and cleanslate_themes directories must be on the same level, unless you have overridden the hammer-vm directory using a .env file.

/Sites/
|_/hammer-vm/
|_/cleanslate_themes/