azurams / salty-vagrant-lamp-dev

Example vagrant setup that uses salt to provision a lamp box for dev purposes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

salty-vagrant-lamp-dev

Example Vagrant setup that uses SaltStack to provision a LAMP box for dev purposes.

Why?

It's a platform-independent, version-controlled, repeatable, reproducible, shareable, customizeable, authentic replacement for all the *AMP packages out there (if you are still wondering why, you are probably stupid and ugly).

Requirements

Vagrant Up

With just a few commands you'll have a virtual machine up and running ...

git clone https://github.com/jehoshua02/salty-vagrant-lamp-dev.git
cd salty-vagrant-lamp-dev
vagrant up

The first run of vagrant up will take some time: the base box must be downloaded, a new vagrant box must be created from the base box, salt must be installed in the vagrant box, and salt will then install and configure the LAMP stack. The next time vagrant up is executed none of these things will need to be performed again.

Did it Work?

If everything ran smoothly, you should be able to open http://192.168.200.10 and see something other than an error page. Ideally, the host name, full path of index file executed, and a list of hosts (which you can add to your hosts file if you want).

You should also be able to connect as root, password root, to 192.168.200.10 with your favorite MySql tool (MySql Workbench, Sequel Pro, or just the plain-old cli client)

Adding Hosts

Adding hosts to the setup is simple, and it doesn't involve modifying any VirtualHost definitions or restarting Apache. It's only two step. For example, if the host being added were dev.myhost.com:

  1. Add a directory named dev.myhost.com in docroots.
  2. Add 192.168.200.10 dev.myhost.com to your hosts file.

About

Example vagrant setup that uses salt to provision a lamp box for dev purposes