D8 Deployment and Continuous Integration

36
D8 Deployment and Continuous Integration Amin Alid, CTO, Anolim GmbH

description

Up until D7, continuous integration has been a luxury for most Drupal projects. It is really hard to implement and the underlying Drupal architecture simply was not built with continuous integration in mind. One of the biggest issues developers face during deployment in D7 is configuration management. With the new features being developed for D8 under the Configuration Management Initiative, lots of these issues should be resolved. In this session we will explore some of the benefits and advantages you get from implementing CI, check some examples of workflows and tools and see how far D8 got in terms of improving deployment and continuous integration practices.

Transcript of D8 Deployment and Continuous Integration

Page 1: D8 Deployment and Continuous Integration

D8 Deployment and Continuous Integration

Amin Alid, CTO, Anolim GmbH

Page 2: D8 Deployment and Continuous Integration

Web and mobile developmentB2B solutions, financial solutions

Amin Alid, CTO, Anolim [email protected]

Virtual Data Centers for devsProgrammable Infrastructure

http://anolim.com

http://www.safeswisscloud.ch

Page 3: D8 Deployment and Continuous Integration

Why CI?How is it done?How will D8 improve things?

3Things..

Page 4: D8 Deployment and Continuous Integration

Why CI??

Page 5: D8 Deployment and Continuous Integration

Ever had to...

Spend hours preparing to go live?

Spend an unplanned week of bug fixing after each deployment?

Page 6: D8 Deployment and Continuous Integration

Ever had to...

Deal with a fragile website that breaks everytime you touch it?

Page 7: D8 Deployment and Continuous Integration

Integration time…

Page 8: D8 Deployment and Continuous Integration

What would it take to...

Deliver faster & increase quality?

Page 9: D8 Deployment and Continuous Integration

What would it take to...

Do more meaningful work Less bug fixing

Page 10: D8 Deployment and Continuous Integration

Happy client & happy team

Page 11: D8 Deployment and Continuous Integration

What we did...

Maintain a code repository Understand your branching model

Page 12: D8 Deployment and Continuous Integration

What we did...

Quick, automated builds

Page 13: D8 Deployment and Continuous Integration

What we did...

Integrate into a live like environment

Page 14: D8 Deployment and Continuous Integration

What we did...

Commit and build often Make the build self testing

Page 15: D8 Deployment and Continuous Integration

What we did...

Test on a clone of production

Page 16: D8 Deployment and Continuous Integration

Automate deployment to production

Page 17: D8 Deployment and Continuous Integration

Results...

Painful deployment to one click deployment

Page 18: D8 Deployment and Continuous Integration

Results...

From 3h to 15 min

Page 19: D8 Deployment and Continuous Integration

Results...

From days to prepare and stabilize to

barely any maintenance

Page 20: D8 Deployment and Continuous Integration

Results...

From bug fixing to new features

Page 21: D8 Deployment and Continuous Integration

How is CI done?7Drupal

Page 22: D8 Deployment and Continuous Integration

Tools and practices...

Update hook, Features, Drush, Configuration module, WF Tools

Page 23: D8 Deployment and Continuous Integration

Features, workflow

Page 24: D8 Deployment and Continuous Integration

DrushEnable, disable modules and featuresdrush en -y devel views_ui

Put site on maintenance, set variablesdrush vset --yes maintenance_mode 1

Sync and sanitize datadrush sql-sync -y @user.prod --sanitizedrush -y rsync @user.prod:%files/ @self:%files

Evaluate codedrush ev ‘$user = user_load(112)’drush sqlq “UPDATE block SET ...”

Any custom drush command

Page 25: D8 Deployment and Continuous Integration

SaltStack

Page 26: D8 Deployment and Continuous Integration

Vagrant, CloudStack

Page 27: D8 Deployment and Continuous Integration

Tools and practices...

Jenkins, Phing SimpleTest, Selenium

Page 28: D8 Deployment and Continuous Integration

D7: Limitations, problems

Hard to track configurations with FeaturesLimited integration with external tools

Page 29: D8 Deployment and Continuous Integration

How will D8 help me?8Drupal

Page 30: D8 Deployment and Continuous Integration

D8 Improvements...

Core Configuration Management API File based configurations!

Page 31: D8 Deployment and Continuous Integration

D8 Configuration Management

Page 32: D8 Deployment and Continuous Integration

D8 Improvements...

Features 3.XState APIComposer for dependenciesSimpleTest to PHPUnit

Page 33: D8 Deployment and Continuous Integration

To Do...

Finalize APIsContributed modules on top of new APIsIntegration into different external CI tools

Page 34: D8 Deployment and Continuous Integration

Conclusion...

CI is good for you D8 is here to help We need contribution

Page 35: D8 Deployment and Continuous Integration

Happy client & Happy team