cheaper by the dozens - 2018.badcamp.org · • an installation profile released to be used by...

76
Cheaper by the Dozens Building Drupal Websites En Masse JAMES NETTIK

Upload: others

Post on 06-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Cheaper by the DozensBuilding Drupal Websites En Masse

JAMES NETTIK

Page 2: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

James NettikFRONT-END DEVELOPER@JNETTIK

Page 3: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

@atendesign aten.io

Page 4: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Work ThatMatters

Page 5: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Work ThatMatters

Page 6: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

A BRIGHTER TOMORROW

Page 7: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Thinking in GroupsWhat problems come up when steering dozens of projects simultaneously?

Page 8: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

“Mo’ websites,mo’ problems.

- The Notorious B.I.G.

Page 9: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Starting Guidelines

Page 10: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Starting Guidelines• Resist mixing code/configuration and

site content.

Page 11: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Starting Guidelines• Resist mixing code/configuration and

site content.

• Keep scope as small and simple as possible.

Page 12: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Starting Guidelines• Resist mixing code/configuration and

site content.

• Keep scope as small and simple as possible.

• For every feature ask: “How many websites on the platform will use this?”

Page 13: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Starting Guidelines• Resist mixing code/configuration and

site content.

• Keep scope as small and simple as possible.

• For every feature ask: “How many websites on the platform will use this?”

• Be prepared to (politely) push back against single instance requests.

Page 14: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Starting Guidelines• Resist mixing code/configuration and

site content.

• Keep scope as small and simple as possible.

• For every feature ask: “How many websites on the platform will use this?”

• Be prepared to (politely) push back against single instance requests.

• Test a fresh install after every new feature built and before every deployment made.

Page 15: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Installation ProfilesBecause clicking the same buttons on every project gets old fast.

Page 16: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

What are install profiles?

Page 17: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

What are install profiles?• Bundled dependencies, content types, displays, functionality, content, and

themes to start a new project with.

Page 18: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

What are install profiles?• Bundled dependencies, content types, displays, functionality, content, and

themes to start a new project with.

• Similar to Drupal modules in most ways.

Page 19: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

What are install profiles?• Bundled dependencies, content types, displays, functionality, content, and

themes to start a new project with.

• Similar to Drupal modules in most ways.

• Uses a .profile file for core functionality instead of a .module file.

Page 20: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

What are install profiles?• Bundled dependencies, content types, displays, functionality, content, and

themes to start a new project with.

• Similar to Drupal modules in most ways.

• Uses a .profile file for core functionality instead of a .module file.

• Generally used as a starting point to work off of.

Page 21: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

DistributionsEmpowering others with our laziness.

Page 22: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

What are distributions?

Page 23: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

What are distributions?• An Installation Profile released to be used by others.

Page 24: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

What are distributions?• An Installation Profile released to be used by others.

• Often released bundled with dependencies and downloaded.

Page 25: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

What are distributions?• An Installation Profile released to be used by others.

• Often released bundled with dependencies and downloaded.

• Can be scaffolded using composer create-project.

Page 26: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

INSTALL WITH COMPOSER

Page 27: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

THUNDER’S INSTALLER

Page 28: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

THUNDER’S REQUIREMENTS

Page 29: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

What are distributions?• An Installation Profile released to be used by others.

• Often released bundled with dependencies and downloaded.

• Can be scaffolded using composer create-project.

• Get updates and new features from maintainers.

Page 30: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

What are distributions?• An Installation Profile released to be used by others.

• Often released bundled with dependencies and downloaded.

• Can be scaffolded using composer create-project.

• Get updates and new features from maintainers.

• drupal-org.make files for bundling through drupal.org

Page 31: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

DRUPAL MAKE FILE

Page 32: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Planning the ProjectBalancing the needs of many vs. the needs of a few.

Page 33: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Flexible Contentand Design

Page 34: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Flexible Contentand Design

• Paragraph module allows for providing controlled flexibility back to admins and content manager.

Page 35: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Flexible Contentand Design

• Paragraph module allows for providing controlled flexibility back to admins and content manager.

• Background Images Formatter module is great for allowing control over banner style images usually handled in CSS.

Page 36: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Branding

Page 37: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Branding• Branding should remain consistent across the platform, but flexible for each

specific instance.

Page 38: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Branding• Branding should remain consistent across the platform, but flexible for each

specific instance.

• Logos, main colors, and typography are some of the most important items to consider.

Page 39: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Branding• Branding should remain consistent across the platform, but flexible for each

specific instance.

• Logos, main colors, and typography are some of the most important items to consider.

• Drupal Core allows for changing logos through the interface.

Page 40: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

DRUPAL LOGO CONFIG

Page 41: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

