SlideShare a Scribd company logo
1 of 27
Features + Installation Profiles
          February 24, 2012
David Watson
Rensselaer Polytechnic Institute
  Web Developer
   Experimental Media and
   Performing Arts Center (EMPAC)
  Adjunct Professor
   Web Systems Development
Drupal Consultant
  ~3 years in the community
  Specialized Generalist
Best Practices
Revision Control
Dev/Test/Prod workflow
One-click Deployment
Revision Control
Easier collaboration with conflict handling
Change history
Ability to revert
Easier to merge in new code
Best Practice: Use it.
Reality: This is hard to do for sites!
Dev/Test/Prod
Workstations check out code from Dev server
Patches are reviewed, committed to Dev
  Possibly running Jenkins/Hudson
Release candidates are pushed to Test/Staging
 environment
Final release pushed to Production along with
  any staged content
Dev/Test/Prod
Best Practice: Use a workflow like this to ensure
 that only production-quality code is running on
 production servers.
Reality: This is hard to do for sites!
One-click Deployment
End-users shouldn't have to configure their sites,
 that's what we're here for!
Best practice: Let the installer do all of the
 heavy lifting, providing sane defaults site-wide
Reality: ...You get the idea.
Drupal Database
Data
  Nodes
  Fields
  ...
Configuration
  Content Types
  Field Info
  Rules
  Views Settings
  Variables
Drupal Deployment Challenges
How do we deploy our Drupal instances from one
 box to another?
  Moving the database?
  Manually duplicating configuration changes?
Drupal Deployment Challenges
How to we use revision control with Drupal?
  Works great with modules, but what about our
   configuration?
  Add SQL dumps to the repository?
Drupal Deployment Challenges
How do we achieve one-click deployment?
  Modules are handled through dependencies...
  What about our configuration?
  Write some sort of custom installation script?
THE Drupal Deployment Challenge
All of these problems can be reduced to one:
  configuration that lives in the database instead
  of the code
How do we move as much configuration into
 code as possible, and load it when the site is
 first installed?
The Answer
Installation Profiles provide a means of one-
  click (or even fully automated!) deployment for
  modules and themes
Features provide a means of exporting
 configuration to code as feature modules, used
 to satisfy a specific use case
Installation Profiles
Core functionality
Allows users to perform one-time setup tasks
  during installation, based on presets
  Install and enable modules/themes
  Run custom code
Can be used to package modules and themes
Possible to select through the UI and through
 drush site-install!
Anatomy of an Install Profile
Exist in profiles/PROFILENAME
Within each...
  PROFILENAME.info – metadata/dependencies
  PROFILENAME.install – installation-specific hooks
  PROFILENAME.profile – other hooks
  modules/ - modules packaged with this profile
  themes/ - themes packaged in the profile
  libraries/ - Libraries API looks here for libs
Features
Contrib module that allows for exporting existing
 configuration as modules
First, some terminology...
Features Terminology
Features refers to the Features module
Features packages components together - bits
 of configuration for individual modules, like
 individual views
These components are taken from modules that
 integrate with Features, usually by providing
 CTools exportables
The feature modules that Features creates
 contain the components that you select
Why Features?
Feature modules can be committed to version
 control
Code is more portable than database between
 Dev/Test/Prod
Overrides to feature modules can be reverted to
 their default state
Hooks can be added to the module later
 (remember, feature modules are just modules!)
Commonly Used
Boxes – What custom blocks should've been
Views – All views are exportable!
Rules – Also exportable. Very handy when
 working w/ Drupal Commerce!
Strongarm – Makes the variables table
 exportable
UUID – Paired with other modules to provide
 unique identifiers for content that won't change
 depending on the order they're installed
Special Cases
Not everything is exportable
  Make it exportable, and contribute a patch!
  Last resort: hook_(un)install()
Content-based Configuration?
  Boxes module for blocks
  Defaultcontent for nodes
  Drupal Commerce7 in progress...
Putting it all together
Features provides the means of separating
 configuration from content
Install Profiles allow for packaging of modules
  (contrib/devel/features/custom) and themes,
  while offering one-click deployment
Features Workflow
Perform configuration in the UI
Export config as a feature and move to
 profiles/PROFILENAME/modules/features/
Implement any necessary hooks in the
  feature's .module file
Make sure the install profile depends on the new
 feature
Reinstall the site and test
Site Development Workflow
Create an install profile
Download/write contrib/custom modules
  Required libraries should go in the profile's libraries/
   directory
Create core feature for site-wide settings, add to
 profile's .info
