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

Commit 039b065

Browse files
authored
Merge branch 'master' into small-changes
2 parents 8673c81 + 1d4bf8c commit 039b065

File tree

8 files changed

+115
-56
lines changed

8 files changed

+115
-56
lines changed

src/_data/toc/configuration-guide.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,9 @@ pages:
353353
- label: Set up optional database replication
354354
url: /config-guide/multi-master/multi-master_slavedb.html
355355

356+
- label: Revert from a split database to a single database
357+
url: /config-guide/revert-split-database.html
358+
356359
- label: Custom Logging
357360
url: /config-guide/log/log-intro.html
358361
children:

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ The Test container, based on the [magento/magento-cloud-docker-php][php-cloud] D
218218
**Docker base image**: [magento/magento-cloud-docker-nginx:1.19-1.2.0][tls]<br>
219219
**Ports**: `443` (default), `8080:80` (Varnish bypass)<br/>
220220

221+
By default, the TLS container is included with the Docker Compose configuration. However, you can generate a configuration without TLS by adding the `--no-tls` option to the `ece-docker build:compose` command.
222+
221223
The TLS termination proxy container facilitates the Varnish SSL termination over HTTPS.
222224

223225
- The default port for TLS communication is `443`.
@@ -267,6 +269,11 @@ docker-compose exec varnish varnishadm ban req.url '~' '.'
267269

268270
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).
269271

272+
This container provides two NGINX configuration options for building the Docker configuration:
273+
274+
- `--nginx-worker-processes` to set the number of worker processes for NGINX. The default is `1`.
275+
- `--nginx-worker-connections` to set the maximum number of connections that each worker process can handle simultaneously. The default is `1024`.
276+
270277
The NGINX configuration for this container is the standard Magento [nginx config], which includes the configuration to auto-generate NGINX certificates for the container. You can customize the NGINX configuration by mounting a new configuration file using a volume.
271278

272279
{:.procedure}

src/cloud/docker/docker-containers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ The following table shows the options to customize service container configurati
5353
| [redis][redis-container] | Redis | `--redis` | 3.2, 4.0, 5.0 | Standard redis container
5454
| [selenium][selenium-container]| Selenium | `--with-selenium`<br>`--selenium-version`<br>`--selenium-image`| Any | Enables Magento application testing using the Magento Functional Testing Framework (MFTF)
5555
| [test][test-container]| PHP CLI | `--with-test`| Any | Optional container with a writable file system for running tests
56-
| [tls][tls-container] | SSL Endpoint | `--tls-port` | nginx 1.19-1.2.0, latest | Terminates SSL, can be configured to pass to varnish or nginx. Use the `--tls-port` option to change the default port (443).
56+
| [tls][tls-container] | SSL Endpoint | `--tls-port`<br/>`--no-tls` | nginx 1.19-1.2.0, latest | Terminates SSL, can be configured to pass to varnish or nginx. Use the `--tls-port` option to change the default port (443).<br/>Use the `--no-tls` option to disable tls.
5757
| [varnish][varnish-container] | Varnish | `--no-varnish` | 4, 6.2 | Varnish is provisioned by default. Use the `--no-varnish` option to skip Varnish service installation.
58-
| [web][web-container] | NGINX | `--nginx` | 1.19-1.2.0, latest | Use the `--nginx` option to install a specific nginx version.
58+
| [web][web-container] | NGINX | `--nginx`<br/>`--nginx-worker-processes`<br/>`--nginx-worker-connections` | 1.19-1.2.1, latest | Use the `--nginx` option to install a specific nginx version.<br/>Use the `--nginx-worker-processes` option to define the number of NGINX worker processes. The default is 1.<br/>Use the `--nginx-worker-connections` option to define the maximum number of connections that each worker process can handle simultaneously. The default is 1024 NGINX worker connections per process.
5959

6060
Use the following command to view all available options for the `ece-docker build:compose` command:
6161

