Here is some documentation:

Overview: http://prezi.com/nqm6g-grqniq/cornell-university-library-drupal-setups/

Scripts & README.txt: https://svn.library.cornell.edu/cul-drupal/drupal_6/scripts

Migrate module: http://drupal.org/project/backup_migrate

Drush: http://drupal.org/project/drush

Drush Make: http://drupal.org/project/drush_make

What is below here is obsolete. We're on a different server now with a different organization and workflow.

This describes the organization of the Drupal sites DLIT has on our test server.

The test server is libdev (library3.library.cornell.edu) . There are lots of other things on this server besides the Drupal stuff.

Server

  • Each site is located under /webvision-dev/apache2/drupals/ in a directory named with the prefix test. (eg. test.mysite.library.cornell.edu)
    • A new set of sites is coming with the domain suffix test1.library.cornell.edu (eg. http://preservation.test1.library.cornell.edu/ )
      • these have directories in the /webvision-dev/apache2/drupals/ also (eg. preservation.test.library.cornell.edu)
  • Each site has these subdirectories on the server
    • bkp - scripts to backup & restore file system and mysql database for the site, site backups
    • build - scripts to check out modules and themes from Subversion Version Control System (SVN) & place them on the site
    • conf - virtual host configuration file
    • htdocs - web visible site
    • logs - large sticks
  • Your user account on libdev
    • install drush - drupal shell commands
      • put the drush directory in ~/bin so you can find ~/bin/drush/drush.php
    • be a member of the solaris group diglibdev-role
    • install drush module manager
      • put in ~/.drush directory so ~/.drush/drush_mm/README.txt

Desktop

The developer checks out the site from SVN
svn+ssh://your-netid-here@libdev.library.cornell.edu/webvision-dev/svn/sites
onto his/her desktop machine to find this structure:

  • Drupal-Sites - top directory in our SVN repository
    • mysite.library.cornell.edu - directory for the site's manifest files
      • webvision.manifest - list of themes and modules from the main library website SVN repository
      • contrib.manifest - list of auxiliary themes and modules from the main library website SVN repository
      • site.manifest - list of themes and modules from the Drupal-Sites/drupal-v6-parts directory in our SVN repository
    • drupal-site-scripts - various server side scripts
      • bkp - scripts for the site backup and restore process
      • build - scripts for the deploy process
    • drupal-v6-parts - mostly modules and themes from drupal.org and its contributors
      • commonspot_migration - coldfusion and php code for exporting commonspot sites and importing them into Drupal
      • libraries - a couple of web based text editors for Drupal
      • modules - the latest release version of all the Drupal modules any of our sites use
        • custom - modules we have written
          • cu_aerialny - reverse geocoding, processes for aerial-ny.library.cornell.edu
          • cu_banners - 45 pixel Cornell banners
          • cu_eship - tools for eship.library.cornell.edu
          • cu_olinuris - fix absolute paths - hook_node_operations
          • cu_template - blocks for our Cornell theme
          • culauth - CUWebAuth interface for Drupal login & account creation
          • feednodefixer - part of commonspot import
          • ltsprocedures - part of commonspot import for LTS site
      • themes - skins for Drupal sites
        • communications - theme for communications.library.cornell.edu based on cuwebtemplate
        • cul - early basic CUL theme
        • cul_aerial_ny - theme for aerial-ny.library.cornell.edu based on zen
        • cul_cuneiform - theme for cuneiform.library.cornell.edu based on zen
        • cuwebtemplate - standard CUL theme
        • cuwebtemplatev2 - new improved CUL theme
        • eship - theme for eship.library.cornell.edu based on cuwebtemplate
        • math_library - theme for mathematics.library.cornell.edu based on cuwebtemplate
        • physical_sciences_library - theme for psl.library.cornell.edu
        • rau - theme for research.library.cornell.edu
        • wordsworth - a theme for wordsworth collection
        • zen - standard starter theme from Drupal.org

Work-flow

Update a site on the test server 

  • locate the site under  /webvision-dev/apache2/drupals/
  • in the htdocs directory, run drush cache clear
  • in the htdocs directory, run drush status to get the database particulars
  • in the bkp directory, run the backup.sh script to save a copy of the filesystem and database
  • log in to Drupal site as user #1
  • put the Drupal site into 'maintenance mode'
  • in the build directory, run the deploy script
  • run update.php on the site
  • check the site - problems? restore backup
  • take the site our of maintenance mode

Add an existing module or theme to a site 

  • edit the site.manifest file to add new module or theme
  • check in modified manifest file
  • do 'update a site on the test server' above

Add a new module or theme 

  • download module/theme from Drupal.org into an empty directory
  • unzip/untar
  • copy resulting directory into  ...\A1Projects\Drupal-Sites\drupal-v6-parts\modules (or ...themes) on your desktop machine
  • select directory and SVN Add
  • select directory and SVN Commit
  • do 'update a site on the test server' above

Create a new site

  • ask Enrico Silterra to do the tasks for setting up a new site
    • set up subdomain (eg. mysite.test1.library.cornell.edu)
    • set up directory structure on libdev (eg.  /webvision-dev/apache2/drupals/mysite)
    • create mysql database and user for Drupal
    • install drupal core files and doctor sites/default/settings.php to include user/password/db for this site
    • create subversion directory for the site under Drupal-Sites
    • get CUWebAuth set up if necessary
  • go to the site and run the Drupal install (eg. http://mysite.test1.library.cornell.edu/install.php)
  • you may need to update the Drupal core if it's out of date
  • check out Drupa-Sites/mysite.library.cornell.edu from SVN
  • add whatever modules you need to site.manifest
  • webvision.manifest should only have modules/cul_common (other webvision modules are out of date)
  • check in your changes to Drupa-Sites/mysite.library.cornell.edu
  • do the 'Update a site on the test server' procedure
  • add a line to /webvision-dev/apache2/drupals/crons/testcrons

Update Drupal Core

  • get a copy of the latest production version of drupal extracted onto your disk from http://drupal.org/
  • backup the file system and database as outlined in 'Update a site on the test server' procedure
  • log in to Drupal site as user #1
  • put the site in off-line maintenance mode /admin/settings/site-maintenance
  • disable all the non-essential modules
    • go to the htdocs directory
    • use this to check which are enabled:
      • drush mm list
      • missing: getid3 token
        enabled: advanced_help autologout block color comment computed_field contact content content_copy content_permissions content_taxonomy content_taxonomy_autocomplete content_taxonomy_options cu_template cul_common culauth date date_api date_locale date_popup date_timezone date_tools dblog devel email fieldgroup filefield filter globalredirect help imagefield insert_view jq jq_bridge jquery_ui link locale menu menu_breadcrumb node node_import nodereference number optionwidgets path search site_map system taxonomy taxonomy_manager text tracker update user views views_bulk_operations views_ui webform wysiwyg xmlsitemap
        disabled: actions_permissions aggregator blog blogapi book content_taxonomy_tree date_php4 date_repeat devel_generate devel_node_access devel_themer feednodefixer filefield_meta filefield_token forum help_example ltsprocedures macro openid performance php ping poll profile statistics syslog throttle translation trigger upload userreference views_export xmlsitemap_engines xmlsitemap_node xmlsitemap_taxonomy xmlsitemap_user

    • use this to disable modules
      • drush mm disable advanced_help autologout  color comment computed_field contact content content_copy content_permissions content_taxonomy content_taxonomy_autocomplete content_taxonomy_options cu_template cul_common culauth date date_api date_locale date_popup date_timezone date_tools dblog devel email fieldgroup filefield  globalredirect help imagefield insert_view jq jq_bridge jquery_ui link locale menu menu_breadcrumb node_import nodereference number optionwidgets path search site_map  taxonomy taxonomy_manager text tracker update  views views_bulk_operations views_ui webform wysiwyg xmlsitemap

      • leave these modules enabled: block filter node system user
  • delete the old Drupal except for the sites directory
    • go to htdocs
    • rm *.txt *.php
    • rm -R includes/ misc/ themes/ modules/ scripts/ profiles/
  • upload the new drupal into htdocs
  • run update.php
  • enable all the modules
    • drush mm enable advanced_help autologout  color comment computed_field contact content content_copy content_permissions content_taxonomy content_taxonomy_autocomplete content_taxonomy_options cu_template cul_common culauth date date_api date_locale date_popup date_timezone date_tools dblog devel email fieldgroup filefield  globalredirect help imagefield insert_view jq jq_bridge jquery_ui link locale menu menu_breadcrumb node_import nodereference number optionwidgets path search site_map  taxonomy taxonomy_manager text tracker update  views views_bulk_operations views_ui webform wysiwyg xmlsitemap

  • run update.php again
  • check the site
  • take the site out of maintenance mode /admin/settings/site-maintenance
  • No labels