PHP Deployment With Capistrano
-
Upload
jserpieters -
Category
Technology
-
view
4.336 -
download
1
description
Transcript of PHP Deployment With Capistrano
![Page 1: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/1.jpg)
PHP Deployment with Capistrano
PHPBelgium Event – 21/10/2008
![Page 2: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/2.jpg)
About me
Jeroen Serpieters
PHP Consultant (ZCE)
Ausy Belgium, Zend Partner in the Belux
www.ausy.be
![Page 3: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/3.jpg)
Goal of this presentation
Show an automated way of deployment
Convince you of using an automated deployment process
Convince you of using Capistrano ;-)
![Page 4: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/4.jpg)
Capistrano
![Page 5: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/5.jpg)
What?
Open Source tool to deploy web applications
Specifically aimed at RoR deployment
But, just as well an all round automation tool
![Page 6: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/6.jpg)
What can it do for you?
Set up your web application environment
Deploy your code
Deploy your database
Manage your releases
![Page 7: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/7.jpg)
Why?
Human beings tend to be error-prone
Computers don’t
Save valuable time
![Page 8: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/8.jpg)
How?
![Page 9: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/9.jpg)
...or...
![Page 10: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/10.jpg)
Prerequisites for the servers
SSH Access
POSIX shell
Identical passwords for all servers or PKI
![Page 11: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/11.jpg)
Getting started!
![Page 12: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/12.jpg)
Terminology
Recipe
Task
Namespace
Role
![Page 13: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/13.jpg)
Installation
Install Ruby on your client
Install Ruby Gems
Install Capistranocap
capify
![Page 14: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/14.jpg)
“Capifying”
Use capify inside your project
./Capfile
./config/deploy.rb
![Page 15: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/15.jpg)
Prepare the server
Only on the first deployment
Set up the default file structure
![Page 16: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/16.jpg)
Initial deployment tree
![Page 17: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/17.jpg)
After deployment
![Page 18: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/18.jpg)
Demo
![Page 19: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/19.jpg)
Round Up
Advantages
Less work
Less error prone deployment
Disadvantages
Deployment client
![Page 20: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/20.jpg)
Q & A
![Page 21: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/21.jpg)
Resources
The Absolute Moron’s Guide to Capistrano
http://www.softiesonrails.com/
Deploying Rails Applicationshttp://pragprog.com/
My Blog :-)http://blog.lunitechs.be/
![Page 22: PHP Deployment With Capistrano](https://reader038.fdocuments.us/reader038/viewer/2022102613/54bae8094a795916718b4569/html5/thumbnails/22.jpg)
Thanks!