Skip to content

Instantly share code, notes, and snippets.

@AllieRays
Created November 13, 2018 18:55
Show Gist options
  • Save AllieRays/0b830411546a0e8a6a68abc266236914 to your computer and use it in GitHub Desktop.
Save AllieRays/0b830411546a0e8a6a68abc266236914 to your computer and use it in GitHub Desktop.
Sanitized Updated Readme file for Projects with BLT

My Project

2018 Multisite D8 Repo for [project_name].

Getting Started

This project is based on BLT, an open-source project template and tool that enables building, testing, and deploying Drupal installations following Acquia Professional Services best practices. While this is one of many methodologies, it is our recommended methodology.

  1. Review the Required / Recommended Skills for working with a BLT project.

  2. Ensure that your computer meets the minimum installation requirements (and then install the required applications). See the System Requirements.

  3. Request access to organization that owns the project repo in GitHub (if needed).

  4. Fork the project repository in GitHub.

  5. Request access to the Acquia Cloud Environment for your project (if needed).

  6. Setup a SSH key that can be used for GitHub and the Acquia Cloud (you CAN use the same key). i. Setup GitHub SSH Keys ii. Setup Acquia Cloud SSH Keys

  7. Clone your forked repository. By default, Git names this "origin" on your local.

    $ git clone git@github.com:<account>/https://github.com/[github-repo][project-name]
    
  8. To ensure that upstream changes to the parent repository may be tracked, add the upstream locally as well.

    $ git remote add upstream git@github.com:[github-repo][project-name].git
    

Setup local environment.

BLT provides an automation layer for testing, building, and launching Drupal 8 applications. For ease when updating codebase it is recommended to use Drupal VM. If you prefer, you can use another tool such as Docker, Docksal, Lando, (other) Vagrant, or your own custom LAMP stack, however support is very limited for these solutions.

  1. After you have forked and cloned the project. Install Composer Dependencies. (Warning: this can take some time based on internet speeds.)

     $ composer install
    
  2. Use BLT to setup the Drupal VM with the configuration from this repositories configuration files (one time only).

    $ blt vm
    
  3. If blt alias is not available use this command outside and inside vagrant (one time only).

    $ composer run-script blt-alias
    
  4. SSH into your localized Drupal VM environment automated with the BLT launch and automation tools.

    $ vagrant ssh
    
  5. Use BLT to setup the site with configuration. To run the site specific setup like [site-name]

    $ blt setup
    

    or if a multisite

    $ blt setup --site=[site_name]
    
  6. Access the site and do necessary work at #LOCAL_DEV_URL by running the following commands.

    $ cd docroot
    $ drush uli
    
  7. Use BLT to pull all files down from ACE.

    $ blt drupal:sync:files
    
  8. Set up frontend build and theme. blt setup will install and configure your frontend dependencies including nvm, node and gulp. To use the task manager gulp run the following commands.

    $ cd docroot/themes/custom/[theme-name]/
    $ gulp
    

    or

    $ gulp watch
    

    If you are using pattern lab To serve Pattern Lab

    $ gulp patternlab:serve
    

    While Pattern Lab is being served, you can access it at localhost:8080.

  9. (optional) To sync local db with dev enviornment use following command inside vagrant.

    drush sql-sync @[drush-alias] @self --uri=c[site-name]
    

    or

    blt sync:refresh
    

Resources

Additional BLT documentation may be useful. You may also access a list of BLT commands by running this:

$ blt

Note the following properties of this project:

Working With a BLT Project

BLT projects are designed to instill software development best practices (including git workflows).

Our BLT Developer documentation includes an example workflow.

Important Configuration Files

BLT uses a number of configuration (.yml or .json) files to define and customize behaviors. Some examples of these are:

  • blt/blt.yml (formerly blt/project.yml prior to BLT 9.x)
  • blt/local.blt.yml
  • box/config.yml (if using Drupal VM)
  • drush/sites (contains Drush aliases for this project)
  • composer.json (includes required components, including Drupal Modules, for this project)

Resources

  • JIRA -
  • GitHub -
  • Acquia Cloud subscription -
  • TravisCI -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment