This component controls actions taken right after the instance is ready. For example for a Magento 2 instance, this would be where the MDOQ admin user is added. This component can run configuration as code scripts to allow you to fine tune your instances based on a number of parameters in a source controlled manner, for more information see Configuration As Code.
When creating or recreating an instance or this component, if Elasticsearch is enabled and set to
latest and no Elasticsearch snapshot is found. MDOQ will automatically run a Magento reindex (
php bin/magento indexer:reindex) to populate Elasticsearch with data.
To speed this pro
- Admin Users - Users that will be created within the admin
- Commands to run after installation - A set of commands to run as part of instance creation. This can be used to run custom build commands.
- Run commands as - the user to run "Commands to run after installation" as.
- Enable Data Migration (Magento 2 only) if enabled as part of the roll up MDOQ will perform a data migration.
- Version to version - the version of Magento you are migrating from and to
- Magento 1 version - the version number of Magento 1 you are migrating from
- Magento 1 crypt key - the crypt key of Magento 1
- Magento 1 Database Name - the name of the database for Magento 1
- Magento 1 Database Host - the host of the database for Magento 1
- Magento 1 Database User - the username to connect to the Magento 1 database
- Magento 1 Database Password - the password to connect to the Magento 1 database
- Magento 1 Database Table Prefix - the table prefix of the Magento 1 tables
- Migrate Settings - if enabled MDOQ will run the migrate settings part of the migration
- Migrate Data - if enabled MDOQ will run the migrate data part of the migration
- Cleanup Crontab - if enabled the
cron_scheduletable will be cleared down as part of the migration
Configuration As Code
Configuration as code is the term used when we configure an environment (or instance in our case) using scripts / files that are stored in source control. This allows us finely tune configuration on a per instance/environment basis, as well as have a version history in our source control repository.
It should be noted that this configuration is intended for environment / instance set up, it is not invoked during a Magento release, for more information on configuring Magento during a release please see Configuring Magento During Releases. If you have custom requirements such as pre build commands, or specific module configuration that changes between production and development this is the correct place.
When an instance is created MDOQ will look for the file
mdoq/post_roll_up_actions, if this file exists and is executable. MDOQ will run this script at different points during the instance creation process with different arguments depending on the step.
- Argument 1, this is the "step" argument, it indicates to the script the point at which it is being executed.
The possible values are:
- Argument 2, this is a representation of the current state of the instance in comparison to the master branch.
The possible values are:
There is a template for this script here.
It can be installed by running the following from the project root.
wget https://raw.githubusercontent.com/MDOQ-UK/Templates/main/post_roll_up_actions -O mdoq/post_roll_up_actions && chmod a+x mdoq/post_roll_up_actions
N.B: if you just add in as is, MDOQ will log the execution so you can see the points at which it would have been ran
We recommend following the Configuration As Code For Magento Environments (Instances) guide if you are looking to set this up for your project.