SlideShare a Scribd company logo
1 of 48
Download to read offline
Off the Treadmill: Building a
Drupal Platform for Your
Organization
Rick Vugteveen (@rickvug)
Pacific Northwest Drupal Summit 2013
Wednesday, 9 October, 13
Hello!
• @rickvug on Twitter, Drupal.org etc.
• Drupal and I have history: Dev, Business Dev, Technical
Architect, Product manager.
• Currently work in Solutions Architecture at Acquia.
Wednesday, 9 October, 13
What will we be talking about?
• Code management strategies. Understanding your
options and trade-offs.
• How to structure your code into re-usable Platform
functionality vs. Site specific code.
• How to deal with problems with Features.
• Consistency and upgrade path issues.
• Whatever you want!
Wednesday, 9 October, 13
Things I like but don’t expect to talk about
• How branching works or other Git fundamentals
• Drush Make
• The basics of Features
• Strongarm
• Exportables
Wednesday, 9 October, 13
Setting the stage
Wednesday, 9 October, 13
• Duplication of content"
• Disparate sources"
• Disconnected reporting"
• Islands of excellence"
Inside Many
Large
Organizations, 

the Web Is
Broken
Wednesday, 9 October, 13
Assemble solutions in Drupal
Drupal core! Drupal + recommended!
modules!
Solution 

Distributions!
Wednesday, 9 October, 13
The Dream
Department sites!
Data portals!
Primary site!
Microsites!
Collaboration

Intranet !
Departmental

