Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add information about installing and using lando with a Pantheon site using quickstart. #144

Open
trackleft opened this issue Feb 3, 2023 · 1 comment

Comments

@trackleft
Copy link
Member

Conditions of satisfaction

Determine which parts of this doc, https://github.com/az-digital/arizona-gatsby#first-time-lando-setup also apply to any pantheon site.

@trackleft
Copy link
Member Author

trackleft commented Feb 3, 2023

Suggestions:

Developing new features for your custom pantheon site locally.

First time Lando setup

Lando is a local development tool that works with Pantheon to make a local version of a live site.

Download Lando

https://lando.dev/download

Once installed, familiarize yourself with the available commands.

Each Lando command is documented in the CLI

For example if you type lando start --help you will see the help file for lando start

For all Lando commands type lando and hit enter.

Get access to download the site from Pantheon.

If you do not have access, please request it from the web team in Slack.

Then in your pantheon account create a machine token.

Add SSH Key to Pantheon

https://pantheon.io/docs/ssh-keys

Set up ssh

Add the following to your ~/.ssh/config file

Host *.drush.in
    StrictHostKeyChecking no
    # The settings on the next two lines are temporary until Pantheon updates the available key types.
    # If 'PubkeyAcceptedAlgorithms' causes an error, remove it.
    HostkeyAlgorithms +ssh-rsa
    PubkeyAcceptedAlgorithms +ssh-rsa

Download Pantheon site with Lando.

mkdir az-admissions && cd az-admissions
lando init pantheon
lando start
lando pull

Logging into the local drupal site that you have created with Lando.

Get yourself a one-time login link

lando drush uli --name<your username in the Drupal site, probably a netid> -l http://<the site machine name>.lndo.site

Other Drush commands

For a full list of drush commands type lando drush
Run drush help [command] to view command-specific help. Run drush topic to read even more documentation.

Update the database with pending database updates
lando drush updb -y

Import pending config from the upstream

lando drush -y state:set config_sync.update_mode 1 --input-format=integer
lando drush -y config-distro-update

Clear the Drupal cache

lando drush cr

Updating Drupal modules.

The Drupal site uses Composer to manage dependencies.

Basic Composer usage

Changing a module version

composer require 'drupal/jsonapi_resources:^1.0@beta'

Updating the codebase manually with the Quickstart upstream:

The az-admissions site lives on the Quickstart upstream to simplify the update process.
In order to update this site with the latest upstream changes, we can clone the sites git repository from pantheon, and merge in upstream changes with git locally.

After downloading the site from pantheon with lando, and changing into the directory that contains it, full git functionality should be available to you.

git remote add upstream az-digital/az-quickstart-pantheon
git pull upstream master --no-ff

If you need to fix merge conflicts, do so. If you don't know how, ask in Slack.

Configure gatsby to point at your local copy instead of live or test.

Gatsby will error on any https request without a valid certificate,
so ensure you use http protocol with local connections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant