SlideShare a Scribd company logo
Build & deploy
PHP applications*
brief introduction
Who am I ?
Anton Babenko
@antonbabenko
Tech lead at Zoozoo.com
Symfony2/PHP/MySQL
Develop > Build > Test > Deploy
Develop > Build > Test > Deploy
Develop locally, run some tests, commit and
push code…
Develop > Build > Test > Deploy
?
Develop > Build > Test > Deploy
Automate
Develop Build Test Deploy
Automate and get:
● Faster development cycle
● Easier handover to new team members
● Improves quality
● Reduces errors
● Saves time
● Establish routine process which team can rely on
Develop Build Test Deploy
What to automate:
● Dependency & configuration management
○ Using Puppet, Chef, Ansible, bash scripting
● Compilation, minification of your assets
● Running tests
● Creation of documentation and changelogs
● Packaging
● Deployment
Develop Build Test Deploy
How to build?
Develop Build Test Deploy
How to build? Why do you need a build tool?
● To prepare a project to act in a specific environment
Should be no room for misconfiguration
● Staging should have environment similar to
production
Develop Build Test Deploy
Example flow:
● Get project files from VCS
● Configure
● DB Migration
● Run package managers and builders (npm, bower,
grunt)
● Upload
● Cache warmup
● Clear opcache
Develop Build Test Deploy
Popular build & deployment tools for PHP projects:
● Bash scripting (Still hit #1)
● Apache Ant
● Phing
● Capistrano
● Fabric
● http://en.wikipedia.org/wiki/List_of_build_automation_software
or use PaaS
Develop Build Test Deploy
PHP PaaS Providers:
PagodaBox
AppFog
Heroku
fortrabbit
Engine Yard Cloud
Red Hat OpenShift Platform
dotCloud
http://www.phptherightway.com/#servers_and_deployment
AWS Elastic Beanstalk
cloudControl
Windows Azure
Zend Developer Cloud
Google App Engine
Jelastic
Develop Build Test Deploy
● Bash scripting = be creative as you wish
● Jenkins CI + Apache Ant + jenkins-php.org = great
starting point
● Phing = “Apache Ant written in PHP”
● Capistrano
● Fabric
Develop Build Test Deploy
● Bash scripting = be creative as you wish
● Jenkins CI + Apache Ant + jenkins-php.org = great
starting point
● Phing = “Apache Ant written in PHP”
● Capistrano = for builds and deployments
● Fabric
Develop Build Test Deploy
Capistrano is an open source tool for running scripts on
multiple servers. It’s primary use is for easily deploying
applications.
capifony is a deployment recipes collection that works
with both symfony and Symfony2 applications.
Source: capifony.org
Develop Build Test Deploy
# gem install hipchat newrelic_rpm
if exists?(:config_hipchat_token)
require 'hipchat/capistrano'
set :hipchat_token, "#{config_hipchat_token}"
set :hipchat_room_name, "Developers chat"
end
# Recipe:
# github.com/ekino/EkinoNewRelicBundle/blob/master/Resources/recipes/newrelic.rb
if exists?(:config_newrelic_license)
require 'new_relic/recipes'
set :newrelic_license_key, "#{config_newrelic_license}"
set :newrelic_appname, "You name it"
after "deploy", "newrelic:notice_deployment"
end
Capifony sugar (1/4):
Develop Build Test Deploy
after "symfony:composer:install", "symfony:verify_console"
namespace :symfony do
task :verify_console do
capifony_pretty_print "--> Run app/console to verify if parameters.yml has all
required keys and application is runnable"
if capture("#{try_sudo} sh -c 'cd #{latest_release} && #{php_bin} #{symfony_console}
> /tmp/app_console_output 2>&1 ; echo $?'").to_s.strip != "0"
run "cat /tmp/app_console_output && rm -rf /tmp/app_console_output"
raise CommandError.new("There was an unrecoverable error.")
end
capifony_puts_ok
end
end
Capifony sugar (2/4):
Develop Build Test Deploy
# Update assets_version
# Source: https://github.com/kachkaev/KachkaevAssetsVersionBundle
namespace :assets_version do
task :increment do
capifony_pretty_print "--> Increment assets_version"
run "#{try_sudo} sh -c 'cd #{latest_release} && #{php_bin} #{symfony_console}
assets_version:increment --env=#{symfony_env_prod}'"
capifony_puts_ok
end
end
Capifony sugar (3/4):
Develop Build Test Deploy
# Run migration on one DB server instead of all:
role :web, "www1.mysite.com", "www2.mysite.com"
role :app, "www1.mysite.com", "www2.mysite.com"
role :db, "db1.mysite.com", :primary => true
role :db, "db2.mysite.com"
role :db, "db3.mysite.com"
Capifony sugar (4/4):
Develop Build Test Deploy
Capifony questions?
http://stackoverflow.com/questions/tagged/capifony
Want something with GUI?
http://www.deployhq.com/
Develop Build Test Deploy
Questions?
Questions?
Questions?
Questions?
Thanks!
Ad

Recommended

Practical PHP Deployment with Jenkins
Practical PHP Deployment with Jenkins
Adam Culp
 
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Pantheon
 
One click deployment with Jenkins - PHP Munich
One click deployment with Jenkins - PHP Munich
Mayflower GmbH
 
Developing PHP Applications Faster
Developing PHP Applications Faster
Adam Culp
 
Why Your Site is Slow: Performance Answers for Your Clients
Why Your Site is Slow: Performance Answers for Your Clients
Pantheon
 
Testing Your Code as Part of an Industrial Grade Workflow
Testing Your Code as Part of an Industrial Grade Workflow
Pantheon
 
Enterprise PHP
Enterprise PHP
Mohammad Emran Hasan
 
Continuous Integration Is for Teams: Moving past buzzword driven development
Continuous Integration Is for Teams: Moving past buzzword driven development
Pantheon
 
Organizing Your PHP Projects (2010 ConFoo)
Organizing Your PHP Projects (2010 ConFoo)
Paul Jones
 
Developing better PHP projects
Developing better PHP projects
Mohammad Emran Hasan
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Michael Lihs
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
Michael Lihs
 
A Personal Journey
A Personal Journey
Michael Lihs
 
Drupal Performance
Drupal Performance
Pantheon
 
They why behind php frameworks
They why behind php frameworks
Kirk Madera
 
ZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small Teams
Joe Ferguson
 
Efficient development workflows with composer
Efficient development workflows with composer
nuppla
 
Frontend testing with Codeception
Frontend testing with Codeception
Christian Keuerleber
 
Efficient development workflows with composer
Efficient development workflows with composer
nuppla
 
How do I Write Testable Javascript so I can Test my CF API on Server and Client
How do I Write Testable Javascript so I can Test my CF API on Server and Client
ColdFusionConference
 
Vagrant and Chef on FOSSASIA 2014
Vagrant and Chef on FOSSASIA 2014
Michael Lihs
 
High Productivity Web Development Workflow
High Productivity Web Development Workflow
Vũ Nguyễn
 
Drupal + composer = new love !?
Drupal + composer = new love !?
nuppla
 
The New Frontend Toolchain
The New Frontend Toolchain
Bruno Abrantes
 
The Modern Developer Toolbox
The Modern Developer Toolbox
Pablo Godel
 
Untangling fall2017 week2
Untangling fall2017 week2
Derek Jacoby
 
Desktop Apps with PHP and Titanium
Desktop Apps with PHP and Titanium
Ben Ramsey
 
Building and deploying PHP applications with Phing
Building and deploying PHP applications with Phing
Michiel Rook
 
Introduction à l'intégration continue en PHP
Introduction à l'intégration continue en PHP
Eric Hogue
 
PHP Unconference Continuous Integration
PHP Unconference Continuous Integration
Nils Hofmeister
 

More Related Content

What's hot (19)

Organizing Your PHP Projects (2010 ConFoo)
Organizing Your PHP Projects (2010 ConFoo)
Paul Jones
 
Developing better PHP projects
Developing better PHP projects
Mohammad Emran Hasan
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Michael Lihs
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
Michael Lihs
 
A Personal Journey
A Personal Journey
Michael Lihs
 
Drupal Performance
Drupal Performance
Pantheon
 
They why behind php frameworks
They why behind php frameworks
Kirk Madera
 
ZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small Teams
Joe Ferguson
 
Efficient development workflows with composer
Efficient development workflows with composer
nuppla
 
Frontend testing with Codeception
Frontend testing with Codeception
Christian Keuerleber
 
Efficient development workflows with composer
Efficient development workflows with composer
nuppla
 
How do I Write Testable Javascript so I can Test my CF API on Server and Client
How do I Write Testable Javascript so I can Test my CF API on Server and Client
ColdFusionConference
 
Vagrant and Chef on FOSSASIA 2014
Vagrant and Chef on FOSSASIA 2014
Michael Lihs
 
High Productivity Web Development Workflow
High Productivity Web Development Workflow
Vũ Nguyễn
 
Drupal + composer = new love !?
Drupal + composer = new love !?
nuppla
 
The New Frontend Toolchain
The New Frontend Toolchain
Bruno Abrantes
 
The Modern Developer Toolbox
The Modern Developer Toolbox
Pablo Godel
 
Untangling fall2017 week2
Untangling fall2017 week2
Derek Jacoby
 
Desktop Apps with PHP and Titanium
Desktop Apps with PHP and Titanium
Ben Ramsey
 
Organizing Your PHP Projects (2010 ConFoo)
Organizing Your PHP Projects (2010 ConFoo)
Paul Jones
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Michael Lihs
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
Michael Lihs
 
A Personal Journey
A Personal Journey
Michael Lihs
 
Drupal Performance
Drupal Performance
Pantheon
 
They why behind php frameworks
They why behind php frameworks
Kirk Madera
 
ZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small Teams
Joe Ferguson
 
Efficient development workflows with composer
Efficient development workflows with composer
nuppla
 
Efficient development workflows with composer
Efficient development workflows with composer
nuppla
 
How do I Write Testable Javascript so I can Test my CF API on Server and Client
How do I Write Testable Javascript so I can Test my CF API on Server and Client
ColdFusionConference
 
Vagrant and Chef on FOSSASIA 2014
Vagrant and Chef on FOSSASIA 2014
Michael Lihs
 
High Productivity Web Development Workflow
High Productivity Web Development Workflow
Vũ Nguyễn
 
Drupal + composer = new love !?
Drupal + composer = new love !?
nuppla
 
The New Frontend Toolchain
The New Frontend Toolchain
Bruno Abrantes
 
The Modern Developer Toolbox
The Modern Developer Toolbox
Pablo Godel
 
Untangling fall2017 week2
Untangling fall2017 week2
Derek Jacoby
 
Desktop Apps with PHP and Titanium
Desktop Apps with PHP and Titanium
Ben Ramsey
 

Viewers also liked (12)

Building and deploying PHP applications with Phing
Building and deploying PHP applications with Phing
Michiel Rook
 
Introduction à l'intégration continue en PHP
Introduction à l'intégration continue en PHP
Eric Hogue
 
PHP Unconference Continuous Integration
PHP Unconference Continuous Integration
Nils Hofmeister
 
Building and Deploying PHP Apps Using phing
Building and Deploying PHP Apps Using phing
Mihail Irintchev
 
Juc boston2014.pptx
Juc boston2014.pptx
Brandon Mueller
 
Symfony under control. Continuous Integration and Automated Deployments in Sy...
Symfony under control. Continuous Integration and Automated Deployments in Sy...
Max Romanovsky
 
Deploying PHP applications with Phing
Deploying PHP applications with Phing
Michiel Rook
 
Continous Delivering a PHP application
Continous Delivering a PHP application
Javier López
 
Deploy and Scale your PHP App with AWS ElasticBeanstalk and Docker- PHPTour L...
Deploy and Scale your PHP App with AWS ElasticBeanstalk and Docker- PHPTour L...
Corley S.r.l.
 
Continuous Integration and PHP
Continuous Integration and PHP
Arno Schneider
 
Enterprise PHP Development - ZendCon 2008
Enterprise PHP Development - ZendCon 2008
Ivo Jansch
 
Principles and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at Etsy
Mike Brittain
 
Building and deploying PHP applications with Phing
Building and deploying PHP applications with Phing
Michiel Rook
 
Introduction à l'intégration continue en PHP
Introduction à l'intégration continue en PHP
Eric Hogue
 
PHP Unconference Continuous Integration
PHP Unconference Continuous Integration
Nils Hofmeister
 
Building and Deploying PHP Apps Using phing
Building and Deploying PHP Apps Using phing
Mihail Irintchev
 
Symfony under control. Continuous Integration and Automated Deployments in Sy...
Symfony under control. Continuous Integration and Automated Deployments in Sy...
Max Romanovsky
 
Deploying PHP applications with Phing
Deploying PHP applications with Phing
Michiel Rook
 
Continous Delivering a PHP application
Continous Delivering a PHP application
Javier López
 
Deploy and Scale your PHP App with AWS ElasticBeanstalk and Docker- PHPTour L...
Deploy and Scale your PHP App with AWS ElasticBeanstalk and Docker- PHPTour L...
Corley S.r.l.
 
Continuous Integration and PHP
Continuous Integration and PHP
Arno Schneider
 
Enterprise PHP Development - ZendCon 2008
Enterprise PHP Development - ZendCon 2008
Ivo Jansch
 
Principles and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at Etsy
Mike Brittain
 
Ad

Similar to Build & deploy PHP application (intro level) (20)

One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.
Javier López
 
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Pablo Godel
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
Pablo Godel
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web Applications
Pablo Godel
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovsky
php-user-group-minsk
 
Building and Deploying PHP Applications, PHPTour 2016
Building and Deploying PHP Applications, PHPTour 2016
Martins Sipenko
 
Evolution of deploy.sh
Evolution of deploy.sh
Leonid Mamchenkov
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
Pablo Godel
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Fabrice Bernhard
 
Continuous Integration at Mollie
Continuous Integration at Mollie
willemstuursma
 
Symfony 2 under control
Symfony 2 under control
Max Romanovsky
 
Write php deploy everywhere tek11
Write php deploy everywhere tek11
Michelangelo van Dam
 
Full-Stack CakePHP Deployment
Full-Stack CakePHP Deployment
Jose Diaz-Gonzalez
 
Deploying PHP apps on the cloud
Deploying PHP apps on the cloud
Zend by Rogue Wave Software
 
CI
CI
Patrick Mizer
 
Deployment Tactics
Deployment Tactics
Ian Barber
 
An introduction to Phing the PHP build system
An introduction to Phing the PHP build system
Jeremy Coates
 
Lighning Talk: PHP build process
Lighning Talk: PHP build process
Bryan Agee
 
Continous delivery with Jenkins and Chef
Continous delivery with Jenkins and Chef
defrag2
 
Professional deployment
Professional deployment
Ivelina Dimova
 
One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.
Javier López
 
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Pablo Godel
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
Pablo Godel
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web Applications
Pablo Godel
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovsky
php-user-group-minsk
 
Building and Deploying PHP Applications, PHPTour 2016
Building and Deploying PHP Applications, PHPTour 2016
Martins Sipenko
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
Pablo Godel
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Fabrice Bernhard
 
Continuous Integration at Mollie
Continuous Integration at Mollie
willemstuursma
 
Symfony 2 under control
Symfony 2 under control
Max Romanovsky
 
Deployment Tactics
Deployment Tactics
Ian Barber
 
An introduction to Phing the PHP build system
An introduction to Phing the PHP build system
Jeremy Coates
 
Lighning Talk: PHP build process
Lighning Talk: PHP build process
Bryan Agee
 
Continous delivery with Jenkins and Chef
Continous delivery with Jenkins and Chef
defrag2
 
Professional deployment
Professional deployment
Ivelina Dimova
 
Ad

More from Anton Babenko (20)

Manage any AWS resources with Terraform 0.12 - April 2020
Manage any AWS resources with Terraform 0.12 - April 2020
Anton Babenko
 
Terraform 0.12 + Terragrunt
Terraform 0.12 + Terragrunt
Anton Babenko
 
Terraform Best Practices - DevOps Unicorns 2019
Terraform Best Practices - DevOps Unicorns 2019
Anton Babenko
 
Terraform AWS modules and some best practices - September 2019
Terraform AWS modules and some best practices - September 2019
Anton Babenko
 
What you see is what you get for AWS infrastructure
What you see is what you get for AWS infrastructure
Anton Babenko
 
Terraform AWS modules and some best-practices - May 2019
Terraform AWS modules and some best-practices - May 2019
Anton Babenko
 
Terraform modules and some of best-practices - March 2019
Terraform modules and some of best-practices - March 2019
Anton Babenko
 
What you see is what you get for AWS infrastructure
What you see is what you get for AWS infrastructure
Anton Babenko
 
Gotchas using Terraform in a secure delivery pipeline
Gotchas using Terraform in a secure delivery pipeline
Anton Babenko
 
Описание инфраструктуры с Terraform на будущее
Описание инфраструктуры с Terraform на будущее
Anton Babenko
 
Preview of Terraform 0.12 + modules.tf - Kiev HUG meetup
Preview of Terraform 0.12 + modules.tf - Kiev HUG meetup
Anton Babenko
 
Terraform modules and (some of) best practices
Terraform modules and (some of) best practices
Anton Babenko
 
Terraform modules and (some of) best practices
Terraform modules and (some of) best practices
Anton Babenko
 
Terraform modules and best-practices - September 2018
Terraform modules and best-practices - September 2018
Anton Babenko
 
Building infrastructure as code using Terraform - DevOps Krakow
Building infrastructure as code using Terraform - DevOps Krakow
Anton Babenko
 
Terraform Q&A - HashiCorp User Group Oslo
Terraform Q&A - HashiCorp User Group Oslo
Anton Babenko
 
"I’ve heard you know infrastructure"
"I’ve heard you know infrastructure"
Anton Babenko
 
Terraform in deployment pipeline
Terraform in deployment pipeline
Anton Babenko
 
"Continuously delivering infrastructure using Terraform and Packer" training ...
"Continuously delivering infrastructure using Terraform and Packer" training ...
Anton Babenko
 
Continuous delivery in AWS
Continuous delivery in AWS
Anton Babenko
 
Manage any AWS resources with Terraform 0.12 - April 2020
Manage any AWS resources with Terraform 0.12 - April 2020
Anton Babenko
 
Terraform 0.12 + Terragrunt
Terraform 0.12 + Terragrunt
Anton Babenko
 
Terraform Best Practices - DevOps Unicorns 2019
Terraform Best Practices - DevOps Unicorns 2019
Anton Babenko
 
Terraform AWS modules and some best practices - September 2019
Terraform AWS modules and some best practices - September 2019
Anton Babenko
 
What you see is what you get for AWS infrastructure
What you see is what you get for AWS infrastructure
Anton Babenko
 
Terraform AWS modules and some best-practices - May 2019
Terraform AWS modules and some best-practices - May 2019
Anton Babenko
 
Terraform modules and some of best-practices - March 2019
Terraform modules and some of best-practices - March 2019
Anton Babenko
 
What you see is what you get for AWS infrastructure
What you see is what you get for AWS infrastructure
Anton Babenko
 
Gotchas using Terraform in a secure delivery pipeline
Gotchas using Terraform in a secure delivery pipeline
Anton Babenko
 
Описание инфраструктуры с Terraform на будущее
Описание инфраструктуры с Terraform на будущее
Anton Babenko
 
Preview of Terraform 0.12 + modules.tf - Kiev HUG meetup
Preview of Terraform 0.12 + modules.tf - Kiev HUG meetup
Anton Babenko
 
Terraform modules and (some of) best practices
Terraform modules and (some of) best practices
Anton Babenko
 
Terraform modules and (some of) best practices
Terraform modules and (some of) best practices
Anton Babenko
 
Terraform modules and best-practices - September 2018
Terraform modules and best-practices - September 2018
Anton Babenko
 
Building infrastructure as code using Terraform - DevOps Krakow
Building infrastructure as code using Terraform - DevOps Krakow
Anton Babenko
 
Terraform Q&A - HashiCorp User Group Oslo
Terraform Q&A - HashiCorp User Group Oslo
Anton Babenko
 
"I’ve heard you know infrastructure"
"I’ve heard you know infrastructure"
Anton Babenko
 
Terraform in deployment pipeline
Terraform in deployment pipeline
Anton Babenko
 
"Continuously delivering infrastructure using Terraform and Packer" training ...
"Continuously delivering infrastructure using Terraform and Packer" training ...
Anton Babenko
 
Continuous delivery in AWS
Continuous delivery in AWS
Anton Babenko
 

Recently uploaded (20)

Reimagining Software Development and DevOps with Agentic AI
Reimagining Software Development and DevOps with Agentic AI
Maxim Salnikov
 
SAP Datasphere Catalog L2 (2024-02-07).pptx
SAP Datasphere Catalog L2 (2024-02-07).pptx
HimanshuSachdeva46
 
DevOps for AI: running LLMs in production with Kubernetes and KubeFlow
DevOps for AI: running LLMs in production with Kubernetes and KubeFlow
Aarno Aukia
 
Zoneranker’s Digital marketing solutions
Zoneranker’s Digital marketing solutions
reenashriee
 
SAP PM Module Level-IV Training Complete.ppt
SAP PM Module Level-IV Training Complete.ppt
MuhammadShaheryar36
 
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Puppy jhon
 
About Certivo | Intelligent Compliance Solutions for Global Regulatory Needs
About Certivo | Intelligent Compliance Solutions for Global Regulatory Needs
certivoai
 
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
Hassan Abid
 
OpenTelemetry 101 Cloud Native Barcelona
OpenTelemetry 101 Cloud Native Barcelona
Imma Valls Bernaus
 
Microsoft Business-230T01A-ENU-PowerPoint_01.pptx
Microsoft Business-230T01A-ENU-PowerPoint_01.pptx
soulamaabdoulaye128
 
Insurance Underwriting Software Enhancing Accuracy and Efficiency
Insurance Underwriting Software Enhancing Accuracy and Efficiency
Insurance Tech Services
 
Looking for a BIRT Report Alternative Here’s Why Helical Insight Stands Out.pdf
Looking for a BIRT Report Alternative Here’s Why Helical Insight Stands Out.pdf
Varsha Nayak
 
dp-700 exam questions sample docume .pdf
dp-700 exam questions sample docume .pdf
pravkumarbiz
 
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
IFI Techsolutions
 
Step by step guide to install Flutter and Dart
Step by step guide to install Flutter and Dart
S Pranav (Deepu)
 
Porting Qt 5 QML Modules to Qt 6 Webinar
Porting Qt 5 QML Modules to Qt 6 Webinar
ICS
 
Who will create the languages of the future?
Who will create the languages of the future?
Jordi Cabot
 
How Insurance Policy Management Software Streamlines Operations
How Insurance Policy Management Software Streamlines Operations
Insurance Tech Services
 
FME as an Orchestration Tool - Peak of Data & AI 2025
FME as an Orchestration Tool - Peak of Data & AI 2025
Safe Software
 
Artificial Intelligence Workloads and Data Center Management
Artificial Intelligence Workloads and Data Center Management
SandeepKS52
 
Reimagining Software Development and DevOps with Agentic AI
Reimagining Software Development and DevOps with Agentic AI
Maxim Salnikov
 
SAP Datasphere Catalog L2 (2024-02-07).pptx
SAP Datasphere Catalog L2 (2024-02-07).pptx
HimanshuSachdeva46
 
DevOps for AI: running LLMs in production with Kubernetes and KubeFlow
DevOps for AI: running LLMs in production with Kubernetes and KubeFlow
Aarno Aukia
 
Zoneranker’s Digital marketing solutions
Zoneranker’s Digital marketing solutions
reenashriee
 
SAP PM Module Level-IV Training Complete.ppt
SAP PM Module Level-IV Training Complete.ppt
MuhammadShaheryar36
 
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Puppy jhon
 
About Certivo | Intelligent Compliance Solutions for Global Regulatory Needs
About Certivo | Intelligent Compliance Solutions for Global Regulatory Needs
certivoai
 
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
Hassan Abid
 
OpenTelemetry 101 Cloud Native Barcelona
OpenTelemetry 101 Cloud Native Barcelona
Imma Valls Bernaus
 
Microsoft Business-230T01A-ENU-PowerPoint_01.pptx
Microsoft Business-230T01A-ENU-PowerPoint_01.pptx
soulamaabdoulaye128
 
Insurance Underwriting Software Enhancing Accuracy and Efficiency
Insurance Underwriting Software Enhancing Accuracy and Efficiency
Insurance Tech Services
 
Looking for a BIRT Report Alternative Here’s Why Helical Insight Stands Out.pdf
Looking for a BIRT Report Alternative Here’s Why Helical Insight Stands Out.pdf
Varsha Nayak
 
dp-700 exam questions sample docume .pdf
dp-700 exam questions sample docume .pdf
pravkumarbiz
 
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
IFI Techsolutions
 
Step by step guide to install Flutter and Dart
Step by step guide to install Flutter and Dart
S Pranav (Deepu)
 
Porting Qt 5 QML Modules to Qt 6 Webinar
Porting Qt 5 QML Modules to Qt 6 Webinar
ICS
 
Who will create the languages of the future?
Who will create the languages of the future?
Jordi Cabot
 
How Insurance Policy Management Software Streamlines Operations
How Insurance Policy Management Software Streamlines Operations
Insurance Tech Services
 
FME as an Orchestration Tool - Peak of Data & AI 2025
FME as an Orchestration Tool - Peak of Data & AI 2025
Safe Software
 
Artificial Intelligence Workloads and Data Center Management
Artificial Intelligence Workloads and Data Center Management
SandeepKS52
 

Build & deploy PHP application (intro level)

  • 1. Build & deploy PHP applications* brief introduction
  • 2. Who am I ? Anton Babenko @antonbabenko Tech lead at Zoozoo.com Symfony2/PHP/MySQL
  • 3. Develop > Build > Test > Deploy
  • 4. Develop > Build > Test > Deploy Develop locally, run some tests, commit and push code…
  • 5. Develop > Build > Test > Deploy ?
  • 6. Develop > Build > Test > Deploy Automate
  • 7. Develop Build Test Deploy Automate and get: ● Faster development cycle ● Easier handover to new team members ● Improves quality ● Reduces errors ● Saves time ● Establish routine process which team can rely on
  • 8. Develop Build Test Deploy What to automate: ● Dependency & configuration management ○ Using Puppet, Chef, Ansible, bash scripting ● Compilation, minification of your assets ● Running tests ● Creation of documentation and changelogs ● Packaging ● Deployment
  • 9. Develop Build Test Deploy How to build?
  • 10. Develop Build Test Deploy How to build? Why do you need a build tool? ● To prepare a project to act in a specific environment Should be no room for misconfiguration ● Staging should have environment similar to production
  • 11. Develop Build Test Deploy Example flow: ● Get project files from VCS ● Configure ● DB Migration ● Run package managers and builders (npm, bower, grunt) ● Upload ● Cache warmup ● Clear opcache
  • 12. Develop Build Test Deploy Popular build & deployment tools for PHP projects: ● Bash scripting (Still hit #1) ● Apache Ant ● Phing ● Capistrano ● Fabric ● http://en.wikipedia.org/wiki/List_of_build_automation_software or use PaaS
  • 13. Develop Build Test Deploy PHP PaaS Providers: PagodaBox AppFog Heroku fortrabbit Engine Yard Cloud Red Hat OpenShift Platform dotCloud http://www.phptherightway.com/#servers_and_deployment AWS Elastic Beanstalk cloudControl Windows Azure Zend Developer Cloud Google App Engine Jelastic
  • 14. Develop Build Test Deploy ● Bash scripting = be creative as you wish ● Jenkins CI + Apache Ant + jenkins-php.org = great starting point ● Phing = “Apache Ant written in PHP” ● Capistrano ● Fabric
  • 15. Develop Build Test Deploy ● Bash scripting = be creative as you wish ● Jenkins CI + Apache Ant + jenkins-php.org = great starting point ● Phing = “Apache Ant written in PHP” ● Capistrano = for builds and deployments ● Fabric
  • 16. Develop Build Test Deploy Capistrano is an open source tool for running scripts on multiple servers. It’s primary use is for easily deploying applications. capifony is a deployment recipes collection that works with both symfony and Symfony2 applications. Source: capifony.org
  • 17. Develop Build Test Deploy # gem install hipchat newrelic_rpm if exists?(:config_hipchat_token) require 'hipchat/capistrano' set :hipchat_token, "#{config_hipchat_token}" set :hipchat_room_name, "Developers chat" end # Recipe: # github.com/ekino/EkinoNewRelicBundle/blob/master/Resources/recipes/newrelic.rb if exists?(:config_newrelic_license) require 'new_relic/recipes' set :newrelic_license_key, "#{config_newrelic_license}" set :newrelic_appname, "You name it" after "deploy", "newrelic:notice_deployment" end Capifony sugar (1/4):
  • 18. Develop Build Test Deploy after "symfony:composer:install", "symfony:verify_console" namespace :symfony do task :verify_console do capifony_pretty_print "--> Run app/console to verify if parameters.yml has all required keys and application is runnable" if capture("#{try_sudo} sh -c 'cd #{latest_release} && #{php_bin} #{symfony_console} > /tmp/app_console_output 2>&1 ; echo $?'").to_s.strip != "0" run "cat /tmp/app_console_output && rm -rf /tmp/app_console_output" raise CommandError.new("There was an unrecoverable error.") end capifony_puts_ok end end Capifony sugar (2/4):
  • 19. Develop Build Test Deploy # Update assets_version # Source: https://github.com/kachkaev/KachkaevAssetsVersionBundle namespace :assets_version do task :increment do capifony_pretty_print "--> Increment assets_version" run "#{try_sudo} sh -c 'cd #{latest_release} && #{php_bin} #{symfony_console} assets_version:increment --env=#{symfony_env_prod}'" capifony_puts_ok end end Capifony sugar (3/4):
  • 20. Develop Build Test Deploy # Run migration on one DB server instead of all: role :web, "www1.mysite.com", "www2.mysite.com" role :app, "www1.mysite.com", "www2.mysite.com" role :db, "db1.mysite.com", :primary => true role :db, "db2.mysite.com" role :db, "db3.mysite.com" Capifony sugar (4/4):
  • 21. Develop Build Test Deploy Capifony questions? http://stackoverflow.com/questions/tagged/capifony Want something with GUI? http://www.deployhq.com/
  • 22. Develop Build Test Deploy Questions? Questions? Questions? Questions?