Introduction to Managed Deployments for Magento
The M.D.G. IT deployment system for Magento 2 fully automates the deployment tasks that need to run each time a change is made to the filesystem. These steps take place off the production server in a separate build container, and files are then deployed to staging and production when the build successfully completes.
Using this deployment system for Magento has considerable advantages:
Minimal downtime during deployment
On large sites with multiple extensions, the build process can take over 30 minutes, during which the site is down if this is run directly on the production server. The latest version of the M.D.G. IT system has downtime of about 20 seconds, during which the site is in maintenance mode.
The build process doesn't put load on the production server
Because the CPU, RAM and disk intensive build steps (like composer install, setup:static-content:deploy and setup:di:compile) run automatically on a separate, dedicated server, no additional load is placed on the server that's serving live traffic while the build is running.
Builds and deployments are fully automated
All you or your developer need to do is update code. Builds and deployments are triggered automatically—or, if you prefer, manually at the click of a button. Site modification, extension installation and Magento upgrades can take place without even logging in to a server.
Failed deployments don't bring down the live site
The system only deploys successful builds to the server. If any of the build steps fail you can view the error output and troubleshoot the issue before rerunning the build.
Extension installation and update becomes simple and predictable
Because installing and upgrading extensions is driven from code rather than run ad hoc, upgrades become replicable and testable. Every installed extension and its version are defined on each build, which means that you can test extension functionality and compatibility on staging with the knowledge that this will work identically when deployed to production. This also applies when upgrading Magento to a new version.
Development becomes faster
Once set up, a managed deployment system is the fastest way to develop Magento. There is no need to run deployment commands on a server and wait for them to finish before running the next command—the entire process of deploying to staging can be automated to run on a commit. In addition, because the system is hosted in the same datacenter as the servers that the system is deploying to, files are transported to the server over a lightning fast network connection.
Undo is fast and simple
Rolling back to a previous version can be done in several clicks. Every previous version is saved, and the build and deployment processes are automated and repeatable, so reverting to a previous version of code is as easy as rerunning the deployment pipeline against a previous working version.
Best practice becomes automatic
When developing, there is often a tendency to just get the job done as simply and quickly as possible. This can take many forms, such as not setting up a staging site, not using version control, developing directly on a production server or making changes to Magento's dynamically generated /vendor directory. With a system like Magento 2, this always leads to problems down the line.
Because of the simple, tight integration with version control and the ease of testing changes before they are pushed to the live site, the system makes best practice software development as fast and simple as possible. Additionally, adopting a pipeline model allows iterative, agile development, where individual changes to functionality can be tested and released rapidly.
How to get started
The process of setting up an existing or new Magento site in pipeline deployments is straightforward and fast. We manage the original setup, either checking an existing site into version control or starting from an existing repository. Please use the navigation on the left of this page for more technical information, tutorials and how-to guides.
If you would like to see a demonstration of the deployment system at work, please open a Support Ticket and our friendly staff will explain the process in more detail and find the best way to get managed deployments working for your application.