Skip to content

Deploying on Webscale STRATUS

Webscale STRATUS simplifies code deployments like never before. Despite the incredible sophistication of the Webscale STRATUS cloud platform, Webscale STRATUS deployments are fairly straightforward and familiar. If you have Zero Downtime deployment enabled or wish to enable it, please follow the ZDD guide.

Before deploying code to a Webscale STRATUS environment:

  • Make sure that all symlinks are using absolute paths.
  • Note that CloudFront may take up to 15 minutes to clear.

To deploy code to Webscale STRATUS, use SSH and push the code, move symlinks, and flush caches. The built-in CLI commands provided in the Webscale STRATUS Control panel can also be used to assist.

After deploying, you should run the following additional commands:

/usr/share/stratus/cli autoscaling.reinit;
sleep 150s;
/usr/share/stratus/cli cache.all.clear;
  • autoscaling.reinit performs a rolling update of the php-fpm containers. When an environment is scaled this will ensure a seamless update across the scaled php-fpm services.
  • sleep 150s pauses to wait rolling update of php-fpm containers to complete because autoscaling.reinit is called asynchronously.

Troubleshooting

If files (other than js, css files that may still be clearing in CloudFront) are not clearing properly from CloudFront or if the Magento cache status (on/off) is reported differently between the CLI and the Magento Admin, use the following following the deployment:

/usr/share/stratus/cli crons.stop;
php bin/magento maintenance:enable;
n98-magerun2 cache:disable;
php bin/magento cache:flush;
/usr/share/stratus/cli cache.all.clear;

php bin/magento setup:upgrade;
php bin/magento setup:di:compile;
php bin/magento setup:static-content:deploy -f -j 10;
php bin/magento indexer:reindex;

n98-magerun2 cache:enable;
/usr/share/stratus/cli autoscaling.reinit;
sleep 150s;
php bin/magento cache:flush;
/usr/share/stratus/cli cache.all.clear;
php bin/magento maintenance:disable;
/usr/share/stratus/cli crons.start;

You can see pod status change during deployment under the General-> Pods section.

See also: