SlideShare uma empresa Scribd logo
1 de 97
Baixar para ler offline
For every site, a .make file
                               Jeff Miccolis
                                                 25. aug 10:00
                                                 vps.net


Wednesday, August 25, 2010
I build drupal sites
               I co-maintain Open Atrium
               I contribute to drush_make




Wednesday, August 25, 2010
You build drupal sites
               You’ve heard of drush
               You’ve had deployment
               issues


Wednesday, August 25, 2010
If I’m lucky, you’ve used
               the Features module.



Wednesday, August 25, 2010
Problems, Tools,
               Gotchas
               ...and your questions




Wednesday, August 25, 2010
a) Problems



Wednesday, August 25, 2010
The reality of deploying
               and maintaining drupal
               is ugly.



Wednesday, August 25, 2010
The standard way of
               deploying drupal...



Wednesday, August 25, 2010
...involves committing
               everything to a project
               specific SVN repository.
               The standard way of deploying drupal...




Wednesday, August 25, 2010
...and then using that SVN
               repository to “manage”
               production.
               The standard way of deploying drupal...




Wednesday, August 25, 2010
...is a heck of a lot
               better than nothing.
               The standard way of deploying drupal...




Wednesday, August 25, 2010
But what version of the
               Date module are you using
               there?




Wednesday, August 25, 2010
The last ‘stable’ release
               was September 16th, 2009
               Which version of Date module is that?




Wednesday, August 25, 2010
The last ‘stable’ release
               doesn’t work with php 5.3
               Which version of Date module is that?




Wednesday, August 25, 2010
Chances are you’re
               using a CVS checkout.
               Which version of Date module is that?




Wednesday, August 25, 2010
With a patch (or two)
               applied.
               Which version of Date module is that?




Wednesday, August 25, 2010
Do you know where
               your children are?



Wednesday, August 25, 2010
...and to make matters
               worse...



Wednesday, August 25, 2010
SA-CONTRIB-2010-666
                             ** not real **




Wednesday, August 25, 2010
...and you haven’t seen
                     this site in 4 months.
                             **happens all the time**




Wednesday, August 25, 2010
The kids are in trouble.



Wednesday, August 25, 2010
We hack our way through.
               Commit semi-random patches
               and `svn co` production.
               The standard way of deploying drupal...




Wednesday, August 25, 2010
We can improve the
               ‘standard way’



Wednesday, August 25, 2010
Duplicative repositories
               Problems with the standard way...




Wednesday, August 25, 2010
Logs that mix of upstream
               fixes and custom work
               Problems with the standard way...




Wednesday, August 25, 2010
Too much detective
               work.
               Problems with the standard way...




Wednesday, August 25, 2010
Doesn’t make upstream
               contributions easy.
               Problems with the standard way...




Wednesday, August 25, 2010
Makes hacking
               upstream projects easy.
               Problems with the standard way...




Wednesday, August 25, 2010
b) Tools



Wednesday, August 25, 2010
Drush, Command line
               Drupal.
               http://drupal.org/project/drush




Wednesday, August 25, 2010
CLI?!?!
                             WTF?!?!



Wednesday, August 25, 2010
Fast and scriptable.



Wednesday, August 25, 2010
**DRUSH_ DEMO**



Wednesday, August 25, 2010
Drush Make
               http://drupal.org/project/drush_make




Wednesday, August 25, 2010
It’s how we package install
               profiles on drupal.org
               drush_make is...




Wednesday, August 25, 2010
Not a Drupal module, a
               Drush extension!
               drush_make is...




Wednesday, August 25, 2010
This means it doesn’t
               need a Drupal site.



Wednesday, August 25, 2010
Installed in ~/.drush
               drush_make is...




Wednesday, August 25, 2010
Used to make a ready to
               install Drupal platform.
               drush_make is...




Wednesday, August 25, 2010
Doesn’t Drupal come
               ‘ready to install’?



Wednesday, August 25, 2010
...when was the last time
               you deployed ‘just Drupal’?




Wednesday, August 25, 2010
Drupal core
               + views
               + cck
               + date
               ...and probably a lot more.

Wednesday, August 25, 2010
A .make file is a
               manifest for your site.



Wednesday, August 25, 2010
core = 6.x
  projects[] = drupal




