Magento Enterprise Cloud Edition 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.

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 server, then, after upgrading, push the changes to staging and production.

Get started

To get started:
  1. Log in to your local development machine, or switch to, the Magento file system owner.
  2. Change to a directory to which the Magento file system owner has write access, such as the web server docroot.
  3. Log in to your project:

    magento-cloud login
    
  4. List your projects:

    magento-cloud project:list
    
  5. If necessary, clone a project.

    magento-cloud project:get <project ID>
    

    Typically, you should clone the project in the web server’s docroot or a Virtual Host docroot.

  6. Change to a project directory.

    For example, cd /var/www/html/magento2

  7. List environments in the project:

    magento-cloud environment:list
    

    magento-cloud environment:list displays environment hierarchies whereas git branch displays does not. If you have any nested environments, use magento-cloud environment:list.

  8. Fetch origin branches:

    git fetch origin
    
  9. Check out an environment:

    magento-cloud environment:checkout <environment ID>
    

    To create a new environment, use magento-cloud environment:branch <environment name> <parent environment ID>

  10. Pull updated code:

    git pull origin <environment ID>
    
  11. Create a snapshot of the environment.

    magento-cloud snapshot:create -e <environment ID>
    

Update .magento.app.yaml

To update `.magento.app.yaml`:
  1. Open <Magento root dir>/.magento.app.yaml in a text editor.
  2. Locate the web: section, and the /static location in it.
  3. Add the following to the rules: clause:

    ^/static/version\d+/(?<resource>.*)$:
         passthru: "/static/$resource"
    

    The /static location should look like this after the change:

    "/static":
        root: "pub/static"
        allow: true
        scripts: false
        passthru: "/front-static.php"
        rules:
            ^/static/version\d+/(?<resource>.*)$:
                passthru: "/static/$resource"
    
  4. Save your changes to .magento.app.yaml and exit the text editor.
  5. 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 don’t 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.

To use Elasticsearch, you must perform all the tasks discussed in this section.

Get started

To get started:
  1. Log in to your local development machine, or switch to, the Magento file system owner.
  2. Change to a directory to which the Magento file system owner has write access, such as the web server docroot.
  3. Log in to your project:

    magento-cloud login
    
  4. List your projects:

    magento-cloud project:list
    
  5. If necessary, clone a project.

    magento-cloud project:get <project ID>
    

    Typically, you should clone the project in the web server’s docroot or a Virtual Host docroot.

  6. Change to a project directory.

    For example, cd /var/www/html/magento2

  7. List environments in the project:

    magento-cloud environment:list
    

    magento-cloud environment:list displays environment hierarchies whereas git branch displays does not. If you have any nested environments, use magento-cloud environment:list.

  8. Fetch origin branches:

    git fetch origin
    
  9. Check out an environment:

    magento-cloud environment:checkout <environment ID>
    

    To create a new environment, use magento-cloud environment:branch <environment name> <parent environment ID>

  10. Pull updated code:

    git pull origin <environment ID>
    
  11. Create a snapshot of the environment.

    magento-cloud snapshot:create -e <environment ID>
    

Step 1: Update .magento.app.yaml

To update .magento.app.yaml:
  1. Open .magento.app.yaml in a text editor.

    It’s located in your Magento Enterprise Cloud Edition project root directory.

  2. In the relationships: section, delete solr: "solr:solr" if it exists.
  3. Add elasticsearch: "elasticsearch:elasticsearch"

    A sample follows:

    relationships:
       database: "mysql:mysql"
       elasticsearch: "elasticsearch:elasticsearch"
       redis: "redis:redis"
    
  4. Save your changes to .magento.app.yaml and exit the text editor.

Step 2: Update .magento/services.yaml

To update .magento/services.yaml:
  1. Open .magento/services.yaml in a text editor.
  2. Remove the entire solr: section.
  3. Add a new elasticsearch: section with the following contents:

    elasticsearch:
       type: elasticsearch:<version>
       disk: 1024
    
  4. Save your changes to .magento/services.yaml and exit the text editor.

Step 3: Push the changes and redeploy the environment

To push the changes:
  1. Add, commit, and push the changes:

    git add -A && git commit -m "Add Elasticsearch"
    git push origin <branch name>
    
  2. 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.