Repeat feature creation for all other functionality
  Remember, features are modules too; you can
   depend on other features!
Site Theming Workflow
Create an install profile
Download/create (sub)themes in
 profiles/PROFILENAME/themes
In .install file...
   theme_enable(THEMENAME);
   variable_set('theme_default', THEMENAME);
*hack hack hack*
Example
Aqueduct Install Profile
Heavily commented
Uses Features to export configuration settings
Play, experiment, use as a base, send
  suggestions/patches for improvement, enjoy!
Questions?
Get in Touch!
d.o – davidwatson
e – dmw@davidwatson.name
t - @caughtexception
in – linkedin.com/in/davidmwatson

More Related Content

What's hot

Vsx5 getting started_guide_en
Vsx5 getting started_guide_enVsx5 getting started_guide_en
Vsx5 getting started_guide_en
Geraldo Camargo
 
Securely connecting to apps over the internet using rds
Securely connecting to apps over the internet using rdsSecurely connecting to apps over the internet using rds
Securely connecting to apps over the internet using rds
Concentrated Technology
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
vstorm83
 
websphere commerce server admin configuration
websphere commerce server admin configuration websphere commerce server admin configuration
websphere commerce server admin configuration
Laxmi Kanth Kshatriya
 
Lab 6) package and deploy a j2 ee application
Lab 6) package and deploy a j2 ee applicationLab 6) package and deploy a j2 ee application
Lab 6) package and deploy a j2 ee application
techbed
 
SharePoint 2010 Training Session 3
SharePoint 2010 Training Session 3SharePoint 2010 Training Session 3
SharePoint 2010 Training Session 3
Usman Zafar Malik
 

What's hot (17)

Vsx5 getting started_guide_en
Vsx5 getting started_guide_enVsx5 getting started_guide_en
Vsx5 getting started_guide_en
 
Securely connecting to apps over the internet using rds
Securely connecting to apps over the internet using rdsSecurely connecting to apps over the internet using rds
Securely connecting to apps over the internet using rds
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
Improve Your IBM Domino Designer Experience
Improve Your IBM Domino Designer ExperienceImprove Your IBM Domino Designer Experience
Improve Your IBM Domino Designer Experience
 
Sonar qube
Sonar qubeSonar qube
Sonar qube
 
Eclipse tools for deployment to was liberty profile in Bluemix
Eclipse tools for deployment to was liberty profile in BluemixEclipse tools for deployment to was liberty profile in Bluemix
Eclipse tools for deployment to was liberty profile in Bluemix
 
Core java environment setup and details
Core java environment setup and detailsCore java environment setup and details
Core java environment setup and details
 
websphere commerce server admin configuration
websphere commerce server admin configuration websphere commerce server admin configuration
websphere commerce server admin configuration
 
Lab 6) package and deploy a j2 ee application
Lab 6) package and deploy a j2 ee applicationLab 6) package and deploy a j2 ee application
Lab 6) package and deploy a j2 ee application
 
Connect 2014 AD209 - Making Your Development Team More Productive With IBM Do...
Connect 2014 AD209 - Making Your Development Team More Productive With IBM Do...Connect 2014 AD209 - Making Your Development Team More Productive With IBM Do...
Connect 2014 AD209 - Making Your Development Team More Productive With IBM Do...
 
Workflow for XPages
Workflow for XPagesWorkflow for XPages
Workflow for XPages
 
SharePoint 2010 Training Session 3
SharePoint 2010 Training Session 3SharePoint 2010 Training Session 3
SharePoint 2010 Training Session 3
 
VAST 7.5 and Beyond
VAST 7.5 and BeyondVAST 7.5 and Beyond
VAST 7.5 and Beyond
 
WebSphere Liberty and IBM Containers: The Perfect Combination for Java Micros...
WebSphere Liberty and IBM Containers: The Perfect Combination for Java Micros...WebSphere Liberty and IBM Containers: The Perfect Combination for Java Micros...
WebSphere Liberty and IBM Containers: The Perfect Combination for Java Micros...
 
XPages: No Experience Needed
XPages: No Experience NeededXPages: No Experience Needed
XPages: No Experience Needed
 
How to Containerize WebSphere Application Server Traditional, and Why You Mig...
How to Containerize WebSphere Application Server Traditional, and Why You Mig...How to Containerize WebSphere Application Server Traditional, and Why You Mig...
How to Containerize WebSphere Application Server Traditional, and Why You Mig...
 
Connect 2014 SHOW102: XPages Still No Experience Necessary
Connect 2014 SHOW102: XPages Still No Experience NecessaryConnect 2014 SHOW102: XPages Still No Experience Necessary
Connect 2014 SHOW102: XPages Still No Experience Necessary
 

