Bundled with PHPSpec, Behat (including Mink, Goutte and PhantomJS via Sahi), virtual dev environment and basic setup of deployments to staging environment.
##Requirements
librarian-chef
is installed (tested with v.0.0.2): ($ gem install librarian-chef
);vagrant
is installed (tested with v.1.3.4): (http://downloads.vagrantup.com
);vagrant-omnibus
extension is installed (tested with v.1.1.1): ($ vagrant plugin install vagrant-omnibus
);vagrant-librarian-chef
extension is installed (tested with v.0.1.5): ($ vagrant plugin install vagrant-librarian-chef
);knife solo
is installed: ($ gem install knife-solo
);capifony
is installed: ($ gem install capifony
).
##Virtual Machine Installation Instructions
Before you start:
- change
vagrant.lt
to your project name/domain at:tools/vagrant/Vagrantfile
.
Installation steps:
- change project settings at your will in
tools/vagrant/Vagrantfile
; - build virtual machine:
$ cd tools/vagrant && vagrant up
; - switch to virtual machine shell:
$ vagrant ssh
; - install dependencies in composer:
$ cd /mnt/project
and$ composer install
.
P.S. Don't forget to add virtual host into hosts
file on your machine, where you run vm:
(by default: 192.168.33.10 dev.vagrant.lt
).
##Staging Environment Provisioning Instructions
Before you start:
- change
vagrant.lt
to your project name/domain at:tools/chef/site-environments/staging.json
,tools/chef/site-nodes/staging.vagrant.lt.json
(latter file have to be renamed to match your project domain).
Provisioning steps:
- make sure you have passwordless access to staging via
staging.vagrant.lt
configured at~/.ssh/config
; - install 64bit Debian 7 on your staging environment;
- prepare environment to provisioning:
(
$ cd tools/chef && knife solo prepare staging.vagrant.lt
); - provision environment:
(
$ knife solo cook staging.vagrant.lt
).
##Staging Environment Deployment Instructions
Before you start:
- change
vagrant.lt
to your project name/domain at:tools/capifony/config/deploy.rb
; - create ssh key on your target staging environment:
(
$ ssh-keygen -t rsa -C "your_email@example.com"
); - add this public key as a deployment key to your project on github.
Deployment steps:
- setup deployment (only the first time):
(
$ cd tools/capifony && cap deploy:setup
); - deploy project (same directory as previous step):
(
$ cap deploy
).