SlideShare a Scribd company logo
1 of 29
Download to read offline
Creating a Distribution
   Using Features, Drush Make, and more



           By Benjamin Shell
What is a Distribution?

• Drupal Installation profiles are pre-
  packaged website solutions for specific use
  cases.
• They include Drupal core as well as
  additional modules.
Confusing Terminology


 • Distributions are often called
   Installation Profiles (on the
   Drupal.org download page among places)
Installation Profiles vs
     Distributions
• Installation profiles are scripts that
  run once when Drupal is installed.
  Installation profiles provide an installation
  process that differs from the default install.
• Distributions are full copies of Drupal
  that include extra things aren't in the
  regular Drupal download. These extras
  typically include installation profiles and
  additional modules and themes.
History
• Support for custom Installation Profiles was
  added in Drupal 5
• Until recently downloading an Installation
  Profile from Drupal.org was just that, an
  Installation Profile
• The Drupal.org packaging script now
  automatically packages core and contrib
  modules into a Distribution
Popular Distributions




      Open Atrium
Popular Distributions




      Open Scholar
Popular Distributions




     Drupal Commons
Popular Distributions




      Managing News
Why Build a
        Distribution?

• Building multiple similar sites
• Giving back to the community
• Encouraging community involvement with
  your project
Components
Distribution

                Contrib      Custom
  Drupal                                     Installation
               Modules &    Modules &
  Core                                         Profile
                Themes       Themes



                Including Features Modules
Steps to Creating a
         Distribution
•   Build a new Drupal site to use as a template
•   Move configuration (node types, views, etc.) into code
    (Features modules)
•   Create an Installation Profile for setting up a new site
•   Create a .make file for downloading resources
•   Test and Release
Building the Site
Creating Features
    Modules
Creating an Installation
        Profile
/**
* Implement hook_install().
*
* Perform actions to set up the site for this profile.
*/
function mydistro_install() {
   include_once DRUPAL_ROOT . '/profiles/standard/standard.install';
   standard_install();

    // Do other things here. For example, let’s change the theme:
    theme_enable(array('photoblog', 'seven'));
    variable_set('theme_default', 'photoblog');
    variable_set('admin_theme', 'seven');
}
Drush and Drush Make

• Drush is a command line tool for Drupal:
  http://drupal.org/project/drush
• Drush Make is an extension to Drush:
  http://drupal.org/project/drush_make
Create a .make file

• This tells the Drupal.org packaging script
  which contrib modules and themes to
  include in your distribution
• Can be make-generate mydistro.make
  drush
         created automatically:
Make File Format
;   $Id$
;
;   Example makefile
;   ----------------
;   This is an example makefile to introduce new users of drush_make to the
;   syntax and options available to drush_make. For a full description of all
;   options available, see README.txt.

; This make file is a working makefile - try it! Any line starting with a `;`
; is a comment.

;   Core version
;   ------------
;   Each makefile should begin by declaring the core version of Drupal that all
;   projects should be compatible with.

core = 6.x

;   API version
;   ------------
;   Every makefile needs to declare it's Drush Make API version. This version of
;   drush make uses API version `2`.

api = 2




                                  Part 1 of 3
;   Core project
;   ------------
;   In order for your makefile to generate a full Drupal site, you must include
;   a core project. This is usually Drupal core, but you can also specify
;   alternative core projects like Pressflow. Note that makefiles included with
;   install profiles *should not* include a core project.

; Use pressflow instead of Drupal core:
; projects[pressflow][type] = "core"
; projects[pressflow][download][type] = "file"
; projects[pressflow][download][url] = "http://launchpad.net/pressflow/6.x/6.15.73/+download/
pressflow-6.15.73.tar.gz"

;   CVS checkout of Drupal 6.x core:
;   projects[drupal][type] = "core"
;   projects[drupal][download][type] = "cvs"
;   projects[drupal][download][root] = ":pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal"
;   projects[drupal][download][revision] = "DRUPAL-6"
;   projects[drupal][download][module] = "drupal"

;   CVS checkout of Drupal 7.x. Requires the `core` property to be set to 7.x.
;   projects[drupal][type] = "core"
;   projects[drupal][download][type] = "cvs"
;   projects[drupal][download][root] = ":pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal"
;   projects[drupal][download][revision] = "HEAD"
;   projects[drupal][download][module] = "drupal"

projects[] = drupal




                                  Part 2 of 3
