one click deployment with jenkins
DESCRIPTION
TRANSCRIPT
![Page 1: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/1.jpg)
© 2011 Mayflower GmbH
One Click Deployment with Jenkins
Thorsten Rinne I 12th October 2011, Mainz, Germany
![Page 2: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/2.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Team Lead / Scrum MasterHead of Open Source Labs
@ThorstenRinne2
![Page 3: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/3.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Who are you?
3
![Page 4: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/4.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Developers?
4
![Page 5: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/5.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Administrators?
5
![Page 6: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/6.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
DevOps?
6
![Page 7: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/7.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Continuous Integration?
7
![Page 8: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/8.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
How much time do you need for a release?
8
![Page 9: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/9.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
More than a year?
9
![Page 10: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/10.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
6 - 12 months?
10
![Page 11: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/11.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
1 - 6 months?
11
![Page 12: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/12.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
2 - 4 weeks?
12
![Page 13: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/13.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
1 - 14 days?
13
![Page 14: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/14.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
1 - 24 hours?
14
![Page 15: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/15.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Less than 15 minutes?
15
![Page 16: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/16.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
15 Minutes!
16
![Page 17: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/17.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Why One Click Deployment?
17
![Page 18: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/18.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Everything is getting faster.
18
![Page 19: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/19.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Faster feedback from your customer / user
19
![Page 20: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/20.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Faster ROI (return on invest)
20
![Page 21: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/21.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Faster responseif the market changes
21
![Page 22: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/22.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I 22Developers are lazy.
![Page 23: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/23.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Basic requirements
23
![Page 24: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/24.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Agile software development
24
![Page 25: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/25.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Scrum or Kanban
25
![Page 26: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/26.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Test Driven Development
26
![Page 27: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/27.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I 27
![Page 28: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/28.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Continuous Integration
28
![Page 29: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/29.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Continuous Inspection
29
![Page 30: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/30.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Refactoring
30
![Page 31: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/31.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I 31
![Page 32: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/32.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I 31
ScrumKanban
![Page 33: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/33.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I 31
ScrumKanban
ContinuousIntegration
![Page 34: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/34.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I 31
ScrumKanban
ContinuousIntegration
ContinuousInspection
![Page 35: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/35.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Continuous Deployment
31
ScrumKanban
ContinuousIntegration
ContinuousInspection
![Page 36: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/36.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Things you don‘t want.
32
![Page 37: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/37.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Having your SVN repo in your webserver‘s docroot.
33
![Page 38: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/38.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Using SSH and vi and your root account on the live
server. Never.
34
![Page 39: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/39.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Who‘s still doing this? :-)
35
![Page 40: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/40.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I 36
![Page 41: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/41.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
What do we need?
37
![Page 42: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/42.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
First: a central build server
38
![Page 43: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/43.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I 39
![Page 44: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/44.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Continous Testing with PHPUnit
40
![Page 45: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/45.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Advantages
41
![Page 46: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/46.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Test results at one central page
42
![Page 47: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/47.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Software metrics at one central page
43
![Page 48: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/48.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Errors can be identified fast and then fixed
44
![Page 49: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/49.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Awareness
45
![Page 50: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/50.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I 46
Awareness!
![Page 51: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/51.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Continuous Integration in PHP projects
47
![Page 52: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/52.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
PHPUnitDocBlox
48
![Page 53: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/53.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Continuous Inspection in PHP projects
49
![Page 54: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/54.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
PHPCSPHP Depend
PHPMDphpcpd
jslint
50
![Page 55: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/55.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
jslint?yes!
51
![Page 56: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/56.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Infrastructure
52
![Page 57: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/57.jpg)
Building a Cloud-based social network I Mayflower GmbH I 11th October 2011 I 53
http://www.flickr.com/photos/nirak/644337888/
![Page 58: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/58.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
One Ubuntu package to rule them all.
54
![Page 59: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/59.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Development VMsJenkins CI ServerSelenium Server
Monitoring ServerTesting Server
55
![Page 60: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/60.jpg)
Building a Cloud-based social network I Mayflower GmbH I 11th October 2011 I
Only on production:Frontend Nodes 11.04
Backend Nodes 10.04 LTS
56
http://www.flickr.com/photos/nirak/644337888/
![Page 61: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/61.jpg)
Building a Cloud-based social network I Mayflower GmbH I 11th October 2011 I 57
☁☁ ☁
Mayflower DMZ
Eucalyptus Cloud
amazon AWS
http://www.flickr.com/photos/nirak/644337888/
![Page 62: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/62.jpg)
Building a Cloud-based social network I Mayflower GmbH I 11th October 2011 I 58
☁☁ ☁
Mayflower DMZ
Eucalyptus Cloud
amazon AWSDeveloper Laptopwith Ubuntu VM
(Git repo + completesoftware stack)
http://www.flickr.com/photos/nirak/644337888/
![Page 63: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/63.jpg)
Building a Cloud-based social network I Mayflower GmbH I 11th October 2011 I 59
☁☁ ☁
Mayflower DMZ
Eucalyptus Cloud
amazon AWSGitorious ServerJenkins CI Server
Puppet MasterSelenium Server
http://www.flickr.com/photos/nirak/644337888/
![Page 64: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/64.jpg)
Building a Cloud-based social network I Mayflower GmbH I 11th October 2011 I 60
☁☁ ☁
Mayflower DMZ
Eucalyptus Cloud
amazon AWS
2 Frontnodes3 Backendnodes
Development MonitorStaging Monitor
http://www.flickr.com/photos/nirak/644337888/
![Page 65: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/65.jpg)
Building a Cloud-based social network I Mayflower GmbH I 11th October 2011 I 61
☁☁ ☁
Mayflower DMZ
Eucalyptus Cloud
amazon AWS2 Frontnodes2 Backendnodes
DrupalLive Monitor
http://www.flickr.com/photos/nirak/644337888/
![Page 66: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/66.jpg)
Building a Cloud-based social network I Mayflower GmbH I 11th October 2011 I 62
Configuration Management done with
http://www.flickr.com/photos/nirak/644337888/
![Page 67: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/67.jpg)
Building a Cloud-based social network I Mayflower GmbH I 11th October 2011 I 63
Configuration changes are on every VM in 5 Minutes.
#WIN
http://www.flickr.com/photos/nirak/644337888/
![Page 68: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/68.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I 64
Frontnode 1Varnish nginx
PHP 5.3
Frontnode 2Varnish nginx
PHP 5.3
Backendnode 3RabbitMQ
Apache SolrPHP 5.3
Backendnode 2MySQL Slave
MogileFSMemcached
PHP 5.3
Backendnode 1MySQL Master
MogileFSMemcached
PHP 5.3
![Page 69: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/69.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Development workflow
65
![Page 70: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/70.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
1. git workflow
66
$ git add Foo.php$ git commit -m ″Bar″$ ant jslint$ ant phpunit ...$ git push
![Page 71: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/71.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
2. Post commit hook
67
Build triggered on Jenkins
![Page 72: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/72.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Jenkins build checks
68
![Page 73: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/73.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
1. PHPUnit Build:Unittests
Controller Tests (Zend_Test)
69
![Page 74: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/74.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
2. Debian Package Build
70
![Page 75: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/75.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
3. Deploy to staging4. Deploy staging to live
71
![Page 76: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/76.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
At midnight:DocBlox
Static code analysis
72
![Page 77: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/77.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
What is a build process?
73
![Page 78: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/78.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
ant syncant clean
ant db-updateparallelTasks:
ant phpunitant phpcbant deb
74
![Page 79: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/79.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
<target name="phpunit" depends="db-test" description="Run all tests"> <exec executable="phpunit" failonerror="true"> <arg line="--configuration ${basedir}/tests/phpunit-verbose.xml ${basedir}/tests/AllTests.php" /> </exec></target>
75
ant phpunit
![Page 80: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/80.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
parallelTasks:php_depend
phpmdphpunitphpcpdphpcsjslint
76
![Page 81: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/81.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I 77
Build Debian Packageant autoloaderant phpunitant clean
ant compilejsant compilecss
![Page 82: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/82.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
<target name="deb" depends="autoloader,phpunit-coverage,clean,autoloader,compilejs,compilecss" description="Generate Debian package"> <exec executable="gpg"> <arg value="--armor" /> <arg value="--import" /> <arg value="scripts/build/deb/mapolis.mayflower.de.pgp" /> </exec> <buildnumber />
78
ant deb (I)
![Page 83: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/83.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
<exec executable="git" outputproperty="githash"> <arg value="describe" /> <arg value="--always" /> <arg value="--match" /> <arg value="" /> </exec> <touch file="debian/changelog" /> <move file="debian/changelog" tofile="debian/changelog.old" />
79
ant deb (II)
![Page 84: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/84.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
<exec executable="git" output="debian/changelog.new"> <arg value="log" /> <arg value="-n" /> <arg value="1" /> <arg value='--format=format:mapolis-web (${build.number}-${githash}) unstable; urgency=low%n%n * %s%n%n -- %an <%ae> %aD%n%n' /> </exec>
80
ant deb (III)
![Page 85: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/85.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
<concat destfile="debian/changelog"> <fileset file="debian/changelog.new" /> <fileset file="debian/changelog.old" /> </concat> <delete file="debian/changelog.new" /> <delete file="debian/changelog.old" />
81
ant deb (IV)
![Page 86: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/86.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
<exec executable="dpkg-buildpackage"> <arg value="-b" /> <arg value="-v${build.number}-${githash}" /> <arg value="-Zlzma" /> <arg value="-z9" /> <arg value="-k78532445" /> <arg value="-pgpg" /> <arg value="-sgpg" /> <arg value="-mMayflower Mapolis Team <[email protected]>" /> </exec>
82
ant deb (V)
![Page 87: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/87.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
<move todir="build/deb/"> <fileset dir="${basedir}/../"> <include name="mapolis*.deb" /> <include name="mapolis*.changes" /> </fileset> </move> <exec executable="dpkg-buildpackage"> <arg value="-Tclean" /> </exec> </target>
83
ant deb (VI)
![Page 88: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/88.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Deploy Stagingant clean
ant deb-signant db-staging-upscp to all hosts
84
![Page 89: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/89.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I 85
Deploy Staging to livescp to all hosts
![Page 90: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/90.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Disadvantages and problems
86
![Page 91: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/91.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Build time15 min on harddisk
massive disk i/o4 min on ramdisk :-)
87
![Page 92: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/92.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Complexity beginning such a infrastructure
88
![Page 93: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/93.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Jenkins:Single point of failure!
89
![Page 94: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/94.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Cool stuff which is now possible
90
![Page 95: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/95.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I 91
Deploy by customer. :-)
![Page 96: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/96.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I 92
Jenkins Chuck Norris Plugin
![Page 97: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/97.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
git bisect start $BAD $GOOD
93
![Page 98: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/98.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Minimum time from bugreport to deploy:
30 minutes
94
![Page 99: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/99.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
$ git branch hotfix-2011-08-22$ git checkout hotfix-2011-08-22$ git reset --hard "last stable sha-1"$ git cherry-pick "hotfix sha-1"$ echo build.number=23 > build.number$ ant deb$ scp build/deb/*.deb xyz.amazonaws.com:/opt/repository/$ git checkout master$ git push origin hotfix-2011-08-10
95
![Page 100: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/100.jpg)
LiveDemo
![Page 101: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/101.jpg)
Continuous Improvement in PHP Projects I Mayflower GmbH I 25th February I
Questions?
97
![Page 102: One Click Deployment with Jenkins](https://reader030.vdocument.in/reader030/viewer/2022020101/544f219baf7959fb6f8b4a24/html5/thumbnails/102.jpg)
Thank you very much for your attention!
© 2011 Mayflower GmbH
Contact Thorsten [email protected]+49 89 242054-31
Mayflower GmbHMannhardtstr. 680538 MünchenGermany
Please rate me @ http://joind.in/talk/view/3904