From b1d1b600d55652eb12eed79829adcd98ac474baf Mon Sep 17 00:00:00 2001 From: Oleksandr Shmyheliuk Date: Thu, 3 Sep 2020 12:19:09 -0500 Subject: [PATCH 01/16] 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 Co-authored-by: Barny Shergold * Update src/cloud/docker/docker-development-debug.md Co-authored-by: Jeff Matthews Co-authored-by: Barny Shergold Co-authored-by: Jeff Matthews --- src/cloud/docker/docker-development-debug.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/cloud/docker/docker-development-debug.md b/src/cloud/docker/docker-development-debug.md index cd5a69e484a..0e112d09796 100644 --- a/src/cloud/docker/docker-development-debug.md +++ b/src/cloud/docker/docker-development-debug.md @@ -23,8 +23,14 @@ If you use Microsoft Windows, take the following steps before continuing: 1. To enable Xdebug for your Docker environment, generate the Docker Compose configuration file in developer mode with the `--with-xdebug` option and any other required options, for example. ```bash - vendor/bin/ece-docker build:compose --mode --sync-engine="mutagen" developer --with-xdebug + vendor/bin/ece-docker build:compose --mode="developer" --sync-engine="mutagen" --with-xdebug ``` + + 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. + + ```bash + vendor/bin/ece-docker build:compose --mode="developer" --with-xdebug --set-docker-host + ``` This command adds the Xdebug configuration to your `docker-compose.yml` file. From b678eb1a1026aa7ce10a1df080d47c3bf8547015 Mon Sep 17 00:00:00 2001 From: Bohdan Korablov Date: Fri, 11 Sep 2020 15:17:40 -0500 Subject: [PATCH 02/16] 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 Co-authored-by: Margaret Eker --- src/cloud/docker/docker-config.md | 14 ++++++++++++++ src/cloud/docker/docker-quick-reference.md | 1 + 2 files changed, 15 insertions(+) diff --git a/src/cloud/docker/docker-config.md b/src/cloud/docker/docker-config.md index dd890fc000f..7ad8d503347 100644 --- a/src/cloud/docker/docker-config.md +++ b/src/cloud/docker/docker-config.md @@ -107,6 +107,20 @@ The default {{ site.data.var.mcd-prod }} configuration includes the [MailHog] se When the MailHog service is installed, go to the following URL to open the service and view outgoing emails: `http://magento2.docker:8025` +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. + +```bash +./vendor/bin/ece-docker build:compose --mailhog-smtp-port=1026 --mailhog-http-port=8026 +``` + +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. + +If you do not need the [MailHog] service, use the `--no-mailhog` option to generate the Docker compose configuration: + +```bash +./vendor/bin/ece-docker build:compose --no-mailhog +``` + [php]: https://www.php.net/manual/en/install.php [Composer]: https://getcomposer.org [Docker]: https://www.docker.com/get-started diff --git a/src/cloud/docker/docker-quick-reference.md b/src/cloud/docker/docker-quick-reference.md index 456b2639c16..4e5b4fd0d09 100644 --- a/src/cloud/docker/docker-quick-reference.md +++ b/src/cloud/docker/docker-quick-reference.md @@ -51,6 +51,7 @@ docker-compose -f docker-compose.yml -f docker-compose-custom.yml [-f more-custo | [Mode][] | `--mode`, `-m` | production, developer | [File synchronization engine][] | `--sync-engine` | native (default), docker-sync, mutagen | Specify a custom URL for Magento | `--host`
`--port` +| Specify custom HTTP and SMTP ports for MailHog | `--mailhog-http-port`
`--mailhog-smtp-port` {:.bs-callout-info} See [Service versions] for a list of service configuration options you can add to the `ece-docker build:compose` command to customize the Cloud Docker environment configuration. From caa18a70bafb525936972f67c0dc9876e15b201a Mon Sep 17 00:00:00 2001 From: Oleksandr Shmyheliuk Date: Mon, 21 Sep 2020 12:29:01 -0500 Subject: [PATCH 03/16] 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. Co-authored-by: Margaret Eker --- src/cloud/docker/docker-containers-service.md | 14 ++++++++++++++ src/cloud/docker/docker-containers.md | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/cloud/docker/docker-containers-service.md b/src/cloud/docker/docker-containers-service.md index 8ca8238f69a..5e93eff7838 100755 --- a/src/cloud/docker/docker-containers-service.md +++ b/src/cloud/docker/docker-containers-service.md @@ -75,6 +75,20 @@ See [Important Elasticsearch configuration][] in the Elasticsearch documentation {:.bs-callout-info} 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`. +### Elasticsearch plugins + +The `analysis-icu` and `analysis-phonetic` plugins are installed by default and can not be skipped. +If you use Elasticsearch 6.5 and later, the default Elasticsearch plugins configured in `.magento/services.yaml` are installed automatically along with any custom plugins added to the `services.yaml`. When you generate the `docker-compose.yaml` file, custom plugins are added to the `ES_PLUGINS` environment configuration option. + +You can change the list of plugins to install by updating the configuration for the `ES_PLUGINS` variable: + +```yaml +services: + elasticsearch: + environment: + - 'ES_PLUGINS=analysis-stempel analysis-nori' +``` + ### Troubleshooting On some Linux systems, when you launch the Docker environment, the Elasticsearch service fails to start and the following error displays: diff --git a/src/cloud/docker/docker-containers.md b/src/cloud/docker/docker-containers.md index 934b4af18b7..2f775ba318c 100644 --- a/src/cloud/docker/docker-containers.md +++ b/src/cloud/docker/docker-containers.md @@ -43,7 +43,7 @@ The following table shows the options to customize service container configurati | Name | Service | Key & options | Available Versions | Notes | ------------- | ---------- | ---------- | ------------------ |------------------ | [db] | MariaDB or MySQL
| `--db`, `--db-image` (MySQL)
`--expose-db-port`
`--db-increment`
`--db-offset`
`--with-entrypoint`
`--with-mariadb-config`|10.0, 10.1, 10.2
5.6, 5.7 | Use the increment and offset options to customize the [auto-increment settings][Using AUTO_INCREMENT] for replication.

Use the `--with-entrypoint` and `--with-mariadb-config` options to automatically configure database directories in the Docker environment

*Example build commands:*
`ece-docker build:compose --db `
`ece-docker build:compose --db --db-image` -| [elasticsearch] | Elasticsearch | `--es`
`--es-env-var`
`--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. +| [elasticsearch] | Elasticsearch | `--es`
`--es-env-var`
`--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. | [FPM][fpm-container] | PHP FPM | `--php`
`--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. | [node][node-container] | Node | `--node` | 6, 8, 10, 11 | Used gulp or other NPM based commands | [rabbitmq][rabbitmq-container]| RabbitMQ | `--rmq` | 3.5, 3.7, 3.8 | From 842dad4315f5a5616a8b6f9b21cc09da99c1f360 Mon Sep 17 00:00:00 2001 From: Oleksandr Shmyheliuk Date: Mon, 5 Oct 2020 12:40:58 -0500 Subject: [PATCH 04/16] 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 Co-authored-by: Barny Shergold Co-authored-by: Margaret Eker --- src/cloud/docker/docker-containers-service.md | 8 ++++++++ src/cloud/docker/docker-containers.md | 4 +++- src/cloud/docker/docker-test-app-mftf.md | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/cloud/docker/docker-containers-service.md b/src/cloud/docker/docker-containers-service.md index 5e93eff7838..978d8eb8a21 100755 --- a/src/cloud/docker/docker-containers-service.md +++ b/src/cloud/docker/docker-containers-service.md @@ -182,6 +182,14 @@ docker-compose run --rm redis redis-cli -h redis 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). +## Test container + +**Container name**: test
+**Docker base image**: [magento/magento-cloud-docker-php][php-cloud], which is based on the [php](https://hub.docker.com/_/php) Docker image
+**Ports exposed**: None
+ +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). + ## TLS container **Container name**: tls
diff --git a/src/cloud/docker/docker-containers.md b/src/cloud/docker/docker-containers.md index 2f775ba318c..74b0d8b60c8 100644 --- a/src/cloud/docker/docker-containers.md +++ b/src/cloud/docker/docker-containers.md @@ -49,6 +49,7 @@ The following table shows the options to customize service container configurati | [rabbitmq][rabbitmq-container]| RabbitMQ | `--rmq` | 3.5, 3.7, 3.8 | | [redis][redis-container] | Redis | `--redis` | 3.2, 4.0, 5.0 | Standard redis container | [selenium][selenium-container]| Selenium | `--with-selenium`
`--selenium-version`
`--selenium-image`| Any | Enables Magento application testing using the Magento Functional Testing Framework (MFTF) +| [test][test-container]| PHP CLI | `--with-test`| Any | Container with a writable file system for running tests | [tls][tls-container] | SSL Endpoint | | | Terminates SSL, can be configured to pass to varnish or nginx | [varnish][varnish-container] | Varnish | `--no-varnish` | 4, 6.2 | Varnish is provisioned by default. Use the `--no-varnish` option to skip Varnish service installation | [web][web-container] | NGINX | `--nginx` | 1.9, latest | @@ -157,6 +158,7 @@ Now you can see all requests that are passing through the TLS container and chec [fpm-container]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#fpm-container [redis-container]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#redis-container [selenium-container]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#selenium-container +[test-container]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#test-container [tls-container]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#tls-container [varnish-container]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#varnish-container [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 + +[Configure Docker]: {{ site.baseurl }}/cloud/docker/docker-config.html +[Docker Docs: Multiple Compose files]: https://docs.docker.com/compose/extends/#multiple-compose-files +[`docker-compose run`]: https://docs.docker.com/compose/reference/run/ +[File synchronization engine]: {{ site.baseurl }}/cloud/docker/docker-syncing-data.html +[Mode]: {{site.baseurl}}/cloud/docker/docker-config.html#set-the-launch-mode +[Service versions]: {{ site.baseurl }}/cloud/docker/docker-containers.html#service-containers From 73b76a7e8872692226578227f9b7274d28e6bf3e Mon Sep 17 00:00:00 2001 From: Margaret Eker Date: Sat, 7 Nov 2020 06:04:40 -0600 Subject: [PATCH 09/16] Correction --- src/cloud/release-notes/mcd-release-notes.md | 625 ++++++++----------- 1 file changed, 269 insertions(+), 356 deletions(-) diff --git a/src/cloud/release-notes/mcd-release-notes.md b/src/cloud/release-notes/mcd-release-notes.md index d6044dfedb4..0503a692226 100644 --- a/src/cloud/release-notes/mcd-release-notes.md +++ b/src/cloud/release-notes/mcd-release-notes.md @@ -1,364 +1,277 @@ --- group: cloud-guide -title: Docker development quick reference +title: Magento Cloud Docker release notes functional_areas: - Cloud - - Docker + - Setup + - Configuration --- -{%include cloud/note-docker-config-reference-link.md%} - -## Docker Compose - -Docker Compose is a tool for defining and running multi-container Docker applications. The following table lists the `docker-compose` commands for building, deploying, and operating {{site.data.var.mcd-prod}}. You can also use [Magento Cloud Docker CLI](#magento-cloud-docker-cli) commands to complete Docker Compose tasks. - -Action | Command -:----- | :------ -Build and start Docker environment | `docker-compose up -d` -Build environment | `docker-compose run --rm build cloud-build` -Deploy environment | `docker-compose run --rm deploy cloud-deploy` -Run post-deploy hooks | `docker-compose run --rm deploy cloud-post-deploy` -Connect to CLI container | `docker-compose run --rm deploy bash` -Use `{{site.data.var.ct}}` command | `docker-compose run --rm deploy ece-command ` -Use Magento command | `docker-compose run --rm deploy magento-command ` -Stop and remove Docker environment (removes volumes) | `docker-compose down -v` -Stop Docker environment without destroying containers | `docker-compose stop` -Resume Docker environment | `docker-compose start` -List images | `docker-compose images` -List containers and ports | `docker-compose ps` or `docker ps` - -{:.bs-callout-info} -The `--rm` option automatically removes containers when they stop. This setting overrides any restart policy specified in the service configuration and prevents orphaned containers from consuming excess disk space. See [`docker-compose run`][] in the _Docker command-line reference_. - -### Override configuration - -Because the `ece-docker build:compose` command overwrites the base configuration, we recommend saving your customizations in an override configuration file. You can use this method to merge multiple custom configurations. See [Docker Docs: Multiple Compose files][]. - -The `docker-compose up` command considers the base `docker-compose.yml` configuration by default. If the `docker-compose.override.yml` file is present, then the override configuration merges with the base configuration. - -Use the `-f` argument to specify an alternate configuration file. The following example uses the default configuration and merges each custom configuration sequentially: - -```bash -docker-compose -f docker-compose.yml -f docker-compose-custom.yml [-f more-custom-docker-compose.yml] up -``` - -### Docker Compose configuration generator - -{%include cloud/cloud-docker-config-generator-cmds.md%} - -### Additional build options - -View the available options for the `ece-docker build:compose` command: - -```bash -php ./vendor/bin/ece-docker build:compose -h -``` - -```terminal -Description: - Build docker configuration - -Usage: - build:compose [options] - -Options: - --php=PHP PHP version - --nginx=NGINX Nginx version - --db=DB DB version - --db-image=DB-IMAGE DB image - --expose-db-port=EXPOSE-DB-PORT Expose DB port - --expose-db-quote-port=EXPOSE-DB-QUOTE-PORT Expose port for DB sales - --expose-db-sales-port=EXPOSE-DB-SALES-PORT Expose port for DB quote - --with-entrypoint Add DB entrypoint volume - --with-mariadb-conf Add MariaDb config volume - --redis=REDIS Redis version - --es=ES Elasticsearch version - --rmq=RMQ RabbitMQ version - --node=NODE Node.js version - --selenium-version=SELENIUM-VERSION Selenium version - --selenium-image=SELENIUM-IMAGE Selenium image - --no-es Disable Elasticsearch - --no-mailhog Disable MailHog - --mailhog-http-port Custom HTTP port for MailHog - --mailhog-smtp-port Custom SMTP port for MailHog - --set-docker-host Sets host.docker.internal for fpm_xdebug container to - resolve debug issue for LINUX system - -m, --mode=MODE Mode of environment (developer, production) - --sync-engine=SYNC-ENGINE File sync engine. Works only with developer mode. Available: (docker-sync, mutagen, native) - --with-cron Add cron container - --no-varnish Remove Varnish container - --with-selenium Add Selenium latest version - --with-test Add container for running tests - --no-tmp-mounts Remove /tmp mounted volume - --with-xdebug Enables XDebug - --env-vars[=ENV-VARS] Cloud environment variables - --installation-type[=INSTALLATION-TYPE] Sets magento installation type [default: "composer"] - --host[=HOST] Host name - --port[=PORT] Port - --tls-port TLS port - --es-env-var=ES-ENV-VAR Environment variable for elasticsearch service (multiple values allowed) - --db-increment-increment=DB-INCREMENT-INCREMENT "auto_increment_increment" database variable - --db-increment-offset=DB-INCREMENT-OFFSET "auto_increment_offset" database variable - -h, --help Display this help message - -q, --quiet Do not output any message - -V, --version Display this application version - --ansi Force ANSI output - --no-ansi Disable ANSI output - -n, --no-interaction Do not ask any interactive question - -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug - ``` - -{:.bs-callout-info} -See [Service versions] for additional information about the service configuration options for the `ece-docker build:compose` command. - -### Build a custom Docker Compose configuration - -Instead of building the `docker-compose.yaml` file using the {{site.data.var.ece }} project configuration. You can use the `build:custom:compose` command to build a custom `docker-compose.yaml` file with the configuration you supply. You provide the configuration as a JSON array as shown in [Example 1](#example-1). - -For {{site.data.var.mcd-prod}} 1.2 and later, you have an additional option to specify custom images and image versions using the `ece-docker build:custom:compose` command as shown in [Example 2](#example-2). - -#### Example 1 - -> Generate a custom `docker-compose.yaml` file - -```bash -./vendor/bin/ece-docker build:custom:compose '{"name":"magento","system":{"mode":"production","host":"magento2.test","port":"8080","db":{"increment_increment":3,"increment_offset":2},"mailhog":{"smtp_port":"1026","http_port":"8026"}},"services":{"php":{"version":"7.3","enabled":true,"extensions":{"enabled":["xsl"]}},"mysql":{"version":"10.2","image":"mariadb","enabled":true}, "mailhog": {"enabled":true}}}' -``` - -This command generates the following `docker-compose.yaml` file: - -```terminal -version: '2.1' -services: - db: - hostname: db.magento2.test - image: 'mariadb:10.2' - environment: - - MYSQL_ROOT_PASSWORD=magento2 - - MYSQL_DATABASE=magento2 - - MYSQL_USER=magento2 - - MYSQL_PASSWORD=magento2 - ports: - - '3306' - volumes: - - '.docker/mnt:/mnt:rw,delegated' - - 'magento-magento-db:/var/lib/mysql' - healthcheck: - test: 'mysqladmin ping -h localhost -pmagento2' - interval: 30s - timeout: 30s - retries: 3 - command: '--auto_increment_increment=3 --auto_increment_offset=2' - networks: - magento: - aliases: - - db.magento2.test - fpm: - hostname: fpm.magento2.test - image: 'magento/magento-cloud-docker-php:7.3-fpm-1.2.0' - extends: generic - volumes: - - '.:/app:ro,delegated' - - 'magento-vendor:/app/vendor:ro,delegated' - - 'magento-generated:/app/generated:ro,delegated' - - '.docker/mnt:/mnt:rw,delegated' - networks: - magento: - aliases: - - fpm.magento2.test - depends_on: - db: - condition: service_healthy - web: - hostname: web.magento2.test - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' - extends: generic - volumes: - - '.:/app:ro,delegated' - - 'magento-vendor:/app/vendor:ro,delegated' - - 'magento-generated:/app/generated:ro,delegated' - - '.docker/mnt:/mnt:rw,delegated' - environment: - - WITH_XDEBUG=0 - networks: - magento: - aliases: - - web.magento2.test - depends_on: - fpm: - condition: service_started - varnish: - hostname: varnish.magento2.test - image: 'magento/magento-cloud-docker-varnish:6.2-1.2.0' - networks: - magento: - aliases: - - varnish.magento2.test - depends_on: - web: - condition: service_started - tls: - hostname: tls.magento2.test - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' - extends: generic - networks: - magento: - aliases: - - magento2.test - environment: - UPSTREAM_HOST: varnish - ports: - - '8080:80' - - '443:443' - depends_on: - varnish: - condition: service_started - generic: - hostname: generic.magento2.test - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' - env_file: ./.docker/config.env - environment: - - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl' - build: - hostname: build.magento2.test - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' - extends: generic - volumes: - - '.:/app:rw,delegated' - - 'magento-vendor:/app/vendor:rw,delegated' - - 'magento-generated:/app/generated:rw,delegated' - - '~/.composer/cache:/root/.composer/cache:rw,delegated' - networks: - magento-build: - aliases: - - build.magento2.test - depends_on: - db: - condition: service_healthy - deploy: - hostname: deploy.magento2.test - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' - extends: generic - volumes: - - '.:/app:ro,delegated' - - 'magento-vendor:/app/vendor:ro,delegated' - - 'magento-generated:/app/generated:ro,delegated' - - '.docker/mnt:/mnt:rw,delegated' - networks: - magento: - aliases: - - deploy.magento2.test - depends_on: - db: - condition: service_healthy - mailhog: - hostname: mailhog.magento2.test - image: 'mailhog/mailhog:latest' - ports: - - '1026:1025' - - '8026:8025' - networks: - magento: - aliases: - - mailhog.magento2.test -volumes: - magento-vendor: { } - magento-generated: { } - magento-magento-db: { } -networks: - magento: - driver: bridge - magento-build: - driver: bridge - -``` - -#### Example 2 - -> Generate a custom `docker-compose.yaml` file with custom images and image versions - -```bash -./vendor/bin/ece-docker build:custom:compose '{"name":"magento","system":{"mode":"production","host":"magento2.test","port":"8080","db":{"increment_increment":3,"increment_offset":2},"mailhog":{"smtp_port":"1026","http_port":"8026"}},"services":{"php":{"image":"php-v1","version":"7.4","enabled":true},"php-cli":{"image-pattern":"%s:%s-cli"},"php-fpm":{"image-pattern":"%s:%s-fpm"},"mysql":{"image":"mariadb-v1","version":"10.3","image-pattern":"%s:%s","enabled":true},"redis":{"image":"redis-v1","enabled":"true","version":"5"},"elasticsearch":{"image":"elasticsearch-v1","image-pattern":"%s:%s","enabled":true,"version":"7.6"},"varnish":{"image":"varnish-v1","image-pattern":"%s:%s","enabled":true,"version":"6.2"},"nginx":{"image":"nginx-v1","version":"1.19","image-pattern":"%s:%s","enabled":"true"},"test":{"enabled":true}},"mounts":{"var":{"path":"var"},"app-etc":{"path":"app\/etc"},"pub-media":{"path":"pub\/media"},"pub-static":{"path":"pub\/static"}}}' -``` - -This command generates the following images in the Docker environment: - -```conf -services: - db: - image: 'mariadb-v1:10.3' - redis: - image: 'redis-v1:5' - fpm: - image: 'php-v1:7.4-fpm' - web: - image: 'nginx-v1:1.19' - varnish: - image: 'varnish-v1:6.2' - tls: - image: 'nginx-v1:1.19' - test: - image: 'php-v1:7.4-cli' - generic: - image: 'php-v1:7.4-cli' - build: - image: 'php-v1:7.4-cli' - deploy: - image: 'php-v1:7.4-cli' -``` - -## Magento Cloud Docker CLI - -The `bin/magento-docker` commands simplify running docker-compose tasks. For example, instead of running a separate docker-compose command for the build, deploy, and post-deploy steps, you can _redeploy_ Magento in a Docker environment using the following command: - -```bash -./bin/magento-docker ece-redeploy -``` - -The following example shows the `./bin/magento-docker` command and output when connecting to the bash shell: - -```bash -./bin/magento-docker bash -``` - -```terminal -Starting project_redis_1 ... done -Starting project_db_1 ... done -Starting project_elasticsearch_1 ... done -[ ok ] Starting enhanced syslogd: rsyslogd. -root@deploy:/app# -``` -{:.no-copy} - -Action | Command -:----- | :------ -Connect to bash shell | `./bin/magento-docker bash` -Pull the latest images | `./bin/magento-docker pull` -Build application | `./bin/magento-docker ece-build` -Deploy application | `./bin/magento-docker ece-deploy` -Run post-deploy hooks | `./bin/magento-docker ece-post-deploy` -Re-build and re-deploy application | `./bin/magento-docker ece-redeploy` -Stop containers | `./bin/magento-docker stop` -Start containers | `./bin/magento-docker start` -Restart containers | `./bin/magento-docker restart` -Destroy containers | `./bin/magento-docker down` -Destroy, re-create, and start containers | `./bin/magento-docker up` -Clears Redis cache | `./bin/magento-docker flush-redis` -Clears Varnish cache | `./bin/magento-docker flush-varnish` -Access database | `./bin/magento-docker ece-db` -Run a command in a PHP container
Supports the following values for the PHP version: 7.1, 7.2, 7.3, 7.4| `./bin/magento-docker php ` - -Use the following command to view the magento-docker CLI command help: - -```bash -./bin/magento-docker -h -``` +The [`{{site.data.var.mcd-package}}`](https://github.com/magento/magento-cloud-docker) package provides functionality and Docker images to deploy {{ site.data.var.ee }} to a local Cloud environment. These release notes describe the latest improvements to this package, which is a component of [{{ site.data.var.csuite }}]({{ page.baseurl }}/cloud/release-notes/cloud-tools.html). - +The `{{site.data.var.mcd-package}}` package uses the following version sequence: `..`. + +The release notes include: + +- {:.new}New features +- {:.fix}Fixes and improvements + +## v1.2.0 +*Release date: November 9, 2020*
+ +- {:.new}**Container updates–** + + - {:.new}**PHP-FPM container**–Added support for the gnupg PHP extension. *[Fix submitted by G Arvind from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/210).* + + - {:.fix}**Database container**–Fixed the database container health check by adding the required database password to the health check command. + + - {:.new}**Elasticsearch container** + + - Added support for Elasticsearch 7.9 for compatibility with upcoming Magento releases. + + - **Elasticsearch plugin configuration**–Added support to use the Elasticsearch plugin configuration information from the `services.yaml` file to generate the `docker-compose.yaml` file for a {{ site.data.var.mcd-prod }} environment. See [Elasticsearch plugins]({{ site.baseurl}}/cloud/docker/docker-containers-service.html#elasticsearch-plugins). + + - **Elasticsearch plugin support**–Added support for the following Elasticsearch plugins: `analysis-icu`, `analysis-phonetic`, `analysis-stempel`, and `analysis-nori`. The `analysis-icu` and `analysis-phonetic` plugins are installed by default. You can add or remove the `analysis-stempel` and `analysis-nori` plugins as needed. + + - {:.new} **CLI container** + + - **Run commands inside Docker PHP containers**–Now you can use the Magento Cloud Docker CLI to run commands inside PHP containers in your Docker environment without having to install PHP on the host. For example, the following command builds the configuration: `./bin/magento-docker php 7.3 vendor/bin/ece-docker build:compose`. See [Magento Cloud Docker CLI]({{ site.baseurl }}/cloud/docker/docker-quick-refere.html#magento-cloud-dockencer-cli). *[Fix submitted by G Arvind from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/209).* + + - Added the OpenSSH-client to PHP CLI containers so you can use ssh-agent forwarding for Composer if the `composer.json` file contains private git repositories that require an ssh client for various Composer commands. + + - {:.new}**Test container**–Added a test container for Magento application testing and added the `--with-test` option to the Docker `build:compose` command to create the container only when testing Magento in the Docker environment. See [Magento application testing](https://devdocs.magento.com/cloud/docker/docker-test-app-mftf.html). + + - {:.new}**FPM-XDEBUG container** + + - {:.new}**Configure Xdebug on Linux**–Added the `--set-docker-host` option to the `ece-docker build:compose` command to configure the `host.docker.internal` value in the Xdebug container. This option is required to use Xdebug on Linux systems. See [Configure Xdebug for Docker]({{ site.baseurl }}/cloud/docker/docker-development-debug.html). + + - {:.fix}Fixed the Xdebug variable configuration for the Docker ENTRYPOINT to resolve `uninitialized "with_xdebug" variable` errors in the logs. *[Fix submitted by Florent Olivaud](https://github.com/magento/magento-cloud-docker/pull/218)* + +- {:.new}**Docker configuration changes** + + - **MailHog configuration**–Now you can use the following `ece-docker build:compose` command options to disable MailHog and specify ports: `--no-mailhog`, `--mailhog-http-port`, and `--mailhog-smtp-port`. See [Set up email]({{ site.baseurl }}/cloud/docker/docker-config.html#set-up-email). + + - For {{site.data.var.mcd-prod}} 1.2.0 and later, Magento now provides Docker images for each patch version, and the Docker configuration generator creates the Docker configuration with a specified patch version instead of using the latest. Previously, the Docker configuration generator built the configuration using the latest patch version which could break {{ site.data.var.mcd-prod}} environments built using an earlier version. + + - **Specify custom images and versions in custom Magento Cloud Docker configuration**service configuration custom environment Updated the `build:custom:compose` command with options to specify custom images and versions when generating a custum Docker compose configuration file, `docker-compose.yaml`. See [Build a custom Docker Compose configuration]({{ site.baseurl }}/cloud/docker/docker-quick-reference.html#build-a-custom-docker-compose-configuration). + + - Updated the Docker host configuration to expose port 443 to enable access to Magento (`https://magento2.docker`) from all CLI containers. + +- {:.fix}Fixed an issue that caused the {{site.data.var.mcd-prod}} build to fail if the `app/etc/env.php` file exists. + +- {:.fix}Updated the build configuration to replace named volumes with regular volumes to prevent issues when deploying {{ site.data.var.mcd-prod }} on Linux or Windows Subsystem for Linux (WSL2). + +- {:.fix}Updated the {{site.data.var.mcd-prod}} functional tests to support Composer 2.0. + +## v1.1.2 +*Release date: September 9, 2020*
+ +- {:.new}Added support for Elasticsearch 7.7 + +## v1.1.1 +*Release date: August 5, 2020*
+ +- {:.fix}**Updated email configuration**–Updated the default {{ site.var.ece.mcd-product }} configuration to support the MailHog service instead of using SendMail. See [Set up email]({{ site.baseurl }}/cloud/docker/docker-config.html#set-up-email). + +- {:.fix}Restored the PS library to the Cloud Docker environment configuration to fix `ps: command not found` errors. + +- {:.fix}Updated the default {{ site.data.var.mcd-prod }} configuration to remove automatic mounting of the database entrypoint and MariaDB volumes to fix `Cannot create container for service db` errors that can occur when starting your Cloud Docker environment. + + Now, you can configure the Cloud Docker environment to mount the database directories by adding the following options to the `ece-docker build:compose` command: `--with-entry-point` and `with-mariadb-conf`. See [Service configuration options]({{site.baseurl}}/cloud/docker/docker-containers.html#service-configuration-options). + +- {:.new}**CLI command updates** + +{: .docker-service-versions-table} + + Action | Command + ------ | ------- + Add an entrypoint to the database container to restore the database from backup | `./vendor/bin/ece-docker build:compose --db --with-entrypoint` + Add a MariaDB configuration volume | `./vendor/bin/ece-docker build:compose --db --mariadb-conf` + + + +## v1.1.0 +*Release date: June 25, 2020*
+ +- {:.new}**Added support for the Magento split database performance solution**–Now you can configure and deploy a Magento store using the Magento Split database performance solution in the Cloud Docker environment. See [Enable split database solution]({{site.baseurl}}/cloud/docker/docker-split-db.html). + +- {:.new}**Support for {{site.data.var.ee}} and {{site.data.var.ce}} deployment**–Now you can use {{site.data.var.mcd-prod}} to deploy a local development environment for projects that are not hosted on the Magento Cloud platform. + +- {:.new}**Blackfire.io support**–Added support to use the [Blackfire.io extension]({{site.baseurl}}/cloud/docker/docker-config-blackfire-io.html) for automated performance testing. *[Fix submitted by Adarsh Manickam from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/202)* + +- {:.new}**Container updates** + + - **Varnish**—Now Varnish is the default cache when you deploy Magento in a Cloud Docker environment using a supported version of the Magento Cloud application template. See [Varnish container]({{site.baseurl}}/cloud/docker/docker-containers-service.html#varnish-container). + + - Added the `--no-varnish` option to skip Varnish service installation when you generate the Cloud Docker configuration file. + + - {:.new}**Database** + + - Added the support for the MySQL database. Now, you can configure the Cloud Docker environment with either MariaDB or MySQL. See [Service configuration options]({{site.baseurl}}/cloud/docker/docker-containers.html#service-configuration-options). + + - Added the ability to set the increment and offset settings for database replication when you generate the Docker compose file. See [Service containers]({{site.baseurl}}/cloud/docker/docker-containers.html#service-containers). + + - {:.new}**PHP-FPM** + + - Added support for PHP 7.4. *[Fix submitted by Mohanela Murugan from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/198)* + + - Added ability to copy a `php.ini` file in the Magento root project directory to the Cloud Docker environment and apply custom PHP settings to the PHP-FPM and CLI containers. See [Customize PHP settings]({{site.baseurl}}/cloud/docker/docker-containers-service.html#customize-php-settings). *[Fix submitted by Mathew Beane from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/130).* + + - Added a container health check. *[Fix submitted by Visanth Sampath from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/188).* + + - {:.fix}**Node.js**—Updated the default Node.js version from version 8 to version 10 to improve security. Node.js version 8 is deprecated and no longer updated with bug fixes or security patches. *[Fix submitted by Mohan Elamurugan from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/183).* + + - {:.new}**Elasticsearch** + + - Added support for Elasticsearch 6.8, 7.2, 7.5, and 7.6. + + - Added the ability to customize the [Elasticsearch container configuration]({{ site.baseurl }}/cloud/docker/docker-containers-service.html#elasticsearch-container) when you generate the Docker compose configuration file. + + - Added the `--no-es` option to the service configuration options for generating the Docker Compose configuration file. Use this option to skip the Elasticsearch container installation and and use MySQL search instead. This option is supported only for Magento versions 2.3.5 and earlier. + + - {:.new}**FPM-XDEBUG container**—Added a service configuration option to install and configure Xdebug for debugging PHP in your Cloud Docker environment. See [Configure Xdebug]({{site.baseurl}}/cloud/docker/docker-development-debug.html). -[Configure Docker]: {{ site.baseurl }}/cloud/docker/docker-config.html -[Docker Docs: Multiple Compose files]: https://docs.docker.com/compose/extends/#multiple-compose-files -[`docker-compose run`]: https://docs.docker.com/compose/reference/run/ -[File synchronization engine]: {{ site.baseurl }}/cloud/docker/docker-syncing-data.html -[Mode]: {{site.baseurl}}/cloud/docker/docker-config.html#set-the-launch-mode -[Service versions]: {{ site.baseurl }}/cloud/docker/docker-containers.html#service-containers +- {:.new}**Docker configuration changes** + + - Added health checks for the PHP-FPM, Redis, Elasticsearch, and MySQL Docker service containers. + + - Changed the default file synchronization mode to `native` in Developer mode. + + - Added version information to the generic Docker service container image when generating the `docker-compose.yml` file. + + - Improved ability to handle large responses from the upstream PHP-FPM container by increasing the `fastcgi_buffers` value for the Nginx server. + + - Improved mutagen file synchronization performance by adding a second sync session to synchronize files in the `vendor` directory. This change prevents mutagen from getting stuck during the file synchronization process. *[Fix submitted by Mathew Beane from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/127).* + + - {:.new}**CLI command updates** + + {: .docker-service-versions-table} + + Action | Command + ------ | ------- + Clear Redis cache | `bin/magento-docker flush-redis` + Clear Varnish cache | `bin/magento-docker flush-varnish` + Skip default Varnish installation | `.vendor/bin/ece-docker build:compose --no-varnish` + [Customize Elasticsearch options]({{site.baseurl}}/cloud/docker/docker-containers-service.html#elasticsearch-container) | `.vendor/bin/ece-docker build:compose --es-env-var` + [Remove Elasticsearch configuration]({{site.baseurl}}/cloud/docker/docker-containers-service.html#elasticsearch-container) | `.vendor/bin/ece-docker build:compose --no-es` + Configure DB container with MySQL version 5.6 or 5.7 | `./vendor/bin/ece-docker build:compose --db --db-image mysql` + Specify custom Magento base URL | `./vendor/bin/ece-docker build:compose --host= --port=` + [Add container for Xdebug configuration]({{site.baseurl}}/cloud/docker/docker-development-debug.html) | `.vendor/bin/ece-docker build:compose --mode developer --sync-engine native --with-xdebug` + +- {:.fix}Fixed the configuration of mutagen file synchronization to prevent mutagen from creating stale sessions. *[Fix submitted by Mathew Beane from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/127).* + +- {:.fix}Fixed a configuration issue that caused syntax errors in the Docker compose log when starting the PHP-FPM container. *[Fix submitted by Mathew Beane from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/129)* + +- {:.fix}Fixed volume conflict errors that sometimes occurred when using multiple Docker environments. *[Fix submitted by G Arvind from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/168).* + +- {:.fix}Fixed an issue that caused the `ece-docker build:compose` command to fail if the configuration included Blackfire.io. *[Fix submitted by G Arvind from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/199).* + +- {:.fix}Updated the PHP CLI image configuration to prevent out-of-memory errors that occurred when installing multiple packages using {{site.data.var.mcd-prod}}. *[Fix submitted by Mohan Elamurugan from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/197).* + +- {:.fix}Added support for multiple MySQL users in the Cloud Docker environment. In earlier releases, the `build:compose` operation failed if the `magento.app.yaml` file specified multiple database users. *[Fix submitted by G Arvind from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/181).* + +- {:.fix}Removed `rsyslog` from the {{site.data.var.mcd-prod}} PHP containers to resolve compatibility issues that caused warning notifications during deployment. Magento Cloud Docker does not use the rsyslog utility. + +## v1.0.0 +*Release date: Feb 5, 2020*
+ +- {:.new}**Created a separate package to deliver `{{site.data.var.mcd-prod}}`**–Moved the source code to deliver {{site.data.var.mcd-prod}} from the `{{site.data.var.ct}}` repository to the [new `magento-cloud-docker` repository](https://github.com/magento/magento-cloud-docker) to maintain code quality and provide independent releases. The new package is a dependency for {{site.data.var.ct}} v2002.1.0 and later. + + When you update {{site.data.var.ct}}, you also update the `{{site.data.var.mcd-package}}` package to version 1.0.0. If you used {{site.data.var.mcd-prod}} with an earlier `{{site.data.var.ct}}` release (2002.0.x), review the [backward incompatibilities]({{site.baseurl}}/cloud/release-notes/backward-incompatible-changes.html#magento-cloud-docker-changes) and update your project as scripts, commands, and processes as needed. + +- {:.new}**Added versioning to the Docker images**–You must now update the `{{site.data.var.mcd-package}}` package to get the updated images. + +- {:.new}**Container updates**– + + - {:.new}**PHP-FPM container**– + + - {:.new}**Added Node.js support**–Updated the PHP-FPM image to support node, npm, and the grunt-cli capabilities inside the PHP container. + + - {:.new}**Added support for [ionCube](https://www.ioncube.com/)**–Updated the default Docker configuration to support ionCube in the local Docker development environment. + + - {:.new}**Web container**– + + - {:.new}**Customize NGINX configuration**–Added the capability to mount a custom `nginx.conf` file to the {{site.data.var.mcd-prod}} environment. See [Web container]({{site.baseurl}}/cloud/docker/docker-containers-service.html#web-container). + + - {:.new}**Auto-generated NGINX certificates**–The Docker configuration file now includes the configuration to auto-generate NGINX certificates for the Web container. + + - {:.new}**New Selenium container**–Added a [Selenium container]({{site.baseurl}}/cloud/docker/docker-containers-service.html#selenium-container) to support {{site.data.var.ee}} application testing using the Magento Functional Testing Framework (MFTF). + + - {:.new}**RabbitMQ version support**–Updated the RabbitMQ container configuration to support RabbitMQ version 3.8. + + - {:.fix}**Persistent database container**–The `magento-db: /var/lib/mysql` database volume now persists after you stop and remove the Docker configuration and restores when you restart the Docker configuration. Now, you must manually delete the database volume. See [Database containers]. + + - {:.new}**TLS container**– + + - {:.new}**Updated the container base image to use official image**–The [Magento Cloud TLS container] image is now based on the official `debian:jessie` Docker image.– + + - {:.new}**Added support for the [Pound TLS Termination Proxy]**–The [Pound configuration file][`pound.cfg`] adds the following ENV variables to customize the Docker configuration for the TLS container: + + - **`TimeOut`**–Sets the Time to First Byte (TTFB) timeout value. The default value is 300 seconds. + + - **`RewriteLocation`**–Determines whether the Pound proxy rewrites the location to the request URL by default. Defaults to `0` to prevent the rewrite from breaking redirects to outside websites like an external SSO site. [Fix submitted by Sorin Sugar](https://github.com/magento/magento-cloud-docker/pull/37) + + - {:.new} Increased the timeout value in the TLS container configuration from 15 to 300 seconds. [Fix submitted by Mathew Beane from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/78) + + - {:.new}**Varnish container**– + + - {:.new}**Updated the container base image to use official image**—The [Magento Cloud Varnish container] is now based on the official `centos` Docker image. + + - {:.new}**Improved default timeout configuration**-Added `.first_byte_timeout` and `.between_bytes_timeout` configuration to the Varnish container. Both timeout values default to `300s` (5 minutes). [Fix submitted by Mathew Beane from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/78) + + - {:.fix}**Skip Varnish during Xdebug sessions**–Updated the Varnish container configuration to return `pass` on requests received when Xdebug is enabled. In previous releases, you could not use Xdebug if the Docker environment included Varnish. [Fix submitted by Mathew Beane from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/111). + +- {:.new}**Docker configuration changes**– + + - {:.new}**Manage mounts and volumes for your project**–Added the ability to manage mounts and volumes when launching a Docker environment for local development. See [Sharing Magento Cloud project data]. + + - {:.new}**Support for network bridge mode**–Added support for network bridge mode to enable connections between Docker containers over the local network. + + - {:.new}**Cron container disabled by default**–To improve performance, the Cron container is no longer configured by default when you build the Docker environment. You can use the `--with-cron` option on the Docker build command to add a Cron container to your environment. See [Managing cron jobs]({{site.baseurl}}/cloud/docker/docker-manage-cron-jobs.html). + + - {:.new}**Stop synchronizing large backup files**–Added DB dumps and archive files—ZIP, SQL, GZ, and BZ2—to the exclusion list in the `dist/docker-sync.yml` and `dist/mutagen.sh` files. Synchronizing large files (>1 GB) can cause a period of inactivity and backup files do not normally require synchronization since you can regenerate them. + +- {:.new}**Command changes**– + + - {:.fix}Renamed the `./bin/docker` file to `./bin/magento-docker` to fix an issue that caused some Docker environments to break because the `./bin/docker` file overwrites existing Docker binary files. This is a [backward incompatible change] that requires updates to your scripts and commands. + + - {:.new}**Added a service configuration option to expose the database port to the host**–Use the `--expose-db-port=` option to expose the database port to the host when building the `docker-compose.yml` file: `bin/ece-docker build:compose --expose-db-port=` [Fix submitted by Adarsh Manickam from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/101). + + - {:.new}**New post-deploy command**–Previously, the post-deploy hooks defined in the `.magento.app.yaml` file ran automatically after you deployed Magento to a Cloud Docker container using the `cloud-deploy` command. Now, you must issue a separate `cloud-post-deploy` command to run the post-deploy hooks after you deploy. See the updated launch instructions for [developer] and [production] mode. + + - {:.new}Added the `--rm` option to `./bin/magento-docker` commands for the build and deploy containers. This removes the container after the task is complete. + + - {:.new}**Updates to `build:compose` command**– + + - {:.new}Added the `--sync-engine="native"` option to the `docker-build` command to disable file synchronization when you generate the Docker Compose configuration file in developer mode. Use this option when developing on Linux systems, which do not require file synchronization for local Docker development. See [Synchronizing data in the Docker environment]({{site.baseurl}}/cloud/docker/docker-syncing-data.html). + + - {:.new}Changed the default file synchronization setting from `docker-sync` to `native`. [Fix submitted by Mathew Beane from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/124). + +- {:.new}**Validation improvements**– + + - {:.new}Added validation to the deployment process for local Docker development environments to verify that the Cloud environment configuration includes the encryption key required to decrypt the database. Now, you get an error message in the log if the environment configuration does not specify a value for the encryption key. + + - {:.new}Added a container health check to the Elasticsearch service to ensure that the service is ready before continuing with build and deploy processing. If the health check returns an error, the container restarts automatically. + + +[Sharing Magento Cloud project data]: {{site.baseurl}}/cloud/docker/docker-containers.html#sharing-magento-cloud-project-data +[Database containers]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#database-container +[developer]: {{site.baseurl}}/cloud/docker/docker-mode-developer.html +[production]: {{site.baseurl}}/cloud/docker/docker-mode-production.html +[backward incompatible change]: {{site.baseurl}}/cloud/release-notes/backward-incompatible-changes.html +[Magento Cloud TLS container]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#tls-container +[Magento Cloud Varnish container]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#varnish-container +[Pound TLS Termination Proxy]: https://github.com/mnuessler/docker-tls-termination-proxy/blob/master/README.md +[`pound.cfg`]: https://github.com/magento/magento-cloud-docker/blob/1.0/images/tls/pound.cfg + + + + + + From ce4262f679d0c11181f6b531ae0895492efdc8d7 Mon Sep 17 00:00:00 2001 From: Margaret Eker Date: Sat, 7 Nov 2020 07:02:49 -0600 Subject: [PATCH 10/16] Update src/cloud/release-notes/mcd-release-notes.md --- src/cloud/release-notes/mcd-release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cloud/release-notes/mcd-release-notes.md b/src/cloud/release-notes/mcd-release-notes.md index 0503a692226..4769d71e0a0 100644 --- a/src/cloud/release-notes/mcd-release-notes.md +++ b/src/cloud/release-notes/mcd-release-notes.md @@ -35,7 +35,7 @@ The release notes include: - {:.new} **CLI container** - - **Run commands inside Docker PHP containers**–Now you can use the Magento Cloud Docker CLI to run commands inside PHP containers in your Docker environment without having to install PHP on the host. For example, the following command builds the configuration: `./bin/magento-docker php 7.3 vendor/bin/ece-docker build:compose`. See [Magento Cloud Docker CLI]({{ site.baseurl }}/cloud/docker/docker-quick-refere.html#magento-cloud-dockencer-cli). *[Fix submitted by G Arvind from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/209).* + - **Run commands inside Docker PHP containers**–Now you can use the Magento Cloud Docker CLI to run commands inside PHP containers in your Docker environment without having to install PHP on the host. For example, the following command builds the configuration: `./bin/magento-docker php 7.3 vendor/bin/ece-docker build:compose`. See [Magento Cloud Docker CLI]({{ site.baseurl }}/cloud/docker/docker-quick-refere.html#magento-cloud-docker-cli). *[Fix submitted by G Arvind from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/209).* - Added the OpenSSH-client to PHP CLI containers so you can use ssh-agent forwarding for Composer if the `composer.json` file contains private git repositories that require an ssh client for various Composer commands. From b90c8ecc4c599ac220417f783a58f28ced8848ad Mon Sep 17 00:00:00 2001 From: Margaret Eker Date: Sat, 7 Nov 2020 07:25:21 -0600 Subject: [PATCH 11/16] Update src/cloud/release-notes/mcd-release-notes.md --- src/cloud/release-notes/mcd-release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cloud/release-notes/mcd-release-notes.md b/src/cloud/release-notes/mcd-release-notes.md index 4769d71e0a0..73dada227bb 100644 --- a/src/cloud/release-notes/mcd-release-notes.md +++ b/src/cloud/release-notes/mcd-release-notes.md @@ -35,7 +35,7 @@ The release notes include: - {:.new} **CLI container** - - **Run commands inside Docker PHP containers**–Now you can use the Magento Cloud Docker CLI to run commands inside PHP containers in your Docker environment without having to install PHP on the host. For example, the following command builds the configuration: `./bin/magento-docker php 7.3 vendor/bin/ece-docker build:compose`. See [Magento Cloud Docker CLI]({{ site.baseurl }}/cloud/docker/docker-quick-refere.html#magento-cloud-docker-cli). *[Fix submitted by G Arvind from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/209).* + - **Run commands inside Docker PHP containers**–Now you can use the Magento Cloud Docker CLI to run commands inside PHP containers in your Docker environment without having to install PHP on the host. For example, the following command builds the configuration: `./bin/magento-docker php 7.3 vendor/bin/ece-docker build:compose`. See [Magento Cloud Docker CLI]({{ site.baseurl }}/cloud/docker/docker-quick-reference.html#magento-cloud-docker-cli). *[Fix submitted by G Arvind from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/209).* - Added the OpenSSH-client to PHP CLI containers so you can use ssh-agent forwarding for Composer if the `composer.json` file contains private git repositories that require an ssh client for various Composer commands. From 0fbb5c72303413a3a508e5e0e3117c53200ead30 Mon Sep 17 00:00:00 2001 From: Margaret Eker Date: Mon, 9 Nov 2020 08:41:44 -0600 Subject: [PATCH 12/16] Apply suggestions from code review --- src/cloud/docker/docker-quick-reference.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cloud/docker/docker-quick-reference.md b/src/cloud/docker/docker-quick-reference.md index 930911289fc..60f7108d783 100644 --- a/src/cloud/docker/docker-quick-reference.md +++ b/src/cloud/docker/docker-quick-reference.md @@ -122,7 +122,7 @@ For {{site.data.var.mcd-prod}} 1.2 and later, you have an additional option to s > Generate a custom `docker-compose.yaml` file ```bash -./vendor/bin/ece-docker build:custom:compose '{"name":"magento","system":{"mode":"production","host":"magento2.test","port":"8080","db":{"increment_increment":3,"increment_offset":2},"mailhog":{"smtp_port":"1026","http_port":"8026"}},"services":{"php":{"version":"7.4","enabled":true,"extensions":{"enabled":["xsl"]}},"mysql":{"version":"10.2","image":"mariadb","enabled":true}, "mailhog": {"enabled":true}}}' +./vendor/bin/ece-docker build:custom:compose '{"name":"magento","system":{"mode":"production","host":"magento2.test","port":"8080","db":{"increment_increment":3,"increment_offset":2},"mailhog":{"smtp_port":"1026","http_port":"8026"}},"services":{"php":{"version":"7.3","enabled":true,"extensions":{"enabled":["xsl"]}},"mysql":{"version":"10.2","image":"mariadb","enabled":true}, "mailhog": {"enabled":true}}}' ``` This command generates the following `docker-compose.yaml` file: @@ -273,7 +273,6 @@ networks: ``` -For {{site.data.var.mcd-prod}} 1.2 and later, you have an additional option to specify custom images and image versions using the `ece-docker build:custom:compose` command. #### Example 2 From dc13081cf15c7851817f9a8c88cebbd7e9c89210 Mon Sep 17 00:00:00 2001 From: Margaret Eker Date: Mon, 9 Nov 2020 08:50:38 -0600 Subject: [PATCH 13/16] remove blank line --- src/cloud/docker/docker-quick-reference.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/cloud/docker/docker-quick-reference.md b/src/cloud/docker/docker-quick-reference.md index 60f7108d783..d6044dfedb4 100644 --- a/src/cloud/docker/docker-quick-reference.md +++ b/src/cloud/docker/docker-quick-reference.md @@ -273,7 +273,6 @@ networks: ``` - #### Example 2 > Generate a custom `docker-compose.yaml` file with custom images and image versions From ddad9899cf6fd85b030fa6b182839fef72b2b804 Mon Sep 17 00:00:00 2001 From: Margaret Eker Date: Mon, 9 Nov 2020 10:04:24 -0600 Subject: [PATCH 14/16] Apply suggestions from code review Co-authored-by: hguthrie --- src/cloud/docker/docker-containers-service.md | 4 ++-- src/cloud/release-notes/mcd-release-notes.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cloud/docker/docker-containers-service.md b/src/cloud/docker/docker-containers-service.md index b0e1e88a99c..2558800dbbf 100755 --- a/src/cloud/docker/docker-containers-service.md +++ b/src/cloud/docker/docker-containers-service.md @@ -78,7 +78,7 @@ If your Cloud project uses Magento version 2.3.5 or earlier with MySQL search, a ### Elasticsearch plugins The `analysis-icu` and `analysis-phonetic` plugins are installed by default and can not be skipped. -If you use Elasticsearch 6.5 and later, the default Elasticsearch plugins configured in `.magento/services.yaml` are installed automatically along with any custom plugins added to the `services.yaml`. When you generate the `docker-compose.yaml` file, custom plugins are added to the `ES_PLUGINS` environment configuration option. +If you use Elasticsearch 6.5 and later, the default Elasticsearch plugins configured in `.magento/services.yaml` are installed automatically along with any custom plugins added to the `services.yaml` file. When you generate the `docker-compose.yaml` file, custom plugins are added to the `ES_PLUGINS` environment configuration option. You can change the list of plugins to install by updating the configuration for the `ES_PLUGINS` variable: @@ -188,7 +188,7 @@ The Selenium container, based on the [selenium/standalone-chrome/](https://hub.d **Docker base image**: [magento/magento-cloud-docker-php][php-cloud], which is based on the [php](https://hub.docker.com/_/php) Docker image
**Ports exposed**: None
-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). +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). ## TLS container diff --git a/src/cloud/release-notes/mcd-release-notes.md b/src/cloud/release-notes/mcd-release-notes.md index 73dada227bb..0ef2800664c 100644 --- a/src/cloud/release-notes/mcd-release-notes.md +++ b/src/cloud/release-notes/mcd-release-notes.md @@ -39,7 +39,7 @@ The release notes include: - Added the OpenSSH-client to PHP CLI containers so you can use ssh-agent forwarding for Composer if the `composer.json` file contains private git repositories that require an ssh client for various Composer commands. - - {:.new}**Test container**–Added a test container for Magento application testing and added the `--with-test` option to the Docker `build:compose` command to create the container only when testing Magento in the Docker environment. See [Magento application testing](https://devdocs.magento.com/cloud/docker/docker-test-app-mftf.html). + - {:.new}**Test container**–Added a test container for Magento application testing, and added the `--with-test` option to the Docker `build:compose` command to create the container only when testing Magento in the Docker environment. See [Magento application testing](https://devdocs.magento.com/cloud/docker/docker-test-app-mftf.html). - {:.new}**FPM-XDEBUG container** @@ -53,7 +53,7 @@ The release notes include: - For {{site.data.var.mcd-prod}} 1.2.0 and later, Magento now provides Docker images for each patch version, and the Docker configuration generator creates the Docker configuration with a specified patch version instead of using the latest. Previously, the Docker configuration generator built the configuration using the latest patch version which could break {{ site.data.var.mcd-prod}} environments built using an earlier version. - - **Specify custom images and versions in custom Magento Cloud Docker configuration**service configuration custom environment Updated the `build:custom:compose` command with options to specify custom images and versions when generating a custum Docker compose configuration file, `docker-compose.yaml`. See [Build a custom Docker Compose configuration]({{ site.baseurl }}/cloud/docker/docker-quick-reference.html#build-a-custom-docker-compose-configuration). + - **Specify custom images and versions in custom Magento Cloud Docker configuration**—Updated the `build:custom:compose` command with options to specify custom images and versions when generating a custom Docker compose configuration file (`docker-compose.yaml`). See [Build a custom Docker Compose configuration]({{ site.baseurl }}/cloud/docker/docker-quick-reference.html#build-a-custom-docker-compose-configuration). - Updated the Docker host configuration to expose port 443 to enable access to Magento (`https://magento2.docker`) from all CLI containers. From 1762a11117c63674726c50a47d4389b4720f8859 Mon Sep 17 00:00:00 2001 From: maeker12 <{ID}+{username}@users.noreply.github.com> Date: Mon, 9 Nov 2020 10:17:57 -0600 Subject: [PATCH 15/16] Updates based on review feedback --- src/cloud/docker/docker-containers-service.md | 16 ++++++++-------- src/cloud/release-notes/mcd-release-notes.md | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/cloud/docker/docker-containers-service.md b/src/cloud/docker/docker-containers-service.md index b0e1e88a99c..57583345a34 100755 --- a/src/cloud/docker/docker-containers-service.md +++ b/src/cloud/docker/docker-containers-service.md @@ -78,9 +78,9 @@ If your Cloud project uses Magento version 2.3.5 or earlier with MySQL search, a ### Elasticsearch plugins The `analysis-icu` and `analysis-phonetic` plugins are installed by default and can not be skipped. -If you use Elasticsearch 6.5 and later, the default Elasticsearch plugins configured in `.magento/services.yaml` are installed automatically along with any custom plugins added to the `services.yaml`. When you generate the `docker-compose.yaml` file, custom plugins are added to the `ES_PLUGINS` environment configuration option. +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. -You can change the list of plugins to install by updating the configuration for the `ES_PLUGINS` variable: +The following example adds the `analysis-stempel` and `analysis-nori` plugins to the Docker environment. ```yaml services: @@ -177,15 +177,15 @@ docker-compose run --rm redis redis-cli -h redis ## Selenium container **Container name**: selenium
-**Docker base image**: [selenium/standalone-chrome/](https://hub.docker.com/r/selenium/standalone-chrome
+**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
**Ports exposed**: `4444`
-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). +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). ## Test container **Container name**: test
-**Docker base image**: [magento/magento-cloud-docker-php][php-cloud], which is based on the [php](https://hub.docker.com/_/php) Docker image
+**Docker base image**: [magento/magento-cloud-docker-php][php-cloud], based on the [magento/magento-cloud-docker-php][php-cloud] Docker image
**Ports exposed**: None
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). @@ -193,7 +193,7 @@ The Test container, based on the [magento/magento-cloud-docker-php][php-cloud] D ## TLS container **Container name**: tls
-**Docker base image**: [magento/magento-cloud-docker-tls][tls], which is based on the [debian:jessie](https://hub.docker.com/_/debian) Docker image
+**Docker base image**: [magento/magento-cloud-docker-tls][tls], based on the [debian:jessie](https://hub.docker.com/_/debian) Docker image
**Ports exposed**: `443`
The TLS termination proxy container facilitates the Varnish SSL termination over HTTPS. @@ -209,7 +209,7 @@ To increase the timeout on this container, add the following code to the `docke ## Varnish container **Container name**: varnish
-**Docker base image**: [magento/magento-cloud-docker-varnish][varnish], which is based on the [centos]
+**Docker base image**: [magento/magento-cloud-docker-varnish][varnish], based on the [centos] Docker image
**Ports exposed**: `80`
The Varnish container simulates Fastly and is useful for testing VCL snippets. @@ -233,7 +233,7 @@ docker-compose exec varnish varnishadm ban req.url '~' '.' ## Web container **Container name**: web
-**Docker base image**: [magento/magento-cloud-docker-nginx][nginx], which is based on the [centos] Docker image
+**Docker base image**: [magento/magento-cloud-docker-nginx][nginx], based on the [centos] Docker image
**Ports exposed**: None
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). diff --git a/src/cloud/release-notes/mcd-release-notes.md b/src/cloud/release-notes/mcd-release-notes.md index 73dada227bb..73a2940b14b 100644 --- a/src/cloud/release-notes/mcd-release-notes.md +++ b/src/cloud/release-notes/mcd-release-notes.md @@ -37,7 +37,7 @@ The release notes include: - **Run commands inside Docker PHP containers**–Now you can use the Magento Cloud Docker CLI to run commands inside PHP containers in your Docker environment without having to install PHP on the host. For example, the following command builds the configuration: `./bin/magento-docker php 7.3 vendor/bin/ece-docker build:compose`. See [Magento Cloud Docker CLI]({{ site.baseurl }}/cloud/docker/docker-quick-reference.html#magento-cloud-docker-cli). *[Fix submitted by G Arvind from Zilker Technology](https://github.com/magento/magento-cloud-docker/pull/209).* - - Added the OpenSSH-client to PHP CLI containers so you can use ssh-agent forwarding for Composer if the `composer.json` file contains private git repositories that require an ssh client for various Composer commands. + - Added the OpenSSH-client to PHP CLI containers. Now, you can use ssh-agent forwarding for Composer if the `composer.json` file contains private git repositories that require an ssh client to use Composer commands. - {:.new}**Test container**–Added a test container for Magento application testing and added the `--with-test` option to the Docker `build:compose` command to create the container only when testing Magento in the Docker environment. See [Magento application testing](https://devdocs.magento.com/cloud/docker/docker-test-app-mftf.html). From 32433eece78b757f6263f7f6b738152ac72b7528 Mon Sep 17 00:00:00 2001 From: maeker12 <{ID}+{username}@users.noreply.github.com> Date: Mon, 9 Nov 2020 10:54:20 -0600 Subject: [PATCH 16/16] Updated Launch developer mode instructions to add step to apply patches before deploying to a Magento Cloud Docker environment --- src/cloud/docker/docker-mode-developer.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/cloud/docker/docker-mode-developer.md b/src/cloud/docker/docker-mode-developer.md index 6600ffeee85..78a77b63298 100644 --- a/src/cloud/docker/docker-mode-developer.md +++ b/src/cloud/docker/docker-mode-developer.md @@ -90,8 +90,18 @@ To launch the Docker environment in developer mode: 1. Install Magento in your Docker environment. + - For Magento version 2.4 and 2.4.1 only, run the following command to apply patches before you deploy. + + ```bash + docker-compose run deploy php ./vendor/bin/ece-patches apply + ``` + - Deploy Magento in the Docker container. + For Magento version 2.4 and 2.4.1, run the following command to apply patches before you deploy. + + ``` + ```bash docker-compose run --rm deploy cloud-deploy ```