ÃÛ¶¹ÊÓƵ

Smart wizards

The smart wizards can help you determine whether your Cloud configuration follows best practices. The available wizards assist with the following configurations:

  • Ideal state for minimal deployment downtime
  • Load-balancing configuration for database and Redis
  • Static Content Deployment (SCD) for on-demand, the build stage, or the deploy stage

Each of the smart wizard commands provides a verification response and, if applicable, a recommendation for the proper configuration.

Command
Description
wizard:ideal-state
Check that SCD is on the build stage, the SKIP_HTML_MINIFICATION variable is true, and the post_deploy hook configured in the Cloud environment. Not for use in the local development environment.
wizard:master-slave
Check that the REDIS_USE_SLAVE_CONNECTION variable and the MYSQL_USE_SLAVE_CONNECTION variable is true.
wizard:scd-on-demand
Check that the SCD_ON_DEMAND global environment variable is true.
wizard:scd-on-build
Check that the SCD_ON_DEMAND global environment variable is false and the SKIP_SCD environment variable is false for the build stage. Verifies that the config.php file contains information for stores, store groups, and websites.
wizard:scd-on-deploy
Check that the SCD_ON_DEMAND global environment variable is false and the SKIP_SCD environment variable is false for the deploy stage. Verifies that the config.php file does NOT contain the list of stores, store groups, and websites with related information.

As an example, you can verify that your configuration properly enables the SCD on-demand feature:

./vendor/bin/ece-tools wizard:scd-on-demand

A successful configuration returns:

SCD on-demand is enabled

A failed configuration returns:

SCD on-demand is disabled

Verifying an ideal configuration

The ideal configuration for your Cloud project helps to minimize deployment downtime by warming the cache and generating static content when requested by the user. This wizard automatically runs during the deployment process. If your Cloud is not configured for this ideal state, then you receive a message similar to the following:

- SCD on build is not configured
- Post-deploy hook is not configured
- Skip HTML minification is disabled

Ideal state is not configured

Based on the output, you need to make the following corrections to your configuration:

  1. Enable the Skip HTML minification variable.

    .magento.env.yaml

    code language-yaml
    stage:
      global:
        SKIP_HTML_MINIFICATION: true
    
  2. Configure the post-deploy hook.

    .magento.app.yaml

    code language-yaml
        post_deploy: |
            php ./vendor/bin/ece-tools post-deploy
    
  3. Push your code changes and run the test again. When your configuration is ideal, you receive the following message.

    code language-none
    Ideal state is configured
    
recommendation-more-help
05f2f56e-ac5d-4931-8cdb-764e60e16f26