build & launch tools (blt) - drupal spend a long time orchestrating these tools a. you...

127
Build & Launch Tools (BLT) Automating best practices for enterprise sites

Upload: dodat

Post on 05-Apr-2018

222 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Build & Launch Tools (BLT)

Automating best practices for enterprise sites

Page 2: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Who are you?

● Matthew Grasmick● @grasmash on Drupal.org, twitter, etc.● Acquia Professional Services, 4yrs● Drupalist, 9yrs● Maintainer of BLT

Page 3: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Let’s start with the problem

that we’re solving.

Page 4: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 5: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 6: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 7: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

FTP

Page 8: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

This was goodIt was fast and simple.

Page 9: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

But it had problems!

● We’d overwrite each other’s files● We couldn’t track or revert changes● It wasn’t redundant or resilient

Page 10: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

FTP

Page 11: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 12: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

This was betterBut also a bit more complicated.

Page 13: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Meanwhile...Our backend tools were evolving

Page 14: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 15: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 16: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 17: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

This was betterBut also a bit more complicated.

Page 18: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Meanwhile...Our front end tools were changing too

Page 19: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 20: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 21: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 22: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 23: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

This was betterBut also a bit more complicated.

Page 24: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Meanwhile...We starting getting great testing tools

Page 25: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 26: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 27: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 28: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 29: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 30: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 31: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

This was betterBut also a bit more complicated.

Page 32: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Meanwhile...Our local environments were changing

Page 33: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 34: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 35: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 36: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

This was betterBut also a bit more complicated.

Page 37: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Meanwhile...The PHP community continued to evolve

Page 38: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 39: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 40: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

These are all great tools!That we run locally.

Page 41: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Teams have many machinesAnd continuous integration requires even more machines

Page 42: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 43: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 44: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 45: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

At some point it became very complex

And painful.

Page 46: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

This is the problem

We’re trying to solve.

Page 47: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Real world consequences

1. You don’t use these toolsa. You don’t have a build process to manage dependenciesb. You don’t use automated testingc. You don’t have a CI process

2. You spend a long time orchestrating these toolsa. You painstakingly create your own build process, for every projectb. You configure your own CI setup, for every projectc. You maintain it constantly, for every project

Page 48: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

There has to be a way...To approach this more consistently and efficiently.

Page 49: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 50: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 51: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 52: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Build & Launch Tools

BLT

Page 53: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 54: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 55: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Package, integrate, automateA stack of Drupal development tools.

Page 56: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

What’s in the box?

Page 57: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

BLT high-level features:

● Open source● Standardized template for Drupal 8 sites● Set of tools for building, testing, deploying● Commands for automating usage of those tools

Page 58: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Template

Page 59: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

What is the template?

● Pre-defined structure for files and directories● Boiler plate code and configuration

Page 60: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Opinionated placement of...

● Settings files● Exported configuration● Modules, themes, profiles, etc.● Drush commands● Patches

Page 61: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Nothing earth-shattering.

Page 62: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Actually, it’s kind of a big deal.

Page 63: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Why is it helpful?

● Faster on-boarding● Better collaboration● Simpler hand-offs

Page 64: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Tools

Page 65: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

We’re all using the same things

● The same tools, the same versions○ Testing tools○ PHP Packages○ Modules

● Preconfigured to work together

Page 66: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Also a big deal.

Page 67: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

What makes this powerful?

Page 68: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Automation!

Page 69: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Make complex things simple

● Create an entire project● Boot (& create) a VM● Validate all of your code● Test you application● Sync environments● Deploy to cloud

… in one command

Page 70: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Seeing is believing.

Page 71: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Warning: we’re going CLI.

Page 72: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Creating a new project

Page 73: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Use composer $ composer create-project acquia/blt-project [project-name] --no-interactionand then wait a bit..

Page 74: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

You have a complete project!

Page 75: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 76: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Install blt aliasand then you can use “blt”

$ composer blt-alias

Page 77: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Setup LAMP stackDev Desktop, DrupalVM, MAMP,

Native LAMP, etc.

$ blt vm

Page 78: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

You have a virtual machine!

Page 79: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Let’s do the other [local] stuff.

Page 80: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Do all the [local] things

● build dependencies● install drupal● import configuration● set file permissions

$ blt setup

Page 81: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

You have a fully functional Drupal site!

Page 82: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

That’s a lot of work you didn’t have to do.

Page 83: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Login to Drupalbecause it’s ready to go

$ cd docroot && drush uli

Page 84: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 85: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

You’ve only run 4 commands.

Page 86: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Automated testing

Page 87: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Don’t freak out.

Page 88: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

We provide the tools and example tests

● Testing

○ Behat

○ PHPUnit

