This repo contains the Puppet scripts used to configure the CASH Music infrastructure and developer VMs.
For developers, all that's needed to get it working is Vagrant and Virtualbox. You can and should also install the Vagrant Hostsupdater plugin if you'd like Vagrant to automatically add an entry to your local hosts file and the Vagrant vbguest plugin to automatically update the VirtualBox Guest Additions within the VM. There are a few configuration steps before getting the machine going:
- Install Vagrant, Virtualbox, and optionally the hostsupdater plugin (
vagrant plugin install vagrant-hostsupdater
) and the vbguest plugin (vagrant plugin install vagrant-vbguest
) after installing Vagrant. - Clone this repo.
- Clone the CASH Music Platform repo.
- In the Platform codebase, copy
framework/settings/cashmusic_template.ini.php
toframework/settings/cashmusic.ini.php
leave the default settings in thedatabase_connection
,security
, andapi
sections of the file:
Next, configure Vagrant for your environment (only required if your platform repo is in a non-standard location, or if you want to change the IP address or CPU/memory configuration).
- Copy
Vagrantfile.local.example
toVagrantfile.local
- Edit
Vagrantfile.local
to point the dev mount to your local clone of the Platform repo. Optionally configure the VM CPU and memory allocations or VM IP address. - If you haven't installed the vagrant-hostsupdater plugin, you'll need to edit your /etc/hosts file on the host machine to add an entry for the virtual machine do this for you automatically). The host entry should look like the following, using whichever IP you definied in
Vagrantfile.local
-- default is 10.10.10.20.
10.10.10.20 vagrant-multi1.cashmusic.org
You're good. Now all you need is:
vagrant up
The first time this is run, it will download a base box image which is around 400 MB, so expect this to take a while if you have a slow connection. Once the box is downloaded, a set of scripts will run to bootstrap the VM with needed packages, and then Puppet will run to configure the VM with PHP, MySQL and other fun stuff. This initial setup can take 5-10 minutes or more depending on your hardware and network connection. Subsequent vagrant up
runs will be much faster since everything will already be setup.
When you are done using the machine, use vagrant halt
to shutdown the VM and save battery life and precious CPU cycles that could be better used looking at cat and dog pictures on the Internet.
The Puppet provisioning scripts will load in the SQL schema from the Platform repo and load in a default user (dev@cashmusic.org / dev).
You should now be able to access the site at https://vagrant-multi1.cashmusic.org. Requests to http:// will be automatically redirected to https. The Vagrant site uses a self-signed certificate that you will need to trust in your browser.
The MySQL database is cash_dev
, and it can be accessed by the cash_dev_rw
user without a password.
You can ssh to the Vagrant VM using vagrant ssh
.