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

MAGECLOUD-2114 fix YAML formatting #4574

Merged
merged 5 commits into from
May 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions _includes/cloud/pretty-print-services.md
Original file line number Diff line number Diff line change
@@ -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"])));'
```
3 changes: 1 addition & 2 deletions _includes/cloud/service-config-integration-starter.md
Original file line number Diff line number Diff line change
@@ -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).
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).
4 changes: 0 additions & 4 deletions guides/v2.1/cloud/configure/setup-cron-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: "* * * * *"
Expand Down Expand Up @@ -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: "* * * * *"
Expand Down
12 changes: 4 additions & 8 deletions guides/v2.1/cloud/env/environment-vars_magento.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,25 @@ 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

Use the ADMIN variables in the following table to override credentials for the Magento Admin user during installation.

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.
32 changes: 16 additions & 16 deletions guides/v2.1/cloud/env/setup-notifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ To configure notifications:
```yaml
log:
slack:
token: "<your-slack-token>"
channel: "<your-slack-channel>"
username: "SlackHandler"
min_level: "info"
token: "<your-slack-token>"
channel: "<your-slack-channel>"
username: "SlackHandler"
min_level: "info"
email:
to: <your-email>
from: <your-email>
subject: "Log notification from Magento Cloud"
min_level: "notice"
to: <your-email>
from: <your-email>
subject: "Log notification from Magento Cloud"
min_level: "notice"
```

{:.bs-callout .bs-callout-info}
Expand All @@ -67,10 +67,10 @@ The following example shows a Slack-only configuration:
```yaml
log:
slack:
token: "<your-slack-token>"
channel: "<your-slack-channel>"
username: "SlackHandler"
min_level: "info"
token: "<your-slack-token>"
channel: "<your-slack-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.
Expand All @@ -88,10 +88,10 @@ The following example shows an email-only configuration:
```yaml
log:
email:
to: <your-email>
from: <your-email>
subject: "Log notification from Magento Cloud"
min_level: "notice"
to: <your-email>
from: <your-email>
subject: "Log notification from Magento Cloud"
min_level: "notice"
```

- `to`—Email address {{site.data.var.ece}} sends notification messages.
Expand Down
22 changes: 11 additions & 11 deletions guides/v2.1/cloud/env/variables-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
9 changes: 5 additions & 4 deletions guides/v2.1/cloud/env/variables-global.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ stage:
global:
GLOBAL_VARIABLE_NAME: value
```

{% include cloud/customize-build-deploy.md %}

### `MIN_LOGGING_LEVEL`
Expand All @@ -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`
Expand All @@ -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`

Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions guides/v2.1/cloud/env/variables-post-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
60 changes: 40 additions & 20 deletions guides/v2.1/cloud/project/project-conf-files_magento-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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:
Expand All @@ -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.
Expand All @@ -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 `<service name>:<endpoint name>`, where `<service name>` comes from `.magento/services.yaml` and `<endpoint name>` 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 `<service-name>:<endpoint-name>`, where `<service-name>` comes from `.magento/services.yaml` and `<endpoint-name>` should be the same as the value of `type` declared in that same file.

Example of valid options are:

Expand All @@ -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:
Expand Down Expand Up @@ -141,6 +146,7 @@ web:
```

### `disk`

Defines the persistent disk size of the application in MB.

```yaml
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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: |
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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
```
Loading