/drupalpod-pantheon

DrupalPod (ddev-gitpod) setup for clients' projects hosted on Pantheon

Primary LanguageShellMIT LicenseMIT

DrupalPod with Pantheon

Setup

  1. Add all the files in this repo to your existing project (make sure all the script files in ./gitpod/ directory are executable)

    chmod +x .gitpod/*
    
  2. Generate ssh-key in Gitpod

    ssh-keygen -b 4096
    
  3. In Gitpod terminal, run gp env "PANTHEON_SSH_KEY=$(cat ~/.ssh/id_rsa)"
    This will add environment variable scoped to this project.

  4. Optional - use the same PANTHEON_SSH_KEY in all your projects:

    1. Edit PANTHEON_SSH_KEY in https://gitpod.io/variables
    2. Update the scope to */*.
  5. Add the content of ~/.ssh/id_rsa.pub to Pantheon
    https://pantheon.io/docs/ssh-keys#add-your-ssh-key-to-pantheon

  6. Generate Terminus Token
    https://pantheon.io/docs/machine-tokens#create-a-machine-token

  7. Add Terminus token you generated to Gitpod as a new environment variable PROJECT_TERMINUS_TOKEN (https://gitpod.io/variables)

  8. Update .ddev/config.yaml to the correct project name

    name: project_name
    
  9. Update line 43 in .ddev/providers/pantheon.yaml

    project: project_name.pantheon_environment_name
    
  10. Recommended:
    To speed up the process, enable Prebuilds by follow the instructions @ https://www.gitpod.io/docs/prebuilds#enable-prebuilt-workspaces