Skip to content

Commit

Permalink
Merge pull request magento-commerce/devdocs/pull/2601 from magento-de…
Browse files Browse the repository at this point in the history
…vdocs/Cloud-release-Oct21

Cloud release October 2021
  • Loading branch information
hguthrie committed Oct 26, 2021
2 parents 2d568cc + 014720e commit 5a32541
Show file tree
Hide file tree
Showing 9 changed files with 327 additions and 242 deletions.
9 changes: 4 additions & 5 deletions src/_data/var.yml
Expand Up @@ -21,24 +21,23 @@ mbi: Adobe Commerce Reporting
# Cloud product name variables

ece: Adobe Commerce on cloud infrastructure
ece-release-date: July 29, 2021
csuite: Cloud Suite for Commerce

ct: ece-tools
ct-repo: magento/ece-tools
ct-release: 2002.1.7
ct-release: 2002.1.8

mcc-prod: Cloud Components of Commerce
mcc-package: magento/magento-cloud-components
mcc-release: 1.0.8
mcc-release: 1.0.9

mcd-prod: Cloud Docker for Commerce
mcd-package: magento/magento-cloud-docker
mcd-release: 1.2.4
mcd-release: 1.3.0

mcp-prod: Cloud Patches for Commerce
mcp-package: magento/magento-cloud-patches
mcp-release: 1.0.12
mcp-release: 1.0.13

# TIP: Use the following syntax to use a variable in the documentation source: {{site.data.var.xx}} where xx
# is the variable value.
Expand Down
2 changes: 1 addition & 1 deletion src/_includes/cloud/backup-db.md
Expand Up @@ -25,7 +25,7 @@ To back up your Staging or Production environment database before deploying:

1. Use SSH to log in to the remote server.

1. Create a database dump.
1. Create a database dump. To choose a target directory for the DB dump, use the `--dump-directory` option.

```bash
vendor/bin/ece-tools db-dump
Expand Down
17 changes: 7 additions & 10 deletions src/cloud/docker/docker-mode-developer.md
Expand Up @@ -11,7 +11,7 @@ Developer mode supports an active development environment with full, writable fi

## Performance considerations

On macOS and Windows systems, performance is slower in developer mode because of additional file synchronization operations. However, you can improve performance by using either the `manual-native` or the `mutagen` file synchronization option when you generate the `docker-compose.yml` file. See [Synchronizing data in Docker].
On macOS and Windows systems, performance is slower in developer mode because of additional file synchronization operations. However, you can improve performance by using either the `manual-native` or the `mutagen` file synchronization option when you generate the `docker-compose.yml` file. See [Synchronizing data in Docker][sync].

{: .bs-callout-info }
The `{{site.data.var.ct}}` version 2002.0.18 and later supports developer mode.
Expand All @@ -24,7 +24,7 @@ Large files (>1 GB) can cause a period of inactivity. DB dumps and archive files
**Prerequisites:**

- Complete the [installation steps].
- [Install file synchronization tools][Synchronizing data in Docker] if needed.
- [Install file synchronization tools][sync] if needed.

{:.procedure}
To launch the Docker environment in developer mode:
Expand All @@ -35,7 +35,10 @@ To launch the Docker environment in developer mode:
./vendor/bin/ece-docker build:compose --mode="developer"
```

If required, set the option for [synchronizing data in Docker]. For example:
{:.bs-callout-info}
The `--mode` option in this step determines the mode in a later `deploy` step.

If required, set the option for [synchronizing data in Docker][sync]. For example:

```bash
./vendor/bin/ece-docker build:compose --mode="developer" --sync-engine="mutagen"
Expand Down Expand Up @@ -107,10 +110,6 @@ To launch the Docker environment in developer mode:
docker-compose run --rm deploy cloud-deploy
```

```bash
docker-compose run --rm deploy magento-command deploy:mode:set developer
```

- Run post-deploy hooks.

