You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
* MAGECLOUD-2739 update services with required values
* clarify role of the config files
* Update examples
* Update project-conf-files_services-redis.md
* apply technical feedback and update examples
* forgot disk value example
* simplified the relationships property
* typos
* describe relationships and scrub pretty print
* Apply suggestions from code review
Co-Authored-By: Margaret Eker <meker@adobe.com>
* updates from feedback
* fix the environment steps
Copy file name to clipboardExpand all lines: guides/v2.2/cloud/project/project-conf-files_magento-app.md
+13-8Lines changed: 13 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,17 +59,22 @@ access:
59
59
60
60
### `relationships`
61
61
62
-
Defines the service mapping in your application.
62
+
Defines the service mapping in the application.
63
63
64
-
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.
65
-
66
-
Example of valid options are:
64
+
The relationship `name` is available to the application in the `MAGENTO_CLOUD_RELATIONSHIPS` environment variable. The `<service-name>:<endpoint-name>` relationship maps to the name and type values defined in the `.magento/services.yaml` file.
67
65
66
+
```yaml
67
+
relationships:
68
+
<name>: "<service-name>:<endpoint-name>"
68
69
```
69
-
database: "mysql:mysql"
70
-
database2: "mysql2:mysql"
71
-
cache: "arediscache:redis"
72
-
search: "searchengine:solr"
70
+
71
+
The following is an example of the default relationships:
72
+
73
+
```yaml
74
+
relationships:
75
+
database: "mysql:mysql"
76
+
redis: "redis:redis"
77
+
elasticsearch: "elasticsearch:elasticsearch"
73
78
```
74
79
75
80
See [Services]({{page.baseurl}}/cloud/project/project-conf-files_services.html) for a full list of currently supported service types and endpoints.
Copy file name to clipboardExpand all lines: guides/v2.2/cloud/project/project-conf-files_services-elastic.md
+1-7Lines changed: 1 addition & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ functional_areas:
41
41
42
42
For information on how these changes affect your environments, see [Services]({{ page.baseurl }}/cloud/project/project-conf-files_services.html).
43
43
44
-
1. [Verify the relationships](#verify-relationships) and configure Elasticsearch in the Admin UI.
44
+
1. [Verify the relationships]({{page.baseurl}}/cloud/project/project-conf-files_services.html#service-relationships) and configure Elasticsearch in the Admin UI.
45
45
46
46
### Add Elasticsearch plugins
47
47
@@ -80,11 +80,5 @@ See [Elasticsearch plugin documentation](https://www.elastic.co/guide/en/elastic
80
80
{:.bs-callout-info}
81
81
If you use the ElasticSuite third-party plugin, you must [update the `{{site.data.var.ct}}` package]({{page.baseurl}}/cloud/project/ece-tools-update.html) to version 2002.0.19 or later.
82
82
83
-
## Verify relationships
84
-
85
-
{{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).
86
-
87
-
{% include cloud/pretty-print-services.md %}
88
-
89
83
{: .bs-callout-warning}
90
84
Staging and Production environments that are in the same cluster share a single Elasticsearch instance, so you must specify a unique Elasticsearch prefix for each of these environments.
Copy file name to clipboardExpand all lines: guides/v2.2/cloud/project/project-conf-files_services-mysql.md
+54-38Lines changed: 54 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,40 +6,77 @@ functional_areas:
6
6
- Setup
7
7
---
8
8
9
-
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).
9
+
The `mysql` service provides persistent 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.
10
10
11
-
We support MariaDB version 10.0, which includes reimplemented features from MySQL 5.6 and 5.7.
11
+
We support MariaDB version 10.2, which includes reimplemented features from MySQL 5.6 and 5.7.
12
12
13
-
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:
13
+
#### To access the MariaDB database directly:
14
+
15
+
Using SSH, log in to the remote server and connect to the database.
16
+
17
+
For Starter:
14
18
15
19
```bash
16
-
mysql -h database.internal -u user
20
+
mysql -h database.internal -u <username>
17
21
```
18
22
19
-
{% include cloud/service-config-integration-starter.md %}
23
+
For Pro, use the db, username, and password from the relationship:
24
+
25
+
```bash
26
+
mysql -h<db> -p<number> -u<username> -p<password>
27
+
```
28
+
29
+
## Enable MySQL
30
+
31
+
1. Add the required name, type, and disk value (in MB) to the `.magento/services.yaml` file.
32
+
33
+
```yaml
34
+
mysql:
35
+
type: mysql:10.2
36
+
disk: 2048
37
+
```
38
+
39
+
1. Configure the relationships in the `.magento.app.yaml` file.
40
+
41
+
```yaml
42
+
relationships:
43
+
database: "mysql:mysql"
44
+
```
45
+
46
+
1. Add, commit, and push your code changes.
47
+
48
+
```bash
49
+
git add -A && git commit -m "Enable mysql service" && git push origin <branch-name>
50
+
```
51
+
52
+
1. [Verify the relationships]({{page.baseurl}}/cloud/project/project-conf-files_services.html#service-relationships).
53
+
54
+
{: .bs-callout-info }
55
+
- 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.
56
+
- 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).
20
57
21
-
## Set up multiple database users {#cloud-appyaml-mysqlusers}
58
+
## Set up multiple database users
22
59
23
60
Optionally, you can set up multiple databases as well as multiple users with different permissions.
24
61
25
-
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.
62
+
An _endpoint_ is a set of credentials (or users) with specific privileges. 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 define multiple endpoints in the services.yaml file and declare the relationships in the .magento.app.yaml file.
26
63
27
-
{:.bs-callout .bs-callout-warning}
64
+
{: .bs-callout-warning}
28
65
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.
29
66
30
-
To specify user access, use the `endpoints` nested array. Each endpoint can have access to one or more schemas (databases), and can have different levels of permission on each.
67
+
Use a nested array to define the endpoints for specific user access. Each endpoint can designate access to one or more schemas (databases) and different levels of permission on each.
31
68
32
69
The valid permission levels are:
33
70
34
71
- `ro`: Only SELECT queries are allowed.
35
-
-`rw`: SELECT queries as well as INSERT/UPDATE/DELETE queries are allowed.
72
+
- `rw`: SELECT queries and INSERT, UPDATE, and DELETE queries are allowed.
36
73
- `admin`: All queries are allowed, including DDL queries (CREATE TABLE, DROP TABLE, and so on).
37
74
38
75
If no endpoints are defined, a single endpoint named `mysql` has `admin` access to the `main` database. For example:
39
76
40
77
```yaml
41
-
mysqldb:
42
-
type: mysql:10.0
78
+
mysql:
79
+
type: mysql:10.2
43
80
disk: 2048
44
81
configuration:
45
82
schemas:
@@ -55,40 +92,19 @@ mysqldb:
55
92
importer:
56
93
privileges:
57
94
main: rw
58
-
59
95
```
60
96
61
-
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:
97
+
In the preceding example, the `admin` endpoint provides admin-level access to the `main` database, the `reporter` endpoint provides read-only access, and the `importer` endpoint provides read-write access. This means that:
62
98
63
99
- The `admin` user has full control of the database.
64
100
- The `repoter` user has SELECT privileges only.
65
101
- The `importer` user has SELECT, INSERT, UPDATE, and DELETE privileges.
66
102
67
-
## Add MySQL in services.yaml and .magento.app.yaml {#settings}
68
-
69
-
To enable MySQL, add the following code with your installed version and allocated disk space in MB to `.magento/services.yaml`.
70
-
71
-
```yaml
72
-
mysql:
73
-
type: mysql:10.0
74
-
disk: 2048
75
-
```
76
-
77
-
To configure the relationships for the environment variable, set a relationship in your `.magento.app.yaml` in the Git branch. For example:
103
+
You must add the endpoints defined in the above example to the `relationships` property of the `.magento.app.yaml` file. For example:
78
104
79
105
```yaml
80
106
relationships:
81
-
database: "mydatabase:mysql"
107
+
database: "mysql:admin"
108
+
databasereporter: "mysql:reporter"
109
+
databaseimporter: "mysql:importer"
82
110
```
83
-
84
-
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).
85
-
86
-
{: .bs-callout-info }
87
-
- 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.
88
-
- 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).
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.
Copy file name to clipboardExpand all lines: guides/v2.2/cloud/project/project-conf-files_services-rabbit.md
+1-11Lines changed: 1 addition & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,12 +36,6 @@ relationships:
36
36
37
37
Merge and deploy the code to set the configurations for RabbitMQ. For information on how these changes affect your environments, see [`services.yaml`]({{ page.baseurl }}/cloud/project/project-conf-files_services.html).
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.
42
-
43
-
{% include cloud/pretty-print-services.md %}
44
-
45
39
## Connect to RabbitMQ for debugging {#connect}
46
40
47
41
For debugging purposes, it is useful to directly connect to a service instance in one of the following ways:
@@ -68,11 +62,7 @@ You can do this using [SSH tunneling]({{ page.baseurl }}/cloud/env/environments-
68
62
magento-cloud tunnel:open
69
63
```
70
64
71
-
1. Pretty-print the relationships. This lets you see which username and password to use, and you can verify the remote service's port.
Copy file name to clipboardExpand all lines: guides/v2.2/cloud/project/project-conf-files_services-redis.md
+24-24Lines changed: 24 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,40 +12,40 @@ We support Redis versions 2.8, 3.0, and 5.0. Redis 3.0 supports up to 64 differe
12
12
13
13
{% include cloud/service-config-integration-starter.md %}
14
14
15
-
## Add Redis in configuration files {#settings}
15
+
## Enable Redis
16
16
17
-
To enable Redis, add your installed version and allocated disk space in MB to `.magento/services.yaml` file:
17
+
1. Add the required name and type to the `.magento/services.yaml` file.
18
18
19
-
```yaml
20
-
myredis:
21
-
type: redis:3.0
22
-
```
19
+
```yaml
20
+
redis:
21
+
type: redis:3.2
22
+
```
23
23
24
-
To provide your own Redis configuration, add a `core_config` key in your `.magento/services.yaml` file:
24
+
To provide your own Redis configuration, add a `core_config` key in your `.magento/services.yaml` file:
25
25
26
-
```yaml
27
-
cache:
28
-
type: redis:3.0
29
-
```
26
+
```yaml
27
+
cache:
28
+
type: redis:3.2
29
+
```
30
30
31
-
To configure relationships for an environment variable in your `.magento.app.yaml` file:
31
+
1. Configure the relationships in the `.magento.app.yaml` file.
32
32
33
-
```yaml
34
-
runtime:
35
-
extensions:
36
-
- redis
33
+
```yaml
34
+
runtime:
35
+
extensions:
36
+
- redis
37
37
38
-
relationships:
39
-
redis: "myredis:redis"
40
-
```
38
+
relationships:
39
+
redis: "redis:redis"
40
+
```
41
41
42
-
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).
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.
47
-
48
-
{% include cloud/pretty-print-services.md %}
48
+
1. [Verify the relationships]({{page.baseurl}}/cloud/project/project-conf-files_services.html#service-relationships).
0 commit comments