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

Improve build and deploy env definitions #8843

Merged
merged 3 commits into from
Mar 30, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Changes as per review
  • Loading branch information
Barny committed Mar 30, 2021
commit 7ce1279062cff7e47529a22a0ab4270426268fd9
26 changes: 26 additions & 0 deletions src/_includes/cloud/scd-configuration-management.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Before Configuration Management:

```yaml
deploy:
CRON_CONSUMERS_RUNNER:
cron_run: true
consumers: []
SCD_STRATEGY: compact
SCD_MATRIX:
...
REDIS_USE_SLAVE_CONNECTION: 1
```

After enabling Configuration Management, move the SCD_* variables to the build stage:

```yaml
deploy:
CRON_CONSUMERS_RUNNER:
cron_run: true
consumers: []
REDIS_USE_SLAVE_CONNECTION: 1
build:
SCD_STRATEGY: compact
SCD_MATRIX:
...
```
27 changes: 1 addition & 26 deletions src/cloud/live/sens-data-over.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,32 +55,7 @@ If you have enabled Configuration Management after dumping the configurations, y

### Example

Before Configuration Management:

```yaml
deploy:
CRON_CONSUMERS_RUNNER:
cron_run: true
consumers: []
SCD_STRATEGY: compact
SCD_MATRIX:
...
REDIS_USE_SLAVE_CONNECTION: 1
```

After enabling Configuration Management, move the SCD_* variables to the build stage:

```yaml
deploy:
CRON_CONSUMERS_RUNNER:
cron_run: true
consumers: []
REDIS_USE_SLAVE_CONNECTION: 1
build:
SCD_STRATEGY: compact
SCD_MATRIX:
...
```
{% include cloud/scd-configuration-management.md %}

{:.bs-callout-info}
Before deploying static files, the build and deploy phases compress static content using GZIP. Compressing static files reduces server loads and increases site performance. Refer to [Magento build options]({{ site.baseurl }}/cloud/env/variables-build.html) to learn about customizing or disabling file compression.
Expand Down
41 changes: 8 additions & 33 deletions src/cloud/project/magento-env-yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,38 +22,6 @@ The `.magento.env.yaml` file includes the following sections:
- `email`—Configure an email to send to one or more email recipients.
- [logging handlers]({{ site.baseurl }}/cloud/env/log-handlers.html)—Configure hardware and software application messages sent to a remote logging server.

{:.bs-callout-info}
If you have enabled Configuration Management after dumping the configurations, you should move the SCD_* variables from the deploy to the build stage.

### Example

Before Configuration Management:

```yaml
deploy:
CRON_CONSUMERS_RUNNER:
cron_run: true
consumers: []
SCD_STRATEGY: compact
SCD_MATRIX:
...
REDIS_USE_SLAVE_CONNECTION: 1
```

After enabling Configuration Management, move the SCD_* variables to the build stage:

```yaml
deploy:
CRON_CONSUMERS_RUNNER:
cron_run: true
consumers: []
REDIS_USE_SLAVE_CONNECTION: 1
build:
SCD_STRATEGY: compact
SCD_MATRIX:
...
```

The latest sample of the `.magento.env.yaml` file contains a detailed definition for all variables described in the following reference topics:

- [Application]({{ site.baseurl }}/cloud/env/environment-vars_magento.html)—variables control administrative credentials
Expand Down Expand Up @@ -160,4 +128,11 @@ Environment configuration is not valid. Correct the following items in your .mag
The SCD_THREADS variable contains an invalid value of type string. Use the following type: integer.
The SCD_STRATEGY variable contains an invalid value fast. Use one of the available value options: compact, quick, standard.
The NOT_EXIST_OPTION variable is not allowed in configuration.
```
```

## Configuration management optimization

{:.bs-callout-info}
If you have enabled Configuration Management after dumping the configurations, you should move the SCD_* variables from the deploy to the build stage.

{% include cloud/scd-configuration-management.md %}