src/cloud/docker/docker-quick-reference.md

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -54,60 +54,6 @@ View the available options for the `ece-docker build:compose` command:
5454
php ./vendor/bin/ece-docker build:compose -h
5555
```
5656

57-
```terminal
58-
Description:
59-
Build docker configuration
60-
61-
Usage:
62-
build:compose [options]
63-
64-
Options:
65-
--php=PHP PHP version
66-
--nginx=NGINX Nginx version
67-
--db=DB DB version
68-
--db-image=DB-IMAGE DB image
69-
--expose-db-port=EXPOSE-DB-PORT Expose DB port
70-
--expose-db-quote-port=EXPOSE-DB-QUOTE-PORT Expose port for DB sales
71-
--expose-db-sales-port=EXPOSE-DB-SALES-PORT Expose port for DB quote
72-
--with-entrypoint Add DB entrypoint volume
73-
--with-mariadb-conf Add MariaDb config volume
74-
--redis=REDIS Redis version
75-
--es=ES Elasticsearch version
76-
--rmq=RMQ RabbitMQ version
77-
--node=NODE Node.js version
78-
--selenium-version=SELENIUM-VERSION Selenium version
79-
--selenium-image=SELENIUM-IMAGE Selenium image
80-
--no-es Disable Elasticsearch
81-
--no-mailhog Disable MailHog
82-
--mailhog-http-port Custom HTTP port for MailHog
83-
--mailhog-smtp-port Custom SMTP port for MailHog
84-
--set-docker-host Sets host.docker.internal for fpm_xdebug container to
85-
resolve debug issue for LINUX system
86-
-m, --mode=MODE Mode of environment (developer, production)
87-
--sync-engine=SYNC-ENGINE File sync engine. Works only with developer mode. Available: (docker-sync, mutagen, native)
88-
--with-cron Add cron container
89-
--no-varnish Remove Varnish container
90-
--with-selenium Add Selenium latest version
91-
--with-test Add container for running tests
92-
--no-tmp-mounts Remove /tmp mounted volume
93-
--with-xdebug Enables XDebug
94-
--env-vars[=ENV-VARS] Cloud environment variables
95-
--installation-type[=INSTALLATION-TYPE] Sets magento installation type [default: "composer"]
96-
--host[=HOST] Host name
97-
--port[=PORT] Port
98-
--tls-port TLS port
99-
--es-env-var=ES-ENV-VAR Environment variable for elasticsearch service (multiple values allowed)
100-
--db-increment-increment=DB-INCREMENT-INCREMENT "auto_increment_increment" database variable
101-
--db-increment-offset=DB-INCREMENT-OFFSET "auto_increment_offset" database variable
102-
-h, --help Display this help message
103-
-q, --quiet Do not output any message
104-
-V, --version Display this application version
105-
--ansi Force ANSI output
106-
--no-ansi Disable ANSI output
107-
-n, --no-interaction Do not ask any interactive question
108-
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
109-
```
110-
11157
{:.bs-callout-info}
11258
See [Service versions] for additional information about the service configuration options for the `ece-docker build:compose` command.
11359

src/cloud/release-notes/mcd-release-notes.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,32 @@ The release notes include:
1616
- {:.new}New features
1717
- {:.fix}Fixes and improvements
1818

19+
## v1.2.1
20+
*Release date: December 21, 2020*<br/>
21+
22+
- {:.new}<!--MCLOUD-7259-->**NGINX command options**–Added build command options to change the number of NGINX `worker_processes` and NGINX `worker_connections` for TLS and Web services. The `worker_process` parameter retains the ability to set the value to `auto`. Examples:
23+
24+
```terminal
25+
./vendor/bin/ece-docker build:compose --nginx-worker-processes=2
26+
./vendor/bin/ece-docker build:compose --nginx-worker-connections=2048
27+
```
28+
29+
- {:.new}<!--MCLOUD-7259-->**TLS command option**–Added build command option to create a configuration without the TLS service. Example:
30+
31+
```terminal
32+
./vendor/bin/ece-docker build:compose --no-tls
33+
```
34+
35+
- {:.new}<!--MCLOUD-7259-->**NGINX memory consumption**–Reduced the memory consumed by the NGINX process for TLS and Web services.
36+
37+
- {:.new}<!--No ticket -->**Blackfire**–Disabled Blackfire PHP extension by default in the Cloud Docker image.
38+
39+
- {:.fix}<!--MCLOUD-7232-->**PHP-FPM container**–Fixed PHP-FPM container health check by changing the `WEB_PORT` from `80` to `8080`.
40+
41+
- {:.fix}<!--MCLOUD-7442-->**Invalid volume naming**–Fixed an error with invalid volume naming in developer mode.
42+
43+
- {:.fix}<!--Issue 295-->**NGINX upstream port**—Updated the Docker NGINX 1.19 image to use port 8080 to avoid an infinite loop. *[Fix submitted by Adarsh Manickam](https://github.com/magento/magento-cloud-docker/pull/296).*
44+
1945
## v1.2.0
2046
*Release date: November 9, 2020*<br/>
2147

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
group: configuration-guide
3+
title: Revert from a split database to a single database
4+
ee_only: true
5+
functional_areas:
6+
- Configuration
7+
- System
8+
- Setup
9+
---
10+
11+
For {{ site.data.var.ee }} customers who have implemented [Split Database]({{ page.baseurl }}/config-guide/multi-master/multi-master.html), the following topic describes how to revert or migrate back to a single database. We recommend that {{ site.data.var.ee }} merchants currently using Split Database who are upgrading to 2.4.2 and above review these steps, as well as our [announcement](https://community.magento.com/t5/Magento-DevBlog/Deprecation-of-Split-Database-in-Magento-Commerce/ba-p/465187) on the planned deprecation of Split Database.
12+
13+
Reverting from a split database to a single database implementation involves creating backups of the `magento_quote` and `magento_sales` databases before loading them into the single `magento_main` database.
14+
15+
In this example, we log in to all three databases, which are installed on the same host (`magento2-mysql`) as the "root" user. You must replace these values with the appropriate values for your databases.
16+
17+
1. Create a backup of the `magento_quote` database:
18+
19+
```bash
20+
mysqldump -h "magento2-mysql" -u root -p magento_quote > ./quote.sql
21+
```
22+
23+
1. Create a backup of the `magento_sales` database:
24+
25+
```bash
26+
mysqldump -h "magento2-mysql" -u root -p magento_sales > ./sales.sql
27+
```
28+
29+
1. Load the `magento_quote` database into the `magento_main` database:
30+
31+
```bash
32+
mysql -h "magento2-mysql" -u root -p magento_main < ./quote.sql
33+
```
34+
35+
1. Load the `magento_sales` database into the `magento_main` database:
36+
37+
```bash
38+
mysql -h "magento2-mysql" -u root -p magento_main < ./sales.sql
39+
```
40+
41+
1. Drop the `magento_sales` database:
42+
43+
```bash
44+
mysql -h "magento2-mysql" -u root -p -e "DROP DATABASE magento_sales;"
45+
```
46+
47+
1. Drop the `magento_quote` database:
48+
49+
```bash
50+
mysql -h "magento2-mysql" -u root -p -e "DROP DATABASE magento_quote;"
51+
```
52+
53+
1. Remove the deployment configuration for `checkout` and `sales` in the `connections` and `resources` sections of the `env.php` file.
54+
1. Restore foreign keys:
55+
56+
```bash
57+
bin/magento setup:upgrade
58+
```
59+
60+
## Verify your work
61+
62+
To verify that your single database implementation is working properly, perform the following tasks and verify that data is added to the `magento_main` database tables using a database tool like [phpMyAdmin]({{ page.baseurl }}/install-gde/prereq/optional.html#install-optional-phpmyadmin):
63+
64+
1. Verify that foreign keys have been restored. For example, the `QUOTE_STORE_ID_STORE_STORE_ID` key in the `quote` database table.
65+
1. Verify that customers can place orders from the storefront.
66+
1. Verify that orders created before reverting the split database to a single database are available in the Admin.

src/guides/v2.3/extension-dev-guide/proxies.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,13 @@ With the proxy used in place of `SlowLoading`, the `SlowLoading` class will not
7373
Because DI configuration is used to inject a proxy, proxies can be dropped in to replace their corresponding classes - or proxy replacements _removed_ - without touching application code.
7474

7575
As a practical example of a proxy, you can see the [StoreManager]({{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Store/Model/StoreManager.php){:target="_blank"} class and then see the generated `StoreManager` proxy class.
76+
77+
The following excerpt from the Magento code passes the `storeManager` argument as a proxy to the `Magento\Store\Model\Resolver\Store` class. The `StoreManagerInterface` model is defined as a proxy class by the added `Proxy` at the end of the original class in the `di.xml` file.
78+
79+
```xml
80+
<type name="Magento\Store\Model\Resolver\Store">
81+
<arguments>
82+
<argument name="storeManager" xsi:type="object">Magento\Store\Model\StoreManagerInterface\Proxy</argument>
83+
</arguments>
84+
</type>
85+
```
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../v2.3/config-guide/revert-split-database.md

0 commit comments

Comments
 (0)