Viewers also liked (6)

SoCal Newsletter September 2012
SoCal Newsletter September 2012 SoCal Newsletter September 2012
SoCal Newsletter September 2012
 
VNP Resume
VNP ResumeVNP Resume
VNP Resume
 
CFU Business Plan
CFU Business PlanCFU Business Plan
CFU Business Plan
 
Undine: Turnkey Drupal Development Environments
Undine: Turnkey Drupal Development EnvironmentsUndine: Turnkey Drupal Development Environments
Undine: Turnkey Drupal Development Environments
 
Intro to Drush
Intro to DrushIntro to Drush
Intro to Drush
 
April 2012 SoCal Newsletter
April 2012 SoCal NewsletterApril 2012 SoCal Newsletter
April 2012 SoCal Newsletter
 

Similar to Features & Installation Profiles

Intro to Features Module on Drupal
Intro to Features Module on DrupalIntro to Features Module on Drupal
Intro to Features Module on Drupal
Aidan Foster
 
PHP North-East - Automated Deployment
PHP North-East - Automated DeploymentPHP North-East - Automated Deployment
PHP North-East - Automated Deployment
Michael Peacock
 

Similar to Features & Installation Profiles (20)

Intro to Features Module on Drupal
Intro to Features Module on DrupalIntro to Features Module on Drupal
Intro to Features Module on Drupal
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
 
Features everywhere
Features everywhere Features everywhere
Features everywhere
 
DDAY2014 - Features per Drupal 8
DDAY2014 - Features per Drupal 8DDAY2014 - Features per Drupal 8
DDAY2014 - Features per Drupal 8
 
Building and Maintaining a Distribution in Drupal 7 with Features
Building and Maintaining a  Distribution in Drupal 7 with FeaturesBuilding and Maintaining a  Distribution in Drupal 7 with Features
Building and Maintaining a Distribution in Drupal 7 with Features
 
Features and Context Overview
Features and Context OverviewFeatures and Context Overview
Features and Context Overview
 
Understanding and extending p2 for fun and profit
Understanding and extending p2 for fun and profitUnderstanding and extending p2 for fun and profit
Understanding and extending p2 for fun and profit
 
Drupal Workflow Concepts
Drupal Workflow ConceptsDrupal Workflow Concepts
Drupal Workflow Concepts
 
Migraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sitesMigraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sites
 
Beginner's guide to drupal
Beginner's guide to drupalBeginner's guide to drupal
Beginner's guide to drupal
 
Drupal distributions - how to build them
Drupal distributions - how to build themDrupal distributions - how to build them
Drupal distributions - how to build them
 
Drupal
DrupalDrupal
Drupal
 
Building and Deployment of Drupal sites with Features and Context
Building and Deployment of Drupal sites with Features and ContextBuilding and Deployment of Drupal sites with Features and Context
Building and Deployment of Drupal sites with Features and Context
 
Best practices for share point solution deployment
Best practices for share point solution deploymentBest practices for share point solution deployment
Best practices for share point solution deployment
 
PHP North-East - Automated Deployment
PHP North-East - Automated DeploymentPHP North-East - Automated Deployment
PHP North-East - Automated Deployment
 
Automated Deployment
Automated DeploymentAutomated Deployment
Automated Deployment
 
IBM Drupal Users Group Discussion on Managing and Deploying Configuration
IBM Drupal Users Group Discussion on Managing and Deploying ConfigurationIBM Drupal Users Group Discussion on Managing and Deploying Configuration
IBM Drupal Users Group Discussion on Managing and Deploying Configuration
 
Extend Eclipse p2 framework capabilities: Add your custom installation steps
Extend Eclipse p2 framework capabilities: Add your custom installation stepsExtend Eclipse p2 framework capabilities: Add your custom installation steps
Extend Eclipse p2 framework capabilities: Add your custom installation steps
 
CloudStack templates with OpenVM
CloudStack templates with OpenVMCloudStack templates with OpenVM
CloudStack templates with OpenVM
 
Puppet | Custom Modules & Using the Forge
Puppet | Custom Modules & Using the ForgePuppet | Custom Modules & Using the Forge
Puppet | Custom Modules & Using the Forge
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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 Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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
 

