eZ Community » Forums » Discussions » Deploying eZ Publish 5 - continuing...
expandshrink

Deploying eZ Publish 5 - continuing from where we left of at the eZ Unconference

Deploying eZ Publish 5 - continuing from where we left of at the eZ Unconference

Wednesday 05 June 2013 4:03:26 pm - 2 replies

Hello All,

I'd like to continue the discussion we started at the "Deployment unconf session" during the eZUnconference in Montpellier.

First let me try and summarise what we talked about.

We use different tools to manage deployments of existing eZ Publish 4 websites.

We talked about how we use capistrano, plain old ftp or simply just git or some other version control system to get our changes to the target environment.

We agreed that deploying the code is the easiest part of the deployment and that getting the database changes to the target environment poses a challenge. Most of us do this by hand or use the package system of eZ Publish.

People suggested using eZXML Installer to deploy content changes, content class changes and this seemed a viable solution for eZ Publish 4.x installations.

We also touched on the point of caches and that we should never clear all of them as this could bring down the site if there are several thousand content objects in the system.

Some of us use command line scripts to clear only specific caches thatreally need to be cleared when deployment happens.

Tools we talked about:

  • Capistrano
  • Jenkins
  • eZXMLInstaller
  • Custom command line scripts
  • puppet

I think I have managed to capture most things above.

If I have missed anything then please let me know so I can add it in.

And now to get the discussion going again happy.gif Emoticon

When I proposed the topic at the unconf my original idea was to talk about deployment strategies for eZ Publish 5. Unfortunately that part got shortened to just "Deployments". I would like to look into the future and see what options we have when we try to deploy our code etc. to other environments.

I'm also curious to see what others think.

So please allow me to start by writing about my thoughts on the subject.

Deploying the code:

In my opinion the best tool to automate this is still capistrano. I know that there is capifony that is a recipes collection of Symfony and Symfony2 tasks, but I'm not sure how well it would work with the renamed app folder in eZ Publish 5.

One could potentially use other tools like Jenkins, puppet or a custom set of scripts to deploy the code.

Deploying content changes:

To deploy database changes I think the best option now is the new Public API and REST API shipped with eZ Publish 5. We could create custom scripts that call the new APIs and deploy our changes to the database, add new content etc.

If I were to use capistrano I would create a new task that would look in a certain folder for any update/install scripts and would execute them when needed.

Obviously it would check for version information or something similar to determine whether it needs to run any scripts or not.

Finalising the deployment:

Then we would have all the tasks that would clear any caches if needed etc.Right so this are my thoughts.

 

This is one way deployments could be tackled, but I am sure there are other ways as well.

Now it is your turn happy.gif Emoticon I'm really interested in what you guys think.

Let the discussion begin!

Cheers,

Peter

Modified on Wednesday 05 June 2013 4:19:25 pm by Peter Halasz

Thursday 06 June 2013 7:22:29 am

Hi,

As Peter mentioned the hard part is not to push code to the server but how to deal with:

1. Clearing cache on big sites without breaking the site or it taking hours.

2. Applying database changes (roles, new content, workflow, etc).

To fix #1 all the cache really needs to be moved off the file system and into something like Memcache. Since Memcache uses LRU (Least Recently Used) deleting cache shouldn't be necessary. Just expire it and let Memcache take care of deleting it once its full. I'm assuming this should be much easier with eZ Publish 5 than 4.

Fixing #2 is much tricker I think. Because of eZ's EAV database structure traditional database migration tools doesn't really work as they are mostly concerned with database tables and columns. Hopefully with eZP 5's improved API scripting these things will become easier than on 4... 

 

Cheers,

Ole

Modified on Thursday 06 June 2013 7:23:17 am by Ole Morten Halvorsen

Friday 07 June 2013 5:47:48 am

Btw, if anyone has some time to help out this pull request should help solve some of the issues with clearing caches while deploying on eZ Publish 4.x when using DFS:

https://github.com/ezsystems/ezpublish-legacy/pull/152

 

Cheers,

Ole

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from