-
Notifications
You must be signed in to change notification settings - Fork 340
MeceInstall
If you are using Magento Enterprise Cloud Edition, you may wonder how you'll be able to use ElasticSuite on such an environment.
We already dug into this specific installation process and can tell you this is working perfectly.
Here are the steps to follow in order to get a running instance of ElasticSuite.
First step is to enable Elasticsearch service on the cloud instance.
To do this, you have to edit the services.yaml file of your project according to this sample :
# The services of the project.
#
# Each service listed will be deployed to power your project.
mysql:
type: mysql:10.0
disk: 2048
redis:
type: redis:3.0
elasticsearch:
type: elasticsearch:2.4
disk: 1024
configuration:
plugins:
- analysis-icu
- analysis-phonetic
The "disk" parameter may vary according the size of your index. 1024 (1Go) is just a "basic" value and could be increased according to your total number of products.
The next step is to edit the .magento.app.yaml file and to declare the Elasticsearch services into the relationships node :
relationships:
database: "mysql:mysql"
redis: "redis:redis"
elasticsearch: "elasticsearch:elasticsearch"
Only the elasticsearch line is relevant
You have to ensure that the inline script feature of Elasticsearch is enabled. You can ask the Magento Cloud team to add the following lines in the Elasticsearch configuration :
script.allowed_types: inline
script.allowed_contexts: search,update,aggs
To be sure that Magento will use ElasticSuite as Search Engine, you will have to enforce the engine by setting the SEARCH_CONFIGURATION
variable.
You can do this with the following command-line :
magento-cloud project:variable:set --json SEARCH_CONFIGURATION '{"engine":"elasticsuite"}'
Since the ElasticSearch server is basically named elasticsearch.internal on MECE, you will have to handle this specific configuration.
You can achieve this by specifying the following environment variable to all environment by adding it to your .magento.app.yaml file like this :
variables:
env:
CONFIG__DEFAULT__SMILE_ELASTICSUITE_CORE_BASE_SETTINGS__ES_CLIENT__SERVERS: 'elasticsearch.internal'
If you did choose to use an environment variable, you can ignore this step.
You can create a new module to embed the configuration.
This module will only contain two files :
etc/module.xml :
<?xml version="1.0" ?>
<config
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="MyVendorName_ElasticSuite" setup_version="0.0.1">
<sequence>
<module name="Smile_ElasticsuiteCore"/>
</sequence>
</module>
</config>
etc/config.xml :
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
<smile_elasticsuite_core_base_settings>
<es_client>
<servers>elasticsearch.internal:9200</servers>
</es_client>
</smile_elasticsuite_core_base_settings>
</default>
</config>
This means that you will have to ensure your Elasticsearch indexes have different names between the staging and the production environment.
Hopefully, this can be easily achieved either :
-
in the module configuration via the Indices alias name parameter. This will require manually editing this configuration scope.
-
on a technical way, by specifying a different value between staging and production the following environment variable (not a "Project variable" but an "Environment variable")
env:CONFIG__DEFAULT__SMILE_ELASTICSUITE_CORE_BASE_SETTINGS__ES_CLIENT__INDICES_ALIAS
Please note the "env:" pattern before the variable name as stated in the Magento documentation
Please ensure you are using a different alias name between your staging and production environment.
E.g : 'myproject_stg' and 'myproject_prod' should fit your needs and keep you safe from index collisions.
If you did all the step before in a dedicated branch, the environment for this branch should work properly once it has been delivered and deployed into the Cloud.
Once you will have done all this, you should be all set.
-
User's Guide
-
Developer's Guide
-
Releases
- Magento 2.3.x
- Magento 2.2.x
- Magento 2.1.x
- ElasticSuite 2.5.15
- ElasticSuite 2.5.14
- ElasticSuite 2.5.13
- ElasticSuite 2.5.12
- ElasticSuite 2.5.11
- ElasticSuite 2.5.10
- ElasticSuite 2.5.9
- ElasticSuite 2.5.8
- ElasticSuite 2.5.7
- ElasticSuite 2.5.6
- ElasticSuite 2.5.5
- ElasticSuite 2.5.4
- ElasticSuite 2.5.3
- ElasticSuite 2.5.2
- ElasticSuite 2.5.1
- ElasticSuite 2.5.0
- ElasticSuite 2.4.6
- ElasticSuite 2.4.5
- ElasticSuite 2.4.4
- ElasticSuite 2.4.3
- ElasticSuite 2.4.2
- ElasticSuite 2.4.1
- ElasticSuite 2.4.0
- ElasticSuite 2.3.10
- ElasticSuite 2.3.9
- ElasticSuite 2.3.8
- ElasticSuite 2.3.7
- ElasticSuite 2.3.6
- ElasticSuite 2.3.5
- ElasticSuite 2.3.4
- ElasticSuite 2.3.3
- ElasticSuite 2.3.2
- ElasticSuite 2.3.1
- ElasticSuite 2.3.0
- Magento 2.0.x