DRUPAL LOGO OVERRIDE

Page 42: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Branding• Branding should remain consistent across the platform, but flexible for each

specific instance.

• Logos, main colors, and typography are some of the most important items to consider.

• Drupal Core allows for changing logos through the interface.

• Drupal Core’s Color module can be integrated into themes to expose color schemes to admins.

Page 43: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

COLOR.INC

Page 44: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

COLOR MODULE CONFIG

Page 45: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

OVERRIDES.CSS

Page 46: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Branding• Branding should remain consistent across the platform, but flexible for each

specific instance.

• Logos, main colors, and typography are some of the most important items to consider.

• Drupal Core allows for changing logos through the interface.

• Drupal Core’s Color module can be integrated into themes to expose color schemes to admins.

• @FontYourFace module exposes theme font faces into configuration.

Page 47: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

@FONTYOURFACE

Page 48: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

@FONTYOURFACE

Page 49: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

@FONTYOURFACE

Page 50: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Hosting and InfrastructureThe needs of many vs. the needs of one.

Page 51: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Pantheon Upstreams

Page 52: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Pantheon Upstreams• Git repository used to create new Pantheon websites in a single click.

Page 53: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Pantheon Upstreams• Git repository used to create new Pantheon websites in a single click.

• Pantheon manages their own Upstreams of Drupal 7 and 8 cores.

Page 54: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Pantheon Upstreams• Git repository used to create new Pantheon websites in a single click.

• Pantheon manages their own Upstreams of Drupal 7 and 8 cores.

• Updates to websites can be deployed through the Upstream.

Page 55: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

PANTHEON UPDATES

Page 56: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Pantheon Upstreams• Git repository used to create new Pantheon websites in a single click.

• Pantheon manages their own Upstreams of Drupal 7 and 8 cores.

Page 57: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Pantheon Upstreams• Git repository used to create new Pantheon websites in a single click.

• Pantheon manages their own Upstreams of Drupal 7 and 8 cores.

• Updates to websites can be deployed through the Upstream.

Page 58: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Pantheon Upstreams• Git repository used to create new Pantheon websites in a single click.

• Pantheon manages their own Upstreams of Drupal 7 and 8 cores.

• Updates to websites can be deployed through the Upstream.

• Organization accounts can create their own custom Upstreams.

Page 59: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

PANTHEON UPSTREAMS

Page 60: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Pantheon Terminus CLI

Page 61: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Pantheon Terminus CLI• Terminus is a tool for managing websites, organizations, user, and teams

from the command line.

Page 62: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Pantheon Terminus CLI• Terminus is a tool for managing websites, organizations, user, and teams

from the command line.

• Terminus can execute Drush commands on Drupal websites, without the use of Drush Aliases.

Page 63: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Pantheon Terminus CLI• Terminus is a tool for managing websites, organizations, user, and teams

from the command line.

• Terminus can execute Drush commands on Drupal websites, without the use of Drush Aliases.

• Permissions to websites are controlled by your individual Pantheon account.

Page 64: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Pantheon Terminus CLI• Terminus is a tool for managing websites, organizations, user, and teams

from the command line.

• Terminus can execute Drush commands on Drupal websites, without the use of Drush Aliases.

• Permissions to websites are controlled by your individual Pantheon account.

• Limited to being executed on one site and one environment at a time.

Page 65: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Extending Terminus with Plugins

Page 66: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

TERMINUS PLUGIN LIBRARY

Page 67: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Extending Terminus with Plugins

• Terminus Mass Update gets piped a list of site IDs, loops over them, and pulls in any Upstream updates.

Page 68: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

TERMINUS SITE LIST

Page 69: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

TERMINUS SITE UPDATE

Page 70: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Extending Terminus with Plugins

• Terminus Mass Update gets piped a list of site IDs, loops over them, and pulls in any Upstream updates.

• Terminus Mass Run adds looping functionality for Terminus commands like: remote:drush, backup:create, connection:set, env:deploy, site:upstream:cache-clear.

Page 71: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

TERMINUS USER CREATE

Page 72: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

TERMINUS DEPLOYMENT

Page 73: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Acquia CloudSite Factory

• Leverages Drupal multi-site functionality.

• Similar workflow to the Aegir project

Page 74: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Barebones approach with Composer

• Install Profiles can be updated with Composer like any module.

• Install Profiles can use hook_update_N() like modules.

Page 75: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

Thanks!James Nettik

[email protected]@jnettik

Page 76: Cheaper by the Dozens - 2018.badcamp.org · • An Installation Profile released to be used by others. • Often released bundled with dependencies and downloaded. • Can be scaffolded

http://bit.ly/jnettik-install-profiles

@atendes ign | a ten . io

SLIDES