This page explains the concepts and principles of how the deployment process (performing a release) works.
Even though MDOQ supports a few platforms (Magento 1, Magento 2 and VueStorefront) the process to deploy / release work to production is the same. The underlying differences between them is handled transparently by MDOQ to allow you to get on with what you need to do.
MDOQ at it's heart uses the agile/iterative development mentality, the general idea behind this mentality is, do smaller changes and release more often.
It is out of scope of this explanation to compare the merits of many small iterative developments over fewer larger developments. However MDOQ supports both approaches so it can aid you, with whichever your preference.
Before we dive in a few key terms
- deployment - is the term MDOQ uses to describe all the files/assets required to deploy that specific version of your site. It is intrinsically linked to whatever source control system you are using.
- release - is the process of, and around pushing a specific deployment to your live site.
In MDOQ terms you create a deployment, then you can release a deployment to live
Releasing a single piece of work
Before you can create a deployment and release it you need to have:
- Created An Instance
- Done some development / work e.g Installed a module
- Committed this work to source control
If this is the case you should have an instance that has work on it ready to go to production.
As you can see from the diagram above, the process can be broken down into four steps:
1. Create a deployment
- Select the instance containing the work from the instance list
- Click the "I'm done" button. This will load the target branch dialog
- Select Master From the list. MDOQ will then confirm that this instance is only ahead.
- Select "Proceed To Regression Testing". At this point MDOQ will recreate your instance (if allowed) then create a deployment from the files on the instance.
By following the previous steps, MDOQ will have put your instance into production mode. Following this MDOQ will automatically run automated tests against your instance.
If these tests fail you will be given the option to cancel the process and go back to the instance or carry on. Regardless of the outcome of the regression test MDOQ will have made a deployment from the instance.
At this point you can test the work on the instance, you will notice the "I'm Done" button has been replaced by "Client Declined" and "Client Accepted".
- Client Declined: Will destroy the deployment and put the instance back into a state ready to be worked on.
- Client Accepted: Will take you to the next step.
3. Publish the deployment
Selecting Client Accepted will show the Client Accepted Dialog.
Here you can enter a "Next Tag", this will be how you identify this specific deployment in the future. MDOQ will try and determine what the "Next tag" is automatically, though you can change this to whatever you desire.
Clicking "Create deployment" will publish the deployment under this tag.
4. Release deployment
Once the "Accept Approval" action has finished successfully
Your deployment is ready to be released.
- Select the Production Instance
- Select "Perform Release", this will show you the Release dialog
- Select the tag you created from the drop down
- Select the release type you want.
- Select "Release"
This will kick off the release of your deployment.
MDOQ is able to perform two types of releases:
This is where the sites "maintenance mode" will be employed to allow database changes to be ran. Although labelled "downtime", in most cases the downtime experienced is under 10 seconds.
- Zero Downtime
The site will not be put into maintenance mode, the changes will be put in place whilst the site remains operational.
Unfortunately MDOQ is unable to automatically determine which type of release is applicable based on the work in the deployment. If in any doubt it is always safer to perform a downtime release.
Target Branch Dialog
This dialog contains all the options available to you when preparing your instance for a deployment to be made from it.
- Target Branch:
This is where your work will go
- Skip Regression Testing:
This does just as it says, not advised but available to do.
- Allow DB Recreation:
As part the instance preparation MDOQ does, it can recreate the database. Doing this prior to final testing ensures that any scripted changes, are also tested.
- Allow Code Recreation:
Similarly to DB Recreation, this allows MDOQ to recreate the codebase, this ensures that only source controlled work is test and taken to production.
Client Accepted Dialog
This dialog contains all the options required to version the deployment.
- Next Tag:
This will be the name of the deployment
- Zero Downtime deployment: the release type to perform
- Force Git Checkout: doing this will cause MDOQ to perform a forced git checkout when checking out the tag.