vladdancer
6/2/2014 - 11:37 AM

Setup new project instance from pantheon service in the Drupalpro environment.

Setup new project instance from pantheon service in the Drupalpro environment.

# add drush aliases.
# Please, first is download this file from pantheon if you haven't did it early
# and place to the .drush folder
cd ~/
cp ~/Downloads/pantheon.aliases.drushrc.php ~/.drush
cd ~/websites
# use 'drush sa' command to check if drush is using new aliases.
# this command will provide list of aliases, so you need to check something like
# pantheon.*

# install new site instanse using drush qc of Drupalpro environment.
# you should replace 'project.loc' to the something like 'tinhat.loc'
drush qc --domain='project.loc'

# this step will do checkout to the existing folder
git clone project.git /tmp/project
mv /tmp/project/.git project.loc
rm -rf /tmp/project
cd project.loc
git reset --hard HEAD

# sync local db with remote.
# (required only for pantheon) Get sql-sync command version for panhteon
drush dl drush_sql_sync_pipe
# (optional) install pv programm to use visual progress of sync
sudo apt-get install pv
# and only now we can sync db
# BTW: --progress param isn't required, so you can miss if you don't want to see
# sync progress
# If you have an error try add --strict=0 param.
drush sql-sync-pipe @pantheon.tinhat.dev @self --progress

# OR alternative method install https://drupal.org/project/Pandarus
# to the $HOME/.drush 
# NOTE: only this pandarus.drush.inc, sync.sql.pan.inc are needed
# drush pan-sql-sync @pantheon.tinhat.dev @self