Your Magento Commerce Cloud Starter architecture supports up to four environments, including a Master environment that contains the initial project code, the Staging environment, and up to two Integration environments.
All environments are in PaaS (Platform-as-a-Service) containers. These containers are deployed inside highly restricted containers on a grid of servers. These environments are read-only, accepting deployed code changes from branches pushed from your local workspace. Each environment provide a database and web server.
You can use any development and branching methodology you like. When you get initial access to your project, we strongly recommend that you create a Staging environment from the Master environment. Then, create the Integration environment by branching from Staging.
Starter environment architecture
The following diagram shows the hierarchical relationships of the Starter environments.
The Production environment provides the source code to deploy Magento to the Cloud infrastructure that runs your public-facing Magento single and multi-site storefronts. The Production environment uses code from the
master branch to configure and enable the web server, database, configured services, and your Magento application code.
Because the production environment is read-only, you must make changes in the Integration environment and deploy across the architecture from the Integration environment to Staging, and finally to the Production environment. See Deploy your store and Site launch.
We highly recommend fully testing in your Staging environment and branch before pushing to the
master branch which deploys to the Production environment.
We recommend creating a branch called
staging branch deploys code to the Staging environment to provide a pre-production environment to test code, modules and extensions, payment gateways, shipping, product data, and much more. This environment provides the configuration for all services to match the Production environment including Fastly, New Relic APM, and search.
Additional sections in this guide provide instructions for final code deployments and testing production level interactions in a secure Staging environment. For best performance and feature testing, replicate your Production database into the Staging environment.
Developers use the Integration environment to develop, deploy, and test:
- Magento application code
- Custom code
You can have up to two active Integration environments. You create an Integration environment by creating a branch from the Staging branch. When you create an Integration environment, the environment name matches the branch name. An integration environment includes a web server and a database. It does not include all services, for example Fastly CDN and New Relic are not available.
You can have an unlimited number of inactive branches for code storage. To access, view, and test an inactive branch, you must activate it.
Projects provisioned before June 5, 2020 had multiple, smaller Integration environments. If you need a larger Integration environment for testing and development, request an upgrade to Enhanced Integration environments. See the Integration Environment request article in the Magento Help Center for details.
Production and Staging technology stack
The Production and Staging environments include the following technologies. You can modify and configure these technologies through the
- Fastly for HTTP caching and CDN
- Nginx web server speaking to PHP-FPM, one instance with multiple workers
- Redis server
- Elasticsearch for searching for Magento Commerce Cloud 2.2 and later
Magento Commerce Cloud currently supports the following services: PHP, MySQL (MariaDB), Elasticsearch (Magento 2.2.x and later), Redis, and RabbitMQ.
Each service runs in a separate, secure container. Containers are managed together in the project. Some services are standard, such as the following:
- HTTP router (handling incoming requests, but also caching and redirects)
- PHP application server
- Secure Shell (SSH)
You can have multiple applications running in the same project. Building a microservice-oriented architecture with Magento Commerce is as easy as managing a monolithic application.
Magento Commerce Cloud uses the Debian GNU/Linux operating system and the NGINX web server. You cannot upgrade this software, but you can configure versions for the following:
In the Staging and Production environments, you use Fastly for CDN and caching. When your environment is initially provisioned, we install the latest version of the Fastly CDN extension for Magento. You can upgrade the extension to get the latest bug fixes and improvements. See Fastly CDN module for Magento 2. You also have access to New Relic for performance management.
You use the following files to configure the software versions that you want to use in your implementation.
Backup and disaster recovery
You can create a snapshot of your database and file system using the Project Web Interface or the CLI. The snapshot includes your deployed code, installed software and services, and data. See Snapshots and backup management.
Prepare for development
The following workflow summarizes the process to branch your code, develop, and deploy your store:
- Set up your local environment
- Clone the
masterbranch from the Project to your local environment
- Create a
- Create branches for development from
- Push code to Git that builds and deploys to an environment for testing
See the following sections for detailed instructions and walk-throughs to develop, test, and deploy your store: