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

Commit 12c1cd4

Browse files
committed
Merge branch 'master' into sync-develop
2 parents 7ed6c33 + 632c7bf commit 12c1cd4

File tree

22 files changed

+1153
-766
lines changed

22 files changed

+1153
-766
lines changed
68.8 KB
Loading
8.27 KB
Loading

guides/v2.2/cloud/docker/docker-config.md

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,9 @@ For example, the following command starts the Docker configuration generator for
5454
## Prerequisites
5555

5656
1. You must have the following software installed on your local workstation:
57-
5857
- PHP version 7.1 or later
59-
- [[email protected]](https://formulae.brew.sh/formula/[email protected])
60-
- [[email protected]](https://formulae.brew.sh/formula/[email protected])
58+
- [[email protected]](https://formulae.brew.sh/formula/[email protected])
59+
- [[email protected]](https://formulae.brew.sh/formula/[email protected])
6160
- [Composer](https://getcomposer.org)
6261
- [Docker](https://www.docker.com/get-started)
6362
- File synchronization required for developer mode—use one of the following:
@@ -121,19 +120,6 @@ Continue launching your Docker environment in the default _production_ mode.
121120
cp .docker/config.php.dist .docker/config.php
122121
```
123122
124-
Convert custom PHP configuration files to Docker ENV files.
125-
126-
```bash
127-
./vendor/bin/ece-tools docker:config:convert
128-
```
129-
130-
This generates the following Docker ENV files:
131-
132-
* `.docker/config.env`
133-
134-
{: .bs-callout-info }
135-
The `{{site.data.var.ct}}` version 2002.0.12 package does not support the `docker:config:convert` command.
136-
137123
1. _Optional_: Configure the Docker global variables in the `docker-compose.yml` file. For example, you can [configure Xdebug]({{ page.baseurl }}/cloud/docker/docker-development-debug.html#configure-xdebug).
138124
139125
1. Build files to containers and run in the background.
@@ -170,7 +156,8 @@ Continue launching your Docker environment in the default _production_ mode.
170156
```bash
171157
docker-compose run deploy magento-command cache:clean
172158
```
173-
1. _Optional_: Restart services if the static content does not synchronize with all images after generation on build phase.
159+
160+
1. _Optional_: Restart services if the static content does not synchronize with all images after generation on build phase.
174161
175162
```bash
176163
docker-compose restart
@@ -185,52 +172,61 @@ Continue launching your Docker environment in the _developer_ mode. The develope
185172
{: .bs-callout-info }
186173
The `{{site.data.var.ct}}` version 2002.0.18 and later supports developer mode.
187174
188-
1. Install the `docker-sync` tool using the [Installation instructions](https://docker-sync.readthedocs.io/en/latest/getting-started/installation.html). If you have it installed, continue to the next step.
175+
1. Install the `docker-sync` tool using the [Installation instructions](https://docker-sync.readthedocs.io/en/latest/getting-started/installation.html).
176+
Optionally, you can install the `mutagen.io` tool using the [Installation instructions](https://mutagen.io/documentation/installation/).
177+
If you have it installed, continue to the next step.
189178
190179
1. In your local environment, start the Docker configuration generator. You can use the service keys, such as `--php`, to [specify a version](#service-versions).
191180
192181
```bash
193182
./vendor/bin/ece-tools docker:build --mode="developer"
194183
```
195184
196-
1. _Optional_: If you have a custom PHP configuration file, copy the default configuration DIST file to your custom configuration file and make any necessary changes.
185+
By default, the docker-compose configuration uses 'docker-sync' for file synchronization.
186+
To use 'mutagen.io' for file synchronization, you must run the command with the `--sync-engine=mutagen` option.
187+
188+
For example:
197189
198190
```bash
199-
cp .docker/config.php.dist .docker/config.php
191+
./vendor/bin/ece-tools docker:build --mode="developer" --sync-engine=mutagen
200192
```
201193
202-
Convert custom PHP configuration files to Docker ENV files.
194+
1. _Optional_: If you have a custom PHP configuration file, copy the default configuration DIST file to your custom configuration file and make any necessary changes.
203195
204196
```bash
205-
./vendor/bin/ece-tools docker:config:convert
197+
cp .docker/config.php.dist .docker/config.php
206198
```
207199
208-
This generates the following Docker ENV files:
209-
210-
* `.docker/config.env`
211-
212200
1. _Optional_: Configure the Docker global variables in the `docker-compose.yml` file. For example, you can [enable and configure Xdebug]({{ page.baseurl }}/cloud/docker/docker-development-debug.html).
213201
214-
1. Start the file synchronization (use one of the following).
202+
1. Start the file synchronization.
215203
216204
For the `docker-sync` tool:
217205
218206
```bash
219207
docker-sync start
220208
```
221209
222-
For the `mutagen` tool:
210+
If it is the first installation you should wait a few minutes for synchronization files
223211
224-
```bash
225-
bash ./mutagen.sh
226-
```
212+
{: .bs-callout-info}
213+
If you use `mutagen.io` for file synchronization, skip this step. You start `mutagen.io` _after_ deploying the docker containers.
227214
228215
1. Build files to containers and run in the background.
229216
230217
```bash
231218
docker-compose up -d
232219
```
233220
221+
1. Start the file synchronization with `mutagen.io`.
222+
223+
```bash
224+
bash ./mutagen.sh
225+
```
226+
227+
{: .bs-callout-info}
228+
If you use `docker-sync` for file synchronization, skip this step.
229+
234230
1. Install Magento in your Docker environment.
235231
236232
- Deploy Magento in the Docker container:

guides/v2.2/cloud/docker/docker-development-debug.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ runtime:
4545
- PHP_IDE_CONFIG=serverName=magento_cloud_docker
4646
- XDEBUG_CONFIG=remote_host=host.docker.internal
4747
- 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip redis xsl xdebug'
48-
env_file:
49-
- ./.docker/config.env
5048
```
5149
{:.no-copy}
5250

@@ -60,19 +58,19 @@ runtime:
6058

6159
1. In your PhpStorm project, open the settings panel.
6260

63-
- _Mac OS X_—Select **File** > **Preferences**.
64-
- _Windows/Linux_—Select **File** > **Settings**.
61+
- _Mac OS X_—Select **File** > **Preferences**.
62+
- _Windows/Linux_—Select **File** > **Settings**.
6563

6664
1. In the _Settings_ panel, expand and locate the **Languages & Frameworks** > **PHP** > **Servers** section.
6765

6866
1. Click the **+** to add a server configuration. The project name is in grey at the top.
6967

7068
1. Configure the following settings for the new server configuration:
7169

72-
- **Name**—Enter the name used for the `serverName` in `PHP_IDE_CONFIG` option from `docker-compose.yml` file.
73-
- **Host**—Enter `localhost`.
74-
- **Port**—Enter `80`.
75-
- **Debugger**—Select `Xdebug`.
70+
- **Name**—Enter the name used for the `serverName` in `PHP_IDE_CONFIG` option from `docker-compose.yml` file.
71+
- **Host**—Enter `localhost`.
72+
- **Port**—Enter `80`.
73+
- **Debugger**—Select `Xdebug`.
7674

7775
1. Select **Use path mappings**. In the _File/Directory_ pane, the root of the project for the `serverName` displays.
7876

guides/v2.2/cloud/env/variables-deploy.md

Lines changed: 47 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ stage:
5858

5959
Enables or disables cleaning [static content files]({{ page.baseurl }}/config-guide/cli/config-cli-subcommands-static-view.html#config-cli-static-overview) generated during the build or deploy phase. We recommend the default value _true_ in development.
6060

61-
- **`true`**—Removes all existing static content before deploying the updated static content.
62-
- **`false`**—The deployment only overwrites existing static content files if the generated content contains a newer version.
61+
- **`true`**—Removes all existing static content before deploying the updated static content.
62+
- **`false`**—The deployment only overwrites existing static content files if the generated content contains a newer version.
6363

6464
If you make modifications to static content through a separate process, set the value to _false_.
6565

@@ -79,9 +79,9 @@ deploy updates to existing files without removing the previous versions. Because
7979

8080
Use this environment variable to confirm message queues are running after a deployment.
8181

82-
- `cron_run`—A boolean value that enables or disables the `consumers_runner` cron job (default = `false`).
83-
- `max_messages`—A number specifying the maximum number of messages each consumer must process before terminating (default = `1000`). Although we do not recommend it, you can use `0` to prevent the consumer from terminating.
84-
- `consumers`—An array of strings specifying which consumer(s) to run. An empty array runs _all_ consumers.
82+
- `cron_run`—A boolean value that enables or disables the `consumers_runner` cron job (default = `false`).
83+
- `max_messages`—A number specifying the maximum number of messages each consumer must process before terminating (default = `1000`). Although we do not recommend it, you can use `0` to prevent the consumer from terminating.
84+
- `consumers`—An array of strings specifying which consumer(s) to run. An empty array runs _all_ consumers.
8585

8686
```yaml
8787
stage:
@@ -101,6 +101,27 @@ By default, the deployment process overwrites all settings in the `env.php` file
101101
```bash
102102
./bin/magento queue:consumers:list
103103
```
104+
105+
### `CONSUMERS_WAIT_FOR_MAX_MESSAGES`
106+
107+
- **Default**—`false`
108+
- **Version**—Magento 2.2.0 and later
109+
110+
Configure how consumers process messages from the message queue by choosing one of the following options:
111+
112+
- `false`—Consumers process available messages in the queue, close the TCP connection, and terminate. Consumers do not wait for additional messages to enter the queue, even if the number of processed messages is less than the `max_messages` value specified in the `CRON_CONSUMERS_RUNNER` deploy variable.
113+
114+
- `true`—Consumers continue to process messages from the message queue until reaching the maximum number of messages (`max_messages`) specified in the `CRON_CONSUMERS_RUNNER` deploy variable before closing the TCP connection and terminating the consumer process. If the queue empties before reaching `max_messages`, the consumer waits for more messages to arrive.
115+
116+
{: .bs-callout .bs-callout-warning}
117+
If you use workers to run consumers instead of using a cron job, set this variable to true.
118+
119+
```yaml
120+
stage:
121+
deploy:
122+
CONSUMERS_WAIT_FOR_MAX_MESSAGES: false
123+
```
124+
104125
### `CRYPT_KEY`
105126

106127
- **Default**—_Not set_
@@ -171,7 +192,7 @@ MariaDB [main]> SHOW TABLES;
171192
| ece_cache |
172193
| ece_cache_tag |
173194
| ece_captcha_log |
174-
.....
195+
...
175196
```
176197
{: .no-copy}
177198

@@ -209,8 +230,8 @@ stage:
209230

210231
**Known limitations**—
211232

212-
- Changing the search engine to any type other than `elasticsuite` causes a deploy failure accompanied by an appropriate validation error
213-
- Removing the ElasticSearch service causes a deploy failure accompanied by an appropriate validation error
233+
- Changing the search engine to any type other than `elasticsuite` causes a deploy failure accompanied by an appropriate validation error
234+
- Removing the ElasticSearch service causes a deploy failure accompanied by an appropriate validation error
214235

215236
{:.bs-callout .bs-callout-info}
216237
Magento does not support the ElasticSuite third-party plugin.
@@ -222,8 +243,8 @@ Magento does not support the ElasticSuite third-party plugin.
222243

223244
Enables and disables Google Analytics when deploying to Staging and Integration environments. By default, Google Analytics is true only for the Production environment. Set this value to `true` to enable Google Analytics in the Staging and Integration environments.
224245

225-
- **`true`**—Enables Google Analytics on Staging and Integration environments.
226-
- **`false`**—Disables Google Analytics on Staging and Integration environments.
246+
- **`true`**—Enables Google Analytics on Staging and Integration environments.
247+
- **`false`**—Disables Google Analytics on Staging and Integration environments.
227248

228249
Add the `ENABLE_GOOGLE_ANALYTICS` environment variable to the `deploy` stage in the `.magento.env.yaml` file:
229250

@@ -249,6 +270,21 @@ stage:
249270
FORCE_UPDATE_URLS: true
250271
```
251272

273+
### `LOCK_PROVIDER`
274+
275+
- **Default**—`file`
276+
- **Version**—Magento 2.2.5 and later
277+
278+
The lock provider prevents the launch of duplicate cron jobs and cron groups. You must use the `file` lock provider in the Production environment. Starter environments and the Pro Integration environment do not use the [MAGENTO_CLOUD_LOCKS_DIR]({{page.baseurl}}/cloud/env/variables-cloud.html) variable, so `{{site.data.var.ct}}` applies the `db` lock provider automatically.
279+
280+
```yaml
281+
stage:
282+
deploy:
283+
LOCK_PROVIDER: "db"
284+
```
285+
286+
See [Configure the lock]({{page.baseurl}}/install-gde/install/cli/install-cli-subcommands-lock.html) in the _Install guide_.
287+
252288
### `MYSQL_USE_SLAVE_CONNECTION`
253289

254290
- **Default**—`false`
@@ -422,6 +458,7 @@ stage:
422458
Allows you to increase the maximum expected execution time for static content deployment.
423459

424460
By default, Magento Commerce sets the maximum expected execution to 400 seconds, but in some scenarios you might need more time to complete the static content deployment for a Cloud project.
461+
425462
```yaml
426463
stage:
427464
deploy:

guides/v2.2/cloud/project/project-conf-files_services.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,18 @@ The current default storage amount per project is 5GB, or 5120MB. You can distri
146146
```
147147

148148
1. Confirm the `service` and `type` from the response. The response provides connection information, such as the IP address and port number.
149+
150+
## Service versions
151+
152+
The following table lists the services used in {{site.data.var.ece}} and their version compatibility with the [Magento Cloud template](https://github.com/magento/magento-cloud).
153+
154+
Service | Magento 2.3 | Magento 2.2
155+
--------- | ------------- | ------------
156+
`elasticsearch` | Magento 2.3.1 and later—1.7, 2.4, 5.2, 6.5<br>Magento 2.3.0—1.7, 2.4, 5.2 | Magento versions 2.2.8 and later—1.7, 2.4, 5.2, 6.5<br>Magento 2.2.0 to 2.2.7—1.7, 2.4, 5.2
157+
`mariadb` | 10.0 to 10.2 | 10.0 to 10.2
158+
`nginx` | 1.9 | 1.9
159+
`node` | 6, 8, 10, 11 | 6, 8, 10, 11
160+
`php` | Magento 2.3.3 and later—7.1, 7.2, 7.3<br>Magento 2.3.0 to 2.3.2—7.1, 7.2 | Magento 2.2.10 and later—7.1, 7.2<br>Magento 2.2.5 to 2.2.9—7.0, 7.1<br>Magento 2.2.4 and earlier—7.0.2, 7.0.4, ~7.0.6, 7.1
161+
`rabbitmq`| 3.5, 3.7 | 3.5
162+
`redis` | 3.2, 4.0, 5.0 | 3.2, 4.0, 5.0
163+
`varnish` | Magento 2.3.3 and later—4.0, 5.0, 6.2<br>Magento 2.3.0 to 2.3.2—4.0, 5.0 | 4.0, 5.0

0 commit comments

Comments
 (0)