In yesterday’s webinar, “Deploying PHP apps on the cloud,” Boaz Ziniman and Dima Zbarski explained and demoed several different methods for you to consider for deploying a PHP application:
1. Manual deployment including Git and S3 options
2. Shared file systems (EFS)
3. AWS Beanstalk
4. Zend Deployment
Regardless of the method you choose for deployment it’s critical to ensure that you have good deployment process, one that is simple, fast, consistent, automated, and continuous. A good deployment process can save you time, money, and your reputation (remember back to webinar #3 – your reputation largely depends upon the reputation of your applications).
Audience poll results
We asked our attendees about cloud providers and what they thought were barriers to cloud deployment. Here’s what they thought.
We’re not surprised that AWS is a popular choice, but we’d heard DigitalOcean was popular too and I guess our attendees proved that statement to be true.
Our attendees responded in a similar fashion to the recent RightScale survey which looked at the cloud challenges from 2016 vs 2015, and concluded that lack of resources/expertise replaced security as the #1 cloud challenge.
Boaz and Dima answer your questions
Which of the options presented is the most secure?
(Dima) I don’t think you can compare these options by how secure they are. Even in the case of manual deployment, files are transferred using SSH, which is a very secure protocol. So if we compare how secure these methods are – I would say all methods are more or less equal.
Does Zend Deployment support other cloud services?
(Boaz) Zend Server is fully available on AWS Marketplace, Azure Marketplace, and Google Cloud Launcher in Developer edition. Zend Server is available as an official Docker image from Docker Hub and can be deployed on any cloud service supporting Docker. Additionally, any platform that can run Zend Server supports Zend Deployment out-of-the-box.
Does Zend Deployment integrate with Git or other version management systems?
(Dima) To some extent. The Zend Deployment package is created from application files with the addition of a few files describing deployment. So you can save everything in a Git repository and automate things using, for example, Jenkins which checkouts code and creates a deployment package. You can then go one step further and deploy that package on Zend Server (Zend Server has a WebAPI and a CLI wrapper script for these things).
For Zend Deployment, was the WordPress site database already created or was it included in the ZPK file?
(Dima) In our demo I created the database separately, without using ZPK. But practically nothing stops you from including SQL files in ZPK and executing them using hook script when deploying an application. The WordPress demo ZPK, which is included in Zend Server installation, does exactly that. One more note about WordPress – you could utilize wp-cli script to automate WordPress deployment.
(Boaz) In our demo the database was already there (to simplify the flow and streamline the demo) but it is possible to include the DB dump as part of your deployment file and execute scripts during the deployment that will import this dump into your DB.
Why not cover Subversion? With Subversion, it is also possible to submit only changed files and run a post-submit script to update servers source code, like a test server.
(Dima) Of course it’s possible. I chose to show a demo with Git because Git is much more common nowadays. I can tell you that I have done a setup of Subversion mirror in cloud and then cluster of servers having Subversion checkout and a hook script to automatically update checkouts on all servers. It’s a bit more complex, because setup of Subversion mirror is additional work, but it works fine and does not solve problem of mixed versions in cluster (but then Git does not solve it either).