diff --git a/_data/toc/cloud-guide.yml b/_data/toc/cloud-guide.yml index 62ee7fcc099..d6853a57b47 100644 --- a/_data/toc/cloud-guide.yml +++ b/_data/toc/cloud-guide.yml @@ -38,6 +38,9 @@ pages: - label: Magento Cloud CLI url: /cloud/reference/cli-ref-topic.html + - label: ece-tools package + url: /cloud/reference/ece-tools-reference.html + - label: Git url: /cloud/reference/git-integration.html @@ -105,6 +108,9 @@ pages: - label: Connect to the database url: /cloud/docker/docker-database.html + - label: Functional testing in Docker + url: /cloud/docker/docker-development-testing.html + - label: Docker quick reference url: /cloud/docker/docker-quick-reference.html diff --git a/_includes/cloud/note-ece-tools-release-info.md b/_includes/cloud/note-ece-tools-release-info.md index fd73802ea25..37c894de57a 100644 --- a/_includes/cloud/note-ece-tools-release-info.md +++ b/_includes/cloud/note-ece-tools-release-info.md @@ -1,2 +1,2 @@ -{: .bs-callout .bs-callout-info} +{: .bs-callout-info} For current {{ site.data.var.ece }} release information, see [Release notes for ece-tools]({{ page.baseurl }}/cloud/release-notes/cloud-tools.html). \ No newline at end of file diff --git a/guides/v2.1/cloud/bk-cloud.md b/guides/v2.1/cloud/bk-cloud.md index 9c4d84146d0..5db9eb146f6 100644 --- a/guides/v2.1/cloud/bk-cloud.md +++ b/guides/v2.1/cloud/bk-cloud.md @@ -22,7 +22,7 @@ Amazon Web Services (AWS) powers the underlying Infrastructure as a Service (Iaa ## {{site.data.var.ct}} package -The `{{site.data.var.ct}}` package is a scalable deployment tool that simplifies the Cloud upgrade process. In 2018, we deprecated the `magento-cloud-configuration` and `ece-patches` packages in favor of providing a single package. We encourage all customers to [upgrade to use `{{site.data.var.ct}}`]({{page.baseurl}}/cloud/project/ece-tools-upgrade-project.html) as soon as possible to benefit from the package features, such as commands to create a backup of the database, apply custom patches, and verify environment configuration. +The [`{{site.data.var.ct}}` package][ece] is a scalable deployment tool that simplifies the Cloud upgrade process. In 2018, we deprecated the `magento-cloud-configuration` and `ece-patches` packages in favor of providing a single package. We encourage all customers to [upgrade to use `{{site.data.var.ct}}`]({{page.baseurl}}/cloud/project/ece-tools-upgrade-project.html) as soon as possible to benefit from the package features, such as commands to create a backup of the database, apply custom patches, and verify environment configuration. @@ -31,3 +31,5 @@ The `{{site.data.var.ct}}` package is a scalable deployment tool that simplifies [Cloud Stack]: {{site.baseurl}}/common/images/cloud/CloudStack.png {: width="804px" height="721px"} + +[ece]: {{page.baseurl}}/cloud/reference/ece-tools-reference.html diff --git a/guides/v2.1/cloud/docker/docker-config.md b/guides/v2.1/cloud/docker/docker-config.md index 1ea9df01cae..aebfb22e0d1 100644 --- a/guides/v2.1/cloud/docker/docker-config.md +++ b/guides/v2.1/cloud/docker/docker-config.md @@ -52,38 +52,44 @@ For example, the following command starts the Docker configuration generator for ./vendor/bin/ece-tools docker:build --mode="developer" --php 7.2 ``` -### Prerequisites +## Prerequisites -You must have the following software installed on your local workstation: +1. You must have the following software installed on your local workstation: -- PHP version 7.1 or later - - [php@7.1](https://formulae.brew.sh/formula/php@7.1) - - [php@7.2](https://formulae.brew.sh/formula/php@7.2) -- [Composer](https://getcomposer.org) -- [Docker](https://www.docker.com/get-started) -- [docker-sync](https://docker-sync.readthedocs.io/en/latest/getting-started/installation.html)—file synchronization is required for developer mode + - PHP version 7.1 or later + - [php@7.1](https://formulae.brew.sh/formula/php@7.1) + - [php@7.2](https://formulae.brew.sh/formula/php@7.2) + - [Composer](https://getcomposer.org) + - [Docker](https://www.docker.com/get-started) + - File synchronization required for developer mode—use one of the following: + - [docker-sync](https://docker-sync.readthedocs.io/en/latest/getting-started/installation.html) + - [mutagen](https://mutagen.io/documentation/installation/#installation) -Before you begin, you must add the following hostname to your `/etc/hosts` file: +1. Update the hosts file. -``` -127.0.0.1 magento2.docker -``` + Before you begin, you must add the following hostname to your `/etc/hosts` file: -Alternatively, you can run the following command to add it to the file: + ``` + 127.0.0.1 magento2.docker + ``` -```bash -echo "127.0.0.1 magento2.docker" | sudo tee -a /etc/hosts -``` + Alternatively, you can run the following command to add it to the file: -### Stopping default Apache instance on Mac OS + ```bash + echo "127.0.0.1 magento2.docker" | sudo tee -a /etc/hosts + ``` -Because Mac OS provides built-in Apache service, and may occupy port `80`, you must stop the service with the following command: +1. Stop the default Apache instance on Mac OS. -```bash -sudo apachectl stop -``` + Because Mac OS provides built-in Apache service, and may occupy port `80`, you must stop the service with the following command: + + ```bash + sudo apachectl stop + ``` -#### To launch Docker: +1. Optionally, [enable Xdebug]({{page.baseurl}}/cloud/docker/docker-development-debug.html#enable-xdebug). + +## Launch the Docker environment 1. Download a Magento application template from the [Magento Cloud repository](https://github.com/magento/magento-cloud). Be careful to select the branch that corresponds with the Magento version. @@ -110,7 +116,7 @@ Continue launching your Docker environment in the default _production_ mode. 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. ```bash - cp docker/config.php.dist docker/config.php + cp .docker/config.php.dist .docker/config.php ``` Convert custom PHP configuration files to Docker ENV files. @@ -121,12 +127,12 @@ Continue launching your Docker environment in the default _production_ mode. This generates the following Docker ENV files: - * `docker/config.env` + * `.docker/config.env` {: .bs-callout .bs-callout-info} The `{{site.data.var.ct}}` version 2002.0.12 package does not support the `docker:config:convert` command. -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). +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). 1. Build files to containers and run in the background. @@ -138,15 +144,15 @@ Continue launching your Docker environment in the default _production_ mode. - Build Magento in the Docker container: - ```bash - docker-compose run build cloud-build - ``` + ```bash + docker-compose run build cloud-build + ``` - Deploy Magento in the Docker container: - ```bash - docker-compose run deploy cloud-deploy - ``` + ```bash + docker-compose run deploy cloud-deploy + ``` {: .bs-callout .bs-callout-info} For `{{site.data.var.ct}}` v2002.0.12, install Magento with the `docker-compose run cli magento-installer` command. @@ -184,7 +190,7 @@ The `{{site.data.var.ct}}` version 2002.0.18 and later supports developer mode. 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. ```bash - cp docker/config.php.dist docker/config.php + cp .docker/config.php.dist .docker/config.php ``` Convert custom PHP configuration files to Docker ENV files. @@ -195,16 +201,24 @@ The `{{site.data.var.ct}}` version 2002.0.18 and later supports developer mode. This generates the following Docker ENV files: - * `docker/config.env` + * `.docker/config.env` 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). 1. Start the file synchronization. + For the `docker-sync` tool: + ```bash docker-sync start ``` + For the `mutagen` tool: + + ```bash + bash ./mutagen.sh + ``` + 1. Build files to containers and run in the background. ```bash @@ -272,11 +286,11 @@ docker-sync stop ## Advanced usage -### Extending docker-compose.yml configuration +### Extend the Docker configuration -You can use Docker's built-in [extension mechanism](https://docs.docker.com/compose/reference/overview/#specifying-multiple-compose-files). +You can use the built-in extension mechanism of Docker to [specify multiple compose files](https://docs.docker.com/compose/reference/overview/#specifying-multiple-compose-files). The following example replaces the default value of the `ENABLE_SENDMAIL` environment variable. -1. Create a `docker-compose-dev.yml` file inside your project's root directory and add the following content: +1. Create a `docker-compose-dev.yml` file inside your project root directory and add the following content: ```yaml version: '2' @@ -286,8 +300,6 @@ You can use Docker's built-in [extension mechanism](https://docs.docker.com/comp - ENABLE_SENDMAIL=true ``` - This replaces the default value of the `ENABLE_SENDMAIL` environment variable. - 1. Pass both configuration files while executing your commands. For example: ```bash diff --git a/guides/v2.1/cloud/docker/docker-database.md b/guides/v2.1/cloud/docker/docker-database.md index 9b6b516b289..fdb87089e41 100644 --- a/guides/v2.1/cloud/docker/docker-database.md +++ b/guides/v2.1/cloud/docker/docker-database.md @@ -7,9 +7,9 @@ functional_areas: - Configuration --- -There are two ways to connect to the database. Before you begin, you can find the database credentials in the `database` section of the `docker/config.php` file. The examples use the following default credentials: +There are two ways to connect to the database. Before you begin, you can find the database credentials in the `database` section of the `.docker/config.php` file. The examples use the following default credentials: -> Filename: `docker/config.php` +> Filename: `.docker/config.php` ```php?start_inline=1 return [ @@ -85,4 +85,4 @@ return [ | 10.0.38-MariaDB-1~xenial | +--------------------------+ ``` - {: .no-copy} \ No newline at end of file + {: .no-copy} diff --git a/guides/v2.1/cloud/docker/docker-development-debug.md b/guides/v2.1/cloud/docker/docker-development-debug.md index c227aa22cbd..1b47364563d 100644 --- a/guides/v2.1/cloud/docker/docker-development-debug.md +++ b/guides/v2.1/cloud/docker/docker-development-debug.md @@ -18,29 +18,43 @@ If you use Microsoft Windows, take the following steps before continuing: ## Enable Xdebug -To enable Xdebug, you must configure your `docker-compose.yaml` file at the time you configure your local workstation to [Launch Docker]({{ page.baseurl }}/cloud/docker/docker-config.html). +To enable Xdebug for your project, add `xdebug` to the `runtime:extensions` section of the `.magento.app.yaml` file. ```yaml -generic: - image: alpine - environment: - - PHP_MEMORY_LIMIT=2048M - - DEBUG=false - - ENABLE_SENDMAIL=false - - UPLOAD_MAX_FILESIZE=64M - - MAGENTO_ROOT=/app - - PHP_ENABLE_XDEBUG=false - - PHP_IDE_CONFIG=serverName=magento_cloud_docker - - XDEBUG_CONFIG=remote_host=host.docker.internal - env_file: - - ./docker/config.env +runtime: + extensions: + - redis + - xsl + - json + - blackfire + - newrelic + - xdebug ``` -You can change any Xdebug configuration using the`XDEBUG_CONFIG` option. For example, to change the `xdebug.remote_port` option: +## Configure Xdebug -```yaml -XDEBUG_CONFIG='remote_host=host.docker.internal remote_port=9002' -``` +1. Rebuild the `docker-compose.yml` file by continuing to configure your local workstation to [launch the Docker environment]({{ page.baseurl }}/cloud/docker/docker-config.html). The following is an excerpt from the `docker-compose.yml` file that shows Docker global variables. + + ```yaml + generic: + image: alpine + environment: + - PHP_MEMORY_LIMIT=2048M + - UPLOAD_MAX_FILESIZE=64M + - MAGENTO_ROOT=/app + - PHP_IDE_CONFIG=serverName=magento_cloud_docker + - XDEBUG_CONFIG=remote_host=host.docker.internal + - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip redis xsl xdebug' + env_file: + - ./.docker/config.env + ``` + {:.no-copy} + +1. Change any Xdebug configuration using the`XDEBUG_CONFIG` option. For example, to change the `xdebug.remote_port` option: + + ```yaml + XDEBUG_CONFIG='remote_host=host.docker.internal remote_port=9002' + ``` #### To configure PhpStorm to work with Xdebug: @@ -68,7 +82,7 @@ XDEBUG_CONFIG='remote_host=host.docker.internal remote_port=9002' 1. Click **Apply**. -## Using Xdebug +## Use Xdebug The following steps describe debugging web requests and CLI commands. diff --git a/guides/v2.1/cloud/docker/docker-development-testing.md b/guides/v2.1/cloud/docker/docker-development-testing.md new file mode 100644 index 00000000000..82c1e7d3b21 --- /dev/null +++ b/guides/v2.1/cloud/docker/docker-development-testing.md @@ -0,0 +1,119 @@ +--- +group: cloud-guide +title: Functional testing in Docker +functional_areas: + - Cloud + - Docker + - Configuration +--- + +You can use the `{{site.data.var.ct}}` package to run functional tests in the Docker environment. Functional tests are in the `src/Test/Functional/Acceptance` folder. See an example in the [ece-tools repository](https://github.com/magento/ece-tools/tree/develop/src/Test/Functional/Acceptance). + +## Prerequisites + +Before you run functional tests, you must prepare your environment with the following steps. + +1. Stop all services that use the following ports: + + - `80`—varnish + - `443`—web, tls + - `3306`—apache, mysql + +1. Switch to the preferred PHP version for running tests. + +1. Update the project dependencies. + + ```bash + composer update + ``` + +1. Add credentials to the Docker environment. + + ```bash + echo "COMPOSER_MAGENTO_USERNAME=your_public_key" >> ./.docker/composer.env + ``` + + ```bash + echo "COMPOSER_MAGENTO_PASSWORD=your_private_key" >> ./.docker/composer.env + ``` + +## Run tests + +The `codeception.dist.yml` file in the `{{site.data.var.ct}}` root directory contains the global testing configuration. See the [`{{site.data.var.ct}}` repository](https://github.com/magento/ece-tools/blob/develop/codeception.dist.yml). + +By default, functional tests produce a short output. You can receive a more detailed output by editing the `codeception.dist.yml` file to set the `printOutput:` property to `true`. + +```yaml +modules: + config: + Magento\MagentoCloud\Test\Functional\Codeception\Docker: + ... + printOutput: true +``` +{:.no-copy} + +### Run a specific test + +Use the following command format to run a specific functional test: + +```bash +./vendor/bin/codecept run Acceptance Cest +``` + +For example, the following test verifies that the post-deploy task runs successfully. + +```bash +./vendor/bin/codecept run Acceptance PostDeployCest +``` + +Sample response: + +```terminal +Codeception PHP Testing Framework v2.5.6 +Powered by PHPUnit 6.5.14 by Sebastian Bergmann and contributors. +Running with seed: +Acceptance Tests (1) ----------------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------------------------------------- +------------------------------------------------------------------------------- +PostDeployCest: Test post deploy | {"ADMIN_EMAIL":"admin@example.com"} + [Magento\MagentoCloud\Test\Functional\Robo\Tasks\GenerateDockerCompose] Running ./bin/ece-tools docker:build + --mode=functional --php=7.2 +... +... +✔ PostDeployCest: Test post deploy | {"ADMIN_EMAIL":"admin@example.com"} (210.41s) +``` +{: .no-copy} + +### Run all tests + +The following list provides the commands to run all available tests for each version of PHP. + +- **PHP 7.0** + + ```bash + ./vendor/bin/codecept run -g php70 --steps + ``` + +- **PHP 7.1** + + ```bash + ./vendor/bin/codecept run -g php71 --steps + ``` + +- **PHP 7.2** + + ```bash + ./tests/travis/prepare_functional_parallel.sh + ``` + + ```bash + ./vendor/bin/codecept run -g php72parallel_1 --steps + ``` + + ```bash + ./vendor/bin/codecept run -g php72parallel_2 --steps + ``` + + ```bash + ./vendor/bin/codecept run -g php72parallel_3 --steps + ``` diff --git a/guides/v2.1/cloud/docker/docker-development.md b/guides/v2.1/cloud/docker/docker-development.md index 2f0967bfdf7..898c72da09a 100644 --- a/guides/v2.1/cloud/docker/docker-development.md +++ b/guides/v2.1/cloud/docker/docker-development.md @@ -9,30 +9,28 @@ functional_areas: {{site.data.var.ece}} provides a Docker environment option for those who use their local environment for development, test, or automation tasks. The {{site.data.var.ece}} Docker environment requires three, essential components: a {{site.data.var.ee}} v2 template, Docker Compose, and the {{site.data.var.ece}} `{{site.data.var.ct}}` package. See the instructions in [Launch Docker]({{page.baseurl}}/cloud/docker/docker-config.html). -The [Magento Cloud Docker repository](https://github.com/magento/magento-cloud-docker) contains build information for the following Docker images: - -Image | Docker link -:------------------ | :------------------------------------------- -**DB** | [mariadb:10.0](https://hub.docker.com/_/mariadb) -**FPM**
PHP-CLI: version 7
PHP-FPM: version 7 | [magento/magento-cloud-docker-php](https://hub.docker.com/r/magento/magento-cloud-docker-php) -**ElasticSearch** | [magento/magento-cloud-docker-elasticsearch](https://hub.docker.com/r/magento/magento-cloud-docker-elasticsearch) -**NGINX** |[magento/magento-cloud-docker-nginx](https://hub.docker.com/r/magento/magento-cloud-docker-nginx) -**Node** | [official Node Docker image](https://hub.docker.com/_/node/) -**RabbitMQ** | [rabbitmq](https://hub.docker.com/_/rabbitmq) -**Redis** | [magento/magento-cloud-docker-redis](https://hub.docker.com/r/magento/magento-cloud-docker-redis) -**TLS** | [magento/magento-cloud-docker-tls](https://hub.docker.com/r/magento/magento-cloud-docker-tls) -**Varnish** | [magento/magento-cloud-docker-varnish](https://hub.docker.com/r/magento/magento-cloud-docker-varnish) +The [Magento Cloud Docker repository](https://github.com/magento/magento-cloud-docker) contains build information for the following Docker containers. -{:.bs-callout .bs-callout-info} -See the [service version values available]({{page.baseurl}}/cloud/docker/docker-config.html) for use when launching Docker. +## Database container + +The database container is based on the [mariadb](https://hub.docker.com/_/mariadb) image. -## Web container +- Port: 3306 +- Volumes: + - `/var/lib/mysql` + - `./docker/mysql` + +#### To import a database dump: + +Place the SQL file into the `.docker/mysql/docker-entrypoint-initdb.d` folder. + +The `{{site.data.var.ct}}` package imports and processes the SQL file the next time you build and start the Docker environment using the `docker-compose up` command. -The web container works with the [PHP-FPM](https://php-fpm.org) to serve PHP code, the **DB** image for the local database, and the **Varnish** image to send requests and cache the results. +Although it is a more complex approach, you can use GZIP by _sharing_ the `.sql.gz` file using the `.docker/mnt` directory and importing it inside the Docker container. ## CLI containers -The following CLI containers, which are based on a PHP-CLI image, provide `magento-cloud` and `{{site.data.var.ct}}` commands to perform file system operations: +The following CLI containers, which are based on a [PHP-CLI version 7 image](https://hub.docker.com/r/magento/magento-cloud-docker-php), provide `magento-cloud` and `{{site.data.var.ct}}` commands to perform file system operations: - `build`—extends the CLI container to perform operations with writable filesystem, similar to the build phase - `deploy`—extends the CLI container to use read-only file system, similar to the deploy phase @@ -56,7 +54,7 @@ The configured state is not ideal ``` {: .no-copy} -## Cron container +### Cron container The Cron container is based on PHP-CLI images, and executes operations in the background immediately after the Docker environment start. It uses the cron configuration defined in the [`crons` property of the `.magento.app.yaml` file]({{page.baseurl}}/cloud/project/project-conf-files_magento-app.html#crons). @@ -66,31 +64,53 @@ The Cron container is based on PHP-CLI images, and executes operations in the ba docker-compose run deploy bash -c "cat /app/var/cron.log" ``` -## Node Container +### Node container -The Node container is based on the [official Node Docker image](https://hub.docker.com/_/node/). It can be used to install NPM dependencies or run any Node-based command line tools. +The Node container is based on the [official Node Docker image](https://hub.docker.com/_/node/). It can be used to install NPM dependencies, such as Gulp, or run any Node-based command line tools. -## Database container +## PHP-FPM container -The database container is based on the `mariadb:10` image. +The PHP-FPM container is based on the [magento/magento-cloud-docker-php](https://hub.docker.com/r/magento/magento-cloud-docker-php) image. -#### To import a database dump: +- Port: 9000 +- Read-only volumes: + - `/app` + - `/app/vendor` + - `/app/generated` + - `/app/setup` +- Read/Write volumes: + - `/app/var` + - `/app/app/etc` + - `/app/pub/static` + - `/app/pub/media` -Place the SQL file into the `docker/mysql/docker-entrypoint-initdb.d` folder. +### Web container -The `{{site.data.var.ct}}` package imports and processes the SQL file the next time you build and start the Docker environment using the `docker-compose up` command. +The web container works with the [PHP-FPM](https://php-fpm.org) to serve PHP code, the [**DB** image](#database-container) for the local database, and the **Varnish** image to send requests and cache the results. -Although it is a more complex approach, you can use GZIP by _sharing_ the `.sql.gz` file using the `docker/mnt` directory and importing it inside the Docker container. +### Varnish container -## Varnish container +The Varnish container is based on the [magento/magento-cloud-docker-varnish](https://hub.docker.com/r/magento/magento-cloud-docker-varnish) image. Varnish works on port 80. -The Varnish container is based on the `magento-cloud-docker-varnish` image. Varnish works on port 80. +### TLS container The TLS termination proxy container, based on the [magento/magento-cloud-docker-tls](https://hub.docker.com/r/magento/magento-cloud-docker-tls) image, facilitates the Varnish SSL termination over HTTPS. +## Service containers + +Service | Image +------- | ----- +**ElasticSearch** | [magento/magento-cloud-docker-elasticsearch](https://hub.docker.com/r/magento/magento-cloud-docker-elasticsearch) +**NGINX** | [magento/magento-cloud-docker-nginx](https://hub.docker.com/r/magento/magento-cloud-docker-nginx) +**RabbitMQ** | [rabbitmq](https://hub.docker.com/_/rabbitmq) +**Redis** | [magento/magento-cloud-docker-redis](https://hub.docker.com/r/magento/magento-cloud-docker-redis) + +{:.bs-callout .bs-callout-info} +See the [service version values available]({{page.baseurl}}/cloud/docker/docker-config.html) for use when launching Docker. + ## Sharing data between host machine and container -You can share files easily between your machine and a Docker container by placing the files in the `docker/mnt` directory. You can find the files in the `/mnt` directory the next time you build and start the Docker environment using the `docker-compose up` command. +You can share files easily between your machine and a Docker container by placing the files in the `.docker/mnt` directory. You can find the files in the `/mnt` directory the next time you build and start the Docker environment using the `docker-compose up` command. ## Sendmail service diff --git a/guides/v2.1/cloud/docker/docker-quick-reference.md b/guides/v2.1/cloud/docker/docker-quick-reference.md index f54ec7c0023..e70874272df 100644 --- a/guides/v2.1/cloud/docker/docker-quick-reference.md +++ b/guides/v2.1/cloud/docker/docker-quick-reference.md @@ -22,31 +22,23 @@ Resume Docker environment | `docker-compose start` List images | `docker-compose images` List containers and ports | `docker-compose ps`, or `docker ps` -## ece-tools - -Action | Command -:----- | :------ -Builds the docker environment in [production mode]({{page.baseurl}}/cloud/docker/docker-config.html#launch-modes) by default and verifies configured service versions. | `docker:build` -Builds the docker environment in [developer mode]({{page.baseurl}}/cloud/docker/docker-config.html#launch-modes). | `docker:build --mode="developer"` -Convert PHP configuration files to Docker ENV files. | `docker:config:convert` - -The following example lists the `{{site.data.var.ct}}` Docker commands: - -```bash -php ./vendor/bin/ece-tools list | grep docker -``` - -```terminal - docker - docker:build Build docker configuration - docker:build:integration Build test docker configuration - docker:config:convert Convert raw config to .env files configuration -``` -{: .no-copy} - ### Build options | Option | Key | Available values | ------------ | ---------------- | ------------------ | Mode | `--mode`, `-m` | production, developer +## bin/docker + +Action | Command +:----- | :------ +Pull latest images | pull +Destroy, re-create and start containers | up +Destroy containers | down +Build application | build +Deploy application | up +Re-build and re-deploy application | redeploy +Connect to bash | bash +Stop containers | stop +Start containers | start +Restart containers | restart diff --git a/guides/v2.1/cloud/env/variables-cloud.md b/guides/v2.1/cloud/env/variables-cloud.md index ccc637f7042..f4113aa79fa 100644 --- a/guides/v2.1/cloud/env/variables-cloud.md +++ b/guides/v2.1/cloud/env/variables-cloud.md @@ -13,7 +13,7 @@ functional_areas: Environment variables that are specific to {{site.data.var.ece}} use the `MAGENTO_CLOUD_*` prefix: Variable | Description ------------ | --------------- +-------- | --------------- `MAGENTO_CLOUD_APP_DIR` | The absolute path to the application directory. `MAGENTO_CLOUD_APPLICATION` | A base64-encoded JSON object that describes the application. It maps to the `.magento.app.yaml` file content and has subkeys. `MAGENTO_CLOUD_APPLICATION_NAME` | The name of the application configured in the `.magento.app.yaml` file. @@ -25,13 +25,13 @@ Variable | Description `MAGENTO_CLOUD_TREE_ID` | The tree ID for the application, which corresponds to the SHA of the tree in Git. `MAGENTO_CLOUD_VARIABLES` | A base64-encoded JSON object with key-value pairs, such as `"key":"value"`. -{:.bs-callout .bs-callout-warning} +{:.bs-callout-warning} To [add environment variables to override configuration settings]({{ site.baseurl }}/guides/v2.2/config-guide/prod/config-reference-var-name.html) using the [Project Web Interface]({{ page.baseurl }}/cloud/project/project-webint-basic.html#project-conf-env-var), you must prepend the variable name with `env:` as in the following example. ![Environment variable example]({{ site.baseurl }}/common/images/cloud_env_var_example.png) Since values can change over time, it is best to inspect the variable at runtime and use it to configure your application. For example, we use the `MAGENTO_CLOUD_RELATIONSHIPS` variable to retrieve environment-related relationships as follows: -```php +```php?start_inline=1 /** * Get relationships information from MagentoCloud environment variable. * @@ -41,4 +41,25 @@ Since values can change over time, it is best to inspect the variable at runtime { return json_decode(base64_decode($_ENV["MAGENTO_CLOUD_RELATIONSHIPS"]), true); } -``` \ No newline at end of file +``` + +#### To view environment variables: + +You can use the `env:config:show` command from [the `{{site.data.var.ct}}` package]({{page.baseurl}}/cloud/reference/ece-tools-reference.html) to show a list of variables for the current environment. + +```bash +php ./vendor/bin/ece-tools env:config:show variables +``` + +Sample output for the `variables` option: + +```terminal +Magento Cloud Environment Variables: ++-----------------------------------+----------------------------------+ +| Variable name | Value | ++-----------------------------------+----------------------------------+ +| ADMIN_EMAIL | magentoadmin@company.com | +| ADMIN_PASSWORD | 123123q | ++-----------------------------------+----------------------------------+ +``` +{: .no-copy} \ No newline at end of file diff --git a/guides/v2.1/cloud/env/variables-deploy.md b/guides/v2.1/cloud/env/variables-deploy.md index 97b33260381..28dd98f53c8 100644 --- a/guides/v2.1/cloud/env/variables-deploy.md +++ b/guides/v2.1/cloud/env/variables-deploy.md @@ -103,6 +103,47 @@ stage: _merge: true ``` +Also, you can configure a table prefix. + +{: .bs-callout .bs-callout-warning} +If you do not use the merge option with the table prefix, you must provide default connection settings or the deploy fails validation. + +The following example uses the `ece_` table prefix with default connection settings instead of using the `_merge` option: + +```yaml +stage: + deploy: + DATABASE_CONFIGURATION: + connection: + default: + username: user + host: host + dbname: magento + password: password + table_prefix: 'ece_' +``` + +Sample output: + +```terminal +MariaDB [main]> SHOW TABLES; ++-------------------------------------+ +| Tables_in_main | ++-------------------------------------+ +| ece_admin_passwords | +| ece_admin_system_messages | +| ece_admin_user | +| ece_admin_user_session | +| ece_adminnotification_inbox | +| ece_amazon_customer | +| ece_authorization_rule | +| ece_cache | +| ece_cache_tag | +| ece_captcha_log | +..... +``` +{: .no-copy} + ### `ENABLE_GOOGLE_ANALYTICS` - **Default**—`false` @@ -124,6 +165,19 @@ stage: {:.bs-callout .bs-callout-info} The {{ site.data.var.ece }} deploy process always enables Google Analytics on Production environments. +### `FORCE_UPDATE_URLS` + +- **Default**—`true` +- **Version**—Magento 2.1.4 and later + +On deployment to Pro and Starter Staging and Production environments, this variable replaces Magento base URLs in the database with the project URLs specified by the [`MAGENTO_CLOUD_ROUTES`]({{ page.baseurl}}/cloud/env/variables-cloud.html) variable. Use this setting to override the default behavior, which is to ignore the [UPDATE_URLS](#update_urls) variable when deploying to Staging and Production environments. + +```yaml +stage: + deploy: + FORCE_UPDATE_URLS: true +``` + ### `GENERATED_CODE_SYMLINK` - **Default**—`true` @@ -278,7 +332,7 @@ stage: - **Default**—_Not set_ - **Version**—Magento 2.1.4 and later -You can configure specific locales per theme as long as the theme is not excluded using the `SCD_EXCLUDE_THEMES` variable during deployment. This is ideal if you want to speed up the deployment process by reducing the amount of unnecessary theme files. For example, you can deploy the _magento/backend_ theme in English and a custom theme in other languages. +You can configure specific locales per theme as long as the theme is not excluded using the [`SCD_EXCLUDE_THEMES` variable](#scd_exclude_themes) during deployment. This configuration is ideal to speed up the deployment process by reducing the amount of unnecessary theme files. For example, you can deploy the _magento/backend_ theme in English and a custom theme in other languages. The following example deploys the `Magento/backend` theme with three locales: @@ -407,7 +461,7 @@ stage: - **Default**—`true` - **Version**—Magento 2.1.4 and later -Generates symlinks for static content. This setting is vital in the Pro Production environment for the three-node cluster. When this variable is set to `false`, it must copy every file during the deployment, which increases deployment time. +Generates symlinks for static content. This setting is vital in the Pro Production environment for the three-node cluster. When this variable is set to `false`, it must copy every file during the deployment, which increases deployment time. Setting the [`SCD_ON_DEMAND` variable]({{page.baseurl}}/cloud/env/variables-global.html#scd_on_demand) to `true` disables this variable. If you generate static content during the build phase, it creates a symlink to the content folder. If you generate static content during the deploy phase, it writes directly to the content folder. @@ -424,7 +478,10 @@ stage: - **Default**—`true` - **Version**—Magento 2.1.4 and later -On deployment, replace Magento base URLs in the database with project URLs. This is useful for local development, where base URLs are set up for your local environment. When you deploy to a Cloud environment, we change the URLs so you can access your storefront and Magento Admin using project URLs. +On deployment, replace Magento base URLs in the database with the project URLs specified by the [`MAGENTO_CLOUD_ROUTES`]({{ page.baseurl }}/cloud/env/variables-cloud.html) variable. This is useful for local development, where base URLs are set up for your local environment. +When you deploy to a Cloud environment, we change the URLs so you can access your storefront and Magento Admin using project URLs. + +If you need to update URLs when deploying to Pro or Starter Staging and Production environments, use the [`FORCE_UPDATE_URLS`](#force_update_urls) variable. ```yaml stage: @@ -432,8 +489,6 @@ stage: UPDATE_URLS: false ``` -You should set this variable to `false` _only_ in Staging or Production environments, where the base URLs cannot change. For Pro, we already set this to `false` for you. - ### `VERBOSE_COMMANDS` - **Default**—_Not set_ diff --git a/guides/v2.1/cloud/env/variables-post-deploy.md b/guides/v2.1/cloud/env/variables-post-deploy.md index c0ddedbec81..5633ff5d353 100644 --- a/guides/v2.1/cloud/env/variables-post-deploy.md +++ b/guides/v2.1/cloud/env/variables-post-deploy.md @@ -15,30 +15,87 @@ stage: {% include cloud/customize-build-deploy.md %} -### `WARM_UP_PAGES` +### `TTFB_TESTED_PAGES` -- **Default**— `index.php` -- **Version**—Magento 2.1.4 and later +- **Default**— `[]` (an empty array) +- **Version**—Magento 2.1.4 and later -Customize the list of pages used to preload the cache in the `post_deploy` stage. +Configure _Time To First Byte_ (TTFB) testing for specified pages to test your {{ site.data.var.ece }} site performance. Specify an absolute path reference, or URL with protocol and host, for each page that requires the test. ```yaml stage: - post-deploy: - WARM_UP_PAGES: - - "index.php" - - "index.php/customer/account/create" + post-deploy: + TTFB_TESTED_PAGES: + - "index.php" + - "index.php/customer/account/create" + - "https://example.com/catalog/some-category" ``` -You must configure the post-deploy hook. See [hooks section of the `.magento.app.yaml` file]({{ page.baseurl }}/cloud/project/project-conf-files_magento-app.html#hooks). +After you specify the pages to test and commit your changes, the _Time To First Byte_ test runs during the post-deploy phase and posts results for each path to the cloud log: -Also, you can configure the cache to preload pages for [multiple domains]({{ page.baseurl }}/cloud/project/project-multi-sites.html). +```terminal +[2019-06-20 20:42:22] INFO: TTFB test result: 0.313s {"url":"https://staging-tkyicst-xkmwgjkwmwfuk.us-4.magentosite.cloud/customer/account/create","status":200} +[2019-06-20 20:42:22] INFO: TTFB test result: 0.408s {"url":"https://staging-tkyicst-xkmwgjkwmwfuk.us-4.magentosite.cloud/checkout/cart","status":200} +``` +{: .no-copy} -```yaml -stage: - post-deploy: - WARM_UP_PAGES: - - 'test' - - 'http://example1.com/test' - - 'http://example2.com/test' -``` \ No newline at end of file +For redirected paths, the log reports the path of the redirect target instead of the one configured in the environment variable. If you specify an invalid path, the log displays a warning message. + +### `WARM_UP_PAGES` + +- **Default**— `index.php` +- **Version**—Magento 2.1.4 and later + +Customize the list of pages used to preload the cache in the `post_deploy` stage. You must configure the post-deploy hook. See the [hooks section][] of the `.magento.app.yaml` file. + +- **single pages**—Specify a single page to add to the cache. You do not have to indicate the default base URL. The following example caches the `BASE_URL/index.php` page: + + ```yaml + stage: + post-deploy: + WARM_UP_PAGES: + - "index.php" + ``` + +- **multiple domains**—List multiple URLs. The following example caches pages from two domains: + + ```yaml + stage: + post-deploy: + WARM_UP_PAGES: + - 'http://example1.com/test' + - 'http://example2.com/test' + ``` + +- **multiple pages**—Use the following format to cache multiple pages according to a specific regular expression pattern: + + ```terminal + :: + ``` + + - `entity_type`: Choose `category` or `cms-page` + - `pattern|url`: Use a `regexp` pattern or an exact match `url` to filter the URLs, or use an asterisk (\*) for all pages + - `store_id|store_code`: Use the ID or Code of the store or an asterisk (\*) for all stores + + The following example caches these items: + + - all category pages for store with ID 1 + - category page `cars` for store with code `store_en` + - cms page `contact` for all stores + - any category page that contains `car_` and ends with `html` for store with ID 2 + - any category page that contains `tires_` for store with code `store_gb` + + ```yaml + stage: + post-deploy: + WARM_UP_PAGES: + - "category:*:1" + - "category:cars:store_en" + - "cms-page:contact:* + - "category:|car_.*?\\.html$|:2" + - "category:|tires_.*|:store_gb" + ``` + +[hooks section]: {{page.baseurl}}/cloud/project/project-conf-files_magento-app.html#hooks +[CMS]: https://glossary.magento.com/cms/ +[Content elements]: https://docs.magento.com/m2/ce/user_guide/cms/content-elements.html diff --git a/guides/v2.1/cloud/live/stage-prod-test.md b/guides/v2.1/cloud/live/stage-prod-test.md index d3207755257..9be584129f3 100644 --- a/guides/v2.1/cloud/live/stage-prod-test.md +++ b/guides/v2.1/cloud/live/stage-prod-test.md @@ -12,6 +12,7 @@ functional_areas: --- #### Previous step: + [Migrate data and static files]({{ page.baseurl }}/cloud/live/stage-prod-migrate.html) When your code, files, and data is successfully migrated to Staging or Production, use the environment URLs to test your site(s) and store(s). For a list of your URLs, see [Starter]({{ page.baseurl }}/cloud/live/stage-prod-migrate-prereq.html#starter-urls) and [Pro]({{ page.baseurl }}/cloud/live/stage-prod-migrate-prereq.html#pro-urls) access information. @@ -49,7 +50,9 @@ The following examples use Pro URLs. You can use any URL with the `dig` command. Next, use a `curl` command to verify X-Magento-Tags exist and additional header information. The format for the command is: - curl http[s]:// -H "host: " -k -vo /dev/null -HFastly-Debug:1 +```bash +curl http[s]:// -H "host: " -k -vo /dev/null -HFastly-Debug:1 +``` For Starter, enter the full site URL from your environment [Access info]({{ page.baseurl }}/cloud/live/stage-prod-migrate-prereq.html#starter-urls) in the command to view the headers. @@ -58,20 +61,20 @@ For Pro Staging and Production, the command differs per server: * Staging: `curl http[s]://staging..c..ent.magento.cloud -H "host: " -k -vo /dev/null -HFastly-Debug:1` * Production: - * The load balancer: `curl http[s]://.c..ent.magento.cloud -H "host: " -k -vo /dev/null -HFastly-Debug:1` - * A direct Origin node: `curl http[s]://.{1|2|3}..ent.magento.cloud -H "host: " -k -vo /dev/null -HFastly-Debug:1` + * The load balancer: `curl http[s]://.c..ent.magento.cloud -H "host: " -k -vo /dev/null -HFastly-Debug:1` + * A direct Origin node: `curl http[s]://.{1|2|3}..ent.magento.cloud -H "host: " -k -vo /dev/null -HFastly-Debug:1` After you are live, you can also check your live site: `curl https:// -k -vo /dev/null -HFastly-Debug:1`. You can also add `--resolve` if your live URL is not set up with DNS. Check the returned response headers and values: -* `Fastly-Magento-VCL-Uploaded` should be present -* `X-Magento-Tags` should be returned -* `Fastly-Module-Enabled` should be either `Yes` or the Fastly extension version number -* `X-Cache` should be either `HIT` or `HIT, HIT` -* `x-cache-hits` should be 1,1 -* [`Cache-Control: max-age`](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) should be greater than 0 -* [`Pragma`](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.32) should be `cache` +* `Fastly-Magento-VCL-Uploaded` should be present +* `X-Magento-Tags` should be returned +* `Fastly-Module-Enabled` should be either `Yes` or the Fastly extension version number +* `X-Cache` should be either `HIT` or `HIT, HIT` +* `x-cache-hits` should be 1,1 +* [`Cache-Control: max-age`](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) should be greater than 0 +* [`Pragma`](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.32) should be `cache` To verify Fastly is enabled in Staging and Production, check the configuration in the Magento Admin for each environment: @@ -209,11 +212,12 @@ We recommend that you review the [Magento Performance Toolkit]({{ site.mage2blob For best results, we recommend the following tools: -* [Siege](https://www.joedog.org/siege-home/): Traffic shaping and testing software to push your store to the limit. Hit your site with a configurable number of simulated clients. Siege supports basic authentication, cookies, HTTP, HTTPS and FTP protocols. -* [Jmeter](http://jmeter.apache.org/): Excellent load testing to help gauge performance for spiked traffic, like for flash sales. Create custom tests to run against your site. -* New Relic (provided): Helps locate processes and areas of the site causing slow performance with tracked time spent per action like transmitting data, queries, Redis, and so on. -* [Blackfire]({{ page.baseurl }}/cloud/project/project-integrate-blackfire.html) (provided): Helps track through the issues New Relic finds and helps you dig deeper into the issue for specifics. Blackfire profiles the environment and helps locate bottlenecks indepth: process, method call, query, load, and so on. -* [WebPageTest](https://www.webpagetest.org/) and [Pingdom](https://www.pingdom.com/): Real-time analysis of your site pages load time with different origin locations. Pingdom may cost a fee. WebPageTest is a free tool. +* [Magento application performance test]({{ page.baseurl }}/cloud/env/variables-post-deploy.html#ttfb_tested_pages)—Test Magento application performance by configuring the `TTFB_TESTED_PAGES` environment variable to test site response time. +* [Siege](https://www.joedog.org/siege-home/)—Traffic shaping and testing software to push your store to the limit. Hit your site with a configurable number of simulated clients. Siege supports basic authentication, cookies, HTTP, HTTPS and FTP protocols. +* [Jmeter](http://jmeter.apache.org/)—Excellent load testing to help gauge performance for spiked traffic, like for flash sales. Create custom tests to run against your site. +* New Relic (provided)—Helps locate processes and areas of the site causing slow performance with tracked time spent per action like transmitting data, queries, Redis, and so on. +* [Blackfire]({{ page.baseurl }}/cloud/project/project-integrate-blackfire.html) (provided)— Helps track through the issues New Relic finds and helps you dig deeper into the issue for specifics. Blackfire profiles the environment and helps locate bottlenecks indepth: process, method call, query, load, and so on. +* [WebPageTest](https://www.webpagetest.org/) and [Pingdom](https://www.pingdom.com/)—Real-time analysis of your site pages load time with different origin locations. Pingdom may require a fee. WebPageTest is a free tool. ## Set up Magento Security Scan Tool {#security-scan} diff --git a/guides/v2.1/cloud/project/ece-tools-upgrade-project.md b/guides/v2.1/cloud/project/ece-tools-upgrade-project.md index 2271055d1ea..e314b5a93f0 100644 --- a/guides/v2.1/cloud/project/ece-tools-upgrade-project.md +++ b/guides/v2.1/cloud/project/ece-tools-upgrade-project.md @@ -92,9 +92,10 @@ To upgrade your project to use the `{{site.data.var.ct}}` package, you need to u composer.json composer.lock ``` + {:.no-copy} 1. Push your code changes to the remote server and merge this branch with the `integration` branch. ```bash - git push origin + git push origin ``` diff --git a/guides/v2.1/cloud/project/project-conf-files_magento-app.md b/guides/v2.1/cloud/project/project-conf-files_magento-app.md index aa7bf9ce3c9..532ed423b62 100644 --- a/guides/v2.1/cloud/project/project-conf-files_magento-app.md +++ b/guides/v2.1/cloud/project/project-conf-files_magento-app.md @@ -322,82 +322,124 @@ type: php:7.1 ### PHP extensions -You can define additional PHP extensions to enable or disable: +You can enable additional PHP extensions in the `runtime:extension` section. Also, the extensions specified become available in the Docker PHP containers. > .magento.app.yaml ```yaml runtime: extensions: - - xdebug - - redis + - sockets + - sodium - ssh2 disabled_extensions: - - sqlite3 + - bcmath + - bz2 + - calendar + - exif ``` #### To view the current list of PHP extensions: -Use SSH to log in to your environment and list the PHP extensions as follows: +Use SSH to log in to an environment and list the PHP extensions. ```bash php -m ``` -Magento requires the following PHP extensions that are enabled by default: - -- [curl](http://php.net/manual/en/book.curl.php) -- [gd](http://php.net/manual/en/book.image.php) -- [intl](http://php.net/manual/en/book.intl.php) -- PHP 7 only: - - [json](http://php.net/manual/en/book.json.php) - - [iconv](http://php.net/manual/en/book.iconv.php) - -- [mcrypt](http://php.net/manual/en/book.mcrypt.php) -- [PDO/MySQL](http://php.net/manual/en/ref.pdo-mysql.php) -- [bc-math](http://php.net/manual/en/book.bc.php) -- [mbstring](http://php.net/manual/en/book.mbstring.php) -- [mhash](http://php.net/manual/en/book.mhash.php) -- [openssl](http://php.net/manual/en/book.openssl.php) -- [SimpleXML](http://php.net/manual/en/book.simplexml.php) -- [soap](http://php.net/manual/en/book.soap.php) -- [xml](http://php.net/manual/en/book.xml.php) -- [zip](http://php.net/manual/en/book.zip.php) - -You must install the following extensions: - -- [ImageMagick](http://php.net/manual/en/book.imagick.php) 6.3.7 (or later), ImageMagick can optionally be used with the `gd` extension -- [xsl](http://php.net/manual/en/book.xsl.php) -- [redis](https://pecl.php.net/package/redis) - -In addition, we strongly recommend you enable `opcache`. - -Optional PHP extensions available to install: - -- [apcu](http://php.net/manual/en/book.apcu.php) -- [blackfire](https://blackfire.io/docs/up-and-running/installation) -- [enchant](http://php.net/manual/en/book.enchant.php) -- [gearman](http://php.net/manual/en/book.gearman.php) -- [geoip](http://php.net/manual/en/book.geoip.php) -- [imap](http://php.net/manual/en/book.imap.php) -- [ioncube](https://www.ioncube.com/loaders.php) -- [pecl-http](https://pecl.php.net/package/pecl_http) -- [pinba](http://pinba.org) -- [propro](https://pecl.php.net/package/propro) -- [pspell](http://php.net/manual/en/book.pspell.php) -- [raphf](https://pecl.php.net/package/raphf) -- [readline](http://php.net/manual/en/book.readline.php) -- [recode](http://php.net/manual/en/book.recode.php) -- [snmp](http://php.net/manual/en/book.snmp.php) -- [sqlite3](http://php.net/manual/en/book.sqlite3.php) -- [ssh2](http://php.net/manual/en/book.ssh2.php) -- [tidy](http://php.net/manual/en/book.tidy.php) -- [xcache](https://xcache.lighttpd.net) -- [xdebug](https://xdebug.org) -- [xhprof](http://php.net/manual/en/book.xhprof.php) -- [xmlrpc](http://php.net/manual/en/book.xmlrpc.php) - -{:.bs-callout .bs-callout-warning} +For details about a specific PHP extension, see the [PHP Extension List](https://www.php.net/manual/en/extensions.alphabetical.php). + +{{site.data.var.ece}} supports the following extensions: + +- Default extensions: + - `bcmath` + - `bz2` + - `calendar` + - `exif` + - `gd` + - `gettext` + - `intl` + - `mysqli` + - `pcntl` + - `pdo_mysql` + - `soap` + - `sockets` + - `sysvmsg` + - `sysvsem` + - `sysvshm` + - `opcache` + - `zip` + +- Extensions that are installed and cannot be uninstalled: + - `ctype` + - `curl` + - `date` + - `dom` + - `fileinfo` + - `filter` + - `ftp` + - `hash` + - `iconv` + - `json` + - `mbstring` + - `mysqlnd` + - `openssl` + - `pcre` + - `pdo` + - `pdo_sqlite` + - `phar` + - `posix` + - `readline` + - `session` + - `sqlite3` + - `tokenizer` + - `xml` + - `xmlreader` + - `xmlwriter` + +- Extensions that can be installed and uninstalled as needed: + - `bcmath` + - `bz2` + - `calendar` + - `exif` + - `gd` + - `geoip` + - `gettext` + - `gmp` + - `igbinary` + - `imagick` + - `imap` + - `intl` + - `ldap` + - `mailparse` + - `mcrypt` + - `msgpack` + - `mysqli` + - `oauth` + - `opcache` + - `pdo_mysql` + - `propro` + - `pspell` + - `raphf` + - `recode` + - `redis` + - `shmop` + - `soap` + - `sockets` + - `sodium` + - `ssh2` + - `sysvmsg` + - `sysvsem` + - `sysvshm` + - `tidy` + - `xdebug` + - `xmlrpc` + - `xsl` + - `yaml` + - `zip` + - `pcntl` + +{: .bs-callout-warning} PHP compiled with debug is not supported and the Probe may conflict with XDebug or XHProf. Disable those extensions when enabling the Probe. The Probe conflicts with some PHP extensions like Pinba or IonCube. ### Customize `php.ini` settings diff --git a/guides/v2.1/cloud/reference/ece-tools-reference.md b/guides/v2.1/cloud/reference/ece-tools-reference.md new file mode 100644 index 00000000000..2176b8583b3 --- /dev/null +++ b/guides/v2.1/cloud/reference/ece-tools-reference.md @@ -0,0 +1,111 @@ +--- +group: cloud-guide +title: ece-tools reference +functional_areas: + - Cloud +--- + +The `{{site.data.var.ct}}` package is a set of scripts and tools designed to manage and deploy {{site.data.var.ece}} projects. The `{{site.data.var.ct}}` package simplifies many {{site.data.var.ece}} processes, such as Docker environment deployment, cron management, and project verification. You can view and contribute to the open-source [ece-tools repository on Github](https://github.com/magento/ece-tools). + +{% include cloud/note-ece-tools-package.md %} + +The `{{site.data.var.ct}}` package is compatible with {{site.data.var.ee}}—starting with version 2.1.4—and contains scripts and {{site.data.var.ece}} commands designed to help manage your code and automatically build and deploy your projects. + +#### To list the available `{{site.data.var.ct}}` commands: + +```bash +php ./vendor/bin/ece-tools list +``` + +## Build and deploy + +The `{{site.data.var.ct}}` package performs operations for the build, deploy, and post-deploy stages for launching your {{site.data.var.ece}} application. By default, these commands are in the [hooks property][hooks] of the `.magento.app.yaml` configuration file. + +## Docker configuration generator + +The `{{site.data.var.ct}}` package provides all the commands necessary to [launch a Docker development environment]({{page.baseurl}}/cloud/docker/docker-config.html). + +Command | Action +:------ | :------ +`docker:build` | Builds the docker environment in [production mode][mode] by default and verifies configured service versions. +`docker:build --mode="developer"` | Builds the docker environment in [developer mode][mode]. +`docker:config:convert` | Convert PHP configuration files to Docker ENV files. + +The following example lists the `{{site.data.var.ct}}` Docker commands: + +```bash +php ./vendor/bin/ece-tools list | grep docker +``` + +Sample response: + +```terminal + docker + docker:build Build docker configuration + docker:config:convert Convert raw config to .env files configuration +``` +{: .no-copy} + +## Services, routes, and variables + +You can use the `{{site.data.var.ct}}` package to display detailed information about the Base64-encoded [Cloud variables][cloudvar] used in any Cloud environment. The following command shows all services, routes, and variables. + +```bash +php ./vendor/bin/ece-tools env:config:show +``` + +To display a specific set of information, use the following format: + +```bash +php ./vendor/bin/ece-tools env:config:show