Lando Drupal 8

broken image


Developing a Drupal 8 site or blog with a hosting plan that supports Drupal 8 installation is relatively easy to do than doing it locally.This adds to the upfront cost, even though you just wanted to see how Drupal 8 works.

Lando Drupal 8

If you wish to develop a Drupal 8 blog or site locally, there are few solutions that can help you to do so.

GitHub Gist: instantly share code, notes, and snippets. Getting started with Lando, Pantheon, and Drupal 8. Lando + Pantheon + Drupal 8. Docs. Pantheon. Lando. Create Pantheon D8 Site. `lando init pantheon`. Commit `.lando.yml` config.

‘Acquia Dev Desktop' is one of them, it helps in creating a local development environment for Drupal 8. But, it only have installer for Mac and Windows.

Installing ‘Ampps', ‘WampServer', or a ‘LAMP'/'LEMP' stack could be one of the option as well.

But, I have found Lando makes it easier to do so. Irrespective of the operating system or distro you are working on.Moreover, it runs as an ‘abstraction layer' to spin up docker containers with sane defaults.

Let us look at the steps on how to install and use Lando for creating a local development environment for Drupal 8.

1. Prerequisites for creating a development environment for Drupal 8 with Lando:

Lando

1. Install Docker

For Lando to work, we need to install Docker for Mac/Docker for Windows/Docker CE (if it's not already installed).

Lando Drupal 8 1

2. Install Lando

  • Download the latest .deb, .dmg, .exe, .pacman, or .rpm Tupperware modular mates rectangle 3. package from Lando's GitHub repository (Download the correct package depending on your OS or distro).

  • Install the package.

  • If your distro uses a docker group, make sure your user is a member of it.

    Commands for doing so will be something like:

    $ sudo groupadd docker

    $ sudo usermod -aG docker $USER Streamelements obs.

    Note: Visit here for more details on this: https://docs.docker.com/install/linux/linux-postinstall/

  • Verify that you can run docker commands without sudo.

    $ docker run hello-world

  • To see complete documentation on Installing Lando for your OS, visit appropriate links:

    • Linux: https://docs.devwithlando.io/installation/linux.html
    • MacOS: https://docs.devwithlando.io/installation/macos.html
    • Windows: https://docs.devwithlando.io/installation/windows.html

3. Install Composer

Composer needs to be installed globally. This will ensure to pull Drupal 8 codebase using composer.

4. Install NodeJS and NPM

‘nodejs' and ‘npm' should be installed to install npm packages. Themes or some modules for Drupal 8 might need these packages.

2. Creating the Local development environment for Drupal 8 with Lando.

  1. Open the terminal from home directory. This can be from anywhere as well. Note: You may use Git Bash if you are using windows.

  2. Acquia drupal 9. Use the following command to create a folder named ‘my_site_name_dir' and pull the Drupal 8 code inside it.

    $ composer create-project drupal-composer/drupal-project:8.x-dev my_site_name_dir --stability dev --no-interaction

    Note: Change ‘my_site_name_dir' to ‘drupaldev' for this example.

  3. Go inside the created directory.

  4. Add a .lando.yml file (inside the directory ‘drupaldev') with Drupal 8 recipe mentioned here: https://docs.devwithlando.io/tutorials/drupal8.html

  5. Open the terminal from this directory. (Be sure about your path when in terminal. You should be inside the ‘drupaldev' directory.) Enter the following command:

    $ lando start

  6. The above command will create services like apache, php and mysql necessary for Drupal 8 development environment. Note the details shown in the output, we will need this to access the Drupal site later.

    We can also use $ lando info to get this information.

  7. Use this command to install drush 8.x or downgrade the previous version installed. lando composer require drush/drush 8.x

  8. A development environment for Drupal 8 has been created.

Now we are ready to experiment and start developing with Drupal 8.

Note: Use the command $ lando stop to kill the app (environment) created. To completely erase the database and server environment use: $ lando destroy [app name]


Important links:

  • Official page for ‘drupal-composer/drupal-project': https://github.com/drupal-composer/drupal-project
  • Lando documention for Drupal 8: https://docs.devwithlando.io/tutorials/drupal8.html
  • Drupal documentation for using Composer to manage Drupal site dependencies: https://www.drupal.org/docs/develop/using-composer/using-composer-to-manage-drupal-site-dependencies
  • Drupal Composer installation guide: https://www.drupal.org/docs/user_guide/en/install-composer.html
  • This blog by Jeff Geerling is helpful: https://www.jeffgeerling.com/blog/2018/getting-started-lando-testing-fresh-drupal-8-umami-site

You may add your impressions regarding the blog post here:

Lando Drupal 8

Here's how to create a development environment for Drupal 8 with Lando. https://t.co/L6XVqNUt1q#Drupal8#Drupal#CMS#webdesign#Lando#Bhooraj

Lando Drupal 8 Menu

Lando Drupal 8

If you wish to develop a Drupal 8 blog or site locally, there are few solutions that can help you to do so.

GitHub Gist: instantly share code, notes, and snippets. Getting started with Lando, Pantheon, and Drupal 8. Lando + Pantheon + Drupal 8. Docs. Pantheon. Lando. Create Pantheon D8 Site. `lando init pantheon`. Commit `.lando.yml` config.

‘Acquia Dev Desktop' is one of them, it helps in creating a local development environment for Drupal 8. But, it only have installer for Mac and Windows.

Installing ‘Ampps', ‘WampServer', or a ‘LAMP'/'LEMP' stack could be one of the option as well.

But, I have found Lando makes it easier to do so. Irrespective of the operating system or distro you are working on.Moreover, it runs as an ‘abstraction layer' to spin up docker containers with sane defaults.

Let us look at the steps on how to install and use Lando for creating a local development environment for Drupal 8.

1. Prerequisites for creating a development environment for Drupal 8 with Lando:

1. Install Docker

For Lando to work, we need to install Docker for Mac/Docker for Windows/Docker CE (if it's not already installed).

Lando Drupal 8 1

2. Install Lando

  • Download the latest .deb, .dmg, .exe, .pacman, or .rpm Tupperware modular mates rectangle 3. package from Lando's GitHub repository (Download the correct package depending on your OS or distro).

  • Install the package.

  • If your distro uses a docker group, make sure your user is a member of it.

    Commands for doing so will be something like:

    $ sudo groupadd docker

    $ sudo usermod -aG docker $USER Streamelements obs.

    Note: Visit here for more details on this: https://docs.docker.com/install/linux/linux-postinstall/

  • Verify that you can run docker commands without sudo.

    $ docker run hello-world

  • To see complete documentation on Installing Lando for your OS, visit appropriate links:

    • Linux: https://docs.devwithlando.io/installation/linux.html
    • MacOS: https://docs.devwithlando.io/installation/macos.html
    • Windows: https://docs.devwithlando.io/installation/windows.html

3. Install Composer

Composer needs to be installed globally. This will ensure to pull Drupal 8 codebase using composer.

4. Install NodeJS and NPM

‘nodejs' and ‘npm' should be installed to install npm packages. Themes or some modules for Drupal 8 might need these packages.

2. Creating the Local development environment for Drupal 8 with Lando.

  1. Open the terminal from home directory. This can be from anywhere as well. Note: You may use Git Bash if you are using windows.

  2. Acquia drupal 9. Use the following command to create a folder named ‘my_site_name_dir' and pull the Drupal 8 code inside it.

    $ composer create-project drupal-composer/drupal-project:8.x-dev my_site_name_dir --stability dev --no-interaction

    Note: Change ‘my_site_name_dir' to ‘drupaldev' for this example.

  3. Go inside the created directory.

  4. Add a .lando.yml file (inside the directory ‘drupaldev') with Drupal 8 recipe mentioned here: https://docs.devwithlando.io/tutorials/drupal8.html

  5. Open the terminal from this directory. (Be sure about your path when in terminal. You should be inside the ‘drupaldev' directory.) Enter the following command:

    $ lando start

  6. The above command will create services like apache, php and mysql necessary for Drupal 8 development environment. Note the details shown in the output, we will need this to access the Drupal site later.

    We can also use $ lando info to get this information.

  7. Use this command to install drush 8.x or downgrade the previous version installed. lando composer require drush/drush 8.x

  8. A development environment for Drupal 8 has been created.

Now we are ready to experiment and start developing with Drupal 8.

Note: Use the command $ lando stop to kill the app (environment) created. To completely erase the database and server environment use: $ lando destroy [app name]


Important links:

  • Official page for ‘drupal-composer/drupal-project': https://github.com/drupal-composer/drupal-project
  • Lando documention for Drupal 8: https://docs.devwithlando.io/tutorials/drupal8.html
  • Drupal documentation for using Composer to manage Drupal site dependencies: https://www.drupal.org/docs/develop/using-composer/using-composer-to-manage-drupal-site-dependencies
  • Drupal Composer installation guide: https://www.drupal.org/docs/user_guide/en/install-composer.html
  • This blog by Jeff Geerling is helpful: https://www.jeffgeerling.com/blog/2018/getting-started-lando-testing-fresh-drupal-8-umami-site

You may add your impressions regarding the blog post here:

Lando Drupal 8

Here's how to create a development environment for Drupal 8 with Lando. https://t.co/L6XVqNUt1q#Drupal8#Drupal#CMS#webdesign#Lando#Bhooraj

Lando Drupal 8 Menu

Lando Drupal 8 Multisite

— bhooraj (@bhoowrites) July 31, 2019



broken image