Features & Installation Profiles

  • 1. Features + Installation Profiles February 24, 2012
  • 2. David Watson Rensselaer Polytechnic Institute Web Developer Experimental Media and Performing Arts Center (EMPAC) Adjunct Professor Web Systems Development Drupal Consultant ~3 years in the community Specialized Generalist
  • 3. Best Practices Revision Control Dev/Test/Prod workflow One-click Deployment
  • 4. Revision Control Easier collaboration with conflict handling Change history Ability to revert Easier to merge in new code Best Practice: Use it. Reality: This is hard to do for sites!
  • 5. Dev/Test/Prod Workstations check out code from Dev server Patches are reviewed, committed to Dev Possibly running Jenkins/Hudson Release candidates are pushed to Test/Staging environment Final release pushed to Production along with any staged content
  • 6. Dev/Test/Prod Best Practice: Use a workflow like this to ensure that only production-quality code is running on production servers. Reality: This is hard to do for sites!
  • 7. One-click Deployment End-users shouldn't have to configure their sites, that's what we're here for! Best practice: Let the installer do all of the heavy lifting, providing sane defaults site-wide Reality: ...You get the idea.
  • 8. Drupal Database Data Nodes Fields ... Configuration Content Types Field Info Rules Views Settings Variables
  • 9. Drupal Deployment Challenges How do we deploy our Drupal instances from one box to another? Moving the database? Manually duplicating configuration changes?
  • 10. Drupal Deployment Challenges How to we use revision control with Drupal? Works great with modules, but what about our configuration? Add SQL dumps to the repository?
  • 11. Drupal Deployment Challenges How do we achieve one-click deployment? Modules are handled through dependencies... What about our configuration? Write some sort of custom installation script?
  • 12. THE Drupal Deployment Challenge All of these problems can be reduced to one: configuration that lives in the database instead of the code How do we move as much configuration into code as possible, and load it when the site is first installed?
  • 13. The Answer Installation Profiles provide a means of one- click (or even fully automated!) deployment for modules and themes Features provide a means of exporting configuration to code as feature modules, used to satisfy a specific use case
  • 14. Installation Profiles Core functionality Allows users to perform one-time setup tasks during installation, based on presets Install and enable modules/themes Run custom code Can be used to package modules and themes Possible to select through the UI and through drush site-install!
  • 15. Anatomy of an Install Profile Exist in profiles/PROFILENAME Within each... PROFILENAME.info – metadata/dependencies PROFILENAME.install – installation-specific hooks PROFILENAME.profile – other hooks modules/ - modules packaged with this profile themes/ - themes packaged in the profile libraries/ - Libraries API looks here for libs
  • 16. Features Contrib module that allows for exporting existing configuration as modules First, some terminology...
  • 17. Features Terminology Features refers to the Features module Features packages components together - bits of configuration for individual modules, like individual views These components are taken from modules that integrate with Features, usually by providing CTools exportables The feature modules that Features creates contain the components that you select
  • 18. Why Features? Feature modules can be committed to version control Code is more portable than database between Dev/Test/Prod Overrides to feature modules can be reverted to their default state Hooks can be added to the module later (remember, feature modules are just modules!)
  • 19. Commonly Used Boxes – What custom blocks should've been Views – All views are exportable! Rules – Also exportable. Very handy when working w/ Drupal Commerce! Strongarm – Makes the variables table exportable UUID – Paired with other modules to provide unique identifiers for content that won't change depending on the order they're installed
  • 20. Special Cases Not everything is exportable Make it exportable, and contribute a patch! Last resort: hook_(un)install() Content-based Configuration? Boxes module for blocks Defaultcontent for nodes Drupal Commerce7 in progress...
  • 21. Putting it all together Features provides the means of separating configuration from content Install Profiles allow for packaging of modules (contrib/devel/features/custom) and themes, while offering one-click deployment
  • 22. Features Workflow Perform configuration in the UI Export config as a feature and move to profiles/PROFILENAME/modules/features/ Implement any necessary hooks in the feature's .module file Make sure the install profile depends on the new feature Reinstall the site and test
  • 23. Site Development Workflow Create an install profile Download/write contrib/custom modules Required libraries should go in the profile's libraries/ directory Create core feature for site-wide settings, add to profile's .info Repeat feature creation for all other functionality Remember, features are modules too; you can depend on other features!
  • 24. Site Theming Workflow Create an install profile Download/create (sub)themes in profiles/PROFILENAME/themes In .install file... theme_enable(THEMENAME); variable_set('theme_default', THEMENAME); *hack hack hack*
  • 25. Example Aqueduct Install Profile Heavily commented Uses Features to export configuration settings Play, experiment, use as a base, send suggestions/patches for improvement, enjoy!
  • 27. Get in Touch! d.o – davidwatson e – dmw@davidwatson.name t - @caughtexception in – linkedin.com/in/davidmwatson