Symfony Deployment with Capifony #symfony_ja

Post on 21-Aug-2014

1.810 views 3 download

Tags:

description

It's presented at the symfony meetup #9. About deploymenting to Symfony application, using Capifony. http://symfony.doorkeeper.jp/events/9791

Transcript of Symfony Deployment with Capifony #symfony_ja

2014/04/19 @_nishigori

Symfony Deployment with capifony

$ whoami

❖ @_nishigori!

❖ https://github.com/nishigori!

❖ capifony contributor

http://symfony.com

Symfony is a PHP framework for web projects.

http://capifony.org

Deploying symfony and Symfony2 Applications with Capistrano

How’s Capifony sound?❖ Symfony 1.4+ OR Symfony2!

❖ Supports related libraries !

❖ Doctrine!

❖ Propel!

❖ Composer!

❖ Tests covered!

❖ Inner DSL (Capistrano way)

Get Started$ echo `capifony` >> {YOUR_SYMFONY_PROJECT_ROOT}/Gemfile $ bundle install -j6’ … Installing capifony 2.6.0 Your bundle is complete! It was installed into ./vendor/bundle !

$ bundle exec capifony {YOUR_SYMFONY_PROJECT_ROOT} [add] writing './Capfile' [add] writing './app/config/deploy.rb' [done] symfony 2 project capifonied!

Get Started# Set your specification (hosts, document root, etc..) $ ed app/config/deploy.rb !

# Prepare $ bundle exec cap deploy:setup !

# Deploy $ bundle exec cap deploy !

# Rollback $ bundle exec cap deploy:rollback

Advanced

❖ capistrano-confirm!

❖ Confirm before deploy (& define tasks)!

!

❖ capistrano/ext/multistage (included in Capistrano)!

❖ https://github.com/capistrano/capistrano/wiki/2.x-Multistage-Extension!

❖ Easy way to use a different deployment strategy

Be carefully

❖Fllow related libraries!❖BC Break release!❖e.g) composer’s `—no-dev` option,

# app/config/deploy.rb set :comopser_verion, ‘1.0.0-alpha8’

http://martinfowler.com/delivery.html

CONTINUOUS DELIVERYReliable Software Releases! through !! Build,!! Test,!! and!! Deployment Automation

Testing - Spec❖ capistrano-spec!

❖ https://github.com/technicalpickles/capistrano-spec!

❖ capifony is using capistrano-spec!{CAPYFONY_ROOT}/spec ├── capifony_symfony2_doctrine_spec.rb ├── capifony_symfony2_propel_spec.rb ├── capifony_symfony2_shared_spec.rb ├── capifony_symfony2_spec.rb ├── capifony_symfony2_symfony_spec.rb └── spec_helper.rb

Testing - Integration

“Development environments made easy ”

You can deploy using vagrant instance. so easily run, and quickly :P

–Martin Fowler

“Automated CI and Go”

Testing - Integration

CI Servere.g) test (green) -> deploy to stages

btw, http://jenkins-ci.org/ is made with Drupal

https://drupal.org/

Thanks :)