This project provides the basis for running applications inside a virtual machine (Unbuntu 12.04 64-bit).
The script will manage all the installation only for the following OS:
- Unbuntu 12.04+
- Debian 6.0+
- And should work on all recent debian based distributions.
If you don't have one of the above OS, please follow the manual installation section bellow.
Manual installation of
To avoid a lot of issues, you'll need to install at least:
- VirtualBox 4.1.8+
- vagrant 1.2.2+
Since the virtual machine used a 64-bit OS, You need to enable the
Virtualization Technology (CPU bios menu of your motherboard) to avoid the
Error : vt-x features locked or unavailable in msr error.
curl -s https://raw.github.com/uor/bootstrap/master/init | bash
If the installation is successful, the development environment will boot automatically and a new browser window should open. Otherwise you can browse to
localhost:8081 (the port is configurable in Vagrantfile).
init script will at least:
- create a git repository if the directory is not a git repository
- add the
lithiumdependency either with composer or with a git submodule (a yes/no prompt is used for making this choice).
In gross, the
init script should be able to deal with any kind of repository.
init script assume the web root directory is there =>
A minimal working example
mkdir myproject cd myproject mkdir webroot && echo "<?php phpinfo();?>" > webroot/index.php curl -s https://raw.github.com/uor/bootstrap/master/init | bash
init script is done, you should be able to browse
Upgrading the VM
If you wan't to upgrate the VM with recent changes in
uor/bootstrap, run the following commands:
rm _build Vagrantfile ./init
From the root directory of your project you can use the following usefull
Starting the virtual machine:
Shutdown the virtual machine:
Destroying the virtual machine:
Getting a SSH console to the virtual machine:
Running the tests:
Running an arbitrary command, for example the tests:
vagrant ssh -c 'cd /vagrant && libraries/lithium/console/li3 test tests/cases $0'
If you see 'r??' in the installation output, try adding this to your
detect_unicode = Off