services.yaml

services.yaml overview

Magento Enterprise Cloud Edition provides services such as MySQL, PHP, Redis, Solr, and so on. You don’t need to subscribe to external service providers.

This file is located at .magento/services.yaml in your project.

When you push your local environment to the remote server, our deploy script uses the values defined by configuration files in the .magento directory, then the script deletes the directory and its contents. Your local development environment isn't affected.

Sample services.yaml file

Changes you make using .yaml files affect your integration environment only. For technical reasons, neither staging nor production environments use .yaml files. To make these changes in a staging or production environment, you must create a Support issue.

The following sections discuss properties in services.yaml.

Defaults

If you do not provide a services.yaml file, the following defaults are used:

mysql:
   type: mysql:10.0
   disk: 2048

redis:
   type: redis:3.0

solr:
   type: solr:4.10
   disk: 1024

name

name identifies the service in the project. name can consist only of lower case alphanumeric characters; that is, az and 09.

Usually you will see in our examples that we simply call the mysql: mysql. Note that you can have multiple instances of each service.

Because we support multiple services of the same type (for example, multiple databases), changing the name of a service in services.yaml causes the existing service to be permanently removed before creating a new service with the new name you specify. Renaming a service results in the loss of all of that service's data. We strongly recommend you snapshot your environment before you change the name of an existing service.

type

The type of your service in the format type:version

We support and deploy the following services for you:

  • mysql version 10.0
  • redis versions 2.8 and 3.0
  • solr version 4.0
  • elasticsearch version 1.7
  • rabbitmq version 3.5

disk

disk 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 (meaning 5120MB), which you can distribute between your application and each of its services. (See .magento.app.yaml.)

Using the services

For services to be available to an application in your project, you must specify relationships between applications and services in .magento.app.yaml.