To get Elasticsearch connection information:
  1. Open an SSH tunnel to your integration environment.

    magento-cloud environment:ssh
    
  2. Enter the following command to get Elasticsearch connection details:

    echo $MAGENTO_CLOUD_RELATIONSHIPS | base64 -d | json_pp
    

    A sample follows:

     "elasticsearch" : [
       {
          "host" : "elasticsearch.internal",
          "ip" : "250.0.97.96",
          "scheme" : "http",
          "port" : "9200"
       }
    ],
    
  3. Write down the connection information.
  4. Enter exit to close the SSH tunnel.
  5. Log in to the Magento Admin as an administrator.

    To view the Magento Admin connection details, enter the following commands:

    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:

    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   |
    +----------------+---------------+-----------+------+
    
  6. Continue with the next section.

Step 5: Configure the Magento application to use Elasticsearch

To configure the Magento application:

This section discusses the minimum settings you must choose to test Elasticsearch with Magento 2. For additional details about configuring Elasticsearch, see the Magento EE User Guide.

To configure Magento to use Elasticsearch:

  1. Log in to the Magento Admin as an administrator.
  2. Click Stores > Settings > Configuration > Catalog > Catalog > Catalog Search.
  3. From the Search Engine list, click Elasticsearch as the following figure shows.

  4. The following table discusses only the configuration options required to test the connection with Magento.

    Unless you changed Elasticsearch server settings, the defaults should work. Skip to the next step.

    Option Description
    Elasticsearch Server Hostname

    Enter the fully qualified host name or IP address of the machine running Elasticsearch.

    Magento Enterprise Cloud Edition: Get this value from your integration system.

    Elasticsearch Server Port

    Enter the Elasticsearch web server proxy port. In our example, the port is 8080 but if you're using a secure proxy, it's typically 443.

    Magento Enterprise Cloud Edition: Get this value from your integration system.

    Enable Elasticsearch HTTP Auth Click Yes only if you enabled authentication for your Elasticsearch server. If so, provide a user name and password in the provided fields.
  5. Click Test Connection.

One of the following displays:

Result Meaning
Magento successfully connected to the Elasticsearch server. Continue with Configure Apache and Elasticsearch or Configure nginx and Elasticsearch.

Try the following:

  • Make sure the Elasticsearch server is running.
  • If the Elasticsearch server is on a different host from Magento, log in to the Magento server and ping the Elasticsearch host. Resolve network connectivity issues and test the connection again.
  • Examine the command window in which you started Elasticsearch for stack traces and exceptions. You must resolve those before you continue.
    In particular, make sure you started Elasticsearch as a user with root privileges.
  • Make sure that UNIX firewall and SELinux are both disabled, or set up rules to enable Elasticsearch and Magento to communicate with each other.
  • Verify the value of the Elasticsearch Server Hostname field. Make sure the server is available. You can try the server's IP address instead.
  • Use the command netstat -an | grep listen-port command to verify that the port specified in the Elasticsearch Server Port field is not being used by another process.
    For example, to see if Elasticsearch is running on its default port, use the following command:
    netstat -an | grep 9200
    If Elasticsearch is running on port 9200, it displays similar to the following:
    tcp        0      0 :::9200            :::*          LISTEN

Reindexing catalog search and refreshing the full page cache

After you change Magento’s Elasticsearch configuration, you must reindex the catalog search index and refresh the full page using the Admin or command line.

To refresh the cache using the Admin:

  1. In the Admin, click System > Cache Management.
  2. Select the check box next to Page Cache.
  3. From the Actions list in the upper right, click Refresh.
    The following figure shows an example.

To clean the cache using the command line, use the magento cache:clean command.

To reindex using the command line:

  1. Log in to your Magento server as, or switch to, the Magento file system owner.
  2. Enter any of the following commands:

    Enter the following command to reindex the catalog search index only:

    php <your Magento install dir>/bin magento indexer:reindex catalogsearch_fulltext
    

    Enter the following command to reindex all indexers:

    php <your Magento install dir>/bin magento indexer:reindex
    
  3. Wait while the reindexing completes.

Unlike the cache, indexers are updated by a cron job. Make sure cron is enabled before you start using Elasticsearch.

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.

Magento EE Release Notes