Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Drupal,	
  git	
  and	
  sanity	
  
Charlie	
  Morris	
  
Penn	
  State	
  University	
  Libraries	
  
@cdmo	
  
	
  
Code...
our	
  scenario	
  
•  migraEng	
  into	
  Drupal	
  from	
  proprietary	
  system	
  
•  one	
  big	
  academic	
  librar...
core	
  +	
  
contrib	
  +	
  
custom	
  
hJp://farm9.staEcflickr.com/8471/8135313427_44c72f8d52_c.jpg	
  
some	
  potenEal	
  opEons	
  for	
  managing	
  
drupal	
  projects	
  
•  put	
  all	
  the	
  things	
  in	
  the	
  dr...
sEll	
  the	
  problem	
  of	
  updaEng	
  the	
  
database	
  aYer	
  updaEng	
  core	
  and	
  
contrib	
  
how	
  we	
  are	
  doing	
  it	
  
•  just	
  managing	
  all	
  of	
  our	
  own	
  code	
  in	
  one	
  repo	
  
(modul...
a	
  “base	
  build”	
  or	
  “the	
  upstream”	
  
•  created	
  a	
  base	
  build	
  that	
  contains	
  the	
  
common...
the	
  basic	
  idea	
  
1.  clone	
  the	
  base	
  build	
  and	
  install	
  via	
  bash	
  
script	
  
2.  new	
  proj...
git fetch upstream
git merge upstream/master
(resolve	
  conflicts	
  as	
  needed)	
  
link	
  
end	
  result	
  (hopefully)	
  
•  staying	
  in	
  sync	
  
•  least	
  pain	
  possible	
  for	
  updaEng/maintaining	
...
thanks!	
  
	
  
base	
  build	
  upstream	
  repo	
  at	
  	
  
hJps://github.com/cdmo/psu-­‐libraries-­‐drupal	
  	
  
	...
Drupal, git and sanity
Upcoming SlideShare
Loading in …5
×

Drupal, git and sanity

1,041 views

Published on

Drupal, git and sanity

Published in: Technology
  • Be the first to comment

Drupal, git and sanity

  1. 1. Drupal,  git  and  sanity   Charlie  Morris   Penn  State  University  Libraries   @cdmo     Code4lib  2015  |  Portland,  Oregon  
  2. 2. our  scenario   •  migraEng  into  Drupal  from  proprietary  system   •  one  big  academic  library  site   •  many  smaller  library  sites  and  sites  under  the   auspices  of  the  libraries   •  mulEple  developers  leading  and  collaboraEng   on  projects   •  lots  of  new    
  3. 3. core  +   contrib  +   custom   hJp://farm9.staEcflickr.com/8471/8135313427_44c72f8d52_c.jpg  
  4. 4. some  potenEal  opEons  for  managing   drupal  projects   •  put  all  the  things  in  the  drupal  file  tree  in  a   repo   •  whole  file  tree  +  git  submodules  for  core  +   contrib  code   •  create  many  repos  for  the  many  custom   modules  and  themes  in  your  drupal  file  tree   – (and  figure  out  how  to  handle   seWngs.php,  .htaccess  and  /sites/all/libraries   modificaEons)    
  5. 5. sEll  the  problem  of  updaEng  the   database  aYer  updaEng  core  and   contrib  
  6. 6. how  we  are  doing  it   •  just  managing  all  of  our  own  code  in  one  repo   (modules,  theme,  .htaccess  mods,  libraries…)   •  aggressive  giEgnore  for  stuff  drush  can  take   care  of   •  use  features  and  strongarm  modules  for   storing  as  much  db  config  in  code  as  possible   •  drush  sql-­‐sync  to  keep  dev  environments  in   sync  with  live  dbs  
  7. 7. a  “base  build”  or  “the  upstream”   •  created  a  base  build  that  contains  the   common  theme,  module,  and  other  custom   code  that  drush  wouldn’t  be  used  to  manage  
  8. 8. the  basic  idea   1.  clone  the  base  build  and  install  via  bash   script   2.  new  project  gets  2  remotes:  origin  and   upstream 3.  projects  are  developed  on  origin 4.  periodic  fetching  and  merging  of  upstream   (devs  noEfied  when  changes  occur  via  Slack)   5.  drush  adds/manages/updates  core,  contrib  
  9. 9. git fetch upstream git merge upstream/master (resolve  conflicts  as  needed)  
  10. 10. link  
  11. 11. end  result  (hopefully)   •  staying  in  sync   •  least  pain  possible  for  updaEng/maintaining   •  less  Eme  on  DevOps   •  more  Eme  learning  all  the  other  new  things   •  more  Eme  building  beJer  user  experiences    
  12. 12. thanks!     base  build  upstream  repo  at     hJps://github.com/cdmo/psu-­‐libraries-­‐drupal       quesEons/feedback?     Charlie  Morris   Penn  State  Libraries   @cdmo  

×