Skip to content

Instantly share code, notes, and snippets.

@amitaibu
Last active January 9, 2017 07:22
Show Gist options
  • Save amitaibu/2f3d712fce154c8416011d72bdfe5f2b to your computer and use it in GitHub Desktop.
Save amitaibu/2f3d712fce154c8416011d72bdfe5f2b to your computer and use it in GitHub Desktop.
  1. Create a Drupal 7 site on Pantheon
  2. Create Pusher apps. One for local, and 3 for pantheon (Dev, Test, Live)
  3. On Pantheon dashboard switch connection mode to "Git"
  4. Clone Pantheon site locally
  5. In the Pantheon directory, cd sites/default && cp default.settings.php settings.php
  6. Add the following code, to the end of settings.php - replace Pusher's app ID,key, secret and cluster
# Pusher integration.
if ($_ENV['PANTHEON_ENVIRONMENT'] == 'dev') {  
  $conf['hedley_pusher_app_id'] = '<your-app-id>';
  $conf['hedley_pusher_app_key'] = '<your-app-key>';
  $conf['hedley_pusher_app_secret'] = '<your-app-secret>';
  $conf['hedley_pusher_app_cluster'] = '<your-app-cluster>';
}
elseif ($_ENV['PANTHEON_ENVIRONMENT'] == 'test') {
  $conf['hedley_pusher_app_id'] = '<your-app-id>';
  $conf['hedley_pusher_app_key'] = '<your-app-key>';
  $conf['hedley_pusher_app_secret'] = '<your-app-secret>';
  $conf['hedley_pusher_app_cluster'] = '<your-app-cluster>';
}
elseif ($_ENV['PANTHEON_ENVIRONMENT'] == 'live') {
  $conf['hedley_pusher_app_id'] = '<your-app-id>';
  $conf['hedley_pusher_app_key'] = '<your-app-key>';
  $conf['hedley_pusher_app_secret'] = '<your-app-secret>';
  $conf['hedley_pusher_app_cluster'] = '<your-app-cluster>';
}
  1. From Pantheon dashboard, download the Drush aliases and copy the newly created Dev to ~/.drush/pantheon.aliases.drushrc.php. Verify with drush sa the alias exists.

  2. Back in the make directory, cd server && cp default.config.sh config.sh && cp pantheon-install.sh.example pantheon-install.sh

  3. Change the settings in config.sh for your DB and BASE_DOMAIN_URL

  4. Add the local pusher credentials under post_install and post_reset

  5. In pantheon-install.sh Change the MAKE_DIR and PANTHEON_DIR, and PANTHEON_ALIAS

  6. After installation of the make dir under server (install ./install -dly or re-install ./scripts/reset -dly)

  7. Install on Pantheon ./pantheon-install.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment