Search Topic

Preparing Lagoon for Drupal 9 Launch Day

Lagoon + Drupal 9

As everybody knows, Drupal 9 is just around the corner. As a hosting provider, we need to ensure that our customers who wish to utilize Drupal 9 can do so. The release comes with a few environment requirements that we need to ensure we can handle and adds a few more behind-the-scenes actions for which we need to prepare ourselves.

Lagoon 1.6.0 supports Drupal 9, meeting all those requirements and helping our customers migrate to D9 as soon as possible.

PHP7.4 (also PHP7.3)


We’ve been providing PHP7.4 images alongside 7.2 and 7.3 for a few months now, so we’ve covered that! We’ll be looking to support PHP8 once it’s out in December. Hopefully, we can get some RC images out beforehand to test!

Drush 10

Although all our Drupal-specific PHP images contain Drush 8.3 as a fallback, we also install Drush-launcher to allow for project-specific Drush versions to be utilized. In the case of Drupal 9, Drush 10 is the minimum, so as long as that version is specified, you’ll be fine! Since Drush 9 was released, all PHP containers have included default drush.yml files.



MariaDB 10.3.7+

In every version of Lagoon up to v1.5.0, we’ve had to use the 10.2 version of MariaDB for compatibility reasons (mostly around Galera) – this means that we’ve had to base the MariaDB install on the Alpine 3.8 images (which is now EOL). To meet Drupal 9 minimum requirements, we’ve switched to the Alpine 3.11 packaged version (10.4). In doing this, we’ve dropped support for the MariaDB-Galera images (no one was using them anyway). We’ve also included a script in the image entry point to ensure that any databases are properly upgraded before use. This will allow us to use the upstream Alpine version going forward (hopefully, no more image pinning!).  Note that a Drupal module is available for customers that *must* use an older version of MariaDB with Drupal 9.0 – it can be installed via composer and requires some settings.php to enable.

We’ve also checked the PostgreSQL requirements – we have a compatible version of PostgreSQL installed (11.6 at the time of writing) and the necessary extensions (pg_trgm) installed. Note that as of the Drupal 9.0 release, the extension hasn’t been utilized yet, but it will be checked and enabled in a future release.

Contributed Drupal modules possibly in use

https://www.drupal.org/project/lagoon_logs will be D9 compatible from 1.1 onwards


Redis

https://www.drupal.org/project/redis is D9 compatible from 1.3 onwards

Solr 

https://www.drupal.org/project/search_api_solr is D9 compatible from 3.9/4.0 onwards

https://www.drupal.org/project/search_api is D9 compatible from 1.17 onwards


Varnish

https://www.drupal.org/project/lagoon_varnish has D9 compatibility in the 1.x-dev branch

https://www.drupal.org/project/varnish_purge is D9 compatible from 2.0 onwards
https://www.drupal.org/project/purge is D9 compatible from 3.0 onwards

Drupal Console


Our previous Drupal-example projects included Drupal Console and Drush to manage aspects of your Drupal site.  Drupal Console is not yet compatible with Drupal 9 (there is an open issue with making it Symfony 4 compatible).  To upgrade an existing site to Drupal 9, you will first need to “composer remove” Drupal Console if you have it installed.  The base images we provide only have Drupal-console-launcher installed, which will not conflict with your site or requirements.

Testing

We’ve also implemented some new Drupal 9 tests in Lagoon—currently, just one test (PHP7.4 and MariaDB), but we will be porting more tests shortly.

To demonstrate how to set up a Drupal9 project, we’ve redeveloped our Drupal-example project and taken on board some feedback that needs simplifying. We’ve created a new project at https://github.com/amazeeio/drupal-example-simple – which is by default a Drupal 8 install (that now takes advantage of the improvements in the Drupal "Composer in Core" initiative and uses a more widely compatible scaffold technique) but also has a 9.x branch that includes all the necessary changes for D9 (hint: there aren’t many).

We’ve worked really hard to ensure that Lagoon is ready for Drupal 9, and we look forward to seeing your sites as they start to go live.


Writer