Vagrant and concrete5

Vagrant and concrete5

Creat lightweight, reproducible, and portable concrete5 development environments


Article by Ollie / / Comments / Difficulty 
Vagrant and concrete5

Vagrant is a tool for creating self-contained virtual development environments. Core to its strengths is the ability to reproduce the same environment over and over, important if you're developing as part of a team, and, since machine configuration is stored as a file, the ability to manage and store your environment specification under version control is also huge.

Here's a GIT repository (https://bitbucket.org/olliephillips/concrete5-vagrant) containing a VagrantFile and bash configuration script which will create an Ubuntu virtual machine, then install all the development tools needed for a LAMP environment, as well as install concrete5 (5.6.3) using the command line installation tool.

To get started you need to install VirtualBox, and Vagrant. Check out the the Vagrantup.com website for instructions.

Then copy the two files included in the repo to a local directory and type vagrant up.

This command will provision the entire virtual machine. You can SSH to the development box using vagrant SSH.

The script symlinks /var/www to the virtual machines /vagrant folder which is mapped to the folder you created on your host computer.

To kill the virtual machine use vagrant destroy, to merely stop the machine use vagrant suspend and to bring it back vagrant resume.

Note the VagrantFile will set up the virtual machine on your private network, using a random (random in that I chose it randomly) IP address. Just edit your hosts file (on Mac and Linux /etc/hosts on Windows \system32\drivers\etc\hosts) and create an entry for this IP address such as concrete5.vagrant.

You can then access your concrete5 development box in your browser at http://concrete5.vagrant.

If this solution isn't workable for you, check out the vagrantup.com website for instructions on port forwarding.

When you're done, you can log in using:

username: admin
password: vagrant 

You can login to phpMyAdmin, using:

username: root
password: vagrant 

Enjoy!

Join the conversation

comments powered by Disqus