In this session we show how to organize Magento projects using Version control and how to have a full development and deployment process in place to assure highest quality with many developers involved and teams spread over different continents. This talk covers how to run a continuous integration pipeline that takes care of testing various aspects of the webshop (unit tests, acceptance tests, performance test,…). Covers: Continuous integration, automation, Vagrant/Chef, Testing pipeline, unit/acceptance/performance tests, monitoring, deployment workflows, development best practices
8. Who’s a Magento developer? Who spends a significant
amount of his/her time dealing
with development/deployment
processes?
Who thinks he/she’s got it
figured out?
YOU...?
38. • Fully compatible with magento-hackathon/magento-composer-installer
• Adds support for type “magento-source”
• Only puts packages into place
• Native modman script is used to deploy modules
• Wrapped in a simple installer script
AOEpeople/composer-installers
44. 0%
100%
Writing
Code
Time spent…
5 years ago today
Drinking Coffee
Drinking Coffee
while waiting for builds/tests
Twitter
VCS
Deployment
Design / Architecture /
Infrastructure
Writing Code
Ping Pong
Think about it
45. master
Feature B
Feature A
Hotfix
(if master is not modified)
Hotfix
(if master is modified)
Feature C
build
install on
integration
tests
build
install on
integration
tests
install on
deploy
build
install on
integration
tests
deploy to
stage
deploy to
prod
Git Workflow
build
install on
integration
tests
deploy to
stage
deploy to
prod
build
install on
integration
tests
deploy to
stage
deploy to
prod
single
mainline
no commits,
only --no-ff
merges
70. Unit Tests Integration Tests
AOE PMD
(for Magento)
broken links,
HTTP headers,
W3C validity,…
Test features that rely on other
parts (e.g. framework, external
services,…)
External components
(SSL, Redis, Varnish,
ERP, Data Import,…)
Basically this is also
PHPUnit, but
addressing other stuff
83. timespent
task size
does it
manually
does it
manually
gets annoyed
writes script to
automate
runs script
wins
loses
Geeks vs. Non-Geeks
Makes fun of geek’s
complicated method
85. No manual interaction!
no creating
CMS blocks
no creating
product attributes
no updating of any
configuration settings!
no clearing
the cache
no purging CDN
or Reverse Proxy
content!
92. Build
What is it?
A simple shell script. That’s it!
No Ant, no Phing, no fancy PHP tool/framework
Where is it used?
In the build job of a Jenkins server
What does it need to know?
Where to get all the source code from
What does it do?
add metadata, composer, modman, minify,
packaging, upload to S3
93. Provisioning
What is it?
A couple of chef cookbooks.
Run by AWS OpsWorks or Vagrant,…
Where is it used?
On the target servers
What does it need to know?
The role of the server (web server, devbox, Redis,…)
What does it do?
Installing and configuring web server, PHP,
MySQL, Redis,…
94. Deployment
What is it?
A simple shell script.
Or the “deploy” chef cookbook
Or EasyDeployWorkflows
Where is it used?
On the target servers
What does it need to know?
How to get the build and where to deploy it to
What does it do?
(Resetting the environment), getting the build, extracting it,
managing release folders and symlinks, triggering installer,
cleanup old releases
95. Installation
What is it?
A simple shell script.
Sometimes triggered inside “deploy” before_migrate.rb
Where is it used?
On the target servers, called from deployment step
What does it need to know?
What environment this is. Injected settings
What does it do?
Run modman, connect to shared directories, apply settings,
trigger update scripts, customize cache prefix,