Wednesday, August 25, 2010
projects[cck][subdir] = "contrib"
  projects[cck][version] = "2.8"




Wednesday, August 25, 2010
;    This is a comment
  ;
  ;    In short .make files use
  ;    .info file formatting.
  ;
  ;    Also drush_make has a great
  ;    README.txt



Wednesday, August 25, 2010
projects[date][type] = "module"

projects[date][download][type] = "cvs"

projects[date][download][module] =
 "contributions/modules/date"

projects[date][download][revision] =
 "DRUPAL-6--2:2010-06-20"




Wednesday, August 25, 2010
projects[litecal][type] = "module"

projects[litecal][download][type] = "git"

projects[litecal][download][url] =
 "git://github.com/./litecal.git"




Wednesday, August 25, 2010
**DRUSH_MAKE
                                DEMO**



Wednesday, August 25, 2010
Why can’t you generate
               the make file automatically?
               Question.




Wednesday, August 25, 2010
Text




                             http://drupal.org/project/cck
Wednesday, August 25, 2010
Wednesday, August 25, 2010
Wednesday, August 25, 2010
Projects vs. Modules
               Answer.




Wednesday, August 25, 2010
What about bugs in
               contrib module?
               Question.




Wednesday, August 25, 2010
projects[prepopulate][patch][] =
    "http://../360613_20100812.patch"
    Answer.




Wednesday, August 25, 2010
What about random
               javascript libraries?
               Question.




Wednesday, August 25, 2010
libraries[jquery_ui][download][type] = "get"

libraries[jquery_ui][download][url] = "http.."

libraries[jquery_ui][directory_name] =
  "jquery.ui"

libraries[jquery_ui][destination] = "modules/contrib/
jquery_ui"




 Answer.
Wednesday, August 25, 2010
Isn’t it slow to do all
               this downloading?
               Question.




Wednesday, August 25, 2010
Finally, a useful purpose
               for squid!
               http://reluctanthacker.rollett.org/node/114




Wednesday, August 25, 2010
Can I reuse snippits of
               make files somehow?
               Question.




Wednesday, August 25, 2010
Yes, two ways;
               recursion & inclusion.
               Answer




Wednesday, August 25, 2010
Recursion: if a project has
               a .make file it will be run.




Wednesday, August 25, 2010
Recursion: Avoid it.*
               Rarely useful, mostly
               confusing.
               *except with install profiles.




Wednesday, August 25, 2010
Inclusion: Allow a make
               file to reference
               another make file.



Wednesday, August 25, 2010
Inclusion: Use it.
               References via URLs, items in the referenced file can be
               overridden.




Wednesday, August 25, 2010
; Include Open Atrium
    includes[openatrium] = http://...




      ; Include Open Atrium
      includes[openatrium] = http://drupalcode.org/viewvc/drupal/contributions/profiles/openatrium/
     openatrium.make?view=co&pathrev=HEAD

Wednesday, August 25, 2010
Use overrides to grab
               CVS checkouts,
               experimental forks, more
               recent versions, etc


Wednesday, August 25, 2010
Ok, cool. How do I use
                        this again?



Wednesday, August 25, 2010
**BUILDKIT DEMO**



Wednesday, August 25, 2010
c) Gotchas, best
               practices, concepts,
               etc...


Wednesday, August 25, 2010
Make files are portable.
               They’re manifests, not a personal ‘save’ button




Wednesday, August 25, 2010
Tag versions.
               If your make file is pointing at HEAD it’s not doing it’s
               job.




Wednesday, August 25, 2010
Use comments &
               Link patches
               A few words can help a lot.




Wednesday, August 25, 2010
Profile .make
               vs.
               Distro .make



Wednesday, August 25, 2010
Used to make an install
               profile. No Core.
               profile .make




Wednesday, August 25, 2010
It’s what we use on
               Drupal.org
               profile .make




Wednesday, August 25, 2010
Includes core.
               distro .make




Wednesday, August 25, 2010
Is what I use for
               Openatrium.com
               distro .make




Wednesday, August 25, 2010
The distro .make
               retrieves and builds the
               profile.make.
               distro .make




Wednesday, August 25, 2010
This is the one place the
               recursion behavior works
               for us.
               distro .make




