Digital Team
About UsEdit in Gitbook
  • Welcome
  • Getting started
    • Life on the Digital team
      • Meetings
      • Communication
      • Software engineering working agreement
    • Contributing to Boston.gov
    • Using GitBook
  • Standards & best practices
    • Digital Team Release Notes
    • Working with Partners
    • Accessibility at COB
      • Developers
      • Content Editors
        • How to guide
      • Resources
      • Working with Iterators
    • Analytics and Metrics
    • Code of Conduct
    • General
    • Code reviews
    • Project Management
    • Git / GitHub
      • Contacts at Github
      • Git Command Tips
      • GitHub Service Accounts
    • Code quality
      • Automated tests & static analysis
      • Code comments
      • Style guides
        • Drupal/PHP
          • D8 Dependency Injection (DI)
        • React/TypeScript
    • Technical documentation
    • Hosting and monitoring
    • Deployment
  • Guides
    • Technology stack and technologies used
      • Web applications
    • Drupal - boston.gov
      • Custom Development & Configuration
        • On Demand Instances
          • Acquia Environment setup checklist
        • Continuous Deployment Process
        • Developer Onboarding
          • Step 1: Local Dev Environments
          • Step 2: Version control
          • Step 3: Introduction to Drupal
          • (to be sorted)
            • Development environment
              • PHP CodeSniffer
              • VSCode IDE Setup
              • AWS for Developers
              • Using Windows
            • Installation instructions
              • Typical build output
              • Lando 101
              • Verify Installation
                • Local Patterns installation
              • Windows install
              • PhpStorm settings configurations
          • Step 4: Site Building in Drupal 8
        • Site Development Notes
          • Git Best Practices - Drupal
          • Drupal Cache
          • Drupal Config
          • Custom Modules
            • Custom Themes
              • Front-end Theme (bos_theme)
                • Site Breadcrumbs
              • Back-end Theme (bos_admin)
            • Adding Templates to Custom Modules
            • Custom Content Types
              • D7 -> D8 Conversion
              • Content Editor UX
                • Content Moderation
              • In-page Navigation Menu
            • Custom Paragraphs
              • D7 -> D8 Conversion
            • Custom Taxonomies
            • WebApps
          • Drupal UX-specific
            • Image Styles & UX
            • Example Content Pages
          • PHPStorm IDE
        • CKEditor
      • Drupal Apps/Content Types
        • Budget Website
        • Building Housing
          • BH Drupal Entities
          • BH Map Webpage
          • BH Property Webpage
            • BH Project Timeline
          • BH Salesforce Sync
            • Salesforce Contributed Module
        • Contact Form
        • Election results
        • Google reCAPTCHA
        • My Neighborhood Lookup
        • Metrolist
        • Metrolist (Drupal)
        • Project Tracker
          • Content Types (& Paragraphs)
          • Taxonomies
          • Views
          • Developer Notes
      • Drupal Features & Components
        • Single Sign On (SSO)
          • Drupal SAML Knowledgebase
          • SamlAuth
        • Maps on boston.gov
        • Charts on boston.gov
          • Quick Overview
          • Chart Data
          • Chart Configuration
          • Advanced Concepts and Techniques
          • Charts on boston.gov (legacy)
          • Useful Resources
      • Drupal micro-services (API end-points)
        • Integrating with Boston.gov
        • Assessing Forms Endpoint
        • Bos311 API
        • Cityscore
          • Knowledge Base
        • PDF Manager Module
        • PostMark Email Services
          • Postmark Knowledgebase
        • Upaknee Email List Services
        • Public Notices
        • Site Alerts
          • CodeRed Subscription
      • Drupal - Weekly Maintenance
      • Drupal - Periodic Maintenance
    • Digital Webapps
      • Libraries and Tools
        • Emotion
        • Storybook
        • Rollbar
      • Services
        • AWS-hosted Microservices
          • SQL Proxy API (DBConnector)
            • Developer Notes
          • PDFToolkit API (DB Connector)
            • Developer Notes
      • Webapps - Maintenance
      • Webapps
        • Boston Family Days
        • Property Tax Calculator
        • Access-Boston
          • Updating IAMDIR/Group Management/LDAP certificates
          • Node Server
          • Portal App Tile Configurations
          • Ownership of Concerns
          • Updating SAML Certificates
          • Applications/Services
            • Group Management
            • Confirm ID/ID Verification
            • Preferred Name
        • Sanitation Scheduling
        • Registry-Certs
          • Marriage Intention
      • DevOps
        • New service setup
          • Non-Monorepo Service Setup
        • Service Configuration
          • Editing a project’s configuration using Cyberduck
        • Managing AWS
          • Production Overview
          • AWS Bastion Access
          • Terraform
            • Updating the ECS cluster AMI
          • Restarting an ECS service
          • Encrypting service configuration for S3
          • Mounting AWS SFTP as a Drive (Mac)
        • Webapp Deployment
          • Deploy to AWS 2021
            • Deploy Tool (cob_ecrDeploy)
    • Fleet - Pattern Library
      • Patterns Library Architecture
      • Icon Library Architecture
      • Developers
        • Local Development for Drupal Developers
      • Patterns Library Maintenance
    • Legacy Website - cityofboston.gov
      • Animal Control
        • Dog Licenses
      • No Tow
        • Street Sweeping Reminders
        • Street Occupancy Alerts
        • Towing Alerts
        • Towing Search
        • Subscription Search
        • Proposed Restructure
          • Backend
        • Reillys Notes
      • Workers' Compensation Inquiry Form
      • Streetbook
      • Legacy Website - Maintenance
        • Animal Control Maintenance
        • Assessing Online (AOL) Maintenance
          • Knowledge-base
          • Disclosure Period
          • Annual PDF Initialization
          • Database Tables
        • No-Tow Maintenance
    • AgilePoint
      • AgilePoint: Adding Users
      • Migrating AGP Applications from one platform to another
    • The Hub - hub.boston.gov
      • The Hub - Maintenance
    • Maintenance
      • Updating SSL Certificates
    • Redirects
      • Redirecting from cityofboston.gov
      • URL redirects versus URL aliases - Drupal
      • DNS Redirects
    • Decommissioned Apps or Services
      • Archived Forms Information
      • CodeRed
      • Drupal 7
        • Deployment (2019)
          • Why do we peer-review pull-requests ?
      • Rentsmart
      • SnowStats
      • Ruby
    • Weglot translation
      • What to do in Weglot
      • What to do on the website or page
        • Softr
        • Drupal Powered Pages
        • Custom Pages
  • Projects
    • Project: Patterns Library Cleanup
      • Project: Refactoring Legacy CSS
        • Strategy
        • Regression Testing
        • Maintenance
    • Project: Upaknee
    • Project: Everbridge API + UI
    • Project: 311 CRM Upgrade
      • Project: City Worker Upgrade to City Worker 5
      • Project: Lagan 311 CRM upgrade to 15r4
    • Project: Fleet (Pattern Library Design System)
    • Project: Monorepo Decoupling
    • Inactive projects
      • Project: 311 (Salesforce Upgrade)
      • Project: Access Boston
        • General/Historical Documentation
          • Edit Config and Upload Icons
        • Processes
          • Process: Adding New Icon to Access Boston Website
          • Process: Non-icon Access Boston Feature or Bug Requests
          • Self-Service
      • Project: Alexa Skill
      • Project: Assessing Online
        • 2022 Notes
      • Project: Boards and commissions
      • Project: City Hall Appointment Scheduler
      • Project: CityScore
      • Project: Mobile Apps
      • Project: Permit Finder
      • Project: Public Notice Signage
      • Project: Registry Suite
        • Birth certificates
        • Marriage Certificates
        • Marriage Intention
        • Death Certificates
      • Project: Work With U.S. Digital Response Team
      • Project: TDM Points App
      • Project: Translation on boston.gov
  • External resources
    • Learning resources
    • Reference links
    • Applications and extensions