; Projects
; --------
; Each project that you would like to include in the makefile should be
; declared under the `projects` key. The simplest declaration of a project
; looks like this:
projects[] = views

;   This will, by default, retrieve the latest recommended version of the project
;   using its update XML feed on Drupal.org. If any of those defaults are not
;   desirable for a project, you will want to use the keyed syntax combined with
;   some options.

; If you want to retrieve a specific version of a project:
projects[cck] = 2.6

; Or an alternative, extended syntax:
projects[ctools][version] = 1.3

; Check out the latest version of a project from CVS. Note that when using a
; repository as your project source, you must explictly declare the project
; type so that drush_make knows where to put your project.
projects[data][type] = module
projects[data][download][type] = cvs
projects[data][download][module] = contributions/modules/data
projects[data][download][revision] = DRUPAL-6--1

; Clone a project from github.
projects[tao][type] = theme
projects[tao][download][type] = git
projects[tao][download][url] = git://github.com/developmentseed/tao.git

; If you want to install a module into a sub-directory, you can use the
; `subdir` attribute.
projects[admin_menu][subdir] = custom

; To apply a patch to a project, use the `patch` attribute and pass in the URL
; of the patch.
projects[admin_menu][patch][] = "http://drupal.org/files/issues/admin_menu.long_.31.patch"


                                  Part 3 of 3
Creating a .make file
Testing
(We finally get to use the “Drush Make” command.)

• Put your .make file in a new folder
• Run: drush make mydistro.make
• After the build, put your profile module in
  the profiles directory of the new Drupal
  site
• Install Drupal, choosing your Installation
  Profile
Releasing a Distribution
    on Drupal.org
From http://drupal.org/node/642116:
•   Verify the .make file
•   Name the .make file drupal-org.make
•   Add the .make file to your Installation Profile
•   Create a Drupal project or sandbox page
•   Commit your Installation Profile directory to Git

 (These steps aren’t necessary if you don’t
  release your distribution on Drupal.org)
Verifying the Make File

• This tests to ensure the .make file is in the
  correct format for Drupal.org
• Run:
  drush verify-makefile profiles/mydistro/drupal-org.make
Setup a Drupal.org
   Project or Sandbox
• Anyone can create a sandbox project
• Sandbox projects can be promoted to full
  projects
• Choose “Installation Profile” as the type of
  project
Get Ready for Release
• Custom module and themes (not released
  elsewhere) can be added to the installation
  profile in subdirectory: /profiles/mydistro/
  modules/myspecialmodule
• Run git   init in your installation profile
  folder, then follow instructions on your
  project/sandbox page to commit your code
  and push it to Drupal.org
Push your code to
       Drupal.org
• The Drupal.org packaging system uses
  your .make file to download core and the
  contrib module/themes specified
• Your installation profile is moved to a
  subdirectory of the build (/profiles/mydistro)
• Contrib modules/themes are put in
  /profiles/mydistro/modules and /profiles/
  mydistro/themes
For More Information
• General information about Distributions
  and Installation Profiles: http://drupal.org/
  node/1089736
• Drupal Groups for Distributions: http://
  drupal.org/node/1089736
• Releasing a Distribution on Drupal.org:
  http://drupal.org/node/642116
Any Questions?

More Related Content

What's hot

Drupal 8 - A Brief Introduction
Drupal 8 - A Brief IntroductionDrupal 8 - A Brief Introduction
Drupal 8 - A Brief IntroductionJeff Geerling
 
Site Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp OttawaSite Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp OttawaSuzanne Dergacheva
 
Drupal - Blocks vs Context vs Panels
Drupal - Blocks vs Context vs PanelsDrupal - Blocks vs Context vs Panels
Drupal - Blocks vs Context vs PanelsDavid Burns
 
Top 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal projectTop 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal projectIztok Smolic
 
Introduction to Drupal Basics
Introduction to Drupal BasicsIntroduction to Drupal Basics
Introduction to Drupal BasicsJuha Niemi
 
Introduction to the Drupal - Web Experience Toolkit
Introduction to the Drupal - Web Experience ToolkitIntroduction to the Drupal - Web Experience Toolkit
Introduction to the Drupal - Web Experience ToolkitSuzanne Dergacheva
 
Using Foundation with Drupal
Using Foundation with DrupalUsing Foundation with Drupal
Using Foundation with DrupalExove
 
The Foundations of Being Sassy in Drupal
The Foundations of Being Sassy in DrupalThe Foundations of Being Sassy in Drupal
The Foundations of Being Sassy in DrupalEllie Roepken
 
