27
Zend Server Deployment Good things come in packages Presented by Yonni Guido [email protected] @zendsui linkedin.com/in/yonman

Zend server deployment, 2014 Webinar

Embed Size (px)

DESCRIPTION

Demystifying the Zend Server Deployment Package creation process, webinar: http://www.zend.com/en/webinar/Server/70170000000cLi5-ZendServerPackages.flv

Citation preview

Page 1: Zend server deployment, 2014 Webinar

Zend Server Deployment

Good things come in packagesPresented by Yonni Guido [email protected] @zendsui

linkedin.com/in/yonman

Page 2: Zend server deployment, 2014 Webinar

What is Zend Server?

Page 3: Zend server deployment, 2014 Webinar

Deployment: what could possibly go wrong?

• Preparation: untested scripts, shoddy docs

Devs gotta dev!Symbolic deployment

from dailywtf

Page 4: Zend server deployment, 2014 Webinar

Deployment: what could possibly go wrong?

• Technical failure

• Human error:wrong server, wrong package,...

• Human reaction

Page 5: Zend server deployment, 2014 Webinar

Deployment: what could possibly go wrong?

• Psychological projectiono Dev: If it works in dev, surely it works on

productiono Ops: If it fails on production, surely it fails in

dev

Result: Downtime. Money lost. Lose process.

Page 6: Zend server deployment, 2014 Webinar

Deployment in Zend Server

• Mechanise

• Automate

• Control

• Fallback

Zpk to deploy

deployzpk

Rollback

Health check?

Page 7: Zend server deployment, 2014 Webinar

This is all great…

What is a ZPK?

“A wondrous package of code, fun and migration bundled together to make your wish of a long night of sleep come true.”

-- unknown

Page 8: Zend server deployment, 2014 Webinar

Popular workflows: Zend Studio

Requires: Zend Studio, Zend Server, Mouse

• Create a project

• Package the project

• Deploy the projectDemo!

Page 9: Zend server deployment, 2014 Webinar

Zend Studio end-to-end integration demo, questions?

Popular workflows: Zend Studio

Page 10: Zend server deployment, 2014 Webinar

Popular workflows: Zend Server Wiz

Requires: Zend Server, Zpk file

• Produce Zpk file

• Deploy Zpk file

• Rejoice!Demo!

Page 11: Zend server deployment, 2014 Webinar

Zend Server Wizard Deployment, questions?

Popular workflows: Zend Server

Page 12: Zend server deployment, 2014 Webinar

• Same ZPK, simpler

• Automated updates

• No outwards facing files

• Onboard libraries

A word about Libraries

Yonni Guido Mendes
How is auto update setup?
Page 13: Zend server deployment, 2014 Webinar

ZPK: Not what you thought

• Zip

• data directory

• scripts directory

• deployment.xml

Demo: ZPK from the inside

Page 14: Zend server deployment, 2014 Webinar

Advanced stuffPrerequisites, User params, Hook scripts,

Persistent resources

Page 15: Zend server deployment, 2014 Webinar

Advanced stuff: Prerequisites

Adding a new prerequisiteFailing prerequisitesLibrary prerequisites

Demo: playing around with prerequisites

Page 16: Zend server deployment, 2014 Webinar

Using prerequisites in our package, questions?

Prerequisites

Page 17: Zend server deployment, 2014 Webinar

Advanced stuff: Staging & Activation

Deployment order of business

• Unpacking

• Staging

• ActivationHook/trigger scripts: Execution, Handling errors

Demo (and another one in a sec)!

Page 18: Zend server deployment, 2014 Webinar

Advanced Stuff: User Parameters

Specifying user parametersCollecting user parameters’ values

• Zend Studio

• Zend Deployment Wizard

• (Zend Server Web API)Demo: Using user params in hook scripts

Page 19: Zend server deployment, 2014 Webinar

Using User Params inside our hook scripts, questions?

Hook scripts and user params

Page 20: Zend server deployment, 2014 Webinar

Support hook scripts and user paramsOnly a “stage” step, no activation

User params and libraries

Page 21: Zend server deployment, 2014 Webinar

• Removes the applicationo Deactivateo Unstage

• Redeploy stages and activates

• Rollback only activates the previous application version

Hook scripts should be designed accordingly

A word about rollback and redeploy

Page 22: Zend server deployment, 2014 Webinar

• Eula fileo XML locationo Text

• Readme fileo Special Locationo Markdown

Zpk: Extra stuff

Page 23: Zend server deployment, 2014 Webinar

Package creation, a 3rd workflow

`zdpack create <skeleton-name>`You get:

• deployment.xml

• data dir

• scripts dir

• README file`zdpack pack <skeleton-name>`

Page 24: Zend server deployment, 2014 Webinar

But wait! there’s more!

Packaging Monitor rules, Pagecache rules

Application health checkLibraries auto update

Page 25: Zend server deployment, 2014 Webinar

Extra stuff: apps <healthcheck>

Provide a URLResponse: 200 OKorResponse: not 200* and a body with error message

Page 26: Zend server deployment, 2014 Webinar

Extra stuff: libraries <updateurl>

https://packages…/up.json

output:{

"version": "2.3.0",

"downloadUrl": "https://packag...zpk",

"releaseNotes": "http://fra../change/2.3.0/"

}

Page 27: Zend server deployment, 2014 Webinar

Feedback, comments: [email protected] linkedin.com/in/yonman @zendsui

Thank

you!