Skip to content

Instantly share code, notes, and snippets.

@pyrello
Last active November 30, 2018 21:52
Show Gist options
  • Save pyrello/d66ba0769d74f259c18daff08ab0ad64 to your computer and use it in GitHub Desktop.
Save pyrello/d66ba0769d74f259c18daff08ab0ad64 to your computer and use it in GitHub Desktop.
Instructions for setting up local development for uiowa Drupal 8 sites

UIowa Drupal 8 Local Development

These instructions describe the process for setting up a local development environment for developing Drupal 8 websites using the uiowa/uiowa and uiowa/multisite tools.

Getting Started

Install Lando

Install Lando by following the directions for your OS.

Configure Multisite

Follow the directions on uiowa/multisite under the Requirements and Saving sections of the readme. At the end of that, you should have the ~/.drush/drush.yml file created or updated with the following information:

uiowa:
    multisite:
        github:
            token: foo
        acquia:
            user: your-email@uiowa.edu
            token: baz

Install uiowa app

  1. Clone the application repository to your machine: git clone git@github.com:uiowa/uiowa.git ~/acquia/uiowa.
  2. Verify that Docker is running.
  3. Use a terminal window and navigate to your application directory. For example: cd ~/acquia/uiowa.
  4. Run lando start. This will spin up the docker containers specified in the .lando.yml file. This may take a few minutes, so now is a good time to go grab some coffee.

Install rusty profile site

For testing and development on uiowa/rusty profile, it is usually sufficient to use the eight.uiowa.edu site, which should already be created by the previous steps.

  • lando ssh
  • cd docroot/sites/eight.uiowa.edu
  • drush sql:create
  • drush si rusty --sites-subdir eight.uiowa.edu
  • drush uli

The last step provides a login URL that you can copy and add to the end of your local domain, for example https://eight.uiowa.lndo.site/user/reset/1/1542233093/tmsrOQ-HBNttyh0ZSqg-KMVglxEkjFFBKdnNHwWuppU/login.

Ongoing development

Update uiowa app to latest master

cd ~/acquia/uiowa
git pull

Review branch

Update the composer.json file, changing to the branch of uiowa/rusty you would like to review. You'll find this under the "require" section. For example, to test the "foobar" branch, you would update it as follows:

"require": {
    "uiowa/rusty": "dev-foobar",
},

Then run these commands:

cd ~/acquia/uiowa
composer update uiowa/rusty
composer install
cd docroot/sites/eight.uiowa.edu
drush si rusty --sites-subdir eight.uiowa.edu
drush uli

This will re-install the rusty profile so you'll have a fresh installation. Login with the URL generated by the last command.

@adamdelaney
Copy link

Might be better to have all this documentation living in one place. I would suggest updating our uiowa repo readme.md. I think some of this info already lives there.

@pyrello
Copy link
Author

pyrello commented Nov 16, 2018

@adamdelaney I agree with you. Currently this document covers instructions across 3 different readme files. I put it all in one place to make it easier to follow all the way through without having to flip back and forth too much. Happy to add this to the readme if that is the consensus view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment