Symfony Deployment with Capifony #symfony_ja

16
2014/04/19 @_nishigori Symfony Deployment with capifony

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

Page 1: Symfony Deployment with Capifony #symfony_ja

2014/04/19 @_nishigori

Symfony Deployment with capifony

Page 2: Symfony Deployment with Capifony #symfony_ja

$ whoami

❖ @_nishigori!

❖ https://github.com/nishigori!

❖ capifony contributor

Page 3: Symfony Deployment with Capifony #symfony_ja

http://symfony.com

Symfony is a PHP framework for web projects.

Page 4: Symfony Deployment with Capifony #symfony_ja

http://capifony.org

Deploying symfony and Symfony2 Applications with Capistrano

Page 5: Symfony Deployment with Capifony #symfony_ja

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

❖ Supports related libraries !

❖ Doctrine!

❖ Propel!

❖ Composer!

❖ Tests covered!

❖ Inner DSL (Capistrano way)

Page 6: Symfony Deployment with Capifony #symfony_ja

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!

Page 7: Symfony Deployment with Capifony #symfony_ja

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

Page 8: Symfony Deployment with Capifony #symfony_ja

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

Page 9: Symfony Deployment with Capifony #symfony_ja

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’

Page 10: Symfony Deployment with Capifony #symfony_ja

http://martinfowler.com/delivery.html

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

Page 11: Symfony Deployment with Capifony #symfony_ja

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

Page 12: Symfony Deployment with Capifony #symfony_ja

Testing - Integration

“Development environments made easy ”

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

Page 13: Symfony Deployment with Capifony #symfony_ja

–Martin Fowler

“Automated CI and Go”

Page 14: Symfony Deployment with Capifony #symfony_ja

Testing - Integration

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

Page 15: Symfony Deployment with Capifony #symfony_ja

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

https://drupal.org/

Page 16: Symfony Deployment with Capifony #symfony_ja

Thanks :)