Anatomy and Architecture of a WordPress Theme
Anatomy and Architecture of a WordPress ThemeAnatomy and Architecture of a WordPress Theme
Anatomy and Architecture of a WordPress ThemeJulie Kuehl
 
Upgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and GotchasUpgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and GotchasSuzanne Dergacheva
 
Best Practice Checklist for Building a Drupal Website
Best Practice Checklist for Building a Drupal WebsiteBest Practice Checklist for Building a Drupal Website
Best Practice Checklist for Building a Drupal WebsiteAcquia
 
WordPress as a CMS - Case Study of an Organizational Intranet
WordPress as a CMS - Case Study of an Organizational IntranetWordPress as a CMS - Case Study of an Organizational Intranet
WordPress as a CMS - Case Study of an Organizational IntranetTech Liminal
 
WordPress and The Command Line
WordPress and The Command LineWordPress and The Command Line
WordPress and The Command LineKelly Dwan
 
Wordpress theme development
Wordpress theme developmentWordpress theme development
Wordpress theme developmentNaeem Junejo
 
Simplifying End-user Drupal 7 Content Administration
Simplifying End-user Drupal 7 Content Administration Simplifying End-user Drupal 7 Content Administration
Simplifying End-user Drupal 7 Content Administration Aidan Foster
 
Intro to CakePHP 1.3
Intro to CakePHP 1.3Intro to CakePHP 1.3
Intro to CakePHP 1.3Adam Culp
 
Drupal Now! - Introduction to Drupal
Drupal Now! - Introduction to DrupalDrupal Now! - Introduction to Drupal
Drupal Now! - Introduction to DrupalAlozie Nwosu
 

What's hot (20)

Drupal 8 - A Brief Introduction
Drupal 8 - A Brief IntroductionDrupal 8 - A Brief Introduction
Drupal 8 - A Brief Introduction
 
Site Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp OttawaSite Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp Ottawa
 
Drupal - Blocks vs Context vs Panels
Drupal - Blocks vs Context vs PanelsDrupal - Blocks vs Context vs Panels
Drupal - Blocks vs Context vs Panels
 
Top 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal projectTop 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal project
 
A Custom Drupal Theme in 40 Minutes
A Custom Drupal Theme in 40 MinutesA Custom Drupal Theme in 40 Minutes
A Custom Drupal Theme in 40 Minutes
 
Introduction to Drupal Basics
Introduction to Drupal BasicsIntroduction to Drupal Basics
Introduction to Drupal Basics
 
Introduction to the Drupal - Web Experience Toolkit
Introduction to the Drupal - Web Experience ToolkitIntroduction to the Drupal - Web Experience Toolkit
Introduction to the Drupal - Web Experience Toolkit
 
Using Foundation with Drupal
Using Foundation with DrupalUsing Foundation with Drupal
Using Foundation with Drupal
 
The Foundations of Being Sassy in Drupal
The Foundations of Being Sassy in DrupalThe Foundations of Being Sassy in Drupal
The Foundations of Being Sassy in Drupal
 
Anatomy and Architecture of a WordPress Theme
Anatomy and Architecture of a WordPress ThemeAnatomy and Architecture of a WordPress Theme
Anatomy and Architecture of a WordPress Theme
 
Upgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and GotchasUpgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and Gotchas
 
Best Practice Checklist for Building a Drupal Website
Best Practice Checklist for Building a Drupal WebsiteBest Practice Checklist for Building a Drupal Website
Best Practice Checklist for Building a Drupal Website
 
WordPress as a CMS - Case Study of an Organizational Intranet
WordPress as a CMS - Case Study of an Organizational IntranetWordPress as a CMS - Case Study of an Organizational Intranet
WordPress as a CMS - Case Study of an Organizational Intranet
 
WordPress and The Command Line
WordPress and The Command LineWordPress and The Command Line
WordPress and The Command Line
 
Drupal
DrupalDrupal
Drupal
 
Wordpress theme development
Wordpress theme developmentWordpress theme development
Wordpress theme development
 
Introduction to Wordpress
Introduction to WordpressIntroduction to Wordpress
Introduction to Wordpress
 
Simplifying End-user Drupal 7 Content Administration
Simplifying End-user Drupal 7 Content Administration Simplifying End-user Drupal 7 Content Administration
Simplifying End-user Drupal 7 Content Administration
 
