SlideShare a Scribd company logo
1 of 16
AUTOMATIC DRUPAL DEPLOYMENT
WITH DRUSH MAKE
September 2015
KEY CONSULTING
• Drush make provides the possibility of automatic Drupal
project generation
• A functional site with specific versions and custom
modules could be generated only configuring a script
• This gives us high efficiency when we want to start a
new project, environment or restore an existing one
• Internet connection
• Drush: installed and configured
• A main script file created by us
• A folder with all necessary .make files,
custom modules and themes, patches
and other files
• DrushCmd.script
• main_script.sh
– Our main script to run all the process
• /project_name/custom_modules/*.tar.gz
– All compressed custom modules we want to add to the project
• /project_name/custom_themes/*.tar.gz
– All compressed custom themes we want to add to the project
• /project_name/files/*
– Files we want to add manually to the project (libraries, translation files …)
• /project_name/patches/*.patch
– All patches we want to apply during the process
• /project_name/DrushCmd.script
– Script provided to ease Drupal make deployment
• /project_name/*.make
– All make files to be executed that will be described further
• Main script will need to follow all the necessary steps:
– Prepare drush make with DrushCmd.script
– Call drush make installation command
– Copy or overwrite missing files
– Patch files
– Purge useless files and folders
– Do any needed action to have our site working
• Example: we could decide to generate a database
for the site
# Clean target folder
project/DrushCmd.script --alias-path=project --cible=@project.integration --rm-all
# Add make files to the project
project/DrushCmd.script --alias-path=project --cible=@project.integration --make-trans=project/project.integration.make
project/DrushCmd.script --alias-path=project --cible=@project.integration --make-
trans=project/project.core_contrib.make
project/DrushCmd.script --alias-path=project --cible=@project.integration --make-trans=project/project.custom.make
project/DrushCmd.script --alias-path=project --cible=@project.integration --make-trans=project/project.theme.make
# Run automatic process
cd application/contenus && drush make project.integration.make --no-cache -y --prepare-install
# Copy translation file
cp /root/project/files/drupal-7.22.fr.po profiles/minimal/translations/
# Patch lightbox2 module
patch -p1 sites/all/modules/lightbox2/js/lightbox.js < /root/project/patches/lightbox2-1.patch
# Remove useless files and folders
rm -v .gitignore
rm -v CHANGELOG.txt
rm -v COPYRIGHT.txt
rm -v INSTALL.txt
• It is a script provided to us which eases drush make process
• It allows different options to:
– remove all previous files
– transmission of make files to the integration server
– Drupal installation with module activation
– apply needed patches
– profile transmission to the integration server
– profile configuration
– post installation actions
• We could tecnically have only one .make file but it will be more
organized to have one make file for every section: core and
contrib modules, custom modules and themes
• The first make file needs to start with these lines, specifying Core
and api versions
– core = 7.x
– api = 2
• In this main .make file we can include other make files like this
• It is recommended to create a make file for these configurations
• It is possible to download core, libraries and modules directly from external URLs (or
internal if we prefer)
• Core:
– We just need to select the core version we want to install and the URL to
download it
• Libraries:
– As core version we can install Drupal libraries directly from internal or external
URLs
• Contrib modules:
– The same for contrib modules
• It is advisable to create a separated make file for
these modules
• Here, it is possible to include custom modules
or contrib modules which are not available
anymore
• It is possible to include modules from an
internal path instead of an external URL
• In addition we can have a separated make file to
include themes
• Custom themes can be included like custom
modules
• If there is a module and a theme with the same
name, we can use the directory_name
parameter to avoid conflicts
• After the Drupal installation we could wish
to replace or add some files.
– For example: language configurations or any
file needed for the project
• To achieve this we can add lines to copy
or overwrite files in the main script file
• It is also possible to patch files instead of
overwritting them. This could be necessary
in some case, for example: module or
theme conflicts, customize contrib
modules, hard-coded changes
• For this we can also patch directly Drupal
modules using make files
• It is also possible to remove useless files and folders in
the main script file:
– Example:
• Unnecessary Drupal core files
• Unnecessary Drupal module files
• And purge .make files which were transfered at the
beginning of the process:
• rm -v *.make
• Drush make:
– https://www.drupal.org/project/drush_make
• Drush:
– https://www.drupal.org/project/drush
• Patches:
– https://dev.acquia.com/blog/patching-drush-make

More Related Content

Recently uploaded

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Recently uploaded (20)

WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 

Automatic Drupal deployment with drush make

  • 1.
  • 2. AUTOMATIC DRUPAL DEPLOYMENT WITH DRUSH MAKE September 2015 KEY CONSULTING
  • 3. • Drush make provides the possibility of automatic Drupal project generation • A functional site with specific versions and custom modules could be generated only configuring a script • This gives us high efficiency when we want to start a new project, environment or restore an existing one
  • 4. • Internet connection • Drush: installed and configured • A main script file created by us • A folder with all necessary .make files, custom modules and themes, patches and other files • DrushCmd.script
  • 5. • main_script.sh – Our main script to run all the process • /project_name/custom_modules/*.tar.gz – All compressed custom modules we want to add to the project • /project_name/custom_themes/*.tar.gz – All compressed custom themes we want to add to the project • /project_name/files/* – Files we want to add manually to the project (libraries, translation files …) • /project_name/patches/*.patch – All patches we want to apply during the process • /project_name/DrushCmd.script – Script provided to ease Drupal make deployment • /project_name/*.make – All make files to be executed that will be described further
  • 6. • Main script will need to follow all the necessary steps: – Prepare drush make with DrushCmd.script – Call drush make installation command – Copy or overwrite missing files – Patch files – Purge useless files and folders – Do any needed action to have our site working • Example: we could decide to generate a database for the site
  • 7. # Clean target folder project/DrushCmd.script --alias-path=project --cible=@project.integration --rm-all # Add make files to the project project/DrushCmd.script --alias-path=project --cible=@project.integration --make-trans=project/project.integration.make project/DrushCmd.script --alias-path=project --cible=@project.integration --make- trans=project/project.core_contrib.make project/DrushCmd.script --alias-path=project --cible=@project.integration --make-trans=project/project.custom.make project/DrushCmd.script --alias-path=project --cible=@project.integration --make-trans=project/project.theme.make # Run automatic process cd application/contenus && drush make project.integration.make --no-cache -y --prepare-install # Copy translation file cp /root/project/files/drupal-7.22.fr.po profiles/minimal/translations/ # Patch lightbox2 module patch -p1 sites/all/modules/lightbox2/js/lightbox.js < /root/project/patches/lightbox2-1.patch # Remove useless files and folders rm -v .gitignore rm -v CHANGELOG.txt rm -v COPYRIGHT.txt rm -v INSTALL.txt
  • 8. • It is a script provided to us which eases drush make process • It allows different options to: – remove all previous files – transmission of make files to the integration server – Drupal installation with module activation – apply needed patches – profile transmission to the integration server – profile configuration – post installation actions
  • 9. • We could tecnically have only one .make file but it will be more organized to have one make file for every section: core and contrib modules, custom modules and themes • The first make file needs to start with these lines, specifying Core and api versions – core = 7.x – api = 2 • In this main .make file we can include other make files like this
  • 10. • It is recommended to create a make file for these configurations • It is possible to download core, libraries and modules directly from external URLs (or internal if we prefer) • Core: – We just need to select the core version we want to install and the URL to download it • Libraries: – As core version we can install Drupal libraries directly from internal or external URLs • Contrib modules: – The same for contrib modules
  • 11. • It is advisable to create a separated make file for these modules • Here, it is possible to include custom modules or contrib modules which are not available anymore • It is possible to include modules from an internal path instead of an external URL
  • 12. • In addition we can have a separated make file to include themes • Custom themes can be included like custom modules • If there is a module and a theme with the same name, we can use the directory_name parameter to avoid conflicts
  • 13. • After the Drupal installation we could wish to replace or add some files. – For example: language configurations or any file needed for the project • To achieve this we can add lines to copy or overwrite files in the main script file
  • 14. • It is also possible to patch files instead of overwritting them. This could be necessary in some case, for example: module or theme conflicts, customize contrib modules, hard-coded changes • For this we can also patch directly Drupal modules using make files
  • 15. • It is also possible to remove useless files and folders in the main script file: – Example: • Unnecessary Drupal core files • Unnecessary Drupal module files • And purge .make files which were transfered at the beginning of the process: • rm -v *.make
  • 16. • Drush make: – https://www.drupal.org/project/drush_make • Drush: – https://www.drupal.org/project/drush • Patches: – https://dev.acquia.com/blog/patching-drush-make