The article is the go to place for questions about MDOQ production instances. We cover when and why you should sync production instances. The different states of MDOQ production instances.
Production Instance States
Because production instances need to be different from development instances for a number of reason (SSL, URLs, Database, PHP-FPM etc...) MDOQ production instances have two main states:
- Development - When you are wanting to completely recreate the instance (more on this below)
- Production - When your site is live and serving customers (more on this below)
(N.B even though these state names are similar to Magento deploy modes, they do not relate to each other nor are they linked in anyway, your can have production instance in state development, but Magento deploy mode production for example.)
With these two states MDOQ is then able to determine what it should do when sync'ing components. A good example for this is MySQL. If you're in development state and you sync MySQL, MDOQ will completely recreate the MySQL service and database (reimporting the configured backup). However if you are in production mode, MDOQ will not drop the database, it will just recreate the service MySQL service on top of the existing database. (this is how you would upgrade MySQL)
Please see the table for a list of the different behaviours for each component in each state.
Component | State: Development | State: Production |
Code | Same as a development instance | Same as a development instance |
MySQL | Same as a development instance | Will recreate the service, but will not remove the database |
Redis | Same as a development instance | Same as a development instance |
Git | Will checkout the configured main branch | Will checkout the configured main branch |
Elasticsearch | Same as a development instance | Same as a development instance |
PHP-FPM | Same as a development instance | Same as a development instance |
Composer | Same as a development instance | Same as a development instance |
Installation | Will only run if "no backup" is selected for MySQL | Will not run at all |
Media | Same as a development instance | Will not run at all |
Cron | Same as a development instance | Same as a development instance |
Environmental Changes | Same as a development instance | Will not run at all |
Nginx | Same as a development instance | Same as a development instance |
SSH | Same as a development instance | Same as a development instance |
Helpers | Same as a development instance | Same as a development instance |
Post Roll Up Actions | Same as a development instance | Will not run at all |
Varnish | Same as a development instance | Same as a development instance |
Which state is my instance in?
Determining which state your production instance is in is simple. With the production instance selected within the MDOQ UI do you see a big red "Go Live" button to the left of perform release?
If yes: You are in development mode
If no: You are in production mode
How do I go to production state?
To go from development to production state, you just need to click "Go Live" this will not carry out any action other then to update the state within MDOQ.
How do I go to development state?
To go from production to development state, you just need to raise a ticket with us. This is just because from the moment you are in development mode there is a potential for data loss and we just need to confirm you understand this before transitioning.
Syncing Production Instances
When and why should you sync production instances?
When in development mode you can sync as often as you want, though there may be manual steps required to bring the instance up. A common example is the env.php is missing from your code backups which means it needs to be manually rebuilt.
When in production mode, you should only be syncing to apply infrastructure updates for example:
- Change the version of PHP-FPM for the instance, then select PHP-FPM from within the sync dialog. This will upgrade PHP-FPM for the instance.
- Add a new SSH key, then select SSH from within the sync dialog