Intro to CakePHP 1.3
Intro to CakePHP 1.3Intro to CakePHP 1.3
Intro to CakePHP 1.3
 
Drupal Now! - Introduction to Drupal
Drupal Now! - Introduction to DrupalDrupal Now! - Introduction to Drupal
Drupal Now! - Introduction to Drupal
 

Similar to Building a Drupal Distribution using Features, Drush Make, Installation Profiles, and more

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 FeaturesNuvole
 
Build drupal project based on drush make
Build drupal project based on drush makeBuild drupal project based on drush make
Build drupal project based on drush make永对 陈
 
Get Up and Running Quickly with Drupal Distributions
Get Up and Running Quickly with Drupal DistributionsGet Up and Running Quickly with Drupal Distributions
Get Up and Running Quickly with Drupal DistributionsMelissa Piper
 
Using Grunt with Drupal
Using Grunt with DrupalUsing Grunt with Drupal
Using Grunt with Drupalarithmetric
 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Drupalcon Paris
 
Drupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 versionDrupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 versionDavid Lanier
 
Improving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLAImproving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLAJesus Manuel Olivas
 
Drupal distributions and installation profiles
Drupal distributions and installation profilesDrupal distributions and installation profiles
Drupal distributions and installation profilesAndrei Jechiu
 
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and BeyondDrupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and BeyondDrupalDay
 
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
 
Drupal distributions - how to build them
Drupal distributions - how to build themDrupal distributions - how to build them
Drupal distributions - how to build themDick Olsson
 
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
 
13th Sep - Drupal Global Training Day by TCS - Drupal core advanced overview
13th Sep - Drupal Global Training Day by TCS - Drupal core advanced overview13th Sep - Drupal Global Training Day by TCS - Drupal core advanced overview
13th Sep - Drupal Global Training Day by TCS - Drupal core advanced overviewDrupalMumbai
 
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
 
Composer Tools & Frameworks for Drupal
Composer Tools & Frameworks for DrupalComposer Tools & Frameworks for Drupal
Composer Tools & Frameworks for DrupalPantheon
 
Drupal Overview For Techies
Drupal Overview For TechiesDrupal Overview For Techies
Drupal Overview For TechiesRobert Carr
 
Introduction to Drupal - Installation, Anatomy, Terminologies
Introduction to Drupal - Installation, Anatomy, TerminologiesIntroduction to Drupal - Installation, Anatomy, Terminologies
Introduction to Drupal - Installation, Anatomy, TerminologiesGerald Villorente
 
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Paul McKibben
 
Face your fears: Drush and Aegir
Face your fears: Drush and AegirFace your fears: Drush and Aegir
Face your fears: Drush and AegirIztok Smolic
 
Drupal: Reusing functionality
Drupal: Reusing functionalityDrupal: Reusing functionality
Drupal: Reusing functionalityRaymond Muilwijk
 

Similar to Building a Drupal Distribution using Features, Drush Make, Installation Profiles, and more (20)

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
 
Build drupal project based on drush make
Build drupal project based on drush makeBuild drupal project based on drush make
Build drupal project based on drush make
 
Get Up and Running Quickly with Drupal Distributions
Get Up and Running Quickly with Drupal DistributionsGet Up and Running Quickly with Drupal Distributions
Get Up and Running Quickly with Drupal Distributions
 
Using Grunt with Drupal
Using Grunt with DrupalUsing Grunt with Drupal
Using Grunt with Drupal
 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3
 
Drupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 versionDrupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 version
 
Improving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLAImproving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLA
 
Drupal distributions and installation profiles
Drupal distributions and installation profilesDrupal distributions and installation profiles
Drupal distributions and installation profiles
 
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and BeyondDrupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
 
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
 
Drupal distributions - how to build them
Drupal distributions - how to build themDrupal distributions - how to build them
Drupal distributions - how to build them
 
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...
 
13th Sep - Drupal Global Training Day by TCS - Drupal core advanced overview
13th Sep - Drupal Global Training Day by TCS - Drupal core advanced overview13th Sep - Drupal Global Training Day by TCS - Drupal core advanced overview
13th Sep - Drupal Global Training Day by TCS - Drupal core advanced overview
 
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
 
Composer Tools & Frameworks for Drupal
Composer Tools & Frameworks for DrupalComposer Tools & Frameworks for Drupal
Composer Tools & Frameworks for Drupal
 
Drupal Overview For Techies
Drupal Overview For TechiesDrupal Overview For Techies
Drupal Overview For Techies
 
