
Advanced Pantheon and Terminus Commands at Cornell University
Discover advanced commands and functionalities related to Pantheon and Terminus at Cornell University. Learn about Pantheon's hosting services, agile workflows, and security features, as well as how Terminus offers powerful command-line interactions for managing your projects. Explore common commands and scripts used by Drupal developer Bill Juda, and find helpful documentation links for further guidance.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Cornell University Pantheon Terminus Bill Juda
Cornell University Who am I? Bill Juda (wfj24@cornell.edu) Drupal Developer for CIT Custom Development. Started working with Drupal in 2013.
Cornell University Agenda What is Pantheon? What is Terminus? Get Terminus. Using Terminus. Common commands that I use. Scripts I have written. Demo! Documentation links. Questions?
Cornell University What is Pantheon? Drupal and WordPress hosting plus agile workflows, website operations tools, and dependable security features. - Pantheon Drupal and WordPress cloud hosting.
Cornell University What is Terminus? Our command line interface, Terminus, provides advanced interaction with Pantheon. Terminus enables you to do almost everything in a terminal that you can do in the Dashboard, and much more. - Pantheon Command line tool that can do some awesome stuff!!
Cornell University Get Terminus See Pantheon and their documentation: https://pantheon.io/docs/terminus/ Installation instructions: https://pantheon.io/docs/terminus/install You will need an SSH key: https://pantheon.io/docs/ssh-keys/
Cornell University Commands - DRUSH!!! terminus drush SITE_NAME.ENV uli Get one time login link terminus drush SITE_NAME.ENV updb Run database updates terminus drush SITE_NAME.ENV entup Run enty updates terminus drush SITE_NAME.ENV cr Clear cache Drupal 7 terminus drush SITE_NAME.ENV cc Clear Cache Drupal 8 terminus drush SITE_NAME.ENV -- ws --tail Look at watchdog logs in real time
Cornell University Commands - backup related terminus backup:create SITE_NAME.ENV Create a backup for the desired environment terminus backup:get SITE_NAME.ENV --element=database --to=your_file.sql.gz -vv Get a backup or the database and download it terminus backup:get SITE_NAME.ENV --element=files --to=your_file.tar.gz -vv Get a backup of all the files and download it terminus env:clone-content SITE_NAME.ENV TARGET_ENV Clone one environment to another
Cornell University Command - development environment related terminus multidev:create SITE_NAME.ENV MULTIDEV_NAME Create a multidev environment terminus connection:set SITE_NAME.ENV MODE Set your environment to Git or SMTP
Cornell University Scripting - get backups The following script is my pantheon-get-backups.sh This script is run through the terminal running: sh pantheon-get-backup.sh Replace PATH_TO_TERMINUS with your machines path to terminus. echo Site: read SITE echo Env: read ENV PATH_TO_TERMINUS/terminus backup:get SITE_NAME.ENV --element=database -- to=SITE_NAME.sql.gz -vv PATH_TO_TERMINUS/terminus backup:get SITE_NAME.ENV --element=files --to=SITE_NAME.tar.gz - vv
Cornell University Scripting - setting up/migrating a composer based site in Pantheon The following script is my pantheon-composer-site.sh This script is run through the terminal running: sh pantheon-composer-site.sh Replace PATH_TO_TERMINUS with your machines path to terminus. echo Site Name: read SITE_HUMAN_NAME echo "Site Macince Name (dash separated words):" read SITE export PANTHEON_SITE_NAME=SITE_NAME PATH_TO_TERMINUS/terminus site:create --org PANTHEON_ORG_ID $PANTHEON_SITE_NAME "SITE_NAME_HUMAN_NAME" empty export PANTHEON_SITE_GIT_URL="$(PATH_TO_TERMINUS/terminus connection:info $PANTHEON_SITE_NAME.dev --field=git_url)" git remote add origin $PANTHEON_SITE_GIT_URL PATH_TO_TERMINUS/terminus connection:set $PANTHEON_SITE_NAME.dev git
Cornell University Scripting - rsync files to Pantheon (note this is not terminus but terminus inspired) The following script is my pantheon-rsync-to-pantheon.sh This script is run through the terminal running: sh pantheon-rsync-to-pantheon.sh echo Site: read SITE echo Env: read ENV rsync -rLvz --size-only --ipv4 --ignore-existing --progress -e 'ssh -p 2222' files/. --temp-dir=~/tmp/ ENV.SITE_NAME@appserver.ENV.SITE_NAME.drush.in:files/
Cornell University Scripting - rsync files from Pantheon (note this is not terminus but terminus inspired) The following script is my pantheon-rsync-from-pantheon.sh This script is run through the terminal running: sh pantheon-rsync-from-pantheon.sh echo Site: read SITE echo Env: read ENV rsync -rLvz --size-only --ipv4 --ignore-existing --progress -e 'ssh -p 2222' $ENV.$SITE@appserver.$ENV.$SITE.drush.in:files/ files/.
Cornell University Demo!
Cornell University Helpful Links Terminus Docs: https://pantheon.io/docs/terminus/ Generating SSH keys: https://pantheon.io/docs/ssh-keys/ Installation instructions: https://pantheon.io/docs/terminus/install Command documentation: https://pantheon.io/docs/terminus/commands/ Scripts on Github: https://github.com/judaw/pantheon-scripts
Cornell University Questions? wfj24@cornell.edu