● Validation

○ PHPCS

○ Linting (PHP/Twig)

Page 89: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Validate codephpcs, lint, composer

The right standards, on the right extensions, in the right dirs

$ blt validate

Page 90: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Run them all!Behat, PHPUnit all rolled up.

$ blt tests

Page 91: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Let’s stop and appreciate this.

Page 92: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

©2016 Acquia Inc. — Confidential and Proprietary

Page 93: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Let’s talk about workflowNot just local development

Page 94: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Build & TestDevelop, Build & Test

Review Deploy

Continuous Integration

CloudE.g., GitHubLocal Machine

BLT BLT

Page 95: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

With this workflow...

Before merging, you:

● Test your changes automatically● Review your changes on GitHub● Preview your changes on a dedicated environment

Page 96: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Gives the confidence

To merge a deploy code

Page 97: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Adding Continuous Integration

Acquia Cloud CD and Travis CI out-of-the-box.

Page 98: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

We provide CI configYou don’t need to figure it out.

Page 99: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Acquia Cloud CD pipelines

acquia-pipelines.yml

$ blt ci:pipelines:init

Page 100: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

You now haveacquia-pipelines.yml

pre-configured.

Page 101: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Travis CI.travis.yml

$ blt ci:travis:init

Page 102: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

You now have.travis.yml

pre-configured.

Page 103: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Pushto the Cloud

$ git commit -a

$ git push origin

Page 104: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

CI + BLT will build & test your site

Triggered by a push or pull request

Page 105: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 106: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 107: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock
Page 108: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Your tests run before mergingso you don’t break things.

Page 109: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

After merge, code deploysall by itself.

Page 110: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Build & TestDevelop, Build & Test

Review Deploy

Continuous Integration

CloudE.g., GitHubLocal Machine

BLT BLT

Page 111: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Deploying to the CloudDeployment is special.

Page 112: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Only deploy artifacts!Wait what? What’s an artifact?

Page 113: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Things you need for

development process

Things you need for

production website

!=

<>

Page 114: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Development Artifact

Page 115: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

#navbar { width: 80%; border: solid red 1px; float: left; padding: 5px; ul { list-style-type: none; } li { float: right; a { font-weight: bold; color: red; } }}

Development (SASS)#navbar { width: 80%; border: solid red 1px; float: left; padding: 5px;}

#navbar ul { list-style-type: none;}

#navbar ul li { float: right;}

#navbar ul li a { font-weight: bold; color: red;}

Artifact (CSS)

Page 116: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

.drush-use

.git/

.gitignore

.idea/

.travis.yml

.vagrant/README.mdVagrantfilebox/build/composer.jsoncomposer.lockconfig/docroot/drush/drush.wrapper*example.project.local.ymlfactory-hooks/hooks/patches/project.local.ymlproject.ymlreadme/reports/scripts/tests/vendor/

Development.gitignorecomposer.jsoncomposer.lockconfig/docroot/drush/factory-hooks/hooks/scripts/vendor/

Artifact

Page 117: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Build & Test

Build Artifact & Push

Develop Review

Working Repo Artifact

Push

Page 118: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Why are we doing this?Lots of good reasons.

Page 119: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Improves process, improves product.

● Maintainability○ Prevents hacking contrib & core (not committed).○ Deployments are scripted and repeatable (update hooks are required).

● Performance○ Removes unnecessary tools and libraries.

● Security○ Artifacts are sanitized.

Page 120: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Show me.Manual deployment is good for debugging.

Page 121: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

deploying manually $ blt deploy

from your local machine

Page 122: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

What just happened?

● A deployment artifact was created at your/project/path/deploy○ Files were copied.○ Front end assets were compiled.○ Prod dependencies were built.○ Directory was sanitized.○ Everything was committed.

● The deployment artifact was:○ Committed to the “<original-branch>-build” branch.○ Pushed to ${project.git.remotes}

Page 123: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Recap

Page 124: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

BLT is a box with:

● Standardized template for Drupal 8 sites● Set of tools for building, testing, deploying● Commands for automating usage of those tools

Page 125: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Make complex things simple

● Create an entire project● Boot (& create) a VM● Validate all of your code● Test your application● Deploy to cloud

… in one command

Page 126: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Build & TestDevelop, Build & Test

Review Deploy

Continuous Integration

CloudE.g., GitHubLocal Machine

BLT BLT

Page 127: Build & Launch Tools (BLT) - Drupal spend a long time orchestrating these tools a. You painstakingly create your own build process, ... Build & Launch Tools BLT. Package ... composer.lock

Thanks!Questions?

Reminder: Sprints are tomorrow!

github.com/acquia/blt

@grasmash

bit.ly/2oa9j1w