Web Application STack for Extreme Development
This is a generic vagrant box (ubuntu) with php, mysql, composer and nginx and preconfigured vhosts for:
WASTED is designed to be used with an existing git repository (containing your application). Check out the Setup section of this document for instructions. If you want to get WASTED without an existing project see the Notes section.
Switch to the root of your existing git repository and execute the following commands:
git subtree add --prefix vagrant https://github.com/Mayflower/wasted.git master --squash
./vagrant/bootstrap.sh
This requires that there is no existing vagrant
directory.
git-subtree
was first added to git with 1.7.11 in May 2012. If it isn't available on your machine see
the installation instructions.
All git subtree commands accept a --squash
flag to squash the subtree commits into one commit.
All configuration happens in the devstack.yaml
which gets created when running the bootstrap above.
You may add a local_devstack.yaml
in which you can overwrite configuration in devstack.yaml e.g. when using
different IP or box name.
TODO Document devstack.yaml possibilities
To update the devstack use (from the root of your git repository):
git subtree pull --prefix vagrant https://github.com/Mayflower/wasted.git master --squash
Once you completed the steps described in the Setup section just do a vagrant up
.
r10k will first bootstrap your local Puppet modules and after that the provisioning process will be started.
This might not work if you are using non-Virtualbox providers.
vagrant\bootstrap.cmd
to work in the same way that is described in the Adding WASTED to your project section.vagrant up
from the vagrant subdirectoryC:\Windows\System32\drivers\etc\hosts
file manuallyThe config makes use of but does not require:
To update vbox guest extensions automatically you can use:
If you are using LXC (instead of VirtualBox) obviously you should have lxc
and a recent kernel (>3.5) installed.
If you do not (yet) have a project to use with WASTED the easiest way to test WASTED is to create a dummy repository:
# create directory, switch to new directory and initialize git repository
mkdir dummy_project && cd dummy_project && git init
# create a file and commit it to ensure there is a HEAD for the subtree command to work with
touch dummy_file && git add dummy_file && git commit dummy_file -m "Initial commit"
Your dummy repository is now ready for use with WASTED. Just follow the instruction from the Setup section.
WASTED requires Puppet >= 3.7.0 to work correctly, which is included in the default boxes.
Otherwise it will fail with a cryptic error due to a bug in contain
on fully qualified class names:
Error: undefined method 'ref' for nil:NilClass
In case you stab your toe on this using the mayflower/trusty64-puppet3
box run vagrant box update
For development of WASTED create a staging directory and clone the WASTED repository directly into the vagrant
directory.
mkdir wasted_development && cd wasted_development
git clone git@github.com:Mayflower/wasted vagrant
Now you can hack on WASTED code as you would usually do while still retaining the ability to bootstrap and use it like described in the setup section.
If WASTED was subtree merged into your project and changes were made inside the vagrant
directory that you would like to contribute, you need to use git subtree push
.
If you have push access you may create a new branch directly and then submit a pull request:
git subtree push --prefix vagrant git@github.com:Mayflower/wasted $BRANCH_NAME
Otherwise please fork this repository and then create a pull request from your fork:
git subtree push --prefix vagrant git@github.com:$YOUR_USER/wasted $BRANCH_NAME