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

Commit 6bcb986

Browse files
meker12oshmyheliukBarny Shergoldjeff-matthewsBaDos
authored
Cloud Docker 1.2.0 Release (#8199)
* MCLOUD-6430: Xdebug not working on Magento Cloud Docker 1.1 (#7810) * MCLOUD-6430: Xdebug not working on Magento Cloud Docker 1.1 * Update src/cloud/docker/docker-development-debug.md * MCLOUD-6898: Add option to customize port for MailHog (#7860) * MCLOUD-6898: Add option to customize port for MailHog * MCLOUD-6660: Add option to disable MailHog * Update src/cloud/docker/docker-config.md * MCLOUD-2789: [Cloud Docker] Add custom ES plugins (#7898) * MCLOUD-2789: [Cloud Docker] Add support for adding custom ES plugins from services.yaml file to the docker-compose.yml file. * MCLOUD-6394: Help with running MFTF test generation commands (#7995) * MCLOUD-6394: Help with running MFTF test generation commands * Added `--with-test` option to `build:compose` option list * Update src/cloud/docker/docker-containers.md - Added test container * Update src/cloud/docker/docker-containers-service.md Added `--with-test` option to `build:compose` option list * Update Docker command help (#8197) * Updated Docker Quick reference - Addedd new options to the magento-docker CLI - Added listing that shows all available options for ece-docker build:compose command - Added intro to Docker Compose section * Updates for Cloud Docker 1.2.0 release (#8198) * MCLOUD-7809 Added instructions for building custom docker-compose.yaml file * Improved instructions for using the init-docker.sh installation script * Updates based on review feedback * Updated Launch developer mode instructions to add step to apply patches before deploying to a Magento Cloud Docker environment Co-authored-by: Oleksandr Shmyheliuk <[email protected]> Co-authored-by: Barny Shergold <[email protected]> Co-authored-by: Jeff Matthews <[email protected]> Co-authored-by: Bohdan Korablov <[email protected]> Co-authored-by: hguthrie <[email protected]>
1 parent bbe8233 commit 6bcb986

12 files changed

+408
-34
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ 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/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]

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ To launch the Docker environment in production mode:
2121
1. Install the template dependencies and add the default hostname to your `/etc/hosts` file, use the following command to run the Docker initialization script:
2222

2323
```bash
24-
curl https://raw.githubusercontent.com/magento/magento-cloud-docker/1.1.0/bin/init-docker.sh | bash
24+
curl https://raw.githubusercontent.com/magento/magento-cloud-docker/<package-version>/bin/init-docker.sh | bash
2525
```
2626

27-
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:
27+
For `<package-version>`, use the [latest release of the {{site.data.var.mcd-package}}].
28+
29+
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:
2830

2931
```bash
3032
curl https://raw.githubusercontent.com/magento/magento-cloud-docker/1.1.0/bin/init-docker.sh | bash -s -- --help
@@ -97,6 +99,7 @@ To launch the Docker environment in production mode:
9799
- [`https://magento2.docker`](https://magento2.docker)
98100

99101
[cloud-repo]: https://github.com/magento/magento-cloud
102+
[Docker image version]: https://hub.docker.com/r/magento/magento-cloud-docker-php/tags
100103
[magento-creds]: {{site.baseurl}}/guides/v2.3/install-gde/prereq/connect-auth.html
101104
[services]: {{site.baseurl}}/cloud/docker/docker-containers.html#service-containers
102105
[configure Xdebug]: {{site.baseurl}}/cloud/docker/docker-development-debug.html#configure-xdebug

0 commit comments

Comments
 (0)