Magento Commerce (Cloud) 2.1.3 and 2.0.11 Release Notes
These Release Notes provide up-to-date information about changes, additions, and fixes to the Magento Enterprise Cloud Edition for versions 2.1.3 and 2.0.11.
Changes in this release
- Staging and Production environments in the UI for Pro projects. You can enter a ticket to have your project updated. For more information, see Add Staging and Production to Pro projects UI.
Required update to .magento.app.yaml
Before you upgrade to version 2.1.3 or 2.0.11, you must add a rule to the web
section of your .magento.app.yaml
file. You must make the change in your local system, push it to your integration environment, then, after upgrading, push the changes to the staging and production environments. See Magento Commerce Cloud architecture.
Get started
- Log in to your local development system, or switch to, the Magento file system owner.
- Change to a directory to which the Magento file system owner has write access.
-
Enter the following command in a terminal to log in to your project:
1
magento-cloud login
-
List your projects. With the project ID, you can complete additional commands.
1
magento-cloud project:list
-
If necessary, clone the project to your local. You should have cloned when setting up your local development workspace.
1
magento-cloud project:get <project ID>
- Change to a project directory. For example,
cd /var/www/html/magento2
-
List environments in the project. Every environment includes an active Git branch of your code, database, environment variables, configurations, and services.
1
magento-cloud environment:list
magento-cloud environment:list
—displays environment hierarchies whereas thegit branch
command does not. -
Fetch origin branches to get the latest code:
1
git fetch origin
-
Check out, or switch to, a specific branch and environment. Git commands only checkout the Git branch. The Magento Cloud command also switches to the active environment.
1
magento-cloud environment:checkout <environment ID>
To create a new environment, use
magento-cloud environment:branch <environment name> <parent environment ID>
-
Pull any updated code to your local for the environment ID (which is the Git branch):
1
git pull origin <environment ID>
-
Create a snapshot of the environment as a backup:
1
magento-cloud snapshot:create -e <environment ID>
Update .magento.app.yaml
- Open
<Magento root dir>/.magento.app.yaml
in a text editor. - Locate the
web:
section, and the/static
location in it. -
Add the following to the
rules:
clause:1 2
^/static/version\d+/(?<resource>.*)$: passthru: "/static/$resource"
The
/static
location should look like this after the change:1 2 3 4 5 6 7 8
"/static": root: "pub/static" allow: true scripts: false passthru: "/front-static.php" rules: ^/static/version\d+/(?<resource>.*)$: passthru: "/static/$resource"
- Save your changes to
.magento.app.yaml
and exit the text editor. - You may now upgrade to version 2.1.3 or 2.0.11.
Update your Elasticsearch configuration
This section discusses how to update your integration system to replace Solr with Elasticsearch. Currently, all Magento Enterprise Cloud Edition upgrades to 2.1.3 must perform these tasks.
Elasticsearch is supported by Magento Cloud Enterprise Edition 2.1.x only.
If you installed Magento Enterprise Cloud Edition 2.1.3 for the first time, you do not need to do this because Elasticsearch is already the default search engine.
To use Elasticsearch on a staging or production system, open a Support ticket and request Elasticsearch.
After installing Elasticsearch, you must do a full index of your fulltext index. This process can take a while if the index is large. The search functionality is unavailable until the process completes.
To use Elasticsearch, you must perform all the tasks discussed in this section.
Get started
- Log in to your local development system, or switch to, the Magento file system owner.
- Change to a directory to which the Magento file system owner has write access.
-
Enter the following command in a terminal to log in to your project:
1
magento-cloud login
-
List your projects. With the project ID, you can complete additional commands.
1
magento-cloud project:list
-
If necessary, clone the project to your local. You should have cloned when setting up your local development workspace.
1
magento-cloud project:get <project ID>
- Change to a project directory. For example,
cd /var/www/html/magento2
-
List environments in the project. Every environment includes an active Git branch of your code, database, environment variables, configurations, and services.
1
magento-cloud environment:list
magento-cloud environment:list
—displays environment hierarchies whereas thegit branch
command does not. -
Fetch origin branches to get the latest code:
1
git fetch origin
-
Check out, or switch to, a specific branch and environment. Git commands only checkout the Git branch. The Magento Cloud command also switches to the active environment.
1
magento-cloud environment:checkout <environment ID>
To create a new environment, use
magento-cloud environment:branch <environment name> <parent environment ID>
-
Pull any updated code to your local for the environment ID (which is the Git branch):
1
git pull origin <environment ID>
-
Create a snapshot of the environment as a backup:
1
magento-cloud snapshot:create -e <environment ID>
Step 1: Update .magento.app.yaml
-
Open
.magento.app.yaml
in a text editor.It’s located in your Magento Enterprise Cloud Edition project root directory.
- In the
relationships:
section, deletesolr: "solr:solr"
if it exists. -
Add
elasticsearch: "elasticsearch:elasticsearch"
A sample follows:
1 2 3 4
relationships: database: "mysql:mysql" elasticsearch: "elasticsearch:elasticsearch" redis: "redis:redis"
- Save your changes to
.magento.app.yaml
and exit the text editor.
Step 2: Update .magento/services.yaml
- Open
.magento/services.yaml
in a text editor. - Remove the entire
solr:
section. -
Add a new
elasticsearch:
section with the following contents:1 2 3
elasticsearch: type: elasticsearch:<version> disk: 1024
- Save your changes to
.magento/services.yaml
and exit the text editor.
Step 3: Push the changes and redeploy the environment
-
Add, commit, and push the changes:
1 2
git add -A && git commit -m "Add Elasticsearch" git push origin <branch name>
-
Wait for the project to deploy.
Step 4: Get Elasticsearch connection information
This section discusses how to get connection information for Elasticsearch so you can configure the Magento application to use it as your search engine.
-
Open an SSH tunnel to your integration environment.
1
magento-cloud environment:ssh
-
Enter the following command to get Elasticsearch connection details:
1
echo $MAGENTO_CLOUD_RELATIONSHIPS | base64 -d | json_pp
A sample follows:
1 2 3 4 5 6 7 8
"elasticsearch" : [ { "host" : "elasticsearch.internal", "ip" : "250.0.97.96", "scheme" : "http", "port" : "9200" } ],
- Write down the connection information.
- Enter
exit
to close the SSH tunnel. -
Log in to the Magento Admin as an administrator.
To view the Magento Admin connection details, enter the following commands:
1 2
magento-cloud environment:url magento-cloud variable:list
These two commands provide you with the environment’s base URL and Admin login information, respectively.
An example follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
magento-cloud environment:url Enter a number to choose a URL [0] https://mybranch-vyaprfq-dyrupdn6bw82h.us.magentosite.cloud/ [1] http://mybranch-vyaprfq-dyrupdn6bw82h.us.magentosite.cloud/ > 1 http://mybranch-vyaprfq-dyrupdn6bw82h.us.magentosite.cloud/ magento-cloud variable:list +----------------+---------------+-----------+------+ | ID | Value | Inherited | JSON | +----------------+---------------+-----------+------+ | ADMIN_PASSWORD | admin_A456 | Yes | No | | ADMIN_URL | magento_A8v10 | Yes | No | | ADMIN_USERNAME | meister_x2U8 | Yes | No | +----------------+---------------+-----------+------+
- Continue with the next section.
Step 5: Configure the Magento application to use Elasticsearch
Configure Magento using the instructions in the Magento configuration for Elasticsearch guide.
Fixed issue
Note the following issue in this release:
- The
magento setup:install
command (used for deployment) succeeds in either a staging or production system if a Magento database already exists.