Deploy without interruption
Pipeline structure:
Basic principles:
- Phase 1-4 operate based on development setup. This can't be changed because the tests require components from the dev context, but production doesn't.
-
Build Site
andBuild Theme
produce artefacts for the subsequent tasks, but as they contain dev components, those artefacts should not be used in production, right? - Deployment currently builds the site again in production, but that should be changed: build the live site artefacts separately and deploy them such that we can switch within a second.
- We currently run the LAMP stack for all the Drupal sites on the host and sometimes lock those sites into jails so that they can't affect each other. The question remains if we should change that too by moving the LAMP stack into Docker containers, that would make Jails redundant. But this could be a separate step and not necessarily done the same time we approach the above.
Let's have a look into the Drupal application directory structure:
The build artefact contains the full structure except:
/files/
/settings/
So, when rolling out the artefact, we need to "merge" the artefact with those 2 directories from the existing instance and then make the new one active, removing the old one afterwards.
Note: as of today, there is a third directory (web/sites
) which is not in the artefact and expected to be merged but we found out that we can avoid that because that directory only contains relative symbolic links, so we will include them in the artefact in the future.
Another note: we could also move those 2 directories out of the project root and symlink to them as well. Then there won't be any need for merging.