21
BPCE_LIVRAISON: how to deploy your EZpublish website with one or several third party companies Alexandre SEBBANE, Internet project manager & Internet architect, BPCE eZ CONFERENCE London 2011

Bpce livraison

Embed Size (px)

DESCRIPTION

BPCE_LIVRAISON: how to deploy an eZPublish website with one or several third party companies

Citation preview

Page 1: Bpce livraison

BPCE_LIVRAISON: how to deploy your EZpublish website with one or several third party companies

Alexandre SEBBANE, Internet project manager & Internet architect, BPCE

eZ CONFERENCE London 2011

Page 2: Bpce livraison

eZ CONFERENCE London 2011 – 16/06/2011

Agenda

1. Introduction

2. Requirements

3. Solution : BPCE_LIVRAISON

4. Create a patch

5. Deploy a patch

6. To improve

7. Questions/Answers

Page 3: Bpce livraison

eZ CONFERENCE London 2011 – 16/06/2011

Introduction

� Segmented Network

� IT facilities management

� EzPublish Website

� Complex network schema

Page 4: Bpce livraison

eZ CONFERENCE London 2011 – 16/06/2011

Introduction

� Who has access to production server

� Who has someone in production team who know how work ezpublish

� Who has already interve in production environment in order to correct one mistake during the deployment of a patch ?

There is many mistake who can happened so that why we create BPCE_LIVRAISON An Extension to package patch to deploy ezpublish website.

Page 5: Bpce livraison

eZ CONFERENCE London 2011 – 16/06/2011

Requirements

� Linux RHELo Because of the “kernel” of this extension :

svn diff --config-dir /etc/subversion --no-diff-deleted --username $USERNAME --password $PASSWORD --summarize $SVN_SERVER/$SVN_MODULE/tags/$BASE_RELEASE $SVN_SERVER/$SVN_MODULE/tags/$LIVR_RELEASE \

| sed -e 's/^\(\w\{1\}\).*http.*\/tags\/[^\/]*\/\(.*\)$/\2 \1/m' \

| awk -vSVN_URL="$SVN_SERVER/$SVN_MODULE/tags/$LIVR_RELEASE/" -vREP_CIBLE="$REP_CIBLE" -vUSERNAME="$USERNAME" -vPASSWORD="$PASSWORD" -vLOG="$LOG" -vDEL_FILES="$DEL_FILES" '

� SVN for revision control systemo All project is in SVN except the var “directory”

� Noveniniupdate dependencyo To apply ezpublish configuration on deployment environment.

Page 6: Bpce livraison

eZ CONFERENCE London 2011 – 16/06/2011

Solution : BPCE_LIVRAISON

� Extension ezpublisho Standard installationo Directory to create in each directoryo Configuration

[PackagingSettings]# -- List of the differents environment# -- Patch to filesystem eZPublish for each environment# -- Parameter to Server SVN# -- Path where patch will be build# -- Excludes List for each environment# -- Delfiles filename# -- Log path# -- batch « DIFF SVN » patch# -- PHP binary path# -- Path of patch directory model[DeploiementSettings]# -- Acces au filesystem eZPublish pour chaque environnement# -- Repertoire de stockage de la sauvegarde filesystem pour chaque environnement# -- Acces au fichier de LOG pour chaque environnement# -- Owner des fichiers installes pour chaque environnement# -- PHP binary path# -- Droits des fichiers installes# -- Chemin de stockage des TAR de livraisons

Page 7: Bpce livraison

eZ CONFERENCE London 2011 – 16/06/2011

Solution : BPCE_LIVRAISON

� 2 steps deployment:

o Create a patch.

o Deploy it.

Page 8: Bpce livraison

eZ CONFERENCE London 2011 – 16/06/2011

Create a patch : choose the begin tag

Page 9: Bpce livraison

eZ CONFERENCE London 2011 – 16/06/2011

Create a patch : choose the end tag

Page 10: Bpce livraison

eZ CONFERENCE London 2011 – 16/06/2011

Create a patch : choose the environment to deliver

Page 11: Bpce livraison

eZ CONFERENCE London 2011 – 16/06/2011

Create a patch : add SQL to insert into the eZpublish Database

Page 12: Bpce livraison

eZ CONFERENCE London 2011 – 16/06/2011

Create a patch : add SQL to insert into the eZpublish cluster Database

Page 13: Bpce livraison

eZ CONFERENCE London 2011 – 16/06/2011

Create a patch : add comment for history.

Page 14: Bpce livraison

eZ CONFERENCE London 2011 – 16/06/2011

Create a patch : Build in progress

Page 15: Bpce livraison

eZ CONFERENCE London 2011 – 16/06/2011

Create a patch : patch created, you can see creation log.

Page 16: Bpce livraison

eZ CONFERENCE London 2011 – 16/06/2011

Create a patch : Go to the detail of the patch

� Download It

Page 17: Bpce livraison

eZ CONFERENCE London 2011 – 16/06/2011

Time to deploy …

Be careful :

you have to test your deployment in a preproduction environment to verify the bugs are gone.

Page 18: Bpce livraison

eZ CONFERENCE London 2011 – 16/06/2011

Deploy a patch

� Copy the patch in the patch directory in the environment to deploy

� Go in ssh in the directory

� Type “sh nameofthepatch.bin”

� The patch is beginning deployment.o Backup

o Deployment of the patch.

o Verify and Arrange the file rights

o Delete of deleted files.

o Regenerates autoloads.

o Regenerate configuration files with noveniniupdate.

o Clear the cache.

� Patch is deploy.

Page 19: Bpce livraison

eZ CONFERENCE London 2011 – 16/06/2011

Deploy a patch : the log

================================================================ Beginning of the deployment ================================================================

-- Begin the backup ---- Creating directory /data/www/ponant-int/save/4.2.0.86 ---- Files backup

-- End of the backup --

-- Deployment ---- Extract files --

-- Update rights --

-- Copy files --

-- Delete the outdated files --

-- Regenerates autoloads file --

-- Update version file --

-- Update of the configuration --

============================================================== End of the deployment ==============================================================

Page 20: Bpce livraison

eZ CONFERENCE London 2011 – 16/06/2011

To improve

� Replace sql access by ezpersistent object.

� Add Multi-language support.

� Improve the cache clearing.

� Add support of others revision control system.

Page 21: Bpce livraison

Thanks !

Questions ?

Alexandre SEBBANE

Twitter : @alexsebbaneBlog : http://www.sebbane.org/blog/