effectively managing 1000 drupal websites · 2020-01-03 · drupal codebases :) now imagine you...

35
#SolutionsArchitecture Effectively managing 1000 Drupal websites 1 Monday, December 2, 13

Upload: others

Post on 14-Jul-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Effectively managing 1000 Drupal websites

1Monday, December 2, 13

Page 2: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

‣Solutions Architect @ Acquia

‣Experience from:‣Brightcove.com

‣Nokia Meego

‣Johnson & Johnson Open Solutions

‣Twitter: @jakubsuchy

About me Jakub Suchy!Senior Solutions Architect!Drupal for 8 years, built sites like Brightcove.com, Nokia Meego!

Jean Semere!Solutions Architect!Drupal for 7 years, built sites like Capgemini.com!

2Monday, December 2, 13

Page 3: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Web Content Management

Social Business Software

eCommerce

Microsite

Microsite

Promotion

Microsite

Microsite

Event site

Blog

Product site

Corp-com site

Extranet

Wiki

Media gallery

Community platform

Intranet

Ecommerce site

Landing Page

Main website

Microsite Microsite

Promotion Microsite

Microsite

Event site

Blog

Product site

Corp-com site

Extranet

Wiki

Media gallery

Community platform

Intranet

eCommerce site

Landing Page

Main website

3Monday, December 2, 13

Inside many organisations, the web is broken

Page 4: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture4Monday, December 2, 13

Business requirements come from many teams, Resources are scarce, Team members come & goYou end up maintaining not one codebase but hundreds or thousandsThis is the amount of time people typically spend on maintaining their site as opposed to creating new features. This is provided you do maintain your Drupal codebases :)Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices, you will end up having a full time person doing just site maintenance, That’s not good & expensive

Page 5: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

5-20 %

4Monday, December 2, 13Business requirements come from many teams, Resources are scarce, Team members come & goYou end up maintaining not one codebase but hundreds or thousandsThis is the amount of time people typically spend on maintaining their site as opposed to creating new features. This is provided you do maintain your Drupal codebases :)Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices, you will end up having a full time person doing just site maintenance, That’s not good & expensive

Page 6: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Community Platform

Main Website

Microsite

Microsite

Main Website Product

Site

Intranet

Corp-com site

5Monday, December 2, 13

Page 7: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

vs

6Monday, December 2, 13Universities are unique- they typically have either a centralized IT team that maintains and owns all sites - can influence, dictate- decentralized - many different teams and different responsibilities, each owning their own sites

Page 8: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Imagine a 7 figure sum

7Monday, December 2, 13Why does this matter? A company had 1000 websites running, each created by a different team, each maintained separately. After a series of security issues they got ready to write a $1m check to someone to *just* upgrade all the sites to newest versions of Drupal code

Page 9: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Our goals‣Reduce site maintenance

‣Increase efficiency

‣Foster collaboration

8Monday, December 2, 13

Goals

Page 10: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Establish a governance model‣Single team as a gatekeeper

‣The trick: Balance of power for site teams

‣Only works for centralized teams

9Monday, December 2, 13Let’s take a look at a couple of approaches from both governance and code management perspectiveEstablish a formal governance over your efforts: Make a single team responsible for updates and developments, create a gatekeeper that will give power to other teams while maintaining control. The trick is to find out how to do this without giving site teams too much power. Of course this only works for centralized teams

Page 11: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Why do you use Drupal?

10Monday, December 2, 13

Page 12: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture11Monday, December 2, 13

Why do you use Drupal? For the community!This is the best scenario especially for decentralized teams Consider creating an internal open source community. Running your own open source community can foster collaboration, enable your teams to reduce maintenance overhead and increase speed of development

Page 13: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture12Monday, December 2, 13

Share softwareShare best practicesBreak down barriers

Page 14: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Create an internal community‣NBC Universal

‣University of California, San Francisco

13Monday, December 2, 13

Examples

Page 15: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Join LSD - largescaledrupal.com

14Monday, December 2, 13

Page 16: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Take baby steps‣Organize a Camp! Hello!

‣Schedule office hours

‣Github all the things

‣Let a leader emerge

15Monday, December 2, 13

Page 17: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Drupal core

Platform theme & modules

Site specific themes & modules

