Slide 1

Slide 1 text

Practical PHP Deployment with Jenkins By: Adam Culp Twitter: @adamculp

Slide 2

Slide 2 text

2 Practical PHP Deployment with Jenkins ● About me – PHP 5.3 Certified – Consultant at Zend Technologies – Zend Certification Advisory Board – Organizer SoFloPHP (South Florida) – Organized SunshinePHP (Miami) – Long distance (ultra) runner – Judo Black Belt Instructor

Slide 3

Slide 3 text

3 Practical PHP Deployment with Jenkins ● Fan of iteration – Pretty much everything requires iteration to do well: ● Long distance running ● Judo ● Development ● Evading project managers ● Deploying!

Slide 4

Slide 4 text

4 Practical PHP Deployment with Jenkins ● Dev VS Ops – Dev = Ops – Dev doesn't like Ops – Can't communicate – Challenges syncing

Slide 5

Slide 5 text

5 Practical PHP Deployment with Jenkins ● Continuous Delivery – Not a single app solution – Many pieces – Not covered here ● Provisioning of servers ● Integration to monitoring – We will focus on:

Slide 6

Slide 6 text

6 Practical PHP Deployment with Jenkins ● Continuous Integration

Slide 7

Slide 7 text

7 Practical PHP Deployment with Jenkins ● Deployment – FTP works...NOT! – Many large PHP sites – Simple != solution

Slide 8

Slide 8 text

8 Practical PHP Deployment with Jenkins ● 5 to 7 Releases...A Day! – Not achievable with FTP – Must be automated

Slide 9

Slide 9 text

9 Practical PHP Deployment with Jenkins ● Ready To Deploy! – Not after every commit – But always “ready”

Slide 10

Slide 10 text

10 Practical PHP Deployment with Jenkins ● Best Practices – No holy grail here – Many dependencies ● Development team ● Application ● Size of application ● How to implement

Slide 11

Slide 11 text

11 Practical PHP Deployment with Jenkins ● Architecture – Git – Jenkins – Zend Server

Slide 12

Slide 12 text

12 Practical PHP Deployment with Jenkins ● Zend Server – Full PHP application stack – Supported – Consistent across OS – Automated deployment – Cluster management

Slide 13

Slide 13 text

13 Practical PHP Deployment with Jenkins ● WebAPI – Restful Service – Built API first – GUI is just the front-end

Slide 14

Slide 14 text

14 Practical PHP Deployment with Jenkins ● Source Control – !Github here (just in case) – Using Git

Slide 15

Slide 15 text

16 Practical PHP Deployment with Jenkins ● PHP QA Tools – http://phpqatools.org ● PHPUnit ● pdepend

Slide 16

Slide 16 text

17 Practical PHP Deployment with Jenkins ● Docker – Linux Containers – Versioned (“Git for servers”) – Stores delta

Slide 17

Slide 17 text

18 Practical PHP Deployment with Jenkins ● When Apps Break – What's really to blame?

Slide 18

Slide 18 text

19 Practical PHP Deployment with Jenkins ● Root Cause Analysis – What is the cause ● How to prevent ● How to fix – Needs to happen fast!

Slide 19

Slide 19 text

20 Practical PHP Deployment with Jenkins ● Rollback – Within 30 seconds ● Even in a cluster!

Slide 20

Slide 20 text

21 Practical PHP Deployment with Jenkins ● Demo – Using Pimcore – Jenkins ● Multiple jobs from: – Checkout – Testing – Packaging – Deployment to staging – Rollback – Deploy to production (cluster) – Then we'll see the details

Slide 21

Slide 21 text

22 Practical PHP Deployment with Jenkins ● Jenkins plugins – Build Pipeline Plugin – Clone Workspace SCM plugin – x CloudBees Folder Plugin – Copy Artifact Plugin – Delivery Pipeline Plugin – Join Plugin – PostBuild Script Plugin

Slide 22

Slide 22 text

25 Practical PHP Deployment with Jenkins ● Resources – http://zend.com – http://zend.com/en/solutions/continuous-delivery – http://github.com/zend-patterns – GitHub – Jenkins – http://phpqatools.org

Slide 23

Slide 23 text

● Thank you! – Code: https://github.com/adamculp/ Adam Culp http://www.geekyboy.com http://RunGeekRadio.com Twitter @adamculp Questions?