Powered by GitBook
On this page
  • What is Lando ?
  • Lando 101.
  • 1. A Pre-packaged Drupal infrastructure on your local computer.
  • 2. Container Management
  • 3. Command Line Interface for tasks in the
  • Lando Workflows.

Was this helpful?

Export as PDF
  1. Guides
  2. Drupal - boston.gov
  3. Custom Development & Configuration
  4. Developer Onboarding
  5. (to be sorted)
  6. Installation instructions

Lando 101

Using Lando in City of Boston.

PreviousTypical build outputNextVerify Installation

Last updated 5 years ago

Was this helpful?

In the context of this document: Think of as a for a stack constructed in .

What is Lando ?

For our purposes, Lando is a PHP-based tool-set which does 3 main things:

  1. Provides a pre-packaged local docker-based development environment,

  2. Provides a wrapper for common docker container management processes,

  3. Provides a means to execute development commands inside the container from the host.

Lando 101.

1. A Pre-packaged Drupal infrastructure on your local computer.

Lando curates an appropriate LAMP stack for Drupal development, largely removing the need for this skill in the local development team. The stack is contained within:

  • Docker images that are maintained by Lando.

  • A configuration file (landofile) which Lando parses into the necessary dockerfiles and utility scripts

COB uses a landofile which can be found at /[reporoot]/.lando.yml

