-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Added Cloud Configuration Hierarchy #8031
Changes from all commits
e143154
89dac5c
8156402
9ffd366
ffc4715
e57be6e
39e2689
ac2ac54
17f66b1
5f9ee54
a3b654e
7b22496
2ce281c
8ac4190
7f66f57
79c150b
78e56a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ You must have [environment-level, Admin role privileges][admin] to complete conf | |
|
||
## Consistent configuration | ||
|
||
The database contains default configurations for your Magento store. When you update configurations in the {{site.data.var.ece}} environments using the Magento Admin panel, your configuration changes apply to the `app/etc/config.php` file. You can then use this file to manage and synchronize the Magento application configuration for your local environment and across each Cloud environment. | ||
The database contains default configurations for your Magento store. When you update configurations in the {{site.data.var.ece}} environments using the Magento Admin panel or the Magento CLI `bin/magento config:set` command, your configuration changes apply to the `app/etc/config.php` file. You can then use this file to manage and synchronize the Magento application configuration for your local environment and across each Cloud environment. | ||
|
||
Use the `{{site.data.var.ct}}` command in the remote environment to generate a `config.php` file: | ||
|
||
|
@@ -43,7 +43,9 @@ Because {{site.data.var.ece}} supports only the Magento production and maintenan | |
|
||
### Sensitive data | ||
|
||
Sensitive values are _not_ stored in the `app/etc/config.php` file. Any sensitive configurations export to the `app/etc/config.php` file during the `config:dump` process. We recommend using environment variables to store sensitive values. For an example, see [Add Magento authentication keys][auth]. | ||
Sensitive values are _not_ stored in the `app/etc/config.php` file. Any sensitive configurations export to the `app/etc/env.php` file when you use the `bin/magento app:config:dump` Magento CLI command. For Cloud projects, we recommend using {{ site.data.var.ece }} environment variables to store sensitive values. For an example, see [Add Magento authentication keys][auth]. | ||
|
||
You can also set sensitive values using the Magento CLI command: `bin/magento config:sensitive:set`, see [Sensitive or system-specific settings] in the _Configuration Guide_. | ||
|
||
### SCD performance | ||
|
||
|
@@ -60,6 +62,17 @@ All system configurations are set during build and deploy according to the follo | |
1. If an environment variable does not exist, use the configuration from a `MAGENTO_CLOUD_RELATIONSHIPS` name-value pair in the [`.magento.app.yaml` file][app-yaml]. Ignore the default configuration. | ||
1. If an environment variable does not exist and `MAGENTO_CLOUD_RELATIONSHIPS` does not contain a name-value pair, remove all customized configuration and use the values from the default configuration. | ||
|
||
If the same setting is configured in multiple places, Magento relies on the following configuration hierarchy to determine which value to apply to the environment : | ||
|
||
|Priority|Configuration<br/>Method|Description| | ||
|---|---|---| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This table seems to have an unnatural order. My spidey-sense wants to see priority listed in some sequential order. Is there a method you used that I overlooked or can this be reordered? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The strange order seems to be something that happened in my VS code instance. I'm not sure what happened. Should be in sequential order. |
||
|1 | Project Web UI<br>environment variables | Values added from the _Variables_ tab of environment configuration in the Project Web UI. We recommend specifying values here for sensitive or environment-specific configurations. Settings specified here cannot be edited from the Magento Admin. See [Environment configuration variables][].| | ||
|2 | `.magento.app.yaml` | Values added in the `variables` section of the `.magento.app.yaml` file. We recommend specifying values here to ensure consistent configuration across all environments. **Do not specify sensitive values in the `.magento.app.yaml` file.** See [Application settings][app-yaml].| | ||
|3 | `app/etc/env.php` | Environment-specific configuration values stored here are added by using the Magento `app:config:dump` command. Set the system-specific and sensitive values using environment variables or the Magento CLI. See [Sensitive data](#sensitive-data). The `env.php` file is **not** included in source control.| | ||
|4 | `app/etc/config.php` | Values stored here are added by using the Magento `app:config:dump` command. Shared configuration values are added to `config.php`. Set shared configuration from the Magento Admin or using the Magento CLI. See [Consistent configuration](#consistent-configuration). The `config.php` file is included in source control.| | ||
|5 | Database | Values stored here are added by setting configurations in the Magento Admin. Note that configurations set using any of the preceding methods are locked (greyed out) and cannot be edited from the Magento Admin.| | ||
|6 | `config.xml` | Many configurations have default values set in a the `config.xml` file for a module. If Magento cannot find any value set by any of the preceding methods, it falls back to the default value, if set.| | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would also mention .magento.env.yaml as data from some configurations (e.g. service configurations) will override data in env.php There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed but that is separate from this. This is a table for Magento application configuration hierarchy. This page is about "Configuration management for store settings" not service configurations. I had a long conversation with @meker12 last night and .magento.env.yaml is a different type of configuration (service & platform). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @BarnyShergold agree. This is about system configurations only. Probably I was confused by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes - I think this whole page needs a rework, especially after your comments earlier. I'm going to raise an issue so we look at it. 👍 |
||
## Procedure to manage your settings | ||
|
||
The following illustrates a high-level overview of this process: | ||
|
@@ -170,8 +183,10 @@ This process **overwrites** the store configuration; only do the following if th | |
[app-yaml]: {{ site.baseurl }}/cloud/project/magento-app.html | ||
[commerce-dump]: {{ site.baseurl }}/guides/v2.3/reference/cli/magento-commerce.html#appconfigdump | ||
[env-yaml]: {{ site.baseurl }}/cloud/project/magento-env-yaml.html | ||
[environment configuration variables]: {{ site.baseurl }}/cloud/project/projects.html#environment-configuration-variables | ||
[export]: {{ site.baseurl }}/config-guide/cli/config-cli-subcommands-config-mgmt-export.html | ||
[Optimize deployment]: {{ site.baseurl }}/cloud/deploy/optimize-cloud-deployment.html | ||
[Pipeline deployment]: {{ site.baseurl }}/guides/v2.3/config-guide/deployment/pipeline/technical-details.html | ||
[quick]: {{ site.baseurl }}/cloud/env/variables-build.html#scd_strategy | ||
[scd]: {{ site.baseurl }}/cloud/deploy/static-content-deployment.html | ||
[scd]: {{ site.baseurl }}/cloud/deploy/static-content-deployment.html | ||
[Sensitive or system-specific settings]: {{ site.baseurl }}/guides/v2.4/config-guide/prod/config-reference-sens.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why
MAGENTO_CLOUD_RELATIONSHIPS
is mentioned here? This variable contains only connection data to services not system configurations.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above.