|
| 1 | +--- |
| 2 | +group: cloud-guide |
| 3 | +title: Starter architecture |
| 4 | +functional_areas: |
| 5 | + - Cloud |
| 6 | +redirect_from: |
| 7 | + - /cloud/basic-information/starter-architecture.html |
| 8 | +--- |
| 9 | + |
| 10 | +Your {{site.data.var.ece}} 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. |
| 11 | + |
| 12 | +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. |
| 13 | + |
| 14 | +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. |
| 15 | + |
| 16 | +## Starter environment architecture |
| 17 | + |
| 18 | +The following diagram shows the hierarchical relationships of the Starter environments. |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | +## Production environment {#cloud-arch-prod} |
| 23 | + |
| 24 | +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. |
| 25 | + |
| 26 | +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][]. |
| 27 | + |
| 28 | +We highly recommend fully testing in your Staging environment and branch before pushing to the `master` branch which deploys to the Production environment. |
| 29 | + |
| 30 | +## Staging environment {#cloud-arch-stage} |
| 31 | + |
| 32 | +We recommend creating a branch called `staging` from `master`. The `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. |
| 33 | + |
| 34 | +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. |
| 35 | + |
| 36 | +{:.bs-callout-warning} |
| 37 | +We highly recommend testing every merchant and customer interaction in the Staging environment prior to deploying to the Production environment. See [Deploy your store][] and [Test deployment][]. |
| 38 | + |
| 39 | +## Integration environment {#cloud-arch-int} |
| 40 | + |
| 41 | +Developers use the Integration environment to develop, deploy, and test: |
| 42 | + |
| 43 | +- Magento application code |
| 44 | +- Custom code |
| 45 | +- Extensions |
| 46 | +- Services |
| 47 | + |
| 48 | +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. |
| 49 | + |
| 50 | +You can have an unlimited number of inactive branches for code storage. To access, view, and test an inactive branch, you must activate it. |
| 51 | + |
| 52 | +{% include cloud/note-enhanced-integration-envs-kb.md%} |
| 53 | + |
| 54 | +## Production and Staging technology stack {#technology} |
| 55 | + |
| 56 | +The Production and Staging environments include the following technologies. You can modify and configure these technologies through the [`.magento.app.yaml`][magento.app.yaml] file. |
| 57 | + |
| 58 | +- Fastly for HTTP caching and CDN |
| 59 | +- Nginx web server speaking to PHP-FPM, one instance with multiple workers |
| 60 | +- Redis server |
| 61 | +- Elasticsearch for searching for {{site.data.var.ece}} 2.2 and later |
| 62 | + |
| 63 | +### Services {#cloud-arch-services} |
| 64 | + |
| 65 | +{{site.data.var.ece}} currently supports the following services: PHP, MySQL (MariaDB), Elasticsearch (Magento 2.2.x and later), Redis, and RabbitMQ. |
| 66 | + |
| 67 | +Each service runs in a separate, secure container. Containers are managed together in the project. Some services are standard, such as the following: |
| 68 | + |
| 69 | +- HTTP router (handling incoming requests, but also caching and redirects) |
| 70 | +- PHP application server |
| 71 | +- Git |
| 72 | +- Secure Shell (SSH) |
| 73 | + |
| 74 | +You can have multiple applications running in the same project. Building a microservice-oriented architecture with {{site.data.var.ee}} is as easy as managing a monolithic application. |
| 75 | + |
| 76 | +### Software versions {#cloud-arch-software} |
| 77 | + |
| 78 | +{{site.data.var.ece}} uses the Debian GNU/Linux operating system and the [NGINX](https://glossary.magento.com/nginx) web server. You cannot upgrade this software, but you can configure versions for the following: |
| 79 | + |
| 80 | +- [PHP][] |
| 81 | +- [MySQL][] |
| 82 | +- [Redis][] |
| 83 | +- [RabbitMQ][] |
| 84 | +- [Elasticsearch][] |
| 85 | + |
| 86 | +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. |
| 87 | + |
| 88 | +You use the following files to configure the software versions that you want to use in your implementation. |
| 89 | + |
| 90 | +- [`.magento.app.yaml`][magento.app.yaml] |
| 91 | +- [`routes.yaml`][routes.yaml] |
| 92 | +- [`services.yaml`][services.yaml] |
| 93 | + |
| 94 | +### Backup and disaster recovery {#backup} |
| 95 | + |
| 96 | +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][]. |
| 97 | + |
| 98 | +## Prepare for development {#develop} |
| 99 | + |
| 100 | +The following workflow summarizes the process to branch your code, develop, and deploy your store: |
| 101 | + |
| 102 | +1. Set up your local environment |
| 103 | +1. Clone the `master` branch from the Project to your local environment |
| 104 | +1. Create a `staging` branch from `master` |
| 105 | +1. Create branches for development from `staging` |
| 106 | +1. Push code to Git that builds and deploys to an environment for testing |
| 107 | + |
| 108 | +See the following sections for detailed instructions and walk-throughs to develop, test, and deploy your store: |
| 109 | + |
| 110 | +- [Starter develop and deploy workflow][] |
| 111 | +- [Docker development][] (local development environment enabled by {{site.data.var.mcd-prod}}) |
| 112 | +- [Manage branches][] |
| 113 | +- [Deploy your store][] |
| 114 | +- [Site launch][] |
| 115 | + |
| 116 | +<!--Link definitions--> |
| 117 | +[Deploy your store]: {{ site.baseurl }}/cloud/live/stage-prod-live.html |
| 118 | +[Docker development]: {{ site.baseurl }}/cloud/docker/docker-development.html |
| 119 | +[Elasticsearch]: {{ site.baseurl }}/cloud/project/project-conf-files_services-elastic.html |
| 120 | +[Fastly CDN module for Magento 2]: {{ site.baseurl }}/cloud/cdn/cloud-fastly.html#fastly-cdn-module-for-magento-2 |
| 121 | +[Manage branches]: {{ site.baseurl }}/cloud/env/environments-start.html |
| 122 | +[MySQL]: {{ site.baseurl }}/cloud/project/project-conf-files_services-mysql.html |
| 123 | +[New Relic]: {{site.baseurl}}/cloud/project/new-relic.html#configure-new-relic-for-starter-environments |
| 124 | +[PHP]: {{ site.baseurl }}/cloud/project/project-conf-files_magento-app.html |
| 125 | +[RabbitMQ]: {{ site.baseurl }}/cloud/project/project-conf-files_services-rabbit.html |
| 126 | +[Redis]: {{ site.baseurl }}/cloud/project/project-conf-files_services-redis.html |
| 127 | +[Site launch]: {{ site.baseurl }}/cloud/live/live.html |
| 128 | +[Snapshots and backup management]: {{ site.baseurl }}/cloud/project/project-webint-snap.html |
| 129 | +[Starter develop and deploy workflow]: {{ site.baseurl}}/cloud/architecture/starter-develop-deploy-workflow.html |
| 130 | +[Test deployment]: {{ site.baseurl }}/cloud/live/stage-prod-test.html |
| 131 | +[launching your site]: {{ site.baseurl }}/cloud/live/live.html |
| 132 | +[magento.app.yaml]: {{ site.baseurl }}/cloud/project/project-conf-files_magento-app.html |
| 133 | +[nginx]: https://glossary.magento.com/nginx |
| 134 | +[routes.yaml]: {{ site.baseurl }}/cloud/project/project-conf-files_routes.html |
| 135 | +[services.yaml]: {{ site.baseurl }}/cloud/project/project-conf-files_services.html |
0 commit comments