improving your drupal development workflow with continuous...
TRANSCRIPT
![Page 1: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/1.jpg)
1
Improving your Drupal Development workflow with Continuous Integration
DREAM IT. DRUPAL IT.
Peter Drake Sahana Murthy
![Page 2: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/2.jpg)
2
Meet Us!!!!
Peter Drake • Cloud Software Engineer @Acquia • Drupal Developer & sometimes core contributor
Sahana Murthy • Developer Evangelist @Acquia • Open Source Proponent • @sahanatweets
![Page 3: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/3.jpg)
3
Agenda!
àStandard Development Workflow • What does it look like? • What can go wrong and why?
à Continuous Integration workflow • What does it look like? • Why is it better? • Demo!
![Page 4: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/4.jpg)
4
What do we mean by a “Standard Workflow”?
![Page 5: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/5.jpg)
5
Stage 1 – Hacking Code on Server!
![Page 6: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/6.jpg)
6
Stage 2 – Develop locally, push to production!
![Page 7: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/7.jpg)
7
Is the Standard Workflow ideal for today’s Agile World?
![Page 8: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/8.jpg)
8
What could go wrong?
![Page 9: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/9.jpg)
9
Common Pitfalls!à Deploying broken Code
• Developers overwriting each others work • Partial changes • In-development changes • Untested changes
à Deploying broken Config • Missing libraries or dependencies • Wrong Drupal config settings
à Deploying a broken Database Schema • Failure to write schema update hooks • Failure to run update.php • Manual schema changes
![Page 10: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/10.jpg)
10
So…What is the RIGHT way???
![Page 11: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/11.jpg)
11
Stage 3 – Continuous Integration !
![Page 12: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/12.jpg)
12
What is Continuous Integration?!• Continuous integration (CI) is software engineering’s best
practice of merging all developer working copies with a shared mainline several times a day.
![Page 13: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/13.jpg)
13
CI - Principles!
• Use Version Control
• Integrate Code Constantly
• Test on Clone of Production
• Automate Testing
• Automate Deployment
![Page 14: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/14.jpg)
14
Use Version Control!Principles Recommendations
• Git is a distributed revision control and source code management (sCM) system with an emphasis on speed.
• Common Command: • pull: grab changes from
repository. • add: Index the changes. • commit: track the changes. • push: send changes to
repository. • status: list which files are
staged, unstaged, or tracked.
• Step “zero” for good software engineering
• Version everything • Code • Config • Database Schema • Automate Tests • Documentation • Depenencies
Resources • A Successful Git Branching Model • Pro Git Book
![Page 15: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/15.jpg)
15
What problems does Version Control solve for us?"
![Page 16: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/16.jpg)
16
![Page 17: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/17.jpg)
17
![Page 18: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/18.jpg)
18
![Page 19: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/19.jpg)
19
![Page 20: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/20.jpg)
20
![Page 21: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/21.jpg)
21
Version Control - Overview!
![Page 22: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/22.jpg)
22
Integrate Code Constantly!Principles
• Break big features into small
steps
• Commit changes often
• Automate the upgrade process
• Implement tests as you go
• Update from master branch daily
Results
• Identify conflicts early on
• Build quality is ensured
• Test coverage is consistent
• Development mistakes don’t
impact others’ velocity
![Page 23: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/23.jpg)
23
Test on a Clone of Production!
Principles • Identical OS, Apache / MySQL /
Varnish, PHP extensions, PEAR
libraries, assorted packages
• Use a current (scrubbed) version
of production database
• Unify and automate build of all
environments
Results • No more “It worked on my
machine!” or “It worked on the testing database!”
• Manual server tweaks will not propagate to production
“Drupal depends heavily on its environment”
![Page 24: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/24.jpg)
24
Automate Testing!“If it ain’t broke, test it anyway.”
“If it isn’t tested, it doesn’t work.”
Principles Results
• Tests: build, unit, browser-based
• Run tests on every commit
• Don’t merge changes until tests
pass
• Announce when master breaks
• Deploy frequently to QA
environment
• Progress visibility for
stakeholders
• Bugs discovered before
deployment
• Consistent quality (QA)
![Page 25: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/25.jpg)
25
Automate Deployment!“Drag-and-Drop is as automated as
automated gets!!!”
Principles Results
• Deployment should be a push-button-and-relax operation
• Tag each release for future reference or rollback
• Snapshot databases for rollback • Change database schema via
code • Update config via code • No change is done until the
upgrade is automated
• Deployments are worry-free
• Eliminates human error
• Ensures stakeholder
expectations are met
• Enables continuous deployment
![Page 26: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/26.jpg)
26
In a Nutshell!!!
![Page 27: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/27.jpg)
27
Three Phase Development!
![Page 28: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/28.jpg)
28
Lets watch CI in"LIVE ACTION!
![Page 29: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/29.jpg)
29
![Page 30: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/30.jpg)
30
Whats’ next with CI and Drupal???
![Page 31: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/31.jpg)
31
Wait For It…
![Page 32: Improving your Drupal Development workflow with Continuous ...drupalcampohio.org/sites/default/files/slides/Acquia CI Session... · Improving your Drupal Development workflow with](https://reader035.vdocuments.site/reader035/viewer/2022062923/5f0b63457e708231d4304584/html5/thumbnails/32.jpg)
32
Drupal 8"W00T W00T!
Let’s get ‘er done!