```bash
Expand Down Expand Up @@ -153,12 +152,10 @@ To launch the Docker environment in developer mode:

<!--Link definitions-->

[{{site.data.var.mcd-prod}} Docker image]: https://hub.docker.com/r/magento/magento-cloud-docker-php/tags
[installation steps]: {{site.baseurl}}/cloud/docker/docker-installation.html
[latest release of the {{site.data.var.mcd-package}}]: https://github.com/magento/magento-cloud-docker/releases
[magento-creds]: {{site.baseurl}}/cloud/setup/first-time-setup-import-prepare.html#auth-json
[mutagen-install]: https://mutagen.io/documentation/introduction/installation/
[services]: {{site.baseurl}}/cloud/docker/docker-containers.html#service-containers
[service configuration options]: {{site.baseurl}}/cloud/docker/docker-containers.html#service-configuration-options
[Synchronizing data in Docker]: {{site.baseurl}}/cloud/docker/docker-syncing-data.html
[sync]: {{site.baseurl}}/cloud/docker/docker-syncing-data.html
[xdebug]: {{site.baseurl}}/cloud/docker/docker-development-debug.html#configure-xdebug]
81 changes: 40 additions & 41 deletions src/cloud/project/project-webint-snap.md
Expand Up @@ -10,11 +10,11 @@ You can back up and restore specific environments at any time using a snapshot.
A _snapshot_ is a complete backup of an environment that includes all persistent data from all running services (for example, your MySQL database, Redis, and so on) and any files stored on the mounted volumes. Because an environment deploys as a read-only file system, restoring a snapshot is very fast.

{:.bs-callout-warning}
If you want to rollback to previous code or remove added extensions in an environment, restoring a snapshot is not the recommended method. See [Rollbacks to remove code](#rollback-code). If you need to restore an unstable environment that does not have a snapshot, see [Restore an environment]({{ site.baseurl }}/cloud/env/restore-environment.html).
If you want to rollback to previous code or remove added extensions in an environment, restoring a snapshot is not the recommended method. See [Rollbacks to remove code](#rollback-code). If you must restore an unstable environment that does not have a snapshot, see [Restore an environment]({{ site.baseurl }}/cloud/env/restore-environment.html).

You have up to **7 days** to _restore_ a snapshot.
You have up to **seven days** to _restore_ a snapshot.

We provide two methods for creating and managing snapshots:
Adobe provides two methods for creating and managing snapshots:

- Project Web Interface
- Magento Cloud CLI
Expand Down Expand Up @@ -116,10 +116,9 @@ To restore a snapshot using the Magento Cloud CLI:

## Dump your database {#db-dump}

You can create a copy of your database using the [`magento/ece-tools`]({{ site.baseurl }}/cloud/reference/cloud-composer.html#cloud-composer-cloudmeta) `db-dump` command.
You can create a copy of your database using the `{{site.data.var.ct}} db-dump` command. By default, this command creates backups in the `/app/var/dump-main` directory for all database connections that are specified in the environment configuration. For example, if you configured your project to use split databases, the `db-dump` operation creates backups for each of the configured databases.

By default, this command creates backups for all database connections that are specified in the environment configuration. For example, if you configured your project to use split databases, the `db-dump` operation creates backups for each of the configured databases.
You can also backup only selected databases by appending the database names to the command, for example:
You can also back up only selected databases by appending the database names to the command, for example:

```bash
php vendor/bin/ece-tools -- main sales
Expand All @@ -128,43 +127,43 @@ php vendor/bin/ece-tools -- main sales
For help, use the command: `php vendor/bin/ece-tools db-dump --help`

{:.procedure}
To create a database dump:
To create a database dump in the Staging or Production environment:

1. [SSH into the environment]({{ site.baseurl }}/cloud/env/environments-ssh.html) that contains the database you want to copy:
1. [Use SSH to log in to the environment]({{ site.baseurl }}/cloud/env/environments-ssh.html) that contains the database to copy:

- **Staging:** `ssh -A <project ID>_stg@<project ID>.ent.magento.cloud`
- **Production:** `ssh -A <project ID>@<project ID>.ent.magento.cloud`
- To SSH into the `master` branch of your Integration environment:

```bash
magento-cloud environment:ssh
```

1. Enter the following command:

```bash
php vendor/bin/ece-tools db-dump
```