Introduction to Drupal - Installation, Anatomy, Terminologies
Introduction to Drupal - Installation, Anatomy, TerminologiesIntroduction to Drupal - Installation, Anatomy, Terminologies
Introduction to Drupal - Installation, Anatomy, Terminologies
 
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
 
Face your fears: Drush and Aegir
Face your fears: Drush and AegirFace your fears: Drush and Aegir
Face your fears: Drush and Aegir
 
Drupal: Reusing functionality
Drupal: Reusing functionalityDrupal: Reusing functionality
Drupal: Reusing functionality
 

Recently uploaded

UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
QMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdfQMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdfROWELL MARQUINA
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialJoão Esperancinha
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfAarwolf Industries LLC
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 

Recently uploaded (20)

How Tech Giants Cut Corners to Harvest Data for A.I.
How Tech Giants Cut Corners to Harvest Data for A.I.How Tech Giants Cut Corners to Harvest Data for A.I.
How Tech Giants Cut Corners to Harvest Data for A.I.
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
QMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdfQMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdf
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorial
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdf
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 

Building a Drupal Distribution using Features, Drush Make, Installation Profiles, and more

  • 1. Creating a Distribution Using Features, Drush Make, and more By Benjamin Shell
  • 2. What is a Distribution? • Drupal Installation profiles are pre- packaged website solutions for specific use cases. • They include Drupal core as well as additional modules.
  • 3. Confusing Terminology • Distributions are often called Installation Profiles (on the Drupal.org download page among places)
  • 4. Installation Profiles vs Distributions • Installation profiles are scripts that run once when Drupal is installed. Installation profiles provide an installation process that differs from the default install. • Distributions are full copies of Drupal that include extra things aren't in the regular Drupal download. These extras typically include installation profiles and additional modules and themes.
  • 5. History • Support for custom Installation Profiles was added in Drupal 5 • Until recently downloading an Installation Profile from Drupal.org was just that, an Installation Profile • The Drupal.org packaging script now automatically packages core and contrib modules into a Distribution
  • 6. Popular Distributions Open Atrium
  • 7. Popular Distributions Open Scholar
  • 8. Popular Distributions Drupal Commons
  • 9. Popular Distributions Managing News
  • 10. Why Build a Distribution? • Building multiple similar sites • Giving back to the community • Encouraging community involvement with your project
  • 11. Components Distribution Contrib Custom Drupal Installation Modules & Modules & Core Profile Themes Themes Including Features Modules
  • 12. Steps to Creating a Distribution • Build a new Drupal site to use as a template • Move configuration (node types, views, etc.) into code (Features modules) • Create an Installation Profile for setting up a new site • Create a .make file for downloading resources • Test and Release
  • 14. Creating Features Modules
  • 15. Creating an Installation Profile /** * Implement hook_install(). * * Perform actions to set up the site for this profile. */ function mydistro_install() { include_once DRUPAL_ROOT . '/profiles/standard/standard.install'; standard_install(); // Do other things here. For example, let’s change the theme: theme_enable(array('photoblog', 'seven')); variable_set('theme_default', 'photoblog'); variable_set('admin_theme', 'seven'); }
  • 16. Drush and Drush Make • Drush is a command line tool for Drupal: http://drupal.org/project/drush • Drush Make is an extension to Drush: http://drupal.org/project/drush_make
  • 17. Create a .make file • This tells the Drupal.org packaging script which contrib modules and themes to include in your distribution • Can be make-generate mydistro.make drush created automatically:
  • 18. Make File Format ; $Id$ ; ; Example makefile ; ---------------- ; This is an example makefile to introduce new users of drush_make to the ; syntax and options available to drush_make. For a full description of all ; options available, see README.txt. ; This make file is a working makefile - try it! Any line starting with a `;` ; is a comment. ; Core version ; ------------ ; Each makefile should begin by declaring the core version of Drupal that all ; projects should be compatible with. core = 6.x ; API version ; ------------ ; Every makefile needs to declare it's Drush Make API version. This version of ; drush make uses API version `2`. api = 2 Part 1 of 3
  • 19. ; Core project ; ------------ ; In order for your makefile to generate a full Drupal site, you must include ; a core project. This is usually Drupal core, but you can also specify ; alternative core projects like Pressflow. Note that makefiles included with ; install profiles *should not* include a core project. ; Use pressflow instead of Drupal core: ; projects[pressflow][type] = "core" ; projects[pressflow][download][type] = "file" ; projects[pressflow][download][url] = "http://launchpad.net/pressflow/6.x/6.15.73/+download/ pressflow-6.15.73.tar.gz" ; CVS checkout of Drupal 6.x core: ; projects[drupal][type] = "core" ; projects[drupal][download][type] = "cvs" ; projects[drupal][download][root] = ":pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal" ; projects[drupal][download][revision] = "DRUPAL-6" ; projects[drupal][download][module] = "drupal" ; CVS checkout of Drupal 7.x. Requires the `core` property to be set to 7.x. ; projects[drupal][type] = "core" ; projects[drupal][download][type] = "cvs" ; projects[drupal][download][root] = ":pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal" ; projects[drupal][download][revision] = "HEAD" ; projects[drupal][download][module] = "drupal" projects[] = drupal Part 2 of 3
  • 20. ; Projects ; -------- ; Each project that you would like to include in the makefile should be ; declared under the `projects` key. The simplest declaration of a project ; looks like this: projects[] = views ; This will, by default, retrieve the latest recommended version of the project ; using its update XML feed on Drupal.org. If any of those defaults are not ; desirable for a project, you will want to use the keyed syntax combined with ; some options. ; If you want to retrieve a specific version of a project: projects[cck] = 2.6 ; Or an alternative, extended syntax: projects[ctools][version] = 1.3 ; Check out the latest version of a project from CVS. Note that when using a ; repository as your project source, you must explictly declare the project ; type so that drush_make knows where to put your project. projects[data][type] = module projects[data][download][type] = cvs projects[data][download][module] = contributions/modules/data projects[data][download][revision] = DRUPAL-6--1 ; Clone a project from github. projects[tao][type] = theme projects[tao][download][type] = git projects[tao][download][url] = git://github.com/developmentseed/tao.git ; If you want to install a module into a sub-directory, you can use the ; `subdir` attribute. projects[admin_menu][subdir] = custom ; To apply a patch to a project, use the `patch` attribute and pass in the URL ; of the patch. projects[admin_menu][patch][] = "http://drupal.org/files/issues/admin_menu.long_.31.patch" Part 3 of 3
  • 22. Testing (We finally get to use the “Drush Make” command.) • Put your .make file in a new folder • Run: drush make mydistro.make • After the build, put your profile module in the profiles directory of the new Drupal site • Install Drupal, choosing your Installation Profile
  • 23. Releasing a Distribution on Drupal.org From http://drupal.org/node/642116: • Verify the .make file • Name the .make file drupal-org.make • Add the .make file to your Installation Profile • Create a Drupal project or sandbox page • Commit your Installation Profile directory to Git (These steps aren’t necessary if you don’t release your distribution on Drupal.org)
  • 24. Verifying the Make File • This tests to ensure the .make file is in the correct format for Drupal.org • Run: drush verify-makefile profiles/mydistro/drupal-org.make
  • 25. Setup a Drupal.org Project or Sandbox • Anyone can create a sandbox project • Sandbox projects can be promoted to full projects • Choose “Installation Profile” as the type of project
  • 26. Get Ready for Release • Custom module and themes (not released elsewhere) can be added to the installation profile in subdirectory: /profiles/mydistro/ modules/myspecialmodule • Run git init in your installation profile folder, then follow instructions on your project/sandbox page to commit your code and push it to Drupal.org
  • 27. Push your code to Drupal.org • The Drupal.org packaging system uses your .make file to download core and the contrib module/themes specified • Your installation profile is moved to a subdirectory of the build (/profiles/mydistro) • Contrib modules/themes are put in /profiles/mydistro/modules and /profiles/ mydistro/themes
  • 28. For More Information • General information about Distributions and Installation Profiles: http://drupal.org/ node/1089736 • Drupal Groups for Distributions: http:// drupal.org/node/1089736 • Releasing a Distribution on Drupal.org: http://drupal.org/node/642116

Editor's Notes

  1. \n \n
  2. \n \n
  3. \n \n
  4. \n \n
  5. \n \n
  6. \n \n
  7. \n \n
  8. \n \n
  9. \n \n
  10. \n \n
  11. \n \n
  12. \n \n
  13. \n \n
  14. \n \n
  15. \n \n
  16. \n \n
  17. \n \n
  18. \n \n
  19. \n \n
  20. \n \n
  21. \n \n
  22. \n \n
  23. \n \n
  24. \n \n
  25. \n \n
  26. \n \n
  27. \n \n
  28. \n \n
  29. \n \n