Zend Deployment and Wordpress Strategy

General discussion forum for the Zend Server

Zend Deployment and Wordpress Strategy

Postby josh8686 on Tue Nov 08, 2016 3:59 pm

Hello!

My company has recently moved to Linux (long time IBMi/Zend Server shop), and started using Git, Jenkins and Zend Deployment for our applications. We are getting ready to start a new Wordpress site and I'm working on the deployment strategy. I have minimal experience with using Zend server to deploy an application, so I need some help with this part of it. Currently we only have 1 application that we are using Zend for deployment, but as we transfer our applications from our IBMi machine to Linux, we will have several more so I want to get deployment figured out now to pave the way for the rest of our applications. The 1 site that we are currently running on Linux using Zend Deployment is a Magento 1 site. Currently every time we deploy, we deploy the entire application, which is not timely. The core of the Magento application never changes (unless there is an update from Magento), similar to Wordpress, so I figure there are got to be a better way than deploying the entire application. So I'm wondering how I can structure my deployment, using Git, Jenkins and Zend Deployment, so that I can deploy as little as possible, and leave the core programming be. I've done a bunch of research and I think I have the Git side of things figured out, and I don't think Jenkins is going to be much of an issue, so what I'm really looking for is how do I structure the application in Zend to make things work. Any help at all would be great!
josh8686
 
Posts: 2
Joined: Tue Nov 08, 2016 3:44 pm

Re: Zend Deployment and Wordpress Strategy

Postby zvika on Wed Nov 09, 2016 8:42 am

Zend Deployment drops a complete application for a reason. You don't need to worry about dependencies and braking the app if something is missing or not the current version. You deploy the complete application AFTER staging, or testing the changed bits, making sure the entire application works on mirror server before going to production. You deploy a complete "replacement" new version, and once it is in place, the web server is restarted to point the vhost to the new application folder, while keeping a copy of the former version, in case you need to roll back (this should be part of the installation scripts logic, to roll back if needed, and any affected DB schema changes that are required for newer / older versions).

If you're concerned about timing, know that only once the application new version is successfully deployed, the web server is restarted, with minimal offline time for the users.
If you're concerned about time to deploy, you can always move large packages to the servers and deploy locally using zs-client.sh, which is an implementation of Zend Server SDK / CLI tools, so the upload part of the deployment is both automated and short.
All that can be incorporated within GIT/Jenkins and other CD facilities, we have all the experience needed within our consulting group.

If you must go with partial deployment, I guess you need to stitch your own solution of partial update validation and migration to production, but you lose the benefits of cluster deployment if you need more CPU and use Zend Server cluster environment, and you lose rollbacks, which are natively done if you can just switch to an older branch and not "clean" your latest update, which is much less native and prune to issues (especially if the updated code generated more code or resources).

Hope this helps!
Zvika Dror
Zend Support Team
User avatar
zvika
Zend Global Support
 
Posts: 984
Joined: Sun Dec 14, 2008 9:48 am

Re: Zend Deployment and Wordpress Strategy

Postby josh8686 on Thu Nov 10, 2016 2:54 pm

I understand the benefit of deploying the entire application, I'm not sure I entirely agree with the strategy since the majority of the application never changes, but I will concede that deploying the entire application is the best/only route.

So maybe we have our Git strategy wrong, or don't entirely understand what Git can do. Everything I've read about setting up Git in a packaged solution like Magento and Wordpress, is that you add all the core files/directories to the .gitignore file and they aren't included when you clone the repo. In the one application we our currently using Zend Deployment for, we have the entire application in Git, and have very little in our .gitignore file. If we setup this new Wordpress site how I've read it should be setup, with all but the "wp-content" directory in the .gitignore file, when we clone the repo to deploy, we will only get that single directory. Is this Git strategy wrong? Should we have our entire Wordpress application in Git?

Thank you for the help!
josh8686
 
Posts: 2
Joined: Tue Nov 08, 2016 3:44 pm

Re: Zend Deployment and Wordpress Strategy

Postby zvika on Mon Nov 14, 2016 3:28 pm

Hi
I'm not sure if there is a "GIT strategy"... GIT is an SCM tool and any tool is relevant when you build your codebase from sources, to test and deploy. CD (Continuous Delivery) can incorporate such tools and GIT as well, but also Composer for example which can fetch libraries in development / production mode, set autoloading etc. You are not limiting to tools such as GIT when building your project tree for deployment.
Try to learn a bit more about CD flows, we have materials in our website and the main idea in Zend Deployment is to deploy everything into fresh directory and host from it when a new version is updated, to be able to isolate the former version and "fallback" or patch anything and build yet a new full version to update when facing bugs.
Partial deployment / updates is more difficult to "pull back" and can be used of course, you choose how to deploy, when to deploy and what to deploy.
Hope this helps.
Zvika Dror
Zend Support Team
User avatar
zvika
Zend Global Support
 
Posts: 984
Joined: Sun Dec 14, 2008 9:48 am

Re: Zend Deployment and Wordpress Strategy

Postby mary4664 on Thu Jun 29, 2017 11:47 am

Thanks. You can check bsscommerce/magento+2+image+gallery.html from bsscommerce/magento+2+extensions.html
mary4664
 
Posts: 1
Joined: Thu Jun 29, 2017 11:06 am


Return to Zend Server

Who is online

Users browsing this forum: No registered users and 2 guests