everything in code_slides
DESCRIPTION
Mack Hardy presenting "Everything in Code" on the drupal development tools of Features, make files and drush. Presented at the 2nd Pacific Northwest Drupal Summit http://pnwdrupalsummit.org/2010/sessions/everything-code Mack is the founder of Affinity Bridge http://affinitybridge.comTRANSCRIPT
![Page 1: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/1.jpg)
Everything in Code
Mack Hardy & Zoë Neill-St. ClairNerds in residence at Affinity Bridge
![Page 2: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/2.jpg)
WHATdo we mean by "everything"?
the things we do besides code: • the very act of downloading &
installing modules• all the configuration• post-go-live changes
source control}
![Page 3: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/3.jpg)
WHYare people who have Everything In Code so
creepily happy?
config != content.
• source control!• diff!• repeat, repeat, repeat
project handoff? --> so easy. time saved? --> beer.
![Page 4: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/4.jpg)
WHENis it a good idea?
• always.
![Page 5: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/5.jpg)
HOWwhat do the kids in the audience
need to try this at home?
gitdrush
features } do it
![Page 6: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/6.jpg)
HOWPeople, it's demo time.
make filesdrush makeupdating featurestesting } do it
![Page 7: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/7.jpg)
Example of a make file
do it
![Page 8: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/8.jpg)
Specific options
do it
![Page 9: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/9.jpg)
drush make filename.make
do it
![Page 10: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/10.jpg)
drush generate-makefile file.make
do it
HOWMake the Robots do it....
![Page 11: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/11.jpg)
do it
FEATURIZE IT
![Page 12: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/12.jpg)
do it
adding a feature
![Page 13: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/13.jpg)
do it
the list of features
![Page 14: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/14.jpg)
do itfeature details - from here we can re-roll the feature
![Page 15: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/15.jpg)
do it
recreating a feature - components closeup
![Page 16: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/16.jpg)
AND THENsome crazy person comes along and
changes some settings.
![Page 17: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/17.jpg)
do it
the list of features, now with an override.
![Page 18: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/18.jpg)
do it
looking at the details of a feature with overrides
![Page 19: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/19.jpg)
do it
diffing the overrides. a content type setting has been changed, and a block added to a context.
![Page 20: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/20.jpg)
drush features-update my_sandwich
drush features-revert my_sandwich
do it
![Page 21: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/21.jpg)
do it
AUTOMATED TESTING
CI JOE - http://github.com/defunkt/cijoe
![Page 22: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/22.jpg)
do it
AUTOMATED TESTING
Post commit hooks to run simple tests
![Page 23: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/23.jpg)
do it
AUTOMATED TESTING
HUDSON -> SELENIUM -> "INTELLIGENCE"
HUDSONhttp://hudson-ci.org/
SELINIUMhttp://seleniumhq.org/
![Page 24: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/24.jpg)
SOME THINGS ARE NOT (YET) EXPORTABLE
![Page 25: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/25.jpg)
do it
SOME THINGS ARE NOT (YET) EXPORTABLE
update_N as a workaround
• use .install file update hooks to adjust• features will preserve your custom code • don't cram in a million update_N tweaks
![Page 26: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/26.jpg)
AUTOMATIONNow that we know it works....
![Page 27: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/27.jpg)
HOWto ease your team into it
incrementalsmallsteps } start where
you are
![Page 28: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/28.jpg)
ONWARDto Drupal 7!
what, are you scared? • all these tools work on D7 now• taxonomy is exportable• get Build Kit
![Page 29: Everything in code_slides](https://reader034.vdocuments.net/reader034/viewer/2022052621/55879f81d8b42ade2d8b45a2/html5/thumbnails/29.jpg)
Resources
Collaboration over Competitionhttp://affinitybridge.com
http://affinitybridge.com/category/topics/abridged
http://developmentseed.org/blog/2010/sep/30/features-and-exportables-drupal-7
http://developmentseed.org/blog/2010/sep/11/aegir-04-alpha-13-drush-make-support-allows-automatically-building-drupal-distribut
http://github.com/defunkt/cijoehttp://hudson-ci.org