MDOQ is a full deployment pipeline, which means that you don't need to perform manual releases at all. We do understand though that there may be times where you are unable to use an instance to create a deployment package for MDOQ to release.
In this case performing a manual release may be your remaining option. Which is possible, but does have some implications that need highlighting:
- SLA Impact - For those using MDOQ hosting, we will be unable to assist with any release issues. As we won't be able to validate the steps taken to perform the release or validate the code was in fit state to go live.
- The following release (after the emergency hotfix) will not be able to automatically roll back to the previous deployment. (As the deployment package was never generated by MDOQ)
- We strongly recommend against the process unless absolutely necessary
Pre-Requisites
Before starting a manual release the following needs to be in place
1. MDOQ Connector
The MDOQ connector needs to be install and configured. As you will need to use this to flush opcache following the release.
2. SSH Key
You will need to upload a valid and authorised SSH key to the production site under ~/.ssh/id_rsa
3. Valid Tag
The hot fix work going live will need to be in master and tagged.
For example:
- Production is on master on tag 1.0.0
- You have some work in the branch hot_fix_1
- You need to merge hot_fix_1 into master
- You then need to tag master as 1.0.1 (any valid tag, semantic versioning is to increment the last number by 1)
Performing The Release
These steps are general steps and will not include project specific commands.
On the production server run the following:
-
git fetch --tags
-
php bin/magento maintenance:enable
-
php bin/magento cache:flush
-
git checkout 1.0.1
replacing 1.0.1 with your specific tag -
composer install --no-dev
-
php bin/magento deploy:mode:set production
-
php bin/magento setup:upgrade --keep-generated
-
php bin/magento cache:flush
-
php bin/magento maintenance:disable
- Within MDOQ you then need to select the production instance > Toolbelt > Actions > Flush Opcache > Flush
N.B because of how Magento's maintenance mode works (it loads the whole application) there may be stale files in Opcache. To resolve you may need to flush cache on the server, then flush Opcache via MDOQ a few times.
Following The Release
Following a successful release we recommend merging master back into all your currently running instances.