Wednesday, August 25, 2010
Small scripts go a long
               way.
               Like Open Atrium’s rebuild.sh




Wednesday, August 25, 2010
You’ll still want a
               project repository.



Wednesday, August 25, 2010
An install profile.
               You’r new project repository.




Wednesday, August 25, 2010
Custom themes and
               modules.
               Your new project repository.




Wednesday, August 25, 2010
A rebuild script.
               Your new project repository.




Wednesday, August 25, 2010
Nothing that already
               has a home.
               Your new project repository.




Wednesday, August 25, 2010
Forking projects and
               contributing back.
               Forking for karma.




Wednesday, August 25, 2010
The patches in your make
               file need to be public.
               Forking for karma.




Wednesday, August 25, 2010
Write patches that
               have a chance...
               Forking for karma.




Wednesday, August 25, 2010
Post them on the
               project’s issue queue.
               Forking for karma.




Wednesday, August 25, 2010
What if everyone did
               this?
               Forking for karma.




Wednesday, August 25, 2010
In conclusion, two
               things;



Wednesday, August 25, 2010
a) I don’t ever want to
               wonder; did we apply that
               patch to this site?




Wednesday, August 25, 2010
b) patches belong
               upstream. Let’s keep them
               there.




Wednesday, August 25, 2010
Questions?



Wednesday, August 25, 2010
http://cph2010.drupal.org/node/14588




Wednesday, August 25, 2010

Mais conteúdo relacionado

Semelhante a For every site a make file

Scaling with Postgres (Robert Treat)
Scaling with Postgres (Robert Treat)Scaling with Postgres (Robert Treat)
Scaling with Postgres (Robert Treat)
Ontico
 
Drupalmatinee.devtools.v2
Drupalmatinee.devtools.v2Drupalmatinee.devtools.v2
Drupalmatinee.devtools.v2
Joeri Poesen
 
Designing for the mobile web
Designing for the mobile webDesigning for the mobile web
Designing for the mobile web
Zi Bin Cheah
 
From where OpenVBX came from to how we open sourced it
From where OpenVBX came from to how we open sourced itFrom where OpenVBX came from to how we open sourced it
From where OpenVBX came from to how we open sourced it
minddog
 
Android casting-wide-net-android-devices
Android casting-wide-net-android-devicesAndroid casting-wide-net-android-devices
Android casting-wide-net-android-devices
Marakana Inc.
 

Semelhante a For every site a make file (20)

Introduction to Node.js: perspectives from a Drupal dev
Introduction to Node.js: perspectives from a Drupal devIntroduction to Node.js: perspectives from a Drupal dev
Introduction to Node.js: perspectives from a Drupal dev
 
Uberconf 10
Uberconf 10Uberconf 10
Uberconf 10
 
Sencha Touch Workshop
Sencha Touch WorkshopSencha Touch Workshop
Sencha Touch Workshop
 
Scaling with Postgres (Robert Treat)
Scaling with Postgres (Robert Treat)Scaling with Postgres (Robert Treat)
Scaling with Postgres (Robert Treat)
 
Writing Effective Instructions
Writing Effective InstructionsWriting Effective Instructions
Writing Effective Instructions
 
Drupalmatinee.devtools.v2
Drupalmatinee.devtools.v2Drupalmatinee.devtools.v2
Drupalmatinee.devtools.v2
 
Chef
ChefChef
Chef
 
Paul Querna - libcloud
Paul Querna - libcloudPaul Querna - libcloud
Paul Querna - libcloud
 
Designing for the mobile web
Designing for the mobile webDesigning for the mobile web
Designing for the mobile web
 
44275732 chef
44275732 chef44275732 chef
44275732 chef
 
HTML5/CSS3 @ Baidu
HTML5/CSS3 @ BaiduHTML5/CSS3 @ Baidu
HTML5/CSS3 @ Baidu
 
ActiveRecord 2.3
ActiveRecord 2.3ActiveRecord 2.3
ActiveRecord 2.3
 
From where OpenVBX came from to how we open sourced it
From where OpenVBX came from to how we open sourced itFrom where OpenVBX came from to how we open sourced it
From where OpenVBX came from to how we open sourced it
 
Android casting-wide-net-android-devices
Android casting-wide-net-android-devicesAndroid casting-wide-net-android-devices
Android casting-wide-net-android-devices
 
