"

Set up a development sandbox

You should perform development in a sandbox you set up for yourself, ideally locally, running off a clone of the site’s Git repository.

Initial set up

  1. Clone the site repository, but add --recursive. You will start on the master branch; but can optionally switch branches at this point with git checkout -t origin/$BRANCH_NAME.
    • git clone --recursive ssh://codeserver.dev.48f27817-1964-4b24-8410-db424610c2b8@codeserver.dev.48f27817-1964-4b24-8410-db424610c2b8.drush.in:2222/~/repository.git settlenet
    • cd settlenet
  2. Bootstrap Drumkit:
    • . d or
    • source d
  3. Start a local development environment. (Note that you can chain make commands together in the order you want to run them. For example, you could run make complete-rebuild tests.)
    • make complete-rebuild or
    • make start build dropping make install at the end which adds sample data, unneeded if pulling a database from other environments (see below)
    • make tests to run automated tests (optional)
  4. Set up Terminus using a Pantheon machine token:
    1. Log into your Pantheon dashboard
    2. Instead of clicking on a site, click “Account” under your name, then “Machine Tokens”.
    3. Click the “Create token” button. It will ask you for a name, try “lando on $YOUR_COMPUTER_NAME”. Then click “Generate Token”
    4. It will give you a terminus auth:login command to run, but run it starting with lando, e.g.:
      • lando terminus auth:login --machine-token=$TOKEN
    5. You may occasionally need to re-authenticate; you may wish to save the Machine Token to your password manager now.
    6. Click “I understand” to close the window
  5. Pull the database from live (or another shared environment) to your local machine:
    • lando pull -c none -d live -f none
  6. Import configuration, so that the live config-split realm is deactivated:
    • lando drush -y config-import