Lando as a project development tool for Drupal

Imagen creador

Eduar Rivera

2022-11-21

lando-como-herramienta de-desarrollo-de-proyectos-para-drupal

What is Lando?

Lando is a development tool that makes it easy to create and manage web projects. Lando relies on Docker containers to create and manage development environments. In addition, Lando supports a wide range of programming languages and tools, making it a versatile and flexible tool.

Some of Lando's features include:

  • Easy Configuration: Lando integrates with a wide range of programming languages and tools, making it easy to create custom configurations for each project.
  • Reproducibility: Development environments built with Lando are sandboxed and reproducible, meaning developers can ensure their code will run the same anywhere.
  • Scalability: Lando facilitates the scalability of development environments, allowing developers to adapt the available resources according to the needs of the project.
  • Integration with development tools: Lando integrates with a wide range of development tools, allowing developers to use their favorite tools to work on their projects.
  • Easy Sharing: Lando makes it easy to share your development environment with other team members, allowing for greater collaboration and reduced setup time.

With Lando, developers can focus on building their code without worrying about setting up and maintaining the development environment.

 

How does it work?

Lando's operation is based on a configuration file that describes the components needed to run the application. This file is called lando.yml and is used to define the settings for the development environment. The lando.yml file can be customized to include different components and configurations based on the needs of the project.

When you start a development environment with Lando, a Docker container is created for each of the components specified in the lando.yml file. Lando then sets up and connects these containers to create a fully functional development environment.

On the other hand, the homogenization of development environments is essential to guarantee the consistency and quality of web applications. However, it can be a difficult and expensive process, especially when working on complex projects with multiple developers and development environments. Fortunately, Lando is a tool that can help simplify and standardize these environments more efficiently.

How does Lando help standardize development environments?

  • Consistent Development Environments: Lando enables developers to create consistent development environments that work the same way across different platforms and operating systems. This means that developers can work in the same development environment, which reduces compatibility issues and ensures that the application will behave in the same way in different environments.
  • Automated development environment setup: Lando enables developers to set up and manage development environments automatically, reducing the time and effort required to create and manage development environments. Developers can use the lando.yml configuration file to define development environment settings and use command-line tools to manage and debug the environment.
  • Distribution of development environments: Lando allows developers to distribute development environments complete with the application and all its components. This means developers can share development environments with other team members, making collaboration easier and reducing the time it takes to set up new development environments.
  • Integration and validation testing: Lando enables developers to perform integration and validation testing in isolated and reproducible development environments. This means that developers can test the application in different development environments without affecting the production environment.

 

What problem does Lando solve?

Here are some of the top issues Lando helps fix:

  • Complex configuration: setting up and maintaining a development environment for a web project can be a complex and tedious process. Lando simplifies this process by providing predefined configurations for a wide variety of programming languages and tools. In addition, developers can easily customize the settings based on the needs of their project.
  • Environment inconsistencies: When developers work on different operating systems or hardware configurations, they may experience development environment inconsistencies. Lando solves this problem by creating isolated and reproducible development environments using Docker containers. This guarantees that the code will execute the same way everywhere.
  • Difficulty sharing the development environment: Sometimes sharing the development environment with other team members can be difficult due to differences in configuration or operating systems. Lando solves this problem by allowing developers to easily share the development environment with other team members through configuration files.
  • Difficulty scaling the development environment: As a web project grows, more resources may be required for the development environment, which can be difficult to set up and manage. Lando solves this problem by allowing developers to easily scale the development environment as needed.

 

And what are the most frequent commands?

Here are some of the most common commands used in Lando:

  • lando start: This command starts the Lando development environment and creates all the necessary containers to quickly and easily run the project. When executed, Lando starts the Docker container with the development environment specified in the 'lando.yml' configuration file. 
     
  • lando stop: This command stops and shuts down a local development environment that is running in Lando, allowing you to free up resources on your computer and stop all services running in the development environment. 
     
  • lando rebuild: This command is used to completely rebuild a local development environment from scratch. When you run this command, Lando stops the Docker container that is running, removes all services and volumes related to the development environment, then rebuilds and configures it from scratch using the configuration specified in the 'lando.yml' file. 
     
  • lando ssh: This command allows you to establish an SSH connection to the terminal of one of the project's containers. It is useful for debugging tasks and running commands in the container. To use this command, you must have installed Lando software and started a local development environment with 'lando start'. 
     
  • lando info: This command displays detailed information about the project, such as its name, URL, project root path, PHP version, MySQL version, database information, and other relevant details. It also shows useful information for debugging and troubleshooting the local development environment, such as environment variables, network configuration, Docker container configuration, etc. 
     
  • lando logs: This command displays the logs of the project's containers. It is useful for diagnosing problems and understanding what is happening in the development environment. 
     
  • lando drush: This command is used to run Drush commands on a Drupal project in the Lando local development environment, allowing you to efficiently manage and maintain the site without having to install Drush on the host machine. 
     
  • lando npm: This command runs NPM, a command-line tool for Node.js, in the Node.js container. It is useful for installing and managing Node.js dependencies. 
     
  • lando composer: This command runs Composer, a command-line tool for PHP, in the PHP container. It is useful for installing and managing PHP dependencies. 
     
  • lando db-import: This command is used to import a database into a web project in the Lando local development environment, allowing developers to work with up-to-date data and work more efficiently in their local development environment. 
     
  • lando destroy: This command is used to completely destroy and remove a web project and its environment in the Lando local development environment, ensuring that there are no remnants of the project or its environment on the host machine. 
     
  • lando db-export: This command is used to export a database from a local development environment to an SQL file. This can be useful for backing up the database or migrating it to another development environment or a production server.

 

How do we use it internally?

The way Lando is used internally depends on the development team and the specific project. We use it internally as a means of virtualizing Drupal projects, allowing for teamwork, as executing commands makes it possible to start a project hosted in a repository on different computers.

In general, Lando is a very flexible tool that can be used in many different ways to help development teams create, manage, and collaborate on web projects more efficiently and effectively.

You may also like

Alternativas a Lando
Eduar Rivera 2022-11-21
drush-en-todos-lados
Eduar Rivera 2022-11-21