UWS Workshop: Social Media 101 for Contemporary Screen Actors
UWS Workshop: Social Media 101 for Contemporary Screen ActorsUWS Workshop: Social Media 101 for Contemporary Screen Actors
UWS Workshop: Social Media 101 for Contemporary Screen Actors
 
UX, UI, WTF
UX, UI, WTFUX, UI, WTF
UX, UI, WTF
 
Calloway introduction
Calloway introductionCalloway introduction
Calloway introduction
 
Rejectkaigi 2010
Rejectkaigi 2010Rejectkaigi 2010
Rejectkaigi 2010
 
dojo is bizarro jQuery
dojo is bizarro jQuerydojo is bizarro jQuery
dojo is bizarro jQuery
 
Happy Content Creators
Happy Content CreatorsHappy Content Creators
Happy Content Creators
 

Mais de Development Seed

Alternative Mapping on iOS
Alternative Mapping on iOSAlternative Mapping on iOS
Alternative Mapping on iOS
Development Seed
 
Tech@State Preview of Designing Custom Maps with TileMill
Tech@State Preview of Designing Custom Maps with TileMillTech@State Preview of Designing Custom Maps with TileMill
Tech@State Preview of Designing Custom Maps with TileMill
Development Seed
 
ReliefWeb Drupal 7 Build Plan
ReliefWeb Drupal 7 Build PlanReliefWeb Drupal 7 Build Plan
ReliefWeb Drupal 7 Build Plan
Development Seed
 
Offline Mapping: International Crisis
Offline Mapping: International CrisisOffline Mapping: International Crisis
Offline Mapping: International Crisis
Development Seed
 
Aegir one drupal to rule them all
Aegir one drupal to rule them allAegir one drupal to rule them all
Aegir one drupal to rule them all
Development Seed
 

Mais de Development Seed (16)

Rasters are not Monsters - GeoMTL 2019
Rasters are not Monsters - GeoMTL 2019Rasters are not Monsters - GeoMTL 2019
Rasters are not Monsters - GeoMTL 2019
 
Tilemill: Making Custom Transit Maps
Tilemill: Making Custom Transit MapsTilemill: Making Custom Transit Maps
Tilemill: Making Custom Transit Maps
 
Mapnik2 Performance, September 2011
Mapnik2 Performance, September 2011Mapnik2 Performance, September 2011
Mapnik2 Performance, September 2011
 
Alternative Mapping on iOS
Alternative Mapping on iOSAlternative Mapping on iOS
Alternative Mapping on iOS
 
Transparency camp
Transparency campTransparency camp
Transparency camp
 
Fast Map Interaction without Flash
Fast Map Interaction without FlashFast Map Interaction without Flash
Fast Map Interaction without Flash
 
Tech@State Preview of Designing Custom Maps with TileMill
Tech@State Preview of Designing Custom Maps with TileMillTech@State Preview of Designing Custom Maps with TileMill
Tech@State Preview of Designing Custom Maps with TileMill
 
ReliefWeb Drupal 7 Build Plan
ReliefWeb Drupal 7 Build PlanReliefWeb Drupal 7 Build Plan
ReliefWeb Drupal 7 Build Plan
 
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
 
Offline Mapping: International Crisis
Offline Mapping: International CrisisOffline Mapping: International Crisis
Offline Mapping: International Crisis
 
Aegir one drupal to rule them all
Aegir one drupal to rule them allAegir one drupal to rule them all
Aegir one drupal to rule them all
 
Backstage with Drupal localization- Part 2
Backstage with Drupal localization- Part 2Backstage with Drupal localization- Part 2
Backstage with Drupal localization- Part 2
 
Go real time with pubsubhubbub and feeds
Go real time with pubsubhubbub and feedsGo real time with pubsubhubbub and feeds
Go real time with pubsubhubbub and feeds
 
Drupal Distributions: The Dos and Don'ts:
Drupal Distributions: The Dos and Don'ts:Drupal Distributions: The Dos and Don'ts:
Drupal Distributions: The Dos and Don'ts:
 
Open Atrium
Open Atrium Open Atrium
Open Atrium
 
Opening Large Data Sets
Opening Large Data SetsOpening Large Data Sets
Opening Large Data Sets
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 
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
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

For every site a make file