With nowadays web technologies anybody could try any web product with minimal efforts and completely safe. No more need to install and adjust tons of software, no more fear to ruine your working OS with another one server etc. I was dreaming making sandbox for Yii2 playground with Vagrant and Ansible from the first day I have learned them.
And today is this Day :)
In two words ...
"Try Yii2" provides you with Vagrant file and Ansible provsioning scripts. Vagrant will launch the VirtualBox VM, download OS image, deploy it and then run Ansible. It will set up all needed software inside Linux VM, clone Yii2 project, download test DB and connect it with project. Also Vagrant will modify you
hosts file and assign special local domain adresses with VM IP address, so you will be able to access test Yii2 prject by humanreadable local domain name. All these steps will be made completely automatically, just run
vagrant up and wait !
Now in details, out of the box you will get...
- Ubuntu 14.04 64 bit ( + bulk of system soft like
- PHP-FPM 5.5 ( + modules
- Nginx 1.6
- MySQL 5.5
- phpMyAdmin 4.0
- Adminer 4.1
- Redis 2.8 ( + PhpRedis)
- MongoDB 2.6 ( + php_mongo)
- PostgreSQL 9.3
- Sqlite 2.8.17
- Memcached 1.4 ( + php5_memcached)
- Imported Sakila DB for playing around
- And of course Yii2 Advanced Project template imported
- Local IP loop on Host machine
/etc/hostsand Virtual hosts in Nginx already set up too !
- And... I hope to add even more software in the future
It was tested on Ubuntu Linux host machine (But after latest changes, when Ansible was transferred to VM, there is no known issues to run it on Windows)
On other host OSes potentially you will need to change some steps (like the way of Vagrant plugins installation and Terminal usage).
If you have issues on other OSes and have solved it - please send me comments here or on GitHub, to add some solutions to the docs.
- Virtualbox 4.3+ + VirtualBox Extension Pack
Vagrant 1.6+ additional Vagrant modules (optional, but provide full automation) :
vagrant plugin install vagrant-hostsupdater
vagrant plugin install vagrant-vbguest
vagrant plugin install vagrant-cachier
You don't need to have Ansible installed on host machine. It will be installed on VM and self-provisioning will be launched. So it is possible to run everything on Windows machine.
- Clone this from GitHub
- Go inside cloned folder (where
- It will start VM creation and Provisioning. Could take some time 15-30 min... Drink coffee and get back for complete virtual server with Yi2 project ready for play !
Read more ...