Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Deploying PHP apps on the cloud


Published on

Deploying PHP applications on the cloud can be a tricky task, especially when it comes to automation and clustered environments that scale up and down. If you’re looking for ways to improve or automate your code deployment methods and use continuous integration and delivery, this session is for you.

Published in: Software
  • Here is an alternative method of installing and hosting PHP app on DigitalOcean ( ). Using this method, you don't have to manually setup a server or stack. You just have to select app and server details. The server will be created and optimized automatically.
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Deploying PHP apps on the cloud

  1. 1. Building the perfect PHP app for the enterprise Episode 5: Deploying PHP apps on the cloud Boaz Ziniman & Dmitry Zbarski
  2. 2. 2 Series overview Keeping up with PHP Developing apps faster Resolving problems and high availability Optimizing performance Now: Deploying PHP applications on AWS ←
  3. 3. Dmitry Zbarski Senior cloud integration engineer Rogue Wave Software Boaz Ziniman Senior director, cloud strategy Rogue Wave Software
  4. 4. 4 Agenda 1. Introduction to deployment 2. PHP application deployment options 3. Demos 4. Q&A
  5. 5. Introduction to deployment
  6. 6. 6 What is deployment? “Software deployment is all of the activities that make a software system available for use.” • OS level configuration (i.e., NFS mounts) • Web server (Apache) configuration • PHP installation and configuration including PHP extensions • Delivery of code and/or data files to server(s) • Create/upgrade database schema and/or data
  7. 7. 7 What is a good deployment process? • Simple and fast • Consistent and repeatable • Automation • Continuous • Reduce the human error factor • Perform as many steps as possible
  8. 8. Poll #1 Which of the following cloud providers do you use? - Amazon Web Services - Google Cloud Platform - Microsoft Azure - DigitalOcean - None of the above or do not use a cloud provider
  9. 9. PHP application deployment options
  10. 10. 10 Choose what’s right for you • Manual deployment • rsync and other basic copy methods • Git – get code from Git repository • S3 – get code from AWS S3 bucket • AMI snapshot (aka “Frozen pizza” method) • Shared file system- NFS/EFS • AWS Beanstalk • Zend Deployment
  11. 11. 11 Manual deployment • Copy files manually to server over network • Best practice – Use Composer to satisfy dependencies • Git and S3 are special cases in which delivery of files is changed • Upon successful deployment, you can create AMI to ease deployment of multiple instances (if needed) • Probably easiest method • Everything is manual – easy control of each step and commandPros • Everything is manual – easy to make mistakes and/or forget something • Server replacement/addition may require manual rebuild from scratch • Auto scaling in most cases is impossible • Complex to setup CI/CD (Git – hooks can be used; S3 – SNS can be used) Cons
  12. 12. 12 Shared file system (EFS) deployment • Elastic File System(EFS) - A service on AWS that allows mounting network file system (using NFSv4.1 protocol) on one or more instances • To use it - Create a file system in the AWS Console and then mount it on any instance where you want to use it • All files stored on single file system are shared between all instances that has that file system mounted • Pay per data size stored on file system • Update files on EFS and all instances immediately get new files • Only one copy of files (in cases of multiple instances) • Easy management Pros • Single point of failure • Only accessible by instances in same VPC • Performance - In the case of a large number of instances (solvable by system) • File locking is not supported Cons
  13. 13. 13 AWS Beanstalk • A PaaS solution that can deploy PHP applications • Upload your code and AWS Beanstalk will take care of everything else (load balancer, instances, configuration) • All PHP options are configurable • Supports deploying Docker containers too, therefore you can pack your PHP application as a Docker container and deploy it • You do not have to manage instances at all • Easy to setup • Supports Docker Pros • Customizations are harder to implement • Vendor lock-inCons
  14. 14. 14 Zend Deployment • Developed by Zend, supports packaging of both applications and libraries • Applications and libraries are packaged in ZPK files • Supports optional scripts that can be run on install/remove of application • Supports Zend Server cluster out-of-box • Has many different hooks that can be customized (pre-install, post-install etc.) • Allows rollback of applications one version backwards • Very customizable • Zend Server AMI allows specifying ZPK to deploy in user data • Supports requirements of PHP extensions and libraries • Supports parameters which can be passed during deployment • Build of ZPK to deploy can be easily automated using scripts • Can be used in CI/CD flow to fully automate deployment Pros • Supported only by Zend Server • Can be complex • You must learn to use it Cons
  15. 15. Poll #2 What do you think is the biggest barrier to cloud deployment for organizations? - Cost - Lack of security or privacy - Loss of control over systems - Lack of knowledge or skills
  16. 16. 16 Watch on demand • Watch this webinar on demand • Read the recap blog to see the results of the polls and Q&A session
  17. 17. Questions?
  18. 18. Building the perfect PHP app for the enterprise Episode 5: Deploying PHP apps on the cloud Boaz Ziniman & Dmitry Zbarski