Skip to content

Detroit Ledger Drupal install profile

Benjamin Chodoroff edited this page Aug 7, 2013 · 5 revisions

Deployment notes

Updating the gnl_schema feature

The gnl_schema feature defines content types, relations, views and other structural components. Most all of this code is autogenerated and maintaned via the Features module. Drush features commands: https://drupal.org/node/960926

Example: commit your changes that you made in a view:

  • in site user interface, edit a view
  • in shell, run “drush features” - it will list all features in the site along with their status. for the feature that contains the view that you modified - hopefully gnl_schema - it will say “Overridden”
  • to preview the changes in that feature, run the command “drush fd gnl_schema”
  • to move the view changes you made from database to code, run “drush fu gnl_schema” - i usually run “git st” in the target feature’s directory to make sure the changes get to live in their own commit.
  • Run “git diff” - the changes should be pretty darn similar to the “drush fd gnl_schema” output that you saw previously!
  • “git add” and “git commit” as needed

If the configuration or structure changes}tract it into the existing repo - just leave the .git dir in place. Alternatively, you can preview the .info file under the “advanced” tab near the bottom left part of the features recreate page, copy in any added lines to the current .info file and run “drush fu gnl_schema” - the features module will read the info file and add in any newly defined components.

Hosting control panel

  • UI commands can also happen with drush, but we’ll stick with using the UI for now:
  • Can add platforms and sites ** A platform is a drupal install from a profile ** For each DL version, we’ll create a new profile ** So, to test deploy, create a platform and add the makefile (can be done straight from github raw url). ** use distro.make with hash (that is -- peg to a version) ** Can create multiple sites for each platform (eg dev and prod sites) ** Specify “Working copy - preserves SCM files” option ** After platform is verified (sanity tests), you can create a site using the new platform, with domain whatever.aegir.detroitledger.org

Rolling a dev platform - how ben did it on june 30th

Migrating data

For each deploy we need to migrate in our base data. Included in migrate_gnl is a shell script to download CSVs from our google spreadsheets.

drush en migrate_gnl # it is probably enabled by default though
/path/to/migrate_gnl/download.sh # will download CSVs to /tmp/migrate_gnl
drush mreg
drush ms # make sure it’s in the list
drush mi GrantTypes
drush mi OrgNTEETypes

This is what success looks like:

gnl@altissima:~/static/gnl_dev/sites/june2013.dev.detroitledger.org$ drush mi GrantTypes
Processed 81 (81 created, 0 updated, 0 failed, 0 ignored) in 0.4 sec (11461/min) - done with          [completed]
'GrantTypes'
gnl@altissima:~/static/gnl_dev/sites/june2013.dev.detroitledger.org$ drush mi OrgNTEETypes
Processed 629 (448 created, 181 updated, 0 failed, 0 ignored) in 5 sec (7474/min) - done with         [completed]
'OrgNTEETypes'
Clone this wiki locally