This repository consists of the <machine_name>.
This project is based on BLT 12.x with Lando local env, 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.
- Review the Required / Recommended Skills for working with a BLT project.
- Ensure that your computer meets the minimum installation requirements (and then install the required applications). See the System Requirements.
- Download the latest version of Drupal
$ composer create-project --no-interaction acquia/drupal-recommended-project <machine_name>
- Add the blt-lando plugin
$ composer require mikemadison13/blt-lando
- Setup your container settings by modifying your .lando.yml file.
$ blt recipes:vm:lando
- Finalize settings and setup
$ blt setup
Note: if you receive a failure during the install related to the database, please check the docroot/sites/default/settings/local.settings.php file to ensure that the proper credentials are in the database array. This is a very common problem with Lando!
- Request access to organization that owns the project repo in GitHub (if needed).
- Fork the project repository in GitHub.
- Request access to the Acquia Cloud Environment for your project (if needed).
- Setup a SSH key that can be used for GitHub and the Acquia Cloud (you CAN use the same key).
- Clone your forked repository. By default, Git names this "origin" on your local.
$ git clone [email protected]:<account>/<machine_name>.git
- To ensure that upstream changes to the parent repository may be tracked, add the upstream locally as well.
$ git remote add upstream [email protected]:acquia-pso/<machine_name>.git
- Install Composer dependencies. After you have forked, cloned the project and setup your blt.yml file install Composer Dependencies. (Warning: this can take some time based on internet speeds.)
$ composer install
- Setup Lando. Setup the container by modifying your .lando.yml with the configuration from this repositories configuration files.
$ lando start
- Setup a local Drupal site with an empty database. Use BLT to setup the site with configuration. If it is a multisite you can identify a specific site.
$ lando blt setup
or
$ lando blt setup --site=[sitename]
- Log into your site with drush. Access the site and do necessary work at #LOCAL_DEV_URL by running the following commands.
$ lando drush uli
-
Set up frontend build and theme. By default BLT sets up a site with the lightning profile and a cog base theme. You can choose your own profile before setup in the blt.yml file. If you do choose to use cog, see Cog's documentation for installation. See BLT's Frontend docs to see how to automate the theme requirements and frontend tests. After the initial theme setup you can configure
blt/blt.yml
to install and configure your frontend dependencies withblt setup
. -
Pull Files locally. Use BLT to pull all files down from your Cloud environment.
$ lando blt drupal:sync:files
- Sync the Cloud Database. If you have an existing database you can use BLT to pull down the database from your Cloud environment.
$ lando blt sync
- Start clean from the upstream's integration branch
git fetch upstream
git rebase upstream/develop
- Create a new feature branch from develop
git checkout -b JIRA-000-feature-branch
- Install Composer dependencies. After you have forked, cloned the project and setup your blt.yml file install Composer Dependencies. (Warning: this can take some time based on internet speeds.)
$ composer install
- Setup container
$ lando start
- Setup a local Drupal site
There are two options to setup a local Drupal site: with a clean database, or with a copy of a database from a cloud environment.
1. Setup a local Drupal site with an empty database. The blt-cohesion composer package will run all necessary site studio commands.
Use BLT to setup the site with configuration.
$ lando blt setup
or If it is a multisite you can identify a specific site.
$ lando blt setup --site=<machine_name>
2. Setup a local Drupal site with an existing database. If you have an existing database you can use BLT to pull down the database from your Cloud environment.
$ lando blt sync
- Log into your site with drush. Access the site and do necessary work at #LOCAL_DEV_URL by running the following commands.
$ cd docroot
$ lando drush uli
- After you make changes inside your local drupal site. Export your configuration from the database to your configuration. Export your drupal config changes if you have them.
$ lando drush cex
To export Site studio configuration to your site studio package run the following command.
$ lando drush sync:export
- commit your changes and push your changes to your origin repository.
$ git status
$ git add -p
$ git commit -m"<machine_name>-000: Committing new changes to site."
$ git push --set-upstream origin <machine_name>-000-new-site-change
- Navigate to Github and open a pull request against the upstream. Assign a person on your team to review.
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:
- Primary development branch: Develop
- Local site URL: http://<machine_name>.lndo.site
BLT projects are designed to instill software development best practices (including git workflows).
Our BLT Developer documentation includes an example workflow.
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
(local only specific blt configuration)landio.yml
(Lando configuration)drush/sites
(contains Drush aliases for this project)composer.json
(includes required components, including Drupal Modules, for this project)