Site (Yellow):/sites/foo/modules/*/sites/foo/themes/*/sites/bar/modules/*/sites/bar/themes/*

Platform (Brown):/profiles/foo/modules/*/profiles/foo/themes/*Core (Blue):/modules/*/themes/*/includes... etc.

16Monday, December 2, 13

Page 18: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

‣Works great for single teams

‣Easy to keep core & platform in sync

‣Hard to test & QA across many sites

‣Difficult for many teamsSiteB

SiteA

SiteC

SiteD

Multi-Site

17Monday, December 2, 13

Page 19: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Independent sites‣Lets each site be tested, QA'd individually at

their own pace

‣Lets independent teams work on individual sites without breaking others

‣Difficult to maintainSiteA

SiteB

SiteC

SiteD

18Monday, December 2, 13

Page 20: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture19Monday, December 2, 13

Page 21: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

‣Marry multi-site with independent codebases

‣(on code level)

Platform / Distribution approach

SiteA

SiteB

SiteC

SiteD

20Monday, December 2, 13In this scenario, you create a unified Platform / Distribution that contains functionality common for most of your sites and then let your development teams only develop custom modules they need on top of the platform. This lets you keep a single codebase for majority of your code while you give your teams the flexibility to do their own thing under certain circumstancesThe danger? Give people too much power and they will fork the codebase unless you have very strong governance. If you run in decentralized environment then this approach will struggle unless you have a good internal open source community.

Page 22: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Site Stuff

Platform Stuff

Core Stuff

Mmm...Cake‣Segregate responsibility for site-specific

development, platform development and QA

‣Let dev teams use the tools they're used to (git, Github, Drupal)

21Monday, December 2, 13

Page 23: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

How does it do it?

Dev Stage Prod

Platform/SitePush to production

(manual and automated)

SiteA

SiteB

SiteC

SiteA

Site CodePublishingProcess

Production environments

Github Repos

Github Repos

DrupalCore

Features

Site Code

Managed Cloud

Distribution Environment

Site A Setup

Tag

Platform 10Platform

1.4.3

Site Tag 4.3.6

TargetTag newfeaturebranchTarget

Repo DevCloud 3

Code Distribution Management

Platform 10

Platform 11

Platform 12

Platform 10

22Monday, December 2, 13

Page 24: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Who does it work for?

Site DeveloperCommits themes,

modules to Site repo

Platform DeveloperCommits changes to

repos managing Drupal core, platform

features and modules

Developer sandboxes

Production hosting

Platform AdminManages available

deployment environments, setup

QA TeamTests and pushes approved code to

production, for 1 site or 100's

23Monday, December 2, 13

Page 25: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Developers!

DevelopersCommit to repos

they've been granted access to in Github

Developer's personal sandbox where they can test against replica of production

stack

Use Layer Cake to deploy their repos

periodically to sandboxes

24Monday, December 2, 13

Page 26: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Admins!

Developer CSandbox

Production hostingProduction HA environments

Platform AdminSets holds the keys to creating new mappings

Site A Setup

Tag

Platform 10Platform

1.4.3

Site Tag 4.3.6

TargetTag newfeaturebranchTarget

Repo DevCloud 3

Developer ASandbox

Developer DSandbox

25Monday, December 2, 13

Page 27: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Quality Assurance!

Production environments

QA TeamTests and pushes approved code to

production, for 1 site or 100's

Platform 10b

Keyword text

Filter Sites

Deploy Stage -> Prod

Site Version

4.5

7.2

3.1

1.0

134.2

Site

Site B

Site D

Platform Version

10b

Site C

Site E

10b

Site A

10b

10b

10b

Deploy Cancel

26Monday, December 2, 13

Page 28: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Site management gotchas‣Testing the upgrade path on all sites. Shoot for

eventual consistency but beware of the dangers of falling out of sync.

‣When using the Layer Cake approach beware Platform and Site compatibility issues.

27Monday, December 2, 13

Page 29: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

How to start‣Do an inventory

‣Start just by moving modules around.

‣Standardize on top modules.

‣Once modules are standardized, start capturing your common configurations into Features.

28Monday, December 2, 13

How many sites do we have?How similar are they?Are we looking at one platform or many?

Page 30: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Features. Love them. Hate them. Use them.

29Monday, December 2, 13

Page 31: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Overriden Features‣Problem: Feature overridden due to configuration

changes done in dev, stage or prod.

‣Fix: You’re doing it wrong!

‣Adopt a proper dev-> stage -> prod workflow.

‣Automatically revert Features on deployments. Script drush fr.

‣“drush fu” your workflow. (best Drush command ever!)

30Monday, December 2, 13

Page 32: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Aaaand...‣It’s all about to change in Drupal 8

31Monday, December 2, 13

Page 33: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

SaaS: Acquia Site Factory

Templates 1 Select website template

2 Configure site-specific settings

Information architecture Page layouts

Roles & permissions Content types & display

Pre-defined themes 3rd party integrations

3 Add design & site content

http://www.[customdomain].com Done.

32Monday, December 2, 13

What about if you stop maintaining code whatsoever? There are platforms such as Acquia’s Site Factory that let you create hundreds of sites without any code if your sites are easy enough.

Page 34: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

What have we learned‣Managing a lot of sites is hard. Deal with it,

budget for it

‣Foster an internal community

‣Create a platform / distribution

‣Featurize your code

‣Consider SaaS

33Monday, December 2, 13

Page 35: Effectively managing 1000 Drupal websites · 2020-01-03 · Drupal codebases :) Now imagine you have 100 websites. You can easily imagine that without automation or some sane practices,

#SolutionsArchitecture

Thank you, questions?Jakub Suchy, [email protected]@jakubsuchy

34Monday, December 2, 13