This is a simple Vagrant provisioned thanks to Puppet and Librarian with the purpose of creating an installation of a SIFO application.
Vagrant needs the plugin to install the puppet modules using Librarian.
Just execute once:
vagrant plugin install vagrant-librarian-puppet
LAMP environment based on CentOS, specially prepared for working with SIFO PHP Framework projects.
Contains:
- Apache
- MySQL
- PHP (with some useful packages)
- Memcached
- Redis
- BIND (resolving development domains .local, .vm and .lan)
- NTP (Network Time Protocol for system time synchronization)
Clone this repo
git clone --recursive https://github.com/sifophp/vagrant-sifo
cd vagrant-sifo
vagrant up
The machine will be downloaded, all the packages installed and SIFO will be automatically cloned to /www/sifo
. :)
Magic!
-
Step 1. Add the VM as DNS server In order to enable development DNS like
blahblah.local
orblahblah.lan
orblahblah.vm
you should edit your network preferences and add as your DNS server the IP192.168.33.10
which is the IP of this box. If you don't like this IP you can change it in the fileVagrantfile
(If you prefer to add the addresses in your/etc/hosts
file you can skip this step.) -
Step 2. Open the browser Now, you can reach the webroot with
http://centos.local
or SIFO homepage withhttp://sifo.local
Some useful information:
- The Mysql password for root is empty.
- To login into the VM type
vagrant ssh
orssh [email protected] -p 2222
(password 'vagrant') - To halt the VM:
vagrant halt
- To reload changes in the Vagrantfile:
vagrant reload
- To reload changes in the puppet manifest:
vagrant provision
If you want a graphical client to access Mysql from your machine, you can do it with a SSH tunnel:
SSH Host: localhost
SSH user: vagrant
SSH password: vagrant
SSH Port: 2222
MysqlHost: 127.0.0.1
Username: root
Password: #empty#
There is no password, do not type "empty" :)
You'll have two shared folders inside shared
folder on project root:
www
: Your web DocumentRoot. You'll findsifo
folder inside too.logs
: Logs from Apache and MySQL will be stored here.
This two folders will be mapped on root (/
) folder on your guest Virtual Machine with full permissions (777).