Sites!
Wednesday, 9 October, 13
Wednesday, 9 October, 13
Wednesday, 9 October, 13
Does this sound familiar?
• “All of our Drupal sites have slight differences. It is
difficult to keep track of the differences and maintain
them all.”
• “I feel like we keep on developing the same functionality
over and over again.”
• “Bug-fixing and fire-fighting never ends. We need to get
back to creating new business value”.
• “We don’t have time to build things the right way”.
Wednesday, 9 October, 13
Wednesday, 9 October, 13
Code management & deployment strategies
Wednesday, 9 October, 13
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.
Drupal
Core
Platform Theme,
Modules &
Features
Site specific
Theme,
Modules &
Features
Wednesday, 9 October, 13
Multi-site model
Site
B
Site
A
Site
C
Site
D
Git Repo
Wednesday, 9 October, 13
Vendor branching model
Site
A
Drupal
Core
Features
Site
Code
Site
B
Site
C
Site
D
Git Repos
Sites
Platform
Wednesday, 9 October, 13
Site
B
Site
A
Site
C
Site
D
Site
A
Site
B
Site
C
Site
D
Drupal
Core
Features
Site
Code
Drupal Multisite Architecture
✓ Makes it easy to keep core and platform changes
in sync among many sites
- Makes it really hard to test and assure quality on
core or platform changes that may affect tens or
hundreds of sites
- Is difficult to divide responsibility among different
teams of developers and testers
Independent Drupal codebases
✓ Lets each site be tested, QA'd individually at their
own pace
✓ Lets independent teams work on individual sites
without breaking others
- Can lead to forking of core and platform code
- Is difficult to maintain
Lots of Code, Lots of Sites, Lots of Compromises
Wednesday, 9 October, 13
Mmmmm... Cake
Site Stuff
Platform Stuff
Core Stuff
▪ Segregate responsibility for site-specific
development, platform development and QA
▪ Let dev teams use the tools they're used to
(git, Github, Drupal)
▪ Combine the benefits of multisite and
independent codebases
Wednesday, 9 October, 13
How does it do it?
Dev Stage Prod
Platform/Site
Push to production
(manual and automated)
Site
A
Site
B
Site
C
Site
A
Site Code
Publishing
Process
Hosting
Environments
Git Repos
Git Repos
Drupal
Core
Features
Site
Code
Managed
Cloud
Distribution
Environment
Site A Setup
Tag
Platform 10Platform
1.4.3
Site Tag 4.3.6
Target
Tag
newfeaturebranch
Target
Repo
Dev 3
Code Distribution Management
Platform
10
Platform
11
Platform
12
Platform
10
Wednesday, 9 October, 13
Who does Layer Cake work for?
Site Developer
Commits themes,
modules to Site repo
Platform Developer
Commits changes to
repos managing
Drupal core, platform
features and modules
Dev Environments
Developer sandbox
environments
Production Hosting
Production
environment(s)
Platform Admin
Manages available
deployment
environments, setup
QA Team
Tests and pushes approved
code to production, for 1
site or 100's
Wednesday, 9 October, 13
Developers!
Developers
Commit 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
Wednesday, 9 October, 13
Admins!
Developer C
Sandbox
Production Hosting
Production HA
environments
Platform Admin
Sets holds the keys to
creating new mappings
Site A Setup
Tag
Platform 10Platform
1.4.3
Site Tag 4.3.6
Target
Tag
newfeaturebranch
Target
Repo
DevCloud 3
Developer A
Sandbox
Developer D
Sandbox
Wednesday, 9 October, 13
Quality Assurance!
Production Hosting
Production HA
environments
QA Team
Tests 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
Wednesday, 9 October, 13
Site/Code management gotchas
• Testing the upgrade path on all sites. Shoot for eventual
consistency but beware of the dangers of falling out of
sync.
• Watch out for update.php, or what we call “the Upgrade
Dance”.
• When using the Layer Cake approach beware Platform
and Site compatibility issues.
Wednesday, 9 October, 13
Flexibility vs. Effort
• Multi-tenant: One database, one Drupal installation (ie. Domain Access).
• Hybrid: Multiple databases, one Drupal installation. (Multi-site, potentially a
true Distribution)
• Multi-instance: Multiple databases, multiple Drupal installations. (potentially
Vendor Branching)
Wednesday, 9 October, 13
But I’m already a Cowboy!
Wednesday, 9 October, 13
Baby steps
• Do an inventory. How many sites do we have? How similar are they? Are we
looking at one platform or many?
• You can start just by moving modules around.
• Then start standardizing the list of modules you are using.
• Once modules are standardized, start capturing your
common configurations into Features.
Wednesday, 9 October, 13
Features. Love them. Hate them. Use them.
Wednesday, 9 October, 13
Where I’m coming from
30 magazines, up to 60 sites (long term), ~10 legacy
content management systems.
Goal: One Drupal Platform.
Wednesday, 9 October, 13
Wednesday, 9 October, 13
Wednesday, 9 October, 13
Wednesday, 9 October, 13
Wednesday, 9 October, 13
Wednesday, 9 October, 13
Dennis Publishing Example
• Dennis Core:
• Base theme
• Media Management
• WYSIWYG
• Image cache settings
• Contexts (or Panels)
• Base Menus
Wednesday, 9 October, 13
Dennis Publishing Example
• Optional:
• Article
• Gallery
• Carousel
• Video player
Wednesday, 9 October, 13
Wednesday, 9 October, 13
Overridden 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!)
Wednesday, 9 October, 13
Overridden Features because of site differences
• Problem: I want to set defaults but I don’t need them enforced on each site.
• Example: Comment settings should have a default but may change on a
per site basis.
• Potential Solution:
• Don’t be afraid of .install files, hook_update_N(), variable_set and friends.
Only Strongarm variables you don’t want to change.
• Or structure your Features differently...
Wednesday, 9 October, 13
Structuring Features
• Make your Features granular with a proper dependency chain.
• Example: Blog Feature and Gallery Feature both depend on the
Categories vocabulary. Create a Categories Feature with only that
vocabulary. Have other Features depend on that.
• Capture your data structure in your Platform. Move display setting into a Site
modules.
• Example:
/profiles/distroname/features/distroname_blog_structure
/sites/sitename/features/sitename_blog_display
(or have shared base fields as their own Feature)
Wednesday, 9 October, 13
Wednesday, 9 October, 13
Wednesday, 9 October, 13
Wednesday, 9 October, 13
What the hell is a Skeleton Feature?
• Located at /profile/dennis_distro/modules/skel/*
• Naming convention: skel_blog_display, skel_gallery_display etc.
• 1. On distro install automatically copy over skel modules from profile/
platformname/modules/skel/* to sites/sitename/modules/features/*.
• 2. Automatically find and replace “skel” with “sitename”. Eg. changes hook
implementation from skel_blog_display_menu() to
sitename_blog_display_menu().
• 3. hook_info_alter() any modules with the prefix “skel_”. You’ll never see them
and Features will ignore.
• After install: /sites/sitename/modules/features/sitename_blog_display.
Wednesday, 9 October, 13
Features upgrade path issues
• No silver bullet for data structure changes. Avoid at all costs. Get your hands
dirty if needed.
• Start with multiple implementations of a Platform Feature to ensure the
structure is generic enough.
• Push back on asks for site specific data structure. Get creative with
Taxonomy.
• Adding to data structure on a per site basis is fine.
Wednesday, 9 October, 13
Wrapping up. What we (hopefully) learned
• Code management strategies. Understanding your
options and trade-offs.
• How to structure your code into re-usable Platform
functionality vs. Site specific code.
• How to deal with problems with Features.
• Consistency and upgrade path issues.
Wednesday, 9 October, 13
Additional Resources
• Phase2 Blog post on Features Base Fields: http://
www.phase2technology.com/blog/new-field-bases-and-instances-in-
features/
• Patch for Features Base Fields: https://drupal.org/node/1064472
• Multi-headed Drupal: http://palantir.net/blog/multi-headed-drupal
• The Drupal-Powered Enterprise White Paper: https://www.acquia.com/
resources/whitepapers/drupal-powered-enterprise
Wednesday, 9 October, 13
Thanks!
Rick Vugteveen
@rickvug
rickvug@gmail.com
rick.vugteveen@acquia.com
PS - I’m hiring! Let’s talk.
Wednesday, 9 October, 13

More Related Content

Similar to Off the Treadmill: Building a Drupal Platform for Your Organization

J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...Jeavon Leopold
 
Upgrades and migrations
Upgrades and migrationsUpgrades and migrations
Upgrades and migrationsDavid Lanier
 
One Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp LondonOne Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp Londonhernanibf
 
Intro to PHP Testing
Intro to PHP TestingIntro to PHP Testing
Intro to PHP TestingRan Mizrahi
 
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...Best Practices for Development Deployment & Distributions: Capital Camp + Gov...
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...Phase2
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushPantheon
 
Building a Drupal Distribution using Features, Drush Make, Installation Profi...
Building a Drupal Distribution using Features, Drush Make, Installation Profi...Building a Drupal Distribution using Features, Drush Make, Installation Profi...
Building a Drupal Distribution using Features, Drush Make, Installation Profi...Ben Shell
 
CivicActions Drupal Directory Structure
CivicActions Drupal Directory StructureCivicActions Drupal Directory Structure
CivicActions Drupal Directory StructureGregory Heller
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Angela Byron
 
Build Automation of PHP Applications
Build Automation of PHP ApplicationsBuild Automation of PHP Applications
Build Automation of PHP ApplicationsPavan Kumar N
 
Docker 102 - Immutable Infrastructure
Docker 102 - Immutable InfrastructureDocker 102 - Immutable Infrastructure
Docker 102 - Immutable InfrastructureAdrian Otto
 
Drupal 8 improvements for developer productivity php symfony and more
Drupal 8 improvements for developer productivity  php symfony and moreDrupal 8 improvements for developer productivity  php symfony and more
Drupal 8 improvements for developer productivity php symfony and moreAcquia
 
Configuration as Dependency: Managing Drupal 8 Configuration with git and Com...
Configuration as Dependency: Managing Drupal 8 Configuration with git and Com...Configuration as Dependency: Managing Drupal 8 Configuration with git and Com...
Configuration as Dependency: Managing Drupal 8 Configuration with git and Com...Erich Beyrent
 
Hong kong drupal user group nov 8th - drupal 7.32 security vulnerability
Hong kong drupal user group   nov 8th - drupal 7.32 security vulnerabilityHong kong drupal user group   nov 8th - drupal 7.32 security vulnerability
Hong kong drupal user group nov 8th - drupal 7.32 security vulnerabilityAnn Lam
 
Hong Kong Drupal User Group - Nov 8th
Hong Kong Drupal User Group - Nov 8thHong Kong Drupal User Group - Nov 8th
Hong Kong Drupal User Group - Nov 8thWong Hoi Sing Edison
 
Hong kong drupal user group nov 8th - drupal 7.32 security vulnerability
Hong kong drupal user group   nov 8th - drupal 7.32 security vulnerabilityHong kong drupal user group   nov 8th - drupal 7.32 security vulnerability
Hong kong drupal user group nov 8th - drupal 7.32 security vulnerabilityAnn Lam
 
Composer JSON kills make files
Composer JSON kills make filesComposer JSON kills make files
Composer JSON kills make filesropsu
 

Similar to Off the Treadmill: Building a Drupal Platform for Your Organization (20)

J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...
J&Js adventures with agency best practice & the hybrid MVC framework - Umbrac...
 
Drupal in-depth
Drupal in-depthDrupal in-depth
Drupal in-depth
 
Upgrades and migrations
Upgrades and migrationsUpgrades and migrations
Upgrades and migrations
 
One Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp LondonOne Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp London
 
Intro to PHP Testing
Intro to PHP TestingIntro to PHP Testing
Intro to PHP Testing
 
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...Best Practices for Development Deployment & Distributions: Capital Camp + Gov...
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and Drush
 
Building a Drupal Distribution using Features, Drush Make, Installation Profi...
Building a Drupal Distribution using Features, Drush Make, Installation Profi...Building a Drupal Distribution using Features, Drush Make, Installation Profi...
Building a Drupal Distribution using Features, Drush Make, Installation Profi...
 
CivicActions Drupal Directory Structure
CivicActions Drupal Directory StructureCivicActions Drupal Directory Structure
CivicActions Drupal Directory Structure
 
Run R on the cloud
Run R on the cloudRun R on the cloud
Run R on the cloud
 
Forensic Theming - DrupalCon London
Forensic Theming - DrupalCon LondonForensic Theming - DrupalCon London
Forensic Theming - DrupalCon London
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8
 
Build Automation of PHP Applications
Build Automation of PHP ApplicationsBuild Automation of PHP Applications
Build Automation of PHP Applications
 
Docker 102 - Immutable Infrastructure
Docker 102 - Immutable InfrastructureDocker 102 - Immutable Infrastructure
Docker 102 - Immutable Infrastructure
 
Drupal 8 improvements for developer productivity php symfony and more
Drupal 8 improvements for developer productivity  php symfony and moreDrupal 8 improvements for developer productivity  php symfony and more
Drupal 8 improvements for developer productivity php symfony and more
 
Configuration as Dependency: Managing Drupal 8 Configuration with git and Com...
Configuration as Dependency: Managing Drupal 8 Configuration with git and Com...Configuration as Dependency: Managing Drupal 8 Configuration with git and Com...
Configuration as Dependency: Managing Drupal 8 Configuration with git and Com...
 
Hong kong drupal user group nov 8th - drupal 7.32 security vulnerability
Hong kong drupal user group   nov 8th - drupal 7.32 security vulnerabilityHong kong drupal user group   nov 8th - drupal 7.32 security vulnerability
Hong kong drupal user group nov 8th - drupal 7.32 security vulnerability
 
Hong Kong Drupal User Group - Nov 8th
Hong Kong Drupal User Group - Nov 8thHong Kong Drupal User Group - Nov 8th
Hong Kong Drupal User Group - Nov 8th
 
Hong kong drupal user group nov 8th - drupal 7.32 security vulnerability
Hong kong drupal user group   nov 8th - drupal 7.32 security vulnerabilityHong kong drupal user group   nov 8th - drupal 7.32 security vulnerability
Hong kong drupal user group nov 8th - drupal 7.32 security vulnerability
 
Composer JSON kills make files
Composer JSON kills make filesComposer JSON kills make files
Composer JSON kills make files
 

Recently uploaded

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The Evolution of Money: Digital Transformation and CBDCs in Central Banking
The Evolution of Money: Digital Transformation and CBDCs in Central BankingThe Evolution of Money: Digital Transformation and CBDCs in Central Banking
The Evolution of Money: Digital Transformation and CBDCs in Central BankingSelcen Ozturkcan
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 

Recently uploaded (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Evolution of Money: Digital Transformation and CBDCs in Central Banking
The Evolution of Money: Digital Transformation and CBDCs in Central BankingThe Evolution of Money: Digital Transformation and CBDCs in Central Banking
The Evolution of Money: Digital Transformation and CBDCs in Central Banking
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 

Off the Treadmill: Building a Drupal Platform for Your Organization

  • 1. Off the Treadmill: Building a Drupal Platform for Your Organization Rick Vugteveen (@rickvug) Pacific Northwest Drupal Summit 2013 Wednesday, 9 October, 13
  • 2. Hello! • @rickvug on Twitter, Drupal.org etc. • Drupal and I have history: Dev, Business Dev, Technical Architect, Product manager. • Currently work in Solutions Architecture at Acquia. Wednesday, 9 October, 13
  • 3. What will we be talking about? • Code management strategies. Understanding your options and trade-offs. • How to structure your code into re-usable Platform functionality vs. Site specific code. • How to deal with problems with Features. • Consistency and upgrade path issues. • Whatever you want! Wednesday, 9 October, 13
  • 4. Things I like but don’t expect to talk about • How branching works or other Git fundamentals • Drush Make • The basics of Features • Strongarm • Exportables Wednesday, 9 October, 13
  • 6. • Duplication of content" • Disparate sources" • Disconnected reporting" • Islands of excellence" Inside Many Large Organizations, 
 the Web Is Broken Wednesday, 9 October, 13
  • 7. Assemble solutions in Drupal Drupal core! Drupal + recommended! modules! Solution 
 Distributions! Wednesday, 9 October, 13
  • 8. The Dream Department sites! Data portals! Primary site! Microsites! Collaboration
 Intranet ! Departmental
 Sites! Wednesday, 9 October, 13
  • 11. Does this sound familiar? • “All of our Drupal sites have slight differences. It is difficult to keep track of the differences and maintain them all.” • “I feel like we keep on developing the same functionality over and over again.” • “Bug-fixing and fire-fighting never ends. We need to get back to creating new business value”. • “We don’t have time to build things the right way”. Wednesday, 9 October, 13
  • 13. Code management & deployment strategies Wednesday, 9 October, 13
  • 14. 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. Drupal Core Platform Theme, Modules & Features Site specific Theme, Modules & Features Wednesday, 9 October, 13
  • 17. Site B Site A Site C Site D Site A Site B Site C Site D Drupal Core Features Site Code Drupal Multisite Architecture ✓ Makes it easy to keep core and platform changes in sync among many sites - Makes it really hard to test and assure quality on core or platform changes that may affect tens or hundreds of sites - Is difficult to divide responsibility among different teams of developers and testers Independent Drupal codebases ✓ Lets each site be tested, QA'd individually at their own pace ✓ Lets independent teams work on individual sites without breaking others - Can lead to forking of core and platform code - Is difficult to maintain Lots of Code, Lots of Sites, Lots of Compromises Wednesday, 9 October, 13
  • 18. Mmmmm... Cake Site Stuff Platform Stuff Core Stuff ▪ Segregate responsibility for site-specific development, platform development and QA ▪ Let dev teams use the tools they're used to (git, Github, Drupal) ▪ Combine the benefits of multisite and independent codebases Wednesday, 9 October, 13
  • 19. How does it do it? Dev Stage Prod Platform/Site Push to production (manual and automated) Site A Site B Site C Site A Site Code Publishing Process Hosting Environments Git Repos Git Repos Drupal Core Features Site Code Managed Cloud Distribution Environment Site A Setup Tag Platform 10Platform 1.4.3 Site Tag 4.3.6 Target Tag newfeaturebranch Target Repo Dev 3 Code Distribution Management Platform 10 Platform 11 Platform 12 Platform 10 Wednesday, 9 October, 13
  • 20. Who does Layer Cake work for? Site Developer Commits themes, modules to Site repo Platform Developer Commits changes to repos managing Drupal core, platform features and modules Dev Environments Developer sandbox environments Production Hosting Production environment(s) Platform Admin Manages available deployment environments, setup QA Team Tests and pushes approved code to production, for 1 site or 100's Wednesday, 9 October, 13
  • 21. Developers! Developers Commit 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 Wednesday, 9 October, 13
  • 22. Admins! Developer C Sandbox Production Hosting Production HA environments Platform Admin Sets holds the keys to creating new mappings Site A Setup Tag Platform 10Platform 1.4.3 Site Tag 4.3.6 Target Tag newfeaturebranch Target Repo DevCloud 3 Developer A Sandbox Developer D Sandbox Wednesday, 9 October, 13
  • 23. Quality Assurance! Production Hosting Production HA environments QA Team Tests 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 Wednesday, 9 October, 13
  • 24. Site/Code management gotchas • Testing the upgrade path on all sites. Shoot for eventual consistency but beware of the dangers of falling out of sync. • Watch out for update.php, or what we call “the Upgrade Dance”. • When using the Layer Cake approach beware Platform and Site compatibility issues. Wednesday, 9 October, 13
  • 25. Flexibility vs. Effort • Multi-tenant: One database, one Drupal installation (ie. Domain Access). • Hybrid: Multiple databases, one Drupal installation. (Multi-site, potentially a true Distribution) • Multi-instance: Multiple databases, multiple Drupal installations. (potentially Vendor Branching) Wednesday, 9 October, 13
  • 26. But I’m already a Cowboy! Wednesday, 9 October, 13
  • 27. Baby steps • Do an inventory. How many sites do we have? How similar are they? Are we looking at one platform or many? • You can start just by moving modules around. • Then start standardizing the list of modules you are using. • Once modules are standardized, start capturing your common configurations into Features. Wednesday, 9 October, 13
  • 28. Features. Love them. Hate them. Use them. Wednesday, 9 October, 13
  • 29. Where I’m coming from 30 magazines, up to 60 sites (long term), ~10 legacy content management systems. Goal: One Drupal Platform. Wednesday, 9 October, 13
  • 35. Dennis Publishing Example • Dennis Core: • Base theme • Media Management • WYSIWYG • Image cache settings • Contexts (or Panels) • Base Menus Wednesday, 9 October, 13
  • 36. Dennis Publishing Example • Optional: • Article • Gallery • Carousel • Video player Wednesday, 9 October, 13
  • 38. Overridden 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!) Wednesday, 9 October, 13
  • 39. Overridden Features because of site differences • Problem: I want to set defaults but I don’t need them enforced on each site. • Example: Comment settings should have a default but may change on a per site basis. • Potential Solution: • Don’t be afraid of .install files, hook_update_N(), variable_set and friends. Only Strongarm variables you don’t want to change. • Or structure your Features differently... Wednesday, 9 October, 13
  • 40. Structuring Features • Make your Features granular with a proper dependency chain. • Example: Blog Feature and Gallery Feature both depend on the Categories vocabulary. Create a Categories Feature with only that vocabulary. Have other Features depend on that. • Capture your data structure in your Platform. Move display setting into a Site modules. • Example: /profiles/distroname/features/distroname_blog_structure /sites/sitename/features/sitename_blog_display (or have shared base fields as their own Feature) Wednesday, 9 October, 13
  • 44. What the hell is a Skeleton Feature? • Located at /profile/dennis_distro/modules/skel/* • Naming convention: skel_blog_display, skel_gallery_display etc. • 1. On distro install automatically copy over skel modules from profile/ platformname/modules/skel/* to sites/sitename/modules/features/*. • 2. Automatically find and replace “skel” with “sitename”. Eg. changes hook implementation from skel_blog_display_menu() to sitename_blog_display_menu(). • 3. hook_info_alter() any modules with the prefix “skel_”. You’ll never see them and Features will ignore. • After install: /sites/sitename/modules/features/sitename_blog_display. Wednesday, 9 October, 13
  • 45. Features upgrade path issues • No silver bullet for data structure changes. Avoid at all costs. Get your hands dirty if needed. • Start with multiple implementations of a Platform Feature to ensure the structure is generic enough. • Push back on asks for site specific data structure. Get creative with Taxonomy. • Adding to data structure on a per site basis is fine. Wednesday, 9 October, 13
  • 46. Wrapping up. What we (hopefully) learned • Code management strategies. Understanding your options and trade-offs. • How to structure your code into re-usable Platform functionality vs. Site specific code. • How to deal with problems with Features. • Consistency and upgrade path issues. Wednesday, 9 October, 13
  • 47. Additional Resources • Phase2 Blog post on Features Base Fields: http:// www.phase2technology.com/blog/new-field-bases-and-instances-in- features/ • Patch for Features Base Fields: https://drupal.org/node/1064472 • Multi-headed Drupal: http://palantir.net/blog/multi-headed-drupal • The Drupal-Powered Enterprise White Paper: https://www.acquia.com/ resources/whitepapers/drupal-powered-enterprise Wednesday, 9 October, 13
  • 48. Thanks! Rick Vugteveen @rickvug rickvug@gmail.com rick.vugteveen@acquia.com PS - I’m hiring! Let’s talk. Wednesday, 9 October, 13