diff --git a/_includes/cloud/pretty-print-services.md b/_includes/cloud/pretty-print-services.md new file mode 100644 index 00000000000..9128af6c0af --- /dev/null +++ b/_includes/cloud/pretty-print-services.md @@ -0,0 +1,9 @@ +#### To verify information used for configurations and settings: + +1. Use SSH to log in to the remote environment. + +1. Create `pretty-print` of all relationships for services and configuration data for that environment. + + ```bash + php -r 'print_r(json_decode(base64_decode($_ENV["MAGENTO_CLOUD_RELATIONSHIPS"])));' + ``` diff --git a/_includes/cloud/service-config-integration-starter.md b/_includes/cloud/service-config-integration-starter.md index bd1d3b480cf..b717ec7eac8 100644 --- a/_includes/cloud/service-config-integration-starter.md +++ b/_includes/cloud/service-config-integration-starter.md @@ -1,2 +1 @@ - -You can use the following instructions for service setup on {{site.data.var.ece}} Pro Integration environments and Starter environments including Production `master`. You must submit a support ticket to configure the service on Pro Production and Staging environments. See [Services]({{ page.baseurl }}/cloud/project/project-conf-files_services.html). \ No newline at end of file +You can use the following instructions for service setup on {{site.data.var.ece}} Pro Integration environments and Starter environments, including `master` branch. You must submit a support ticket to configure the service on Pro Production and Staging environments. See [Services]({{ page.baseurl }}/cloud/project/project-conf-files_services.html). \ No newline at end of file diff --git a/guides/v2.1/cloud/configure/setup-cron-jobs.md b/guides/v2.1/cloud/configure/setup-cron-jobs.md index f64922bdefa..0e6581bb3e4 100644 --- a/guides/v2.1/cloud/configure/setup-cron-jobs.md +++ b/guides/v2.1/cloud/configure/setup-cron-jobs.md @@ -33,8 +33,6 @@ crons: The following example is the default cron included for {{site.data.var.ece}}. ```yaml -# Default Magento 2 cron job - crons: cronrun: spec: "* * * * *" @@ -89,8 +87,6 @@ The default cron interval for all environments provisioned in the us-3, eu-3, an We include a default cron job for Magento in the default file: ```yaml -# Default Magento 2 cron jobs - crons: cronrun: spec: "* * * * *" diff --git a/guides/v2.1/cloud/env/environment-vars_magento.md b/guides/v2.1/cloud/env/environment-vars_magento.md index 9e0b9624e21..5b1467e79ac 100644 --- a/guides/v2.1/cloud/env/environment-vars_magento.md +++ b/guides/v2.1/cloud/env/environment-vars_magento.md @@ -6,9 +6,7 @@ functional_areas: - Configuration --- -Users that have administrative access to the {{site.data.var.ece}} project can use the -following project environment variables to override the configuration settings -for the administrative user account to access the Admin UI. See [Change the Magento ADMIN variables]({{ page.baseurl }}/cloud/before/before-setup-env-2_clone.html#change-the-magento-admin-variables). +Users that have administrative access to the {{site.data.var.ece}} project can use the following project environment variables to override the configuration settings for the administrative user account to access the Admin UI. See [Change the Magento ADMIN variables]({{ page.baseurl }}/cloud/before/before-setup-env-2_clone.html#change-the-magento-admin-variables). ## Admin credentials @@ -16,19 +14,17 @@ Use the ADMIN variables in the following table to override credentials for the M If you want to change the values after installation, connect to your environment using ssh and use the the Magento CLI [`admin:user` command]({{ page.baseurl }}/install-gde/install/cli/install-cli-subcommands-admin.html) to create or edit the Magento Admin user credentials. -| Variable | Default | Description | -|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Variable | Default | Description | +| -------- | -------- | ----------- | | `ADMIN_USERNAME`| License Owner email address | A username for the administrative user with the ability to create other users, including administrative users.| |`ADMIN_EMAIL`| | Email address for the administrative user. This address is used to send password reset notifications.| |`ADMIN_PASSWORD`| | Password for the administrative user. When the project is created a random password is generated and an email is sent to the {{ site.data.var.ece }} License Owner. During project creation, the License Owner should have already changed the password. You might need to contact the License Owner for the updated password.| | `ADMIN_LOCALE` | `en_US` | The default locale used by the Magento Admin. - - ## Admin URL Use the following environment variable to secure access to your Magento Admin UI. If specified, this value overrides the default URL during installation. `ADMIN_URL`—The relative URL to access the Magento Admin UI. The default URL is `/admin`. For security reasons, Magento recommends that you change the default to a unique, custom Admin URL that is not easy to guess. -If you need to change the Admin URL after installation, connect to your environment using ssh and use the Magento CLI [`magento setup:config`]({{ page.baseurl }}/install-gde/install/cli/install-cli-subcommands-deployment.html) command to change the URL. +If you need to change the Admin URL after installation, connect to your environment using SSH and use the Magento CLI [`magento setup:config`]({{ page.baseurl }}/install-gde/install/cli/install-cli-subcommands-deployment.html) command to change the URL. diff --git a/guides/v2.1/cloud/env/setup-notifications.md b/guides/v2.1/cloud/env/setup-notifications.md index 24b462eeeb8..2d7b8266a64 100644 --- a/guides/v2.1/cloud/env/setup-notifications.md +++ b/guides/v2.1/cloud/env/setup-notifications.md @@ -36,15 +36,15 @@ To configure notifications: ```yaml log: slack: - token: "" - channel: "" - username: "SlackHandler" - min_level: "info" + token: "" + channel: "" + username: "SlackHandler" + min_level: "info" email: - to: - from: - subject: "Log notification from Magento Cloud" - min_level: "notice" + to: + from: + subject: "Log notification from Magento Cloud" + min_level: "notice" ``` {:.bs-callout .bs-callout-info} @@ -67,10 +67,10 @@ The following example shows a Slack-only configuration: ```yaml log: slack: - token: "" - channel: "" - username: "SlackHandler" - min_level: "info" + token: "" + channel: "" + username: "SlackHandler" + min_level: "info" ``` - `token`—Your Slack [user token](https://api.slack.com/docs/token-types#user). Your user token authorizes {{site.data.var.ece}} to send messages. @@ -88,10 +88,10 @@ The following example shows an email-only configuration: ```yaml log: email: - to: - from: - subject: "Log notification from Magento Cloud" - min_level: "notice" + to: + from: + subject: "Log notification from Magento Cloud" + min_level: "notice" ``` - `to`—Email address {{site.data.var.ece}} sends notification messages. diff --git a/guides/v2.1/cloud/env/variables-deploy.md b/guides/v2.1/cloud/env/variables-deploy.md index a6dae8625d8..97b33260381 100644 --- a/guides/v2.1/cloud/env/variables-deploy.md +++ b/guides/v2.1/cloud/env/variables-deploy.md @@ -179,17 +179,17 @@ The following example merges new values to an existing configuration: ```yaml stage: deploy: - QUEUE_CONFIGURATION: - _merge: true - amqp: - host: changed1.host - port: 5672 - amqp2: - host: changed2.host2 - port: 12345 - mq: - host: changedmq.host - port: 1234 + QUEUE_CONFIGURATION: + _merge: true + amqp: + host: changed1.host + port: 5672 + amqp2: + host: changed2.host2 + port: 12345 + mq: + host: changedmq.host + port: 1234 ``` ### `REDIS_USE_SLAVE_CONNECTION` diff --git a/guides/v2.1/cloud/env/variables-global.md b/guides/v2.1/cloud/env/variables-global.md index 53ea0a87ecb..407b976fb95 100644 --- a/guides/v2.1/cloud/env/variables-global.md +++ b/guides/v2.1/cloud/env/variables-global.md @@ -13,6 +13,7 @@ stage: global: GLOBAL_VARIABLE_NAME: value ``` + {% include cloud/customize-build-deploy.md %} ### `MIN_LOGGING_LEVEL` @@ -24,8 +25,8 @@ Overrides the minimum logging level for all output streams without making change ```yaml stage: - global: - MIN_LOGGING_LEVEL: debug + global: + MIN_LOGGING_LEVEL: debug ``` ### `SCD_ON_DEMAND` @@ -45,13 +46,14 @@ stage: The `SCD_ON_DEMAND` variable skips the SCD and the `STATIC_CONTENT_SYMLINK` in both phases (build and deploy), clears the `pub/static` and `var/view_preprocessed` folders, and writes the following to the `app/etc/env.php` file: -```php +```php?start_inline=1 return array( ... 'static_content_on_demand_in_production' => 1, ... ); ``` +{: .no-copy} ### `SKIP_HTML_MINIFICATION` @@ -87,7 +89,6 @@ Use the `X_FRAME_CONFIGURATION` variable to change the [`X-Frame-Options`]({{ pa Add the `X_FRAME_CONFIGURATION` environment variable to the `global` stage in the `.magento.env.yaml` file: - ```yaml stage: global: diff --git a/guides/v2.1/cloud/env/variables-post-deploy.md b/guides/v2.1/cloud/env/variables-post-deploy.md index 7bafbb30ad4..c0ddedbec81 100644 --- a/guides/v2.1/cloud/env/variables-post-deploy.md +++ b/guides/v2.1/cloud/env/variables-post-deploy.md @@ -26,8 +26,8 @@ Customize the list of pages used to preload the cache in the `post_deploy` stage stage: post-deploy: WARM_UP_PAGES: - - "index.php" - - "index.php/customer/account/create" + - "index.php" + - "index.php/customer/account/create" ``` 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). 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 4f4c9e6b4c9..b61fbab251c 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 @@ -21,6 +21,7 @@ The `.magento.app.yaml` has many default values, see [a sample `.magento.app.yam Use the following properties to build your application configuration file. The `name`, `type`, `disk`, and one `web` or `worker` block is required. ### `name` + {{site.data.var.ee}} supports multiple applications in a project, so you need a unique name that identifies the application in the project. You must use lower case alphanumeric characters, such as `a` to `z` and `0` to `9` for the name. The name is used in the [`routes.yaml`]({{ page.baseurl }}/cloud/project/project-conf-files_routes.html) file to define the HTTP upstream (by default, `php:http`). For example, if the value of `name` is `app`, you must use `app:http` in the upstream field. You can also use this name in multi-application relationships. @@ -29,6 +30,7 @@ The name is used in the [`routes.yaml`]({{ page.baseurl }}/cloud/project/project Do not change the name of an application after it has been deployed. ### `type` and `build` + The `type` and `build` properties provide information about the base container image to build and run the project. The supported `type` language is {% glossarytooltip bf703ab1-ca4b-48f9-b2b7-16a81fd46e02 %}PHP{% endglossarytooltip %}. Specify the PHP version as follows: @@ -45,6 +47,7 @@ build: ``` ### `access` + The _access_ property indicates a minimum user role level that is allowed SSH access to the environments. The available user roles are: - `admin`—Can change settings and execute actions in the environment. Also has _contributor_ and _viewer_ rights. @@ -59,9 +62,10 @@ access: ``` ### `relationships` + Defines the service mapping in your application. -The left-hand side is the name of the relationship as it will be exposed to the application in the `MAGENTO_CLOUD_RELATIONSHIPS` environment variable. The right-hand side is in the form `:`, where `` comes from `.magento/services.yaml` and `` should be the same as the value of `type` declared in that same file. +The left-hand side is the name of the relationship as it will be exposed to the application in the `MAGENTO_CLOUD_RELATIONSHIPS` environment variable. The right-hand side is in the form `:`, where `` comes from `.magento/services.yaml` and `` should be the same as the value of `type` declared in that same file. Example of valid options are: @@ -75,6 +79,7 @@ search: "searchengine:solr" See [Services]({{page.baseurl}}/cloud/project/project-conf-files_services.html) for a full list of currently supported service types and endpoints. ### `web` + The `web` property defines how your application is exposed to the web (in HTTP). It determines how the web application serves content— from the front-controller script to a non-static request to an `index.php` file on the root. We support any directory structure so the static file can be in a sub directory, and the `index.php` file can be further down. You can specify the following attributes for the `web` property: @@ -141,6 +146,7 @@ web: ``` ### `disk` + Defines the persistent disk size of the application in MB. ```yaml @@ -151,6 +157,7 @@ disk: 2048 The minimal recommended disk size is 256MB. If you see the error `UserError: Error building the project: Disk size may not be smaller than 128MB`, increase the size to 256MB. ### `mounts` + An object whose keys are paths relative to the root of the application. The mount is a writable area on the disk for files. The following is a default list of mounts configured in the `magento.app.yaml` file using the `volume_id[/subpath]` syntax: ```yaml @@ -177,6 +184,7 @@ Important: The subpath portion of the mount is the unique identifier of the file You can make the mount web accessible by adding it to the [`web`](#web) block of locations. ### `dependencies` + Enables you to specify dependencies that your application might need during the build process. {{site.data.var.ee}} supports dependencies on the following @@ -198,10 +206,13 @@ nodejs: ``` ### `hooks` + Use the `hooks` section to run shell commands during the build, deploy, and post-deploy phases: - **`build`**—Execute commands _before_ packaging your application. Services, such as the database or Redis, are not available at this time since the application has not been deployed yet. You must add custom commands _before_ the default `php ./vendor/bin/ece-tools` command so that custom-generated content continues to the deployment phase. + - **`deploy`**—Execute commands _after_ packaging and deploying your application. You can access other services at this point. Since the default `php ./vendor/bin/ece-tools` command copies the `app/etc` directory to the correct location, you must add custom commands _after_ the deploy command to prevent custom commands from failing. + - **`post_deploy`**—Execute commands _after_ deploying your application and _after_ the container begins accepting connections. The `post_deploy` hook clears the cache and preloads (warms) the cache. You can customize the list of pages using the `WARM_UP_PAGES` variable in the [Post-deploy stage]({{ site.baseurl }}/guides/v2.1/cloud/env/variables-post-deploy.html). It is available only for Pro projects that contain [Staging and Production environments in the Project Web UI]({{ page.baseurl }}/cloud/trouble/pro-env-management.html) and for Starter projects. Although not required, this works in tandem with the `SCD_ON_DEMAND` environment variable. Add CLI commands under the `build`, `deploy`, or `post_deploy` sections _before_ the `ece-tools` command: @@ -242,9 +253,9 @@ The commands run from the application (`/app`) directory. You can use the `cd` c ```yaml dependencies: ruby: - sass: "3.4.7" + sass: "3.4.7" nodejs: - grunt-cli: "~0.1.13" + grunt-cli: "~0.1.13" hooks: build: | @@ -258,6 +269,7 @@ hooks: You must compile Sass files using `grunt` before static content deployment, which happens during the build. Place the `grunt` command before the `build` command. ### `crons` + Describes processes that are triggered on a schedule. We recommend you run `cron` as the [Magento file system owner]({{page.baseurl}}/cloud/before/before-workspace-file-sys-owner.html). Do _not_ run cron as `root` or as the web server user. `crons` support the following: @@ -291,10 +303,10 @@ The following environment variables are included in `.magento.app.yaml`. These a ```yaml variables: - env: - CONFIG__DEFAULT__PAYPAL_ONBOARDING__MIDDLEMAN_DOMAIN: 'payment-broker.magento.com' - CONFIG__STORES__DEFAULT__PAYMENT__BRAINTREE__CHANNEL: 'Magento_Enterprise_Cloud_BT' - CONFIG__STORES__DEFAULT__PAYPAL__NOTATION_CODE: 'Magento_Enterprise_Cloud' + env: + CONFIG__DEFAULT__PAYPAL_ONBOARDING__MIDDLEMAN_DOMAIN: 'payment-broker.magento.com' + CONFIG__STORES__DEFAULT__PAYMENT__BRAINTREE__CHANNEL: 'Magento_Enterprise_Cloud_BT' + CONFIG__STORES__DEFAULT__PAYPAL__NOTATION_CODE: 'Magento_Enterprise_Cloud' ``` ## Configure PHP options @@ -317,27 +329,31 @@ You can define additional PHP extensions to enable or disable: ```yaml runtime: - extensions: - - xdebug - - redis - - ssh2 - disabled_extensions: - - sqlite3 + extensions: + - xdebug + - redis + - ssh2 + disabled_extensions: + - sqlite3 ``` -To view the current list of PHP extensions, SSH into your environment and enter the following command: +#### To view the current list of PHP extensions: - php -m +Use SSH to log in to your environment and list the PHP extensions as follows: + +```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: +- PHP 7 only: + - [json](http://php.net/manual/en/book.json.php) + - [iconv](http://php.net/manual/en/book.iconv.php) - - [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) @@ -396,10 +412,14 @@ Configuring PHP settings improperly can cause issues. We recommend only advanced For example, if you need to increase the PHP memory limit: - memory_limit = 756M +```bash +memory_limit = 756M +``` For a list of recommended PHP configuration settings, see [Required PHP settings]({{ page.baseurl }}/install-gde/prereq/php-settings.html). After pushing your file, you can check that the custom PHP configuration has been added to your environment by [creating an SSH tunnel]({{ page.baseurl }}/cloud/env/environments-start.html#env-start-tunn) to your environment and entering: - cat /etc/php5/fpm/php.ini +```bash +cat /etc/php5/fpm/php.ini +``` \ No newline at end of file diff --git a/guides/v2.1/cloud/project/project-conf-files_routes.md b/guides/v2.1/cloud/project/project-conf-files_routes.md index 302874300aa..06910e2d166 100644 --- a/guides/v2.1/cloud/project/project-conf-files_routes.md +++ b/guides/v2.1/cloud/project/project-conf-files_routes.md @@ -142,14 +142,14 @@ http://{default}/: type: redirect https://{default}/: cache: - cookies: [""] - default_ttl: 0 - enabled: true - headers: - - Accept - - Accept-Language + cookies: [""] + default_ttl: 0 + enabled: true + headers: + - Accept + - Accept-Language ssi: - enabled: false + enabled: false type: upstream upstream: php:http ``` diff --git a/guides/v2.1/cloud/project/project-conf-files_services-elastic.md b/guides/v2.1/cloud/project/project-conf-files_services-elastic.md index 1ae2282b40e..487bbca0301 100644 --- a/guides/v2.1/cloud/project/project-conf-files_services-elastic.md +++ b/guides/v2.1/cloud/project/project-conf-files_services-elastic.md @@ -9,10 +9,10 @@ functional_areas: [Elasticsearch](https://www.elastic.co) is an open source product that enables you to take data from any source, any format, and search and visualize it in real time. -* Elasticsearch performs quick and advanced searches on products in the product catalog -* Elasticsearch Analyzers support multiple languages -* Supports stop words and synonyms -* Indexing does not impact customers until the reindex operation completes +- Elasticsearch performs quick and advanced searches on products in the product catalog +- Elasticsearch Analyzers support multiple languages +- Supports stop words and synonyms +- Indexing does not impact customers until the reindex operation completes We support Elasticsearch versions 1.4, 1.7, and 2.4. The recommended version is 2.4. We support Elasticsearch for all environments starting with {{site.data.var.ece}} 2.1 and later. Refer to [Elasticsearch information]({{ site.baseurl }}/guides/v2.1/config-guide/elasticsearch/es-overview.html) to learn more. @@ -26,12 +26,12 @@ If you prefer using an existing search service, like Elasticsearch, instead of r ## Add Elasticsearch in services.yaml and .magento.app.yaml {#settings} -To enable Elasticsearch, add the following code with your installed version and allocated disk space in MB to `.magento/services.yaml`. +To enable Elasticsearch, add the following code with your installed version and allocated disk space in MB to the `.magento/services.yaml` file. ```yaml elasticsearch: - type: elasticsearch:2.4 - disk: 1024 + type: elasticsearch:2.4 + disk: 1024 ``` To configure the relationships for the environment variable, set a relationship in your `.magento.app.yaml` in the Git branch. For example: @@ -49,31 +49,31 @@ Optionally, you can add the plugins through the `.magento/services.yaml` file. F ```yaml elasticsearch: - type: elasticsearch:2.4 - disk: 1024 - configuration: - plugins: - - analysis-icu - - lang-python + type: elasticsearch:2.4 + disk: 1024 + configuration: + plugins: + - analysis-icu + - lang-python ``` The following are supported Elasticsearch plugins for version 2.4: -* `analysis-icu`: ICU Analysis Plugin, Support ICU Unicode text analysis -* `analysis-kuromoji`: Japanese (kuromoji) Analysis Plugin, Japanese language support -* `analysis-phonetic`: Phonetic Analysis Plugin, Phonetic analysis -* `analysis-smartcn`: Smart Chinese Analysis Plugins -* `analysis-stempel`: Stempel Polish Analysis Plugin -* `cloud-aws`: AWS Cloud Plugin, allows storing indices on AWS S3 -* `cloud-azure`: Azure Cloud Plugin -* `cloud-gce`: GCE Cloud Plugin -* `delete-by-query`: Support for deleting documents matching a given query -* `discovery-multicast`: Ability to form a cluster using TCP/IP multicast messages -* `lang-javascript`: JavaScript language plugin, allows the use of JavaScript in Elasticsearch scripts -* `lang-python`: Python language plugin, allows the use of Python in Elasticsearch scripts -* `mapper-attachments`: Mapper attachments plugin for indexing common file types -* `mapper-murmur3`: Murmur3 mapper plugin for computing hashes at index-time -* `mapper-size`: Size mapper plugin, enables the `_size` meta field +- `analysis-icu`: ICU Analysis Plugin, Support ICU Unicode text analysis +- `analysis-kuromoji`: Japanese (kuromoji) Analysis Plugin, Japanese language support +- `analysis-phonetic`: Phonetic Analysis Plugin, Phonetic analysis +- `analysis-smartcn`: Smart Chinese Analysis Plugins +- `analysis-stempel`: Stempel Polish Analysis Plugin +- `cloud-aws`: AWS Cloud Plugin, allows storing indices on AWS S3 +- `cloud-azure`: Azure Cloud Plugin +- `cloud-gce`: GCE Cloud Plugin +- `delete-by-query`: Support for deleting documents matching a given query +- `discovery-multicast`: Ability to form a cluster using TCP/IP multicast messages +- `lang-javascript`: JavaScript language plugin, allows the use of JavaScript in Elasticsearch scripts +- `lang-python`: Python language plugin, allows the use of Python in Elasticsearch scripts +- `mapper-attachments`: Mapper attachments plugin for indexing common file types +- `mapper-murmur3`: Murmur3 mapper plugin for computing hashes at index-time +- `mapper-size`: Size mapper plugin, enables the `_size` meta field {:.bs-callout .bs-callout-info} Magento does not support the ElasticSuite third-party plugin. @@ -85,28 +85,9 @@ For documentation on plugins, see [Elasticsearch plugin documentation](https://w We use the {{site.data.var.ece}} environment variable [`$MAGENTO_CLOUD_RELATIONSHIPS`]({{ page.baseurl }}/cloud/env/environment-vars_cloud.html), a JSON object, to retrieve environment-related relationships. {:.bs-callout .bs-callout-info} -You will use this information to [complete Elasticsearch configuration](#configure) in the Admin Panel. +Use this information to [complete Elasticsearch configuration](#configure) in the Admin Panel. -To verify this information used for configurations and settings: - -1. SSH into the Integration environment with Elasticsearch installed and configured. -2. Enter the following command to pretty-print connection information for Elasticsearch. You will use this information when configuring Elasticsearch through the Magento Admin. - - php -r 'print_r(json_decode(base64_decode($_ENV["MAGENTO_CLOUD_RELATIONSHIPS"])));' - -The response includes all relationships for services and configuration data for that environment. In the response, you can locate data similar to the following for Elasticsearch: - -``` -"elasticsearch" : [ - { - "host" : "elasticsearch.internal", - "ip" : "250.0.97.96", - "scheme" : "http", - "port" : "9200" - } - ], -``` -{: .no-copy} +{% include cloud/pretty-print-services.md %} ## Configure Elasticsearch for your site {#configure} diff --git a/guides/v2.1/cloud/project/project-conf-files_services-mysql.md b/guides/v2.1/cloud/project/project-conf-files_services-mysql.md index 7e87681acc2..82a71a214ef 100644 --- a/guides/v2.1/cloud/project/project-conf-files_services-mysql.md +++ b/guides/v2.1/cloud/project/project-conf-files_services-mysql.md @@ -1,34 +1,28 @@ --- group: cloud-guide -subgroup: 090_configure title: Set up MySQL service -menu_title: Set up MySQL service -menu_order: 60 -menu_node: -level3_menu_node: level3child -level3_subgroup: services functional_areas: - Cloud - Setup --- -The `mysql` service provides data storage. It is based on [MariaDB](https://mariadb.com/), supporting the [XtraDB](https://www.percona.com/software/mysql-database/percona-server/xtradb) storage -engine (equivalent to MySQL with InnoDB). +The `mysql` service provides data storage. It is based on [MariaDB](https://mariadb.com/), supporting the [XtraDB](https://www.percona.com/software/mysql-database/percona-server/xtradb) storage engine (equivalent to MySQL with InnoDB). We support MariaDB version 10.0, which includes reimplemented features from MySQL 5.6 and 5.7. -To access the MariaDB database directly, [open an SSH tunnel]({{ page.baseurl }}/cloud/env/environments-start.html#env-start-tunn) and use the -following command: +To access the MariaDB database directly, [open an SSH tunnel]({{ page.baseurl }}/cloud/env/environments-start.html#env-start-tunn) and use the following command: - mysql -h database.internal -u user +```bash +mysql -h database.internal -u user +``` {% include cloud/service-config-integration-starter.md %} ## Set up multiple database users {#cloud-appyaml-mysqlusers} -You can optionally set up multiple databases as well as multiple users with different permissions. By default, there is one endpoint named `mysql` that has administrator access to all defined databases. +Optionally, you can set up multiple databases as well as multiple users with different permissions. -To set up multiple databases and users, you must specify multiple endpoints. An _endpoint_ is a user who has privileges you specify. +An _endpoint_ is a user who has privileges you specify. By default, there is one endpoint named `mysql` that has administrator access to all defined databases. To set up multiple databases and users, you must specify multiple endpoints. {:.bs-callout .bs-callout-warning} You cannot use multiple _databases_ with {{site.data.var.ee}} at this time. You **can** create multiple endpoints to restrict access to the `main` database. @@ -37,15 +31,13 @@ To specify user access, use the `endpoints` nested array. Each endpoint can have The valid permission levels are: -* `ro`: Only SELECT queries are allowed. -* `rw`: SELECT queries as well as INSERT/UPDATE/DELETE queries are allowed. -* `admin`: All queries are allowed, including DDL queries (CREATE TABLE, DROP TABLE, and so on). - -If no endpoints are defined, a single endpoint named `mysql` has `admin` access to the `main` database. +- `ro`: Only SELECT queries are allowed. +- `rw`: SELECT queries as well as INSERT/UPDATE/DELETE queries are allowed. +- `admin`: All queries are allowed, including DDL queries (CREATE TABLE, DROP TABLE, and so on). -Example: +If no endpoints are defined, a single endpoint named `mysql` has `admin` access to the `main` database. For example: -``` +```yaml mysqldb: type: mysql:10.0 disk: 2048 @@ -68,9 +60,9 @@ mysqldb: In the preceding example, the endpoint (that is, user) `reporter` has `ro` privileges to the `main` database and endpoint `importer` has `rw` access to the `main` database. This means that: -* The `admin` user has full control of the database. -* The `repoter` user has SELECT privileges only. -* The `importer` user has SELECT, INSERT, UPDATE, and DELETE privileges. +- The `admin` user has full control of the database. +- The `repoter` user has SELECT privileges only. +- The `importer` user has SELECT, INSERT, UPDATE, and DELETE privileges. ## Add MySQL in services.yaml and .magento.app.yaml {#settings} @@ -92,37 +84,11 @@ relationships: Merge and deploy the code to set the configurations for Redis. For information on how these changes affect your environments, see [`services.yaml`]({{ page.baseurl }}/cloud/project/project-conf-files_services.html). {: .bs-callout .bs-callout-info} -* If you configure one MySQL user, you cannot use the [`DEFINER`](http://dev.mysql.com/doc/refman/5.6/en/show-grants.html) access control mechanism for stored procedures and views. -* MySQL errors such as `PDO Exception 'MySQL server has gone away` are usually the result of exhausting your existing disk space. Be sure you have sufficient space allocated to the service in [`.magento/services.yaml`]({{ page.baseurl }}/cloud/project/project-conf-files_magento-app.html#disk). +- If you configure one MySQL user, you cannot use the [`DEFINER`](http://dev.mysql.com/doc/refman/5.6/en/show-grants.html) access control mechanism for stored procedures and views. +- MySQL errors such as `PDO Exception 'MySQL server has gone away` are usually the result of exhausting your existing disk space. Be sure you have sufficient space allocated to the service in [`.magento/services.yaml`]({{ page.baseurl }}/cloud/project/project-conf-files_magento-app.html#disk). ## Verify environment-related relationships {#cloud-es-config-mg} We use the {{site.data.var.ece}} environment variable [`$MAGENTO_CLOUD_RELATIONSHIPS`]({{ page.baseurl }}/cloud/env/environment-vars_cloud.html), a JSON object, to retrieve environment-related relationships. -To verify this information used for configurations and settings: - -1. SSH into the Integration environment with MySQL installed and configured. -2. Enter the following command to pretty-print connection information for MySQL: - - php -r 'print_r(json_decode(base64_decode($_ENV["MAGENTO_CLOUD_RELATIONSHIPS"])));' - -The response includes all relationships for services and configuration data for that environment. In the response, you will locate data similar to the following for MySQL: - -```json -{ - "database": [ - { - "host": "database.internal", - "ip": "192.0.2.150", - "password": "", - "path": "main", - "port": 3306, - "query": { - "is_master": true - }, - "scheme": "mysql", - "username": "user" - } - ] -} -``` \ No newline at end of file +{% include cloud/pretty-print-services.md %} \ No newline at end of file diff --git a/guides/v2.1/cloud/project/project-conf-files_services-rabbit.md b/guides/v2.1/cloud/project/project-conf-files_services-rabbit.md index a427e4295f7..240ce4aae22 100644 --- a/guides/v2.1/cloud/project/project-conf-files_services-rabbit.md +++ b/guides/v2.1/cloud/project/project-conf-files_services-rabbit.md @@ -1,12 +1,6 @@ --- group: cloud-guide -subgroup: 090_configure title: Set up RabbitMQ service -menu_title: Set up RabbitMQ service -menu_order: 75 -menu_node: -level3_menu_node: level3child -level3_subgroup: services functional_areas: - Cloud - Setup @@ -33,7 +27,7 @@ rabbitmq: disk: 1024 ``` -To configure the relationships for the environment variable, set a relationship in your `.magento.app.yaml` in the Git branch. For example: +To configure the relationships for the environment variable, set a relationship in your `.magento.app.yaml` file. For example: ```yaml relationships: @@ -46,68 +40,61 @@ Merge and deploy the code to set the configurations for RabbitMQ. For informatio We use the {{site.data.var.ece}} environment variable [`$MAGENTO_CLOUD_RELATIONSHIPS`]({{ page.baseurl }}/cloud/env/environment-vars_cloud.html), a JSON object, to retrieve environment-related relationships. -To verify this information used for configurations and settings: +{% include cloud/pretty-print-services.md %} -1. SSH into the Integration environment with RabbitMQ installed and configured. -2. Enter the following command to pretty-print connection information for RabbitMQ: +## Connect to RabbitMQ for debugging {#connect} - php -r 'print_r(json_decode(base64_decode($_ENV["MAGENTO_CLOUD_RELATIONSHIPS"])));' +For debugging purposes, it is useful to directly connect to a service instance in one of the following ways: -The response includes all relationships for services and configuration data for that environment. In the response, you will locate data similar to the following for RabbitMQ: +- [Connect from your local development environment](#cloud-rabbitmq-conn-loc) +- [Connect from the application](#cloud-rabbitmq-conn-cont) +- [Connect from your PHP application](#cloud-rabbitmq-conn-php) -``` -{ - "rabbitmq" : [ - { - "password" : "guest", - "ip" : "246.0.129.2", - "scheme" : "amqp", - "port" : 5672, - "host" : "rabbitmq.internal", - "username" : "guest" - } - ] -} -``` +### Connect from your local development environment {#cloud-rabbitmq-conn-loc} -## Connect to RabbitMQ for debugging {#connect} +You can do this using [SSH tunneling]({{ page.baseurl }}/cloud/env/environments-start.html#env-start-tunn): -For debugging purposes, it's sometimes useful to directly connect to a service instance in one of the following ways: +1. Use SSH to log in to the Integration environment with RabbitMQ installed and configured. -* [Connect from your local development environment](#cloud-rabbitmq-conn-loc) -* [Connect from the application](#cloud-rabbitmq-conn-cont) -* [Connect from your PHP application](#cloud-rabbitmq-conn-php) +1. Log in to the Magento Cloud CLI and project: -### Connect from your local development environment {#cloud-rabbitmq-conn-loc} + ```bash + magento-cloud login + ``` -You can do this using [SSH tunneling]({{ page.baseurl }}/cloud/env/environments-start.html#env-start-tunn): +1. Open a tunnel to the application. + + ```bash + magento-cloud tunnel:open + ``` + +1. Pretty-print the relationships. This lets you see which username and password to use, and you can verify the remote service's port. -1. SSH into the Integration environment with RabbitMQ installed and configured. -2. Login to the Magento Cloud CLI and project: + ```bash + php -r 'print_r(json_decode(base64_decode($_ENV["MAGENTO_CLOUD_RELATIONSHIPS"])));' + ``` - magento-cloud login -2. Use `magento-cloud tunnel:open` to open a tunnel to the app. For information on this command, add `--help`. -2. Use the following command to pretty-print your relationships. This lets you see which username and password to use, and you can verify the remote service's port. +1. Enable local port forwarding to RabbitMQ. - php -r 'print_r(json_decode(base64_decode($_ENV["MAGENTO_CLOUD_RELATIONSHIPS"])));' -3. Use the `ssh -L` command to enable local port forwarding to RabbitMQ as follows: + ```bash + ssh -L :mq.internal: -@ssh.us.magentosite.cloud + ``` - ssh -L :mq.internal: -@ssh.us.magentosite.cloud -4. While the session is open, you can start a RabbitMQ client of your choice from your local workstation, configured to connect to the `localhost: 1, ... ); ``` +{: .no-copy} ### `SCD_MAX_EXECUTION_TIME` @@ -101,9 +103,8 @@ Use the `X_FRAME_CONFIGURATION` variable to change the [`X-Frame-Options`]({{ pa Add the `X_FRAME_CONFIGURATION` environment variable to the `global` stage in the `.magento.env.yaml` file: - ```yaml stage: global: X_FRAME_CONFIGURATION: SAMEORIGIN -``` +``` \ No newline at end of file diff --git a/guides/v2.2/cloud/project/project-conf-files_magento-app.md b/guides/v2.2/cloud/project/project-conf-files_magento-app.md index b0539b21206..13141ba3f28 100644 --- a/guides/v2.2/cloud/project/project-conf-files_magento-app.md +++ b/guides/v2.2/cloud/project/project-conf-files_magento-app.md @@ -21,6 +21,7 @@ The `.magento.app.yaml` has many default values, see [a sample `.magento.app.yam Use the following properties to build your application configuration file. The `name`, `type`, `disk`, and one `web` or `worker` block is required. ### `name` + {{site.data.var.ee}} supports multiple applications in a project, so you need a unique name that identifies the application in the project. You must use lower case alphanumeric characters, such as `a` to `z` and `0` to `9` for the name. The name is used in the [`routes.yaml`]({{ page.baseurl }}/cloud/project/project-conf-files_routes.html) file to define the HTTP upstream (by default, `php:http`). For example, if the value of `name` is `app`, you must use `app:http` in the upstream field. You can also use this name in multi-application relationships. @@ -29,6 +30,7 @@ The name is used in the [`routes.yaml`]({{ page.baseurl }}/cloud/project/project Do not change the name of an application after it has been deployed. ### `type` and `build` + The `type` and `build` properties provide information about the base container image to build and run the project. The supported `type` language is {% glossarytooltip bf703ab1-ca4b-48f9-b2b7-16a81fd46e02 %}PHP{% endglossarytooltip %}. Specify the PHP version as follows: @@ -45,6 +47,7 @@ build: ``` ### `access` + The _access_ property indicates a minimum user role level that is allowed SSH access to the environments. The available user roles are: - `admin`—Can change settings and execute actions in the environment. Also has _contributor_ and _viewer_ rights. @@ -59,9 +62,10 @@ access: ``` ### `relationships` + Defines the service mapping in your application. -The left-hand side is the name of the relationship as it will be exposed to the application in the `MAGENTO_CLOUD_RELATIONSHIPS` environment variable. The right-hand side is in the form `:`, where `` comes from `.magento/services.yaml` and `` should be the same as the value of `type` declared in that same file. +The left-hand side is the name of the relationship as it will be exposed to the application in the `MAGENTO_CLOUD_RELATIONSHIPS` environment variable. The right-hand side is in the form `:`, where `` comes from `.magento/services.yaml` and `` should be the same as the value of `type` declared in that same file. Example of valid options are: @@ -75,6 +79,7 @@ search: "searchengine:solr" See [Services]({{page.baseurl}}/cloud/project/project-conf-files_services.html) for a full list of currently supported service types and endpoints. ### `web` + The `web` property defines how your application is exposed to the web (in HTTP). It determines how the web application serves content— from the front-controller script to a non-static request to an `index.php` file on the root. We support any directory structure so the static file can be in a sub directory, and the `index.php` file can be further down. You can specify the following attributes for the `web` property: @@ -135,6 +140,7 @@ web: ``` ### `disk` + Defines the persistent disk size of the application in MB. ```yaml @@ -145,6 +151,7 @@ disk: 2048 The minimal recommended disk size is 256MB. If you see the error `UserError: Error building the project: Disk size may not be smaller than 128MB`, increase the size to 256MB. ### `mounts` + An object whose keys are paths relative to the root of the application. The mount is a writable area on the disk for files. The following is a default list of mounts configured in the `magento.app.yaml` file using the `volume_id[/subpath]` syntax: ```yaml @@ -171,6 +178,7 @@ The subpath portion of the mount is the unique identifier of the files area. If You can make the mount web accessible by adding it to the [`web`](#web) block of locations. ### `dependencies` + Enables you to specify dependencies that your application might need during the build process. {{site.data.var.ee}} supports dependencies on the following @@ -192,10 +200,13 @@ nodejs: ``` ### `hooks` + Use the `hooks` section to run shell commands during the build, deploy, and post-deploy phases: - **`build`**—Execute commands _before_ packaging your application. Services, such as the database or Redis, are not available at this time since the application has not been deployed yet. You must add custom commands _before_ the default `php ./vendor/bin/ece-tools` command so that custom-generated content continues to the deployment phase. + - **`deploy`**—Execute commands _after_ packaging and deploying your application. You can access other services at this point. Since the default `php ./vendor/bin/ece-tools` command copies the `app/etc` directory to the correct location, you must add custom commands _after_ the deploy command to prevent custom commands from failing. + - **`post_deploy`**—Execute commands _after_ deploying your application and _after_ the container begins accepting connections. The `post_deploy` hook clears the cache and preloads (warms) the cache. You can customize the list of pages using the `WARM_UP_PAGES` variable in the [Post-deploy stage]({{ site.baseurl }}/guides/v2.1/cloud/env/variables-post-deploy.html). It is available only for Pro projects that contain [Staging and Production environments in the Project Web UI]({{ page.baseurl }}/cloud/trouble/pro-env-management.html) and for Starter projects. Although not required, this works in tandem with the `SCD_ON_DEMAND` environment variable. Add CLI commands under the `build`, `deploy`, or `post_deploy` sections _before_ the `ece-tools` command: @@ -236,9 +247,9 @@ The commands run from the application (`/app`) directory. You can use the `cd` c ```yaml dependencies: ruby: - sass: "3.4.7" + sass: "3.4.7" nodejs: - grunt-cli: "~0.1.13" + grunt-cli: "~0.1.13" hooks: build: | @@ -252,6 +263,7 @@ hooks: You must compile Sass files using `grunt` before static content deployment, which happens during the build. Place the `grunt` command before the `build` command. ### `crons` + Describes processes that are triggered on a schedule. We recommend you run `cron` as the [Magento file system owner]({{page.baseurl}}/cloud/before/before-workspace-file-sys-owner.html). Do _not_ run cron as `root` or as the web server user. `crons` support the following: @@ -285,10 +297,10 @@ The following environment variables are included in `.magento.app.yaml`. These a ```yaml variables: - env: - CONFIG__DEFAULT__PAYPAL_ONBOARDING__MIDDLEMAN_DOMAIN: 'payment-broker.magento.com' - CONFIG__STORES__DEFAULT__PAYMENT__BRAINTREE__CHANNEL: 'Magento_Enterprise_Cloud_BT' - CONFIG__STORES__DEFAULT__PAYPAL__NOTATION_CODE: 'Magento_Enterprise_Cloud' + env: + CONFIG__DEFAULT__PAYPAL_ONBOARDING__MIDDLEMAN_DOMAIN: 'payment-broker.magento.com' + CONFIG__STORES__DEFAULT__PAYMENT__BRAINTREE__CHANNEL: 'Magento_Enterprise_Cloud_BT' + CONFIG__STORES__DEFAULT__PAYPAL__NOTATION_CODE: 'Magento_Enterprise_Cloud' ``` ## Configure PHP options @@ -311,27 +323,31 @@ You can define additional PHP extensions to enable or disable: ```yaml runtime: - extensions: - - xdebug - - redis - - ssh2 - disabled_extensions: - - sqlite3 + extensions: + - xdebug + - redis + - ssh2 + disabled_extensions: + - sqlite3 ``` -To view the current list of PHP extensions, SSH into your environment and enter the following command: +#### To view the current list of PHP extensions: - php -m +Use SSH to log in to your environment and list the PHP extensions as follows: + +```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: +- PHP 7 only: + - [json](http://php.net/manual/en/book.json.php) + - [iconv](http://php.net/manual/en/book.iconv.php) - - [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) @@ -391,13 +407,17 @@ Configuring PHP settings improperly can cause issues. We recommend only advanced For example, if you need to increase the PHP memory limit: - memory_limit = 756M +```bash +memory_limit = 756M +``` For a list of recommended PHP configuration settings, see [Required PHP settings]({{ page.baseurl }}/install-gde/prereq/php-settings.html). After pushing your file, you can check that the custom PHP configuration has been added to your environment by [creating an SSH tunnel]({{ page.baseurl }}/cloud/env/environments-start.html#env-start-tunn) to your environment and entering: - cat /etc/php5/fpm/php.ini +```bash +cat /etc/php5/fpm/php.ini +``` ## Workers diff --git a/guides/v2.2/cloud/project/project-conf-files_services-elastic.md b/guides/v2.2/cloud/project/project-conf-files_services-elastic.md index cd862b32a20..03aaab82d6f 100644 --- a/guides/v2.2/cloud/project/project-conf-files_services-elastic.md +++ b/guides/v2.2/cloud/project/project-conf-files_services-elastic.md @@ -9,10 +9,10 @@ functional_areas: [Elasticsearch](https://www.elastic.co) is an open source product that enables you to take data from any source, any format, and search and visualize it in real time. -* Elasticsearch performs quick and advanced searches on products in the product catalog -* Elasticsearch Analyzers support multiple languages -* Supports stop words and synonyms -* Indexing does not impact customers until the reindex operation completes +- Elasticsearch performs quick and advanced searches on products in the product catalog +- Elasticsearch Analyzers support multiple languages +- Supports stop words and synonyms +- Indexing does not impact customers until the reindex operation completes {{site.data.var.ee}} supports [Elasticsearch]({{ site.baseurl }}/guides/v2.2/config-guide/elasticsearch/es-overview.html) versions 1.4, 1.7, 2.4, and 5.2 (requires {{site.data.var.ee}} v2.2.3 or later). The recommended version is 5.2. @@ -25,21 +25,21 @@ If you are upgrading to {{site.data.var.ee}} 2.1.3, you must change your configu ```yaml elasticsearch: - type: elasticsearch:5.2 - disk: 1024 + type: elasticsearch:5.2 + disk: 1024 ``` 1. Set the `relationships` property in the `.magento.app.yaml` file. ```yaml relationships: - elasticsearch: "elasticsearch:elasticsearch" + elasticsearch: "elasticsearch:elasticsearch" ``` 1. Add, commit, and push code changes. ```bash - git add -A && git commit -m "Enable Elasticsearch" && git push origin + git add -A && git commit -m "Enable Elasticsearch" && git push origin ``` For information on how these changes affect your environments, see [Services]({{ page.baseurl }}/cloud/project/project-conf-files_services.html). @@ -52,31 +52,31 @@ Optionally, you can add plugins with the `.magento/services.yaml` file. For exam ```yaml elasticsearch: - type: elasticsearch:5.2 - disk: 1024 - configuration: + type: elasticsearch:5.2 + disk: 1024 + configuration: plugins: - - analysis-icu - - lang-python + - analysis-icu + - lang-python ``` The following are supported Elasticsearch plugins for version 2.4: -* `analysis-icu`: ICU Analysis Plugin, Support ICU Unicode text analysis -* `analysis-kuromoji`: Japanese (kuromoji) Analysis Plugin, Japanese language support -* `analysis-phonetic`: Phonetic Analysis Plugin, Phonetic analysis -* `analysis-smartcn`: Smart Chinese Analysis Plugins -* `analysis-stempel`: Stempel Polish Analysis Plugin -* `cloud-aws`: AWS Cloud Plugin, allows storing indices on AWS S3 -* `cloud-azure`: Azure Cloud Plugin -* `cloud-gce`: GCE Cloud Plugin -* `delete-by-query`: Support for deleting documents matching a given query -* `discovery-multicast`: Ability to form a cluster using TCP/IP multicast messages -* `lang-javascript`: JavaScript language plugin, allows the use of JavaScript in Elasticsearch scripts -* `lang-python`: Python language plugin, allows the use of Python in Elasticsearch scripts -* `mapper-attachments`: Mapper attachments plugin for indexing common file types -* `mapper-murmur3`: Murmur3 mapper plugin for computing hashes at index-time -* `mapper-size`: Size mapper plugin, enables the `_size` meta field +- `analysis-icu`: ICU Analysis Plugin, Support ICU Unicode text analysis +- `analysis-kuromoji`: Japanese (kuromoji) Analysis Plugin, Japanese language support +- `analysis-phonetic`: Phonetic Analysis Plugin, Phonetic analysis +- `analysis-smartcn`: Smart Chinese Analysis Plugins +- `analysis-stempel`: Stempel Polish Analysis Plugin +- `cloud-aws`: AWS Cloud Plugin, allows storing indices on AWS S3 +- `cloud-azure`: Azure Cloud Plugin +- `cloud-gce`: GCE Cloud Plugin +- `delete-by-query`: Support for deleting documents matching a given query +- `discovery-multicast`: Ability to form a cluster using TCP/IP multicast messages +- `lang-javascript`: JavaScript language plugin, allows the use of JavaScript in Elasticsearch scripts +- `lang-python`: Python language plugin, allows the use of Python in Elasticsearch scripts +- `mapper-attachments`: Mapper attachments plugin for indexing common file types +- `mapper-murmur3`: Murmur3 mapper plugin for computing hashes at index-time +- `mapper-size`: Size mapper plugin, enables the `_size` meta field {:.bs-callout .bs-callout-info} Magento does not support the ElasticSuite third-party plugin. @@ -87,25 +87,7 @@ See [Elasticsearch plugin documentation](https://www.elastic.co/guide/en/elastic {{site.data.var.ece}} uses the [MAGENTO_CLOUD_RELATIONSHIPS]({{ page.baseurl }}/cloud/env/variables-cloud.html) variable to retrieve the environment-related relationships. You must use this information when you [configure Elasticsearch through the Magento Admin]({{page.baseurl}}/config-guide/elasticsearch/configure-magento.html). -#### To print the connection information for Elasticsearch: - -```bash -php -r 'print_r(json_decode(base64_decode($_ENV["MAGENTO_CLOUD_RELATIONSHIPS"])));' -``` - -The response includes all relationships for services and configuration data for that environment; the Elasticsearch information is similar to the following: - -```terminal -"elasticsearch" : [ - { - "host" : "elasticsearch.internal", - "ip" : "250.0.97.96", - "scheme" : "http", - "port" : "9200" - } - ], -``` -{: .no-copy} +{% include cloud/pretty-print-services.md %} {:.bs-callout .bs-callout-warning} -The Staging and Production environments share a single Elasticsearch instance; therefore, you must specify a unique Elasticsearch prefix for each environment. +The Staging and Production environments share a single Elasticsearch instance; therefore, you must specify a unique Elasticsearch prefix for each environment. \ No newline at end of file diff --git a/guides/v2.2/cloud/project/project-conf-files_services.md b/guides/v2.2/cloud/project/project-conf-files_services.md index 36ab850a168..e07d0c30d25 100644 --- a/guides/v2.2/cloud/project/project-conf-files_services.md +++ b/guides/v2.2/cloud/project/project-conf-files_services.md @@ -18,22 +18,26 @@ The `.magento.app.yaml` and `services.yaml` files set the services, applications This affects the following environments: -* All Starter environments including Production `master` -* Pro Integration environments +- All Starter environments including Production `master` +- Pro Integration environments To install and update services in Pro Staging and Production environments (IaaS), you must enter a [Support ticket]({{ page.baseurl }}/cloud/trouble/trouble.html). Indicate the service changes needed and your updated `.magento.app.yaml` and `services.yaml` files in the ticket. ## Default and supported services {#cloud-yaml-services-default} -Your Git branch includes the following default `services.yaml` file: +A Cloud template includes the following [default `services.yaml` file](https://github.com/magento/magento-cloud/blob/master/.magento/services.yaml): ```yaml mysql: - type: mysql:10.0 - disk: 2048 + type: mysql:10.0 + disk: 2048 redis: - type: redis:3.0 + type: redis:3.0 + +elasticsearch: + type: elasticsearch:6.5 + disk: 1024 ``` Modify this file to use specific and additional services in your deployment. See the [`type`](#cloud-yaml-services-type) section to see the services we support and deploy for you if you add them to the file. @@ -44,52 +48,54 @@ To add a service, you add the following data to services.yaml: ```yaml name: - type: name:version - disk: value + type: name:version + disk: value ``` For example: ```yaml mysql: - type: mysql:10.0 - disk: 2048 + type: mysql:10.0 + disk: 2048 ``` ### `name` {#cloud-yaml-services-name} -`name` identifies the service in the project. The `name` can consist only of lower case alphanumeric characters: `a`–`z` and `0`–`9`. For example, Redis is entered as redis. + +Identifies the service in the project. The `name` can consist only of lower case alphanumeric characters: `a` to `z` and `0` to `9`. For example, Redis is entered as `redis`. You can have multiple instances of each service type. For example, you could have multiple Redis instances. For example, we use multiple Redis instances, one for session and one for cache. ```yaml redis: - type: redis:3.0 + type: redis:3.0 redis2: - type: redis:3.0 + type: redis:3.0 ``` -Be aware, if you rename a service in `services.yaml`, the following is **permanently removed**: +Be aware, if you rename a service in the `services.yaml` file, the following is **permanently removed**: -* The existing service before creating a new service with the new name you specify. -* All existing data for the service is removed. We strongly recommend you [snapshot your environment]({{ page.baseurl }}/cloud/project/project-webint-snap.html) before you change the name of an existing service. +- The existing service before creating a new service with the new name you specify. +- All existing data for the service is removed. We strongly recommend you [snapshot your environment]({{ page.baseurl }}/cloud/project/project-webint-snap.html) before you change the name of an existing service. ### `type` {#cloud-yaml-services-type} -The `type` of your service in the format `type:version` + +The `type` of your service in the format: `type:version` We support and deploy the following services for you: -* [`mysql`]({{ page.baseurl }}/cloud/project/project-conf-files_services-mysql.html) -* [`redis`]({{ page.baseurl }}/cloud/project/project-conf-files_services-redis.html) -* [`elasticsearch`]({{ page.baseurl }}/cloud/project/project-conf-files_services-elastic.html) -* [`rabbitmq`]({{ page.baseurl }}/cloud/project/project-conf-files_services-rabbit.html) +- [`mysql`]({{ page.baseurl }}/cloud/project/project-conf-files_services-mysql.html) +- [`redis`]({{ page.baseurl }}/cloud/project/project-conf-files_services-redis.html) +- [`elasticsearch`]({{ page.baseurl }}/cloud/project/project-conf-files_services-elastic.html) +- [`rabbitmq`]({{ page.baseurl }}/cloud/project/project-conf-files_services-rabbit.html) ### `disk` {#cloud-yaml-services-disk} -`disk` specifies the size of the persistent disk storage (in MB) allocated to the service. +Specifies the size of the persistent disk storage (in MB) allocated to the service. For example, the current default storage amount per project is 5GB, or 5120MB. You can distribute this amount between your application and each of its services. ## Using the services -For services to be available to an application in your project, you must specify [*relationships*]({{ page.baseurl }}/cloud/project/project-conf-files_magento-app.html#relationships) between applications and services in `.magento.app.yaml`. +For services to be available to an application in your project, you must specify [*relationships*]({{ page.baseurl }}/cloud/project/project-conf-files_magento-app.html#relationships) between applications and services in the `.magento.app.yaml` file. diff --git a/guides/v2.3/cloud/project/project-conf-files_services-elastic.md b/guides/v2.3/cloud/project/project-conf-files_services-elastic.md index 6ce2d5cc060..412b982a353 100644 --- a/guides/v2.3/cloud/project/project-conf-files_services-elastic.md +++ b/guides/v2.3/cloud/project/project-conf-files_services-elastic.md @@ -49,12 +49,12 @@ Optionally, you can add plugins with the `.magento/services.yaml` file. For exam ```yaml elasticsearch: - type: elasticsearch:6.5 - disk: 1024 - configuration: + type: elasticsearch:6.5 + disk: 1024 + configuration: plugins: - - analysis-icu - - lang-python + - analysis-icu + - lang-python ``` {:.bs-callout .bs-callout-info}