2. Container Management

Lando provides a CLI for tasks developers commonly need to perform on the container.

A full list of defined Lando commands can be obtained by executing: lando

Command

Explanation

Starts all 3 lando containers, building them if they don't already exist.

Stops all 3 containers, but does not delete or destroy them. They can simply be restarted later.

Will rebuild the container using the values in the .lando.yml and .config.yml files.

  • If the containers have persistent images, these will be reused.

  • Any content in the database will be lost,

  • Project files cloned/managed by git will be left intact.

Will destroy the container.

  • If the containers have persistent images, these will be retained.

  • Any content in the database will be lost,

  • Project files cloned/managed by git will be left intact.

3. Command Line Interface for tasks in the

Lando provides a CLI for tasks developers commonly need to perform in the container.

Command

Explanation

Opens a bash terminal on the appserver docker container.

If the -c switch is used,

lando ssh -c "<command>"

then a terminal will be opened, the command provided will be run in the container and then the session will be closed.

eg: lando ssh -c "ls -la /app/docroot/modules/custom"

lando drush

Executes a drush cli command in the appserver container:

lando drush <command> eg lando drush status Note: a drush alias can be passed like this:

lando drush @alias <command>

eg: lando drush @bostond8.prod en dblog

lando drupal

Executes a Drupal cli command in the appserver container:

lando drupal <command>

lando composer

Executes a Composer command on the appserver container:

eg: lando composer require drupal/paragraphs:^1.3

lando drupal-sync-db

Executes a cob script which copies the database from the stage environment to the local development environment, and sync's all the configurations etc.

lando drupal-sync-db

lando drupal-pull-repo

Executes a cob script which pulls the latest project repository from gitHub and then clones and merges the private -repository. Finally it runs sync tasks to update the DB with any new configurations.

lando drupal-pull-repo

To update the repo's without sync'ing the content, execute:

lando drupal-pull-repo --no-sync

lando validate

Locally runs the linting and PHPCode sniffing checks that are run by Travis.

lando switch-patterns

Allows you to switch between patterns CDN hosts.

lando switch-patterns 2 switches to the local CDN in the patterns container

lando switch-patterns 3 switches to the production CDN

lando switch-patterns 4 switches to the stage patterns CDN.

A full list of defined Lando commands can be obtained by executing: lando

Lando Workflows.

- Pull and sync latest version of the github for the checked-out branch.

lando drupal-pull-repo

- Update local DB with content from Acquia Stage site

lando drupal-sync-db

- Update both code and DB locally, but leave container intact

lando drupal-pull-repo --no-sync && lando drupal-sync-db

- Completely rebuild local development environment

lando rebuild or to be completely sure, run these commands from the lando destroy && rm -rf <repo-path> git clone -b develop git@github.com:CityOfBoston/boston.gov-d8.git <repo-path> lando start

Lando
CLI
Drupal
LAMP
docker
lando start
lando stop
lando rebuild
lando destroy
lando ssh