Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Updated Pro and Starter architecture to reflect enhanced integration environment provisioning #7369

Merged
merged 9 commits into from
Jun 10, 2020
4 changes: 2 additions & 2 deletions src/_data/toc/cloud-guide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ pages:
versionless: true
children:
- label: Starter architecture
url: /cloud/basic-information/starter-architecture.html
url: /cloud/architecture/starter-architecture.html
versionless: true

- label: Starter develop and deploy workflow
url: /cloud/basic-information/starter-develop-deploy-workflow.html
url: /cloud/architecture/starter-develop-deploy-workflow.html
versionless: true

- label: Pro architecture
Expand Down
2 changes: 2 additions & 0 deletions src/_includes/cloud/note-enhanced-integration-envs-kb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{:.bs-callout-info}
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](https://support.magento.com/hc/en-us/articles/360043032152) article in the _Magento Help Center_ for details.
2 changes: 1 addition & 1 deletion src/cloud/architecture/cloud-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ For comparison, each plan includes the following infrastructure features and sup

## Starter projects

The [Starter plan architecture]({{ site.baseurl }}/cloud/basic-information/starter-architecture.html) has four environments:
The [Starter plan architecture]({{ site.baseurl }}/cloud/architecture/starter-architecture.html) has four environments:

- **Integration**—The Integration environment provides three testable environments. Each environment includes an active Git branch, database, web server, caching, some services, environment variables, and configurations.
- **Staging**—As code and extensions pass your tests, you can merge your Integration branch to a Staging environment, which becomes your pre-Production testing environment. It includes the `staging` active branch, database, web server, caching, third-party services, environment variables, configurations, and services, such as Fastly and New Relic.
Expand Down
81 changes: 64 additions & 17 deletions src/cloud/architecture/pro-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ functional_areas:
- Cloud
---

Your {{site.data.var.ece}} Pro architecture supports a maximum of **eight** environments that you can use to develop, test, and launch your store. Each environment contains a database and a web server:
Your {{site.data.var.ece}} Pro architecture supports multiple environments that you can use to develop, test, and launch your store.

- **Integration**—Provides a single environment branch, and you can create up to four additional, environment branches. This allows for a maximum of five _active_ branches deployed to Platform-as-a-Service (PaaS) containers.
- **Integration**—Provides a single environment branch, and you can create one additional, environment branch. This allows for up to two _active_ branches deployed to Platform-as-a-Service (PaaS) containers.
- **Staging**—Provides a single environment branch deployed to dedicated Infrastructure-as-a-Service (IaaS) containers.
- **Production**—Provides a single environment branch deployed to dedicated Infrastructure-as-a-Service (IaaS) containers.
- **Global Master**—Provides a `master` branch deployed to Platform-as-a-Service (PaaS) containers.
- **Master**—Provides a `master` branch deployed to Platform-as-a-Service (PaaS) containers.

The following table summarizes the differences between environments:

Expand Down Expand Up @@ -65,6 +65,9 @@ The following table summarizes the differences between environments:
</tbody>
</table>

{:.bs-callout-info}
Magento also provides the {{site.data.var.mcd-prod}} solution to deploy Magento to a local Cloud Docker environment for developing and testing {{site.data.var.ee}} projects. See [Docker development]({{site.baseurl}}/cloud/docker/docker-development.html).

## Pro environment architecture

Your project is a single Git repository with three, main environment branches for Integration, Staging, and Production. The following diagram shows the hierarchical relationship of the environments:
Expand All @@ -73,32 +76,67 @@ Your project is a single Git repository with three, main environment branches fo

## Integration environment {#cloud-arch-int}

Developers use the Integration environment to develop, deploy, and test:
The Integration environment runs in a Linux container (LXC) on a grid of servers known as Platform-as-a-Service (PaaS). Each environment includes a web server and database to test your site.

**Recommended use cases:**

- Magento application code
- Custom code
- Extensions
- Services
Integration environments are designed for limited testing and development before moving changes to Staging and Production. For example, you can use the Integration environment to complete the following tasks:

The Integration environment runs in a Linux container (LXC) on a grid of servers known as Platform-as-a-Service (PaaS). Each environment includes a web server and database to test your site.
- Ensure that changes to continuous integration (CI) processes are Cloud compatible

- Test critical workflows on key pages like Home, Category, Product Details Page (PDP), Checkout, and Admin

For best performance in the Integration environment follow these best practices:

- Restrict catalog size

{:.bs-callout-info}
The Integration environment does not support all services. For example, the Fastly CDN is not accessible in an Integration environment.
- Limit use to one or two concurrent users

### Global Master
- Disable crons and manually run as needed

The Global Master branch is a part of the Integration environment. You should always push a copy of the Production code to the Global Master in case there is an emergent need to debug the Production environment without interrupting services.
**Caveats:**

Do **not** create a branch from Global Master. Use the Integration environment branch to create new, active branches.
- Fastly CDN and New Relic services are not accessible in an Integration environment

- The Integration environment architecture does not match the Production and Staging architecture

- Do not use the Integration environment for development testing, performance testing, or user acceptance testing (UAT)

- Do not use the Integration environment to test {{site.data.var.b2b}} functionality

- You cannot restore the Integration database from Production or Staging

{% include cloud/note-enhanced-integration-envs-kb.md%}

## Staging environment {#cloud-arch-stage}

The Staging environment provides a near-production environment to test your site. This environment, which is hosted on dedicated IaaS hardware, includes all services, such as Fastly CDN, New Relic APM, and search.

You cannot create a branch from the Staging environment branch. You must push code changes from the Integration environment branch to the Staging environment branch.

{:.bs-callout-warning}
We highly recommend testing every merchant and customer interaction in the Staging environment prior to deploying to the Production environment. See [Deploy your store]({{ site.baseurl }}/cloud/live/stage-prod-live.html) and [Test deployment]({{ site.baseurl }}/cloud/live/stage-prod-test.html).
**Recommended use cases:**

The Staging environment matches the Production architecture and is designed for UAT, content staging, and final review before pushing features to the Production environment. For example, you can use the Staging environment to complete the following tasks:

- Regression testing against production data

- Performance testing with Fastly caching enabled

- Test new builds instead of patching in Production

- UAT testing for new builds

- Test {{site.data.var.b2b}}

- Customize cron configuration and test cron jobs

See [Deploy your store]({{ site.baseurl }}/cloud/live/stage-prod-live.html) and [Test deployment]({{ site.baseurl }}/cloud/live/stage-prod-test.html).

**Caveats:**

- After launching the Production site, use the Staging environment primarily to test patches for Production-critical bug fixes.

- You cannot create a branch from the Staging environment branch. You must push code changes from the Integration environment branch to the Staging environment branch.

## Production environment {#cloud-arch-prod}

Expand Down Expand Up @@ -170,6 +208,15 @@ Our redundant architecture means we can offer upscaling without downtime. When u

For example, you can add extra web servers to an existing cluster should the constriction be at the PHP level rather than the database level. This provides _horizontal scaling_ to complement the vertical scaling provided by extra CPUs on the database level. See [Scaled architecture]({{ site.baseurl }}/cloud/architecture/scaled-architecture.html).

## Master environment

On Pro plan projects, the Master branch provides an active PaaS environment with your Production environment. Always push a copy of the Production code to the Master environment in case you need to debug the Production environment without interrupting services.

**Caveats:**

- Do **not** create a branch from Master. Use the Integration environment branch to create new, active branches.
- Do not use the Master environment for development, UAT or performance testing

## Software versions {#cloud-arch-software}

{{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:
Expand All @@ -180,7 +227,7 @@ For example, you can add extra web servers to an existing cluster should the con
- [RabbitMQ]({{ site.baseurl }}/cloud/project/project-conf-files_services-rabbit.html)
- [Elasticsearch]({{ site.baseurl }}/cloud/project/project-conf-files_services-elastic.html)

For the Staging and Production environments, we recommend installing the Fastly CDN module 1.2.33 or later. See [Fastly in Cloud]({{ site.baseurl }}/cloud/cdn/cloud-fastly.html).
For the Staging and Production environments, we recommend installing the latest version of the Fastly CDN module. See [Fastly in Cloud]({{ site.baseurl }}/cloud/cdn/cloud-fastly.html#fastly-cdn-module-for-magento-2).

Edit the following YAML files to configure specific software versions to use in your implementation.

Expand Down
135 changes: 135 additions & 0 deletions src/cloud/architecture/starter-architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
---
group: cloud-guide
title: Starter architecture
functional_areas:
- Cloud
redirect_from:
- /cloud/basic-information/starter-architecture.html
---

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.

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.

![High-level view of Starter project]({{ site.baseurl }}/common/images/cloud/cloud_arch-starter.png)

## Production environment {#cloud-arch-prod}

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.

## Staging environment {#cloud-arch-stage}

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.

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.

{:.bs-callout-warning}
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][].

## Integration environment {#cloud-arch-int}

Developers use the Integration environment to develop, deploy, and test:

- Magento application code
- Custom code
- Extensions
- Services

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.

{% include cloud/note-enhanced-integration-envs-kb.md%}

## Production and Staging technology stack {#technology}

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.

- Fastly for HTTP caching and CDN
- Nginx web server speaking to PHP-FPM, one instance with multiple workers
- Redis server
- Elasticsearch for searching for {{site.data.var.ece}} 2.2 and later

### Services {#cloud-arch-services}

{{site.data.var.ece}} 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
- Git
- Secure Shell (SSH)

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.

### Software versions {#cloud-arch-software}

{{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:

- [PHP][]
- [MySQL][]
- [Redis][]
- [RabbitMQ][]
- [Elasticsearch][]

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.

- [`.magento.app.yaml`][magento.app.yaml]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link works just fine. So I suggested this for the broken one above. If you change the link definition, then you'd have to change both links. But the suggestion above should be okay.

- [`routes.yaml`][routes.yaml]
- [`services.yaml`][services.yaml]

### Backup and disaster recovery {#backup}

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 {#develop}

The following workflow summarizes the process to branch your code, develop, and deploy your store:

1. Set up your local environment
1. Clone the `master` branch from the Project to your local environment
1. Create a `staging` branch from `master`
1. Create branches for development from `staging`
1. 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:

- [Starter develop and deploy workflow][]
- [Docker development][] (local development environment enabled by {{site.data.var.mcd-prod}})
- [Manage branches][]
- [Deploy your store][]
- [Site launch][]

<!--Link definitions-->
[Deploy your store]: {{ site.baseurl }}/cloud/live/stage-prod-live.html
[Docker development]: {{ site.baseurl }}/cloud/docker/docker-development.html
[Elasticsearch]: {{ site.baseurl }}/cloud/project/project-conf-files_services-elastic.html
[Fastly CDN module for Magento 2]: {{ site.baseurl }}/cloud/cdn/cloud-fastly.html#fastly-cdn-module-for-magento-2
[Manage branches]: {{ site.baseurl }}/cloud/env/environments-start.html
[MySQL]: {{ site.baseurl }}/cloud/project/project-conf-files_services-mysql.html
[New Relic]: {{site.baseurl}}/cloud/project/new-relic.html#configure-new-relic-for-starter-environments
[PHP]: {{ site.baseurl }}/cloud/project/project-conf-files_magento-app.html
[RabbitMQ]: {{ site.baseurl }}/cloud/project/project-conf-files_services-rabbit.html
[Redis]: {{ site.baseurl }}/cloud/project/project-conf-files_services-redis.html
[Site launch]: {{ site.baseurl }}/cloud/live/live.html
[Snapshots and backup management]: {{ site.baseurl }}/cloud/project/project-webint-snap.html
[Starter develop and deploy workflow]: {{ site.baseurl}}/cloud/architecture/starter-develop-deploy-workflow.html
[Test deployment]: {{ site.baseurl }}/cloud/live/stage-prod-test.html
[launching your site]: {{ site.baseurl }}/cloud/live/live.html
[magento.app.yaml]: {{ site.baseurl }}/cloud/project/project-conf-files_magento-app.html
[nginx]: https://glossary.magento.com/nginx
[routes.yaml]: {{ site.baseurl }}/cloud/project/project-conf-files_routes.html
[services.yaml]: {{ site.baseurl }}/cloud/project/project-conf-files_services.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
group: cloud-guide
title: Starter develop and deploy workflow
functional_areas:
- Cloud
redirect_from:
- /cloud/basic-information/starter-develop-deploy-workflow.html
---

The {{site.data.var.ece}} includes a single Git repository with a master branch for the Production environment that can be branched to create Staging and Integration environments for testing and development work. You can have up to four active environments, including a `master` environment for your production server. See [Starter architecture]({{ site.baseurl }}/cloud/basic-information/starter-architecture.html) for an overview.
The {{site.data.var.ece}} includes a single Git repository with a master branch for the Production environment that can be branched to create Staging and Integration environments for testing and development work. You can have up to four active environments, including a `master` environment for your production server. See [Starter architecture]({{ site.baseurl }}/cloud/architecture/starter-architecture.html) for an overview.

For your environments, we recommend following a Development > Staging > Production workflow to develop and deploy your site.

Expand Down
Loading