Skip to content

asarturas/php-vagrant-vm

Repository files navigation

Symfony 2.5 BDD Ready Project Seed

Bundled with PHPSpec, Behat (including Mink, Goutte and PhantomJS via Sahi), virtual dev environment and basic setup of deployments to staging environment.

##Requirements

  1. librarian-chef is installed (tested with v.0.0.2): ($ gem install librarian-chef);
  2. vagrant is installed (tested with v.1.3.4): (http://downloads.vagrantup.com);
  3. vagrant-omnibus extension is installed (tested with v.1.1.1): ($ vagrant plugin install vagrant-omnibus);
  4. vagrant-librarian-chef extension is installed (tested with v.0.1.5): ($ vagrant plugin install vagrant-librarian-chef);
  5. knife solo is installed: ($ gem install knife-solo);
  6. capifony is installed: ($ gem install capifony).

##Virtual Machine Installation Instructions

Before you start:

  1. change vagrant.lt to your project name/domain at: tools/vagrant/Vagrantfile.

Installation steps:

  1. change project settings at your will in tools/vagrant/Vagrantfile;
  2. build virtual machine: $ cd tools/vagrant && vagrant up;
  3. switch to virtual machine shell: $ vagrant ssh;
  4. 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:

  1. 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:

  1. make sure you have passwordless access to staging via staging.vagrant.lt configured at ~/.ssh/config;
  2. install 64bit Debian 7 on your staging environment;
  3. prepare environment to provisioning: ($ cd tools/chef && knife solo prepare staging.vagrant.lt);
  4. provision environment: ($ knife solo cook staging.vagrant.lt).

##Staging Environment Deployment Instructions

Before you start:

  1. change vagrant.lt to your project name/domain at: tools/capifony/config/deploy.rb;
  2. create ssh key on your target staging environment: ($ ssh-keygen -t rsa -C "your_email@example.com");
  3. add this public key as a deployment key to your project on github.

Deployment steps:

  1. setup deployment (only the first time): ($ cd tools/capifony && cap deploy:setup);
  2. deploy project (same directory as previous step): ($ cap deploy).

About

Symfony 2.5 BDD Ready Project Seed

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages