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

Commit 77628e3

Browse files
authored
Merge pull request #8205 from magento/sync-2.4.2
Sync 2.4.2-develop
2 parents 29eb1ad + 2c6dfa2 commit 77628e3

17 files changed

+535
-63
lines changed

src/_data/toc/cloud-guide.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,15 @@ pages:
215215
versionless: true
216216

217217
- label: Launch Docker
218-
children:
219-
- label: Developer mode
220-
url: /cloud/docker/docker-mode-developer.html
221-
versionless: true
222218

219+
children:
223220
- label: Production mode
224221
url: /cloud/docker/docker-mode-production.html
225222
versionless: true
223+
224+
- label: Developer mode
225+
url: /cloud/docker/docker-mode-developer.html
226+
versionless: true
226227

227228
- label: Functional Testing
228229
children:

src/_data/var.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Enterprise Cloud Edition (ECE) ---> Commerce Cloud
1010
# Enterprise Edition for B2B ---> Commerce for B2B
1111

12-
#NOTE: The new product name variables use the old product name abbreviations (e.g., ce, ee, ece, b2b).
12+
#NOTE: The new product name variables use the old product name abbreviations (e.g., ce, ee, ece, b2b).
1313

1414
# Product Name variables
1515

@@ -21,17 +21,17 @@ mbi: Magento Business Intelligence
2121
# Cloud product name variables
2222

2323
ece: Magento Commerce Cloud
24-
ece-release-date: August 5, 2020
24+
ece-release-date: November 9, 2020
2525
csuite: Magento Commerce Cloud Suite
2626
ct: ece-tools
2727
ct-repo: magento/ece-tools
28-
ct-release: 2002.1.2
28+
ct-release: 2002.1.3
2929
mcp-prod: Magento Cloud Patches
3030
mcp-package: magento/magento-cloud-patches
3131
mcp-release: 1.0.8
3232
mcd-package: magento/magento-cloud-docker
3333
mcd-prod: Magento Cloud Docker
34-
mcd-release: 1.1.2
34+
mcd-release: 1.2.0
3535
mcc-prod: Magento Cloud Components
3636
mcc-package: magento/magento-cloud-components
3737
mcc-release: 1.0.7

src/_includes/cloud/cloud-docker-config-generator-cmds.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ You use the following commands to generate the Docker configuration files and bu
22

33
Action | Command
44
:----- | :------
5-
Builds the Docker environment in [production mode][mode] by default and verifies configured service versions. | `ece-docker build:compose`
6-
Builds the docker environment in [developer mode][mode]. | `ece-docker build:compose --mode="developer"`
7-
Builds the docker environment in [production mode][mode]. |`ece-docker build:compose --mode="production"`
8-
Convert PHP configuration files to Docker ENV files. | `ece-docker image:generate:php`
5+
Builds the Docker environment in [production mode][mode] by default and verifies configured service versions. | `./vendor/bin/ece-docker build:compose`
6+
Builds the docker environment in [developer mode][mode]. | `./vendor/bin/ece-docker build:compose --mode="developer"`
7+
Builds the docker environment in [production mode][mode]. |`.vendor/bin/ece-docker build:compose --mode="production"`
8+
Convert PHP configuration files to Docker ENV files. | `.vendor/bin/ece-docker image:generate:php`
9+
Builds a custom `docker-compose.yaml` file | `./vendor/bin/ece-docker build:custom:compose`
910

1011
For example, the following command starts the Docker configuration generator in developer mode and specifies PHP version 7.2:
1112

src/_includes/cloud/error-codes.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-Note: The error code tables in this file are auto-generated from source code. To request changes to error code descriptions or suggestions, submit a GitHub issue to the magento/ece-tools repository.->
1+
<!--Note: This topic is auto-generated from the https://github.com/magento/ece-tools/blob/e3b13ca023afe324cd93d0caa2fd62d5683b60b9/config/schema.error.yaml source code. To request changes to error code descriptions or suggestions, submit a GitHub issue to the magento/ece-tools repository.-->
22

33
## Critical Errors
44

@@ -71,9 +71,10 @@ Critical errors indicate a problem with the {{ site.data.var.ece }} project conf
7171
| 129 | install-update: reset-password | Unable to read reset password template | |
7272
| 130 | install-update: cache_type | Command failed: `php ./bin/magento cache:enable` | Command `php ./bin/magento cache:enable` runs only when Magento was installed but `./app/etc/env.php` file was absent or empty at the beginning of the deployment. Check the `cloud.log` for more information. Add `VERBOSE_COMMANDS: '-vvv'` into `.magento.env.yaml` for more detailed command output. |
7373
| 131 | install-update | The `crypt/key` key value does not exist in the `./app/etc/env.php` file or the `CRYPT_KEY` cloud environment variable | This error occurs if the `./app/etc/env.php` file is not present when Magento deployment begins, or if the `crypt/key` value is undefined. If you migrated the database from another environment, retrieve the crypt key value from that environment. Then, add the value to the [CRYPT_KEY](https://devdocs.magento.com/cloud/env/variables-deploy.html#crypt_key) cloud environment variable in your current environment. See [Add the Magento encryption key](https://devdocs.magento.com/cloud/setup/first-time-setup-import-import.html#encryption-key). If you accidentally removed the `./app/etc/env.php` file, use the following command to restore it from the backup files created from a previous deployment: `./vendor/bin/ece-tools backup:restore` CLI command ." |
74-
| 132 | | Can not connect to the Elasticsearch service | Check that credentials for elasticsearch are correct and service is running |
74+
| 132 | | Can not connect to the Elasticsearch service | Check for valid Elasticsearch credentials and verify that the service is running |
7575
| 133 | validate-config | Remove Magento Braintree module configuration which is no longer supported in Magento 2.4 and later versions. | Support for the Braintree module is no longer included with Magento 2.4.0 and later. Remove the CONFIG__STORES__DEFAULT__PAYMENT__BRAINTREE__CHANNEL variable from the variables section of the .magento.app.yaml file. For Braintree support, use an official Braintree Payments extension from the Magento Marketplace instead. |
7676
| 134 | validate-config | Magento 2.4.0 requires Elasticsearch service to be installed | Install Elasticsearch service |
77+
| 135 | validate-config | The search engine must be set to Elasticsearch for Magento >= 2.4.0 | Check the SEARCH_CONFIGURATION variable for the `engine` option. If it is configured, remove the option, or set the value to "elasticsearch". |
7778

7879
### Post-deploy stage
7980

src/cloud/docker/docker-config.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,20 @@ The default {{ site.data.var.mcd-prod }} configuration includes the [MailHog] se
134134

135135
When the MailHog service is installed, go to the following URL to open the service and view outgoing emails: `http://magento2.docker:8025`
136136

137+
By default, MailHog listens on port 1025 for SMTP and port 8025 for the frontend dashboard and API. You can change the default ports using the `--mailhog-http-port` and `--mailhog-smtp-port` options.
138+
139+
```bash
140+
./vendor/bin/ece-docker build:compose --mailhog-smtp-port=1026 --mailhog-http-port=8026
141+
```
142+
143+
After updating the configuration and restarting the Docker environment, you can connect to the MailHog service from `http://magento2.docker:8026`, and use port 1026 for SMTP communication.
144+
145+
If you do not need the [MailHog] service, use the `--no-mailhog` option to generate the Docker compose configuration:
146+
147+
```bash
148+
./vendor/bin/ece-docker build:compose --no-mailhog
149+
```
150+
137151
[php]: https://www.php.net/manual/en/install.php
138152
[Composer]: https://getcomposer.org
139153
[Docker]: https://www.docker.com/get-started

src/cloud/docker/docker-containers-service.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,20 @@ See [Important Elasticsearch configuration][] in the Elasticsearch documentation
7575
{:.bs-callout-info}
7676
If your Cloud project uses Magento version 2.3.5 or earlier with MySQL search, add the `--no-es` option to skip the Elasticsearch container configuration when you generate the Docker Compose configuration file: `ece-docker build:compose --no-es`.
7777

78+
### Elasticsearch plugins
79+
80+
The `analysis-icu` and `analysis-phonetic` plugins are installed by default and can not be skipped.
81+
If you use Elasticsearch 6.5 and later, the default Elasticsearch plugins are installed automatically along with any custom plugins added to the `services.yaml`file. When you generate the `docker-compose.yaml` file, you can add additional custom plugins to the Docker environment using the `ES_PLUGINS` environment configuration option.
82+
83+
The following example adds the `analysis-stempel` and `analysis-nori` plugins to the Docker environment.
84+
85+
```yaml
86+
services:
87+
elasticsearch:
88+
environment:
89+
- 'ES_PLUGINS=analysis-stempel analysis-nori'
90+
```
91+
7892
### Troubleshooting
7993

8094
On some Linux systems, when you launch the Docker environment, the Elasticsearch service fails to start and the following error displays:
@@ -163,15 +177,23 @@ docker-compose run --rm redis redis-cli -h redis
163177
## Selenium container
164178

165179
**Container name**: selenium<br/>
166-
**Docker base image**: [selenium/standalone-chrome/](https://hub.docker.com/r/selenium/standalone-chrome<br/>
180+
**Docker base image**: [selenium/standalone-chrome/](https://hub.docker.com/r/selenium/standalone-chrome), based on the [selenium/standalone-chrome/](https://hub.docker.com/r/selenium/standalone-chrome/h) Docker image<br/>
167181
**Ports exposed**: `4444`<br/>
168182

169-
The Selenium container, based on the [selenium/standalone-chrome/](https://hub.docker.com/r/selenium/standalone-chrome/h), enables the [Magento Functional Testing Framework (MFTF)](https://devdocs.magento.com/mftf/docs/introduction.html) for Magento application testing in the Cloud Docker environment. See [Magento application testing]({{site.baseurl}}/cloud/docker/docker-test-app-mftf.html).
183+
The Selenium container enables the [Magento Functional Testing Framework (MFTF)](https://devdocs.magento.com/mftf/docs/introduction.html) for Magento application testing in the Cloud Docker environment. See [Magento application testing]({{site.baseurl}}/cloud/docker/docker-test-app-mftf.html).
184+
185+
## Test container
186+
187+
**Container name**: test<br/>
188+
**Docker base image**: [magento/magento-cloud-docker-php][php-cloud], based on the [magento/magento-cloud-docker-php][php-cloud] Docker image<br/>
189+
**Ports exposed**: None<br/>
190+
191+
The Test container, based on the [magento/magento-cloud-docker-php][php-cloud] Docker image, has a writable file system and is used for Magento application testing in the Cloud Docker environment. See [Magento application testing]({{site.baseurl}}/cloud/docker/docker-test-app-mftf.html).
170192

171193
## TLS container
172194

173195
**Container name**: tls<br/>
174-
**Docker base image**: [magento/magento-cloud-docker-tls][tls], which is based on the [debian:jessie](https://hub.docker.com/_/debian) Docker image<br/>
196+
**Docker base image**: [magento/magento-cloud-docker-tls][tls], based on the [debian:jessie](https://hub.docker.com/_/debian) Docker image<br/>
175197
**Ports exposed**: `443`</br>
176198

177199
The TLS termination proxy container facilitates the Varnish SSL termination over HTTPS.
@@ -187,7 +209,7 @@ To increase the timeout on this container, add the following code to the `docke
187209
## Varnish container
188210

189211
**Container name**: varnish<br/>
190-
**Docker base image**: [magento/magento-cloud-docker-varnish][varnish], which is based on the [centos]<br>
212+
**Docker base image**: [magento/magento-cloud-docker-varnish][varnish], based on the [centos] Docker image<br>
191213
**Ports exposed**: `80`<br/>
192214

193215
The Varnish container simulates Fastly and is useful for testing VCL snippets.
@@ -211,7 +233,7 @@ docker-compose exec varnish varnishadm ban req.url '~' '.'
211233
## Web container
212234

213235
**Container name**: web<br/>
214-
**Docker base image**: [magento/magento-cloud-docker-nginx][nginx], which is based on the [centos] Docker image<br/>
236+
**Docker base image**: [magento/magento-cloud-docker-nginx][nginx], based on the [centos] Docker image<br/>
215237
**Ports exposed**: None<br/>
216238

217239
The Web container uses NGINX to handle web requests after TLS and Varnish. This container passes all requests to the FPM container to serve the PHP code. See [Request flow]({{site.baseurl}}/cloud/docker/docker-containers.html#request-flow).

src/cloud/docker/docker-containers.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,18 @@ The following table shows the options to customize service container configurati
4343
| Name | Service | Key & options | Available Versions | Notes
4444
| ------------- | ---------- | ---------- | ------------------ |------------------
4545
| [db] | MariaDB or MySQL<br> | `--db`, `--db-image` (MySQL)<br>`--expose-db-port`<br>`--db-increment`<br>`--db-offset`<br>`--with-entrypoint`<br>`--with-mariadb-config`|10.0, 10.1, 10.2<br>5.6, 5.7 | Use the increment and offset options to customize the [auto-increment settings][Using AUTO_INCREMENT] for replication.<br><br>Use the `--with-entrypoint` and `--with-mariadb-config` options to automatically configure database directories in the Docker environment<br><br>*Example build commands:*<br>`ece-docker build:compose --db <mariadb-version>`<br>`ece-docker build:compose --db <mysql-version> --db-image`
46-
| [elasticsearch] | Elasticsearch | `--es`<br>`--es-env-var`<br>`--no-es` | 1.7, 2.4, 5.2, 6.5, 6.8, 7.5, 7.6 | Use the options to specify the Elasticsearch version, customize Elasticsearch configuration options, or to build a Docker environment without Elasticsearch.
46+
| [elasticsearch] | Elasticsearch | `--es`<br>`--es-env-var`<br>`--no-es` | 1.7, 2.4, 5.2, 6.5, 6.8, 7.5, 7.6, 7.7 | Use the options to specify the Elasticsearch version, customize Elasticsearch configuration options, or to build a Docker environment without Elasticsearch.
4747
| [FPM][fpm-container] | PHP FPM | `--php`<br>`--with-xdebug` | 7.0, 7.1, 7.2, 7.3, 7.4 | Used for all incoming requests. Optionally, add Xdebug configuration to debug PHP code in the Docker environment.
4848
| [node][node-container] | Node | `--node` | 6, 8, 10, 11 | Used gulp or other NPM based commands
4949
| [rabbitmq][rabbitmq-container]| RabbitMQ | `--rmq` | 3.5, 3.7, 3.8 |
5050
| [redis][redis-container] | Redis | `--redis` | 3.2, 4.0, 5.0 | Standard redis container
5151
| [selenium][selenium-container]| Selenium | `--with-selenium`<br>`--selenium-version`<br>`--selenium-image`| Any | Enables Magento application testing using the Magento Functional Testing Framework (MFTF)
52+
| [test][test-container]| PHP CLI | `--with-test`| Any | Container with a writable file system for running tests
5253
| [tls][tls-container] | SSL Endpoint | | | Terminates SSL, can be configured to pass to varnish or nginx
5354
| [varnish][varnish-container] | Varnish | `--no-varnish` | 4, 6.2 | Varnish is provisioned by default. Use the `--no-varnish` option to skip Varnish service installation
5455
| [web][web-container] | NGINX | `--nginx` | 1.9, latest |
5556

56-
Use the following command to view the available options for the `ece-docker build:compose` command:
57+
Use the following command to view all available options for the `ece-docker build:compose` command:
5758

5859
```bash
5960
./vendor/bin/ece-docker build:compose --help
@@ -157,6 +158,7 @@ Now you can see all requests that are passing through the TLS container and chec
157158
[fpm-container]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#fpm-container
158159
[redis-container]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#redis-container
159160
[selenium-container]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#selenium-container
161+
[test-container]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#test-container
160162
[tls-container]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#tls-container
161163
[varnish-container]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#varnish-container
162164
[web-container]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#web-container
@@ -171,4 +173,4 @@ Now you can see all requests that are passing through the TLS container and chec
171173
<style>
172174
table.docker-service-versions-table td:nth-child(3) {
173175
width: 200px;
174-
}
176+
}

src/cloud/docker/docker-development-debug.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ If you use Microsoft Windows, take the following steps before continuing:
2626
vendor/bin/ece-docker build:compose --mode="developer" --sync-engine="mutagen" --with-xdebug
2727
```
2828

29+
For Linux systems, you must use the `--set-docker-host` option to add the `host.docker.internal` entry to the `/etc/hosts` file for the `fpm_xdebug` container.
30+
31+
```bash
32+
vendor/bin/ece-docker build:compose --mode="developer" --with-xdebug --set-docker-host
33+
```
34+
2935
This command adds the Xdebug configuration to your `docker-compose.yml` file.
3036

3137
```yaml

src/cloud/docker/docker-mode-developer.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@ To launch the Docker environment in developer mode:
2626
1. Install the template dependencies, and add the default hostname to your `/etc/hosts` file.
2727

2828
```bash
29-
curl https://raw.githubusercontent.com/magento/magento-cloud-docker/1.1.0/bin/init-docker.sh | bash
29+
curl https://raw.githubusercontent.com/magento/magento-cloud-docker/<magento-cloud-docker-package-version>/bin/init-docker.sh | bash
3030
```
3131

32-
If required, you can add options to the `init-docker.sh` initialization script to customize your Docker environment. Run the following command to see the available options:
32+
For `<package-version>`, use the [latest release of the {{site.data.var.mcd-package}}].
33+
34+
You can customize the options for the `init-docker.sh` initialization script your Docker environment. For example, you can specify the PHP version (default is 7.2) and the [Docker image version] (default 1.1). We recommend using the latest version of the Magento Cloud Docker images. Run the following command to see the available options:
3335

3436
```bash
35-
curl https://raw.githubusercontent.com/magento/magento-cloud-docker/1.1.0/bin/init-docker.sh | bash -s -- --help
37+
curl https://raw.githubusercontent.com/magento/magento-cloud-docker/<magento-cloud-package-version>/bin/init-docker.sh | bash -s -- --help
3638
```
3739

3840
1. On macOS or Windows hosts, install the selected file synchronization tool:
@@ -88,8 +90,18 @@ To launch the Docker environment in developer mode:
8890

8991
1. Install Magento in your Docker environment.
9092

93+
- For Magento version 2.4 and 2.4.1 only, run the following command to apply patches before you deploy.
94+
95+
```bash
96+
docker-compose run deploy php ./vendor/bin/ece-patches apply
97+
```
98+
9199
- Deploy Magento in the Docker container.
92100

101+
For Magento version 2.4 and 2.4.1, run the following command to apply patches before you deploy.
102+
103+
```
104+
93105
```bash
94106
docker-compose run --rm deploy cloud-deploy
95107
```
@@ -129,11 +141,15 @@ To launch the Docker environment in developer mode:
129141

130142
- `https://magento2.docker`
131143

132-
[Synchronizing data in Docker]: {{site.baseurl}}/cloud/docker/docker-syncing-data.html
144+
<!--Link definitioons-->
145+
133146
[cloud-repo]: https://github.com/magento/magento-cloud
147+
[Docker image version]: https://hub.docker.com/r/magento/magento-cloud-docker-php/tags
148+
[dsync-install]: https://docker-sync.readthedocs.io/en/latest/getting-started/installation.html
149+
[latest release of the {{site.data.var.mcd-package}}]: https://github.com/magento/magento-cloud-docker/releases
134150
[magento-creds]: {{site.baseurl}}/guides/v2.3/install-gde/prereq/connect-auth.html
151+
[mutagen-install]: https://mutagen.io/documentation/introduction/installation/
135152
[services]: {{site.baseurl}}/cloud/docker/docker-containers.html#service-containers
136-
[xdebug]: {{site.baseurl}}/cloud/docker/docker-development-debug.html#configure-xdebug]
137153
[service keys]: {{site.baseurl}}/cloud/docker/docker-containers.html#service-configuration-options
138-
[dsync-install]: https://docker-sync.readthedocs.io/en/latest/getting-started/installation.html
139-
[mutagen-install]: https://mutagen.io/documentation/introduction/installation/
154+
[Synchronizing data in Docker]: {{site.baseurl}}/cloud/docker/docker-syncing-data.html
155+
[xdebug]: {{site.baseurl}}/cloud/docker/docker-development-debug.html#configure-xdebug]

0 commit comments

Comments
 (0)