```terminal
php vendor/bin/ece-tools db-dump
The db-dump operation switches the site to maintenance mode, stops all active cron jobs and consumer queue processes, and disables cron jobs before starting the dump process.
Your site will not receive any traffic until the operation completes.
Do you wish to proceed with this process? (y/N)? y
2020-01-28 16:38:08] INFO: Starting backup.
[2020-01-28 16:38:08] NOTICE: Enabling Maintenance mode
[2020-01-28 16:38:10] INFO: Trying to kill running cron jobs and consumers processes
[2020-01-28 16:38:10] INFO: Running Magento cron and consumers processes were not found.
[2020-01-28 16:38:10] INFO: Waiting for lock on db dump.
[2020-01-28 16:38:10] INFO: Start creation DB dump for main database...
[2020-01-28 16:38:10] INFO: Finished DB dump for main database, it can be found here: /tmp/qxmtlseakof6y/dump-main-1580229490.sql.gz
[2020-01-28 16:38:10] INFO: Backup completed.
[2020-01-28 16:38:11] NOTICE: Maintenance mode is disabled.
```

{:.bs-callout-info}

- For Production environments, we recommend completing database dump operations during off-peak hours to minimize service disruptions that occur when the site is in maintenance mode.

```bash
magento-cloud environment:ssh
```

1. Create a backup of the database. To choose a target directory for the DB dump, use the `--dump-directory` option.

```bash
php vendor/bin/ece-tools db-dump
```

Sample response:

```terminal
The db-dump operation switches the site to maintenance mode, stops all active cron jobs and consumer queue processes, and disables cron jobs before starting the dump process.
Your site will not receive any traffic until the operation completes.
Do you wish to proceed with this process? (y/N)? y
2020-01-28 16:38:08] INFO: Starting backup.
[2020-01-28 16:38:08] NOTICE: Enabling Maintenance mode
[2020-01-28 16:38:10] INFO: Trying to kill running cron jobs and consumers processes
[2020-01-28 16:38:10] INFO: Running Magento cron and consumers processes were not found.
[2020-01-28 16:38:10] INFO: Waiting for lock on db dump.
[2020-01-28 16:38:10] INFO: Start creation DB dump for main database...
[2020-01-28 16:38:10] INFO: Finished DB dump for main database, it can be found here: /tmp/qxmtlseakof6y/dump-main-1580229490.sql.gz
[2020-01-28 16:38:10] INFO: Backup completed.
[2020-01-28 16:38:11] NOTICE: Maintenance mode is disabled.
```

{:.bs-callout-info}

- For Production environments, Adobe recommends completing database dump operations during off-peak hours to minimize service disruptions that occur when the site is in maintenance mode.
- The `db-dump` command creates an archive in your remote project directory called `dump-<timestamp>.sql.gz`.
- If an error occurs during the dump operation, the command deletes the dump file to conserve disk space. Review the logs for details (`var/log/cloud.log`).
- For Pro Production environments, this command dumps only from one of three high-availability nodes, so production data written to a different node during the dump might not be copied. The command generates a `var/dbdump.lock` file to prevent the command from running on more than one node.
Expand All @@ -174,8 +173,8 @@ If you want to push this data into an environment, see [Migrate data and static

## Rollbacks to remove code {#rollback-code}

We recommend creating a snapshot of the environment and a backup of the database prior to deployments.
Adobe recommends creating a snapshot of the environment and a backup of the database prior to deployments.

If you need to restore a snapshot specifically to remove new code and added extensions, the process can be complicated depending on the amount of changes and when you rollback. Some rollbacks might require database changes.
If you must restore a snapshot specifically to remove new code and added extensions, the process can be complicated depending on the number of changes and when you roll back. Some rollbacks might require database changes.

Specifically for code, you should investigate reverting code changes from your branch before redeploying. If not, every deploy pushes the master branch (code and extensions) to the target environment again. See the [Deployment Process]({{ site.baseurl }}/cloud/reference/discover-deploy.html).
1 change: 1 addition & 0 deletions src/cloud/release-notes/cloud-tools.md
Expand Up @@ -21,6 +21,7 @@ This release information details the latest improvements to the {{site.data.var.
When you update to `{{site.data.var.ct}}` 2002.1.0 or later, you automatically update to the latest versions of the other packages, which are dependencies for `{{site.data.var.ct}}`.

<!--Link definitions-->

[`{{site.data.var.ct}}` release notes]: {{site.baseurl}}/cloud/release-notes/ece-release-notes.html
[`{{site.data.var.mcc-prod}}` release notes]: {{site.baseurl}}/cloud/release-notes/mcc-release-notes.html
[`{{site.data.var.mcd-prod}}` release notes]: {{site.baseurl}}/cloud/release-notes/mcd-release-notes.html
Expand Down

0 comments on commit 5a32541

Please sign in to comment.