Containers for developers

aleksijohansson

First, let's make an assumption that there's enough reasons for a developer to use an IDE like IntelliJ IDEA and that it doesn't make sense to have a GUI on the production server or the staging/development server that runs the Drupal site to run such an IDE. There are at least two common ways to develop larger Drupal sites locally. Here's a few pros on cons of these two:

Run the stack on your local development machine​

Pros

  • Site runs fast (with full power of the development machine)
  • IDE runs fast

Cons

  • Local environment stack doesn't match the production environment (think about multiple projects with different versions of PHP for example)
  • Local environment configuration doesn't match the production environment (multiple sites enabled in Apache/Nginx, multicore SOLR etc.)
  • Hard to create complex setups like multiple PHP instances together with a load balancer
  • Environment of multiple developers most likely not consistent

Run stack on a virtual environment

Pros

  • Environment matches the production environment, which eventually leads to more productive development
  • Possible to replicate/test/develop complex setups like database clusters
  • Consistent setup across multiple developers

Cons

  • Site is slow (files shared from host machine to the virtual machine)
  • IDE is slow (files shared from virtual machine to host)
  • Depending on the way of building the environment there might be issues with building older environments with outdated software that's not available any more

For long the bottleneck of local development of larger Drupal sites with corresponding local environment to production environment has been the file sharing between a virtual environment and the host machine IDE. From the many benefits of containers, one of them is the fast file sharing with the host machine. The drawback is that containers can only be run natively on a Linux host.

This session is about my sleepless nights in search for a faster local environment. My dive to Linux desktop and containers from the world of OS X and virtual machines. I'm also searching for a co-host to get more into the other benefits of containers.

Session Track

DevOps

Experience Level

Intermediate

Drupal Version