-
Notifications
You must be signed in to change notification settings - Fork 197
MAGECLOUD-4164 [Spike] Investigate issue with elasticsearch image on AWS #165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/Command/BuildCompose.php
Outdated
| Source\CliSource::OPTION_ES_EVN_VAR, | ||
| null, | ||
| InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, | ||
| "Environment variable for elasticsearch service" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to add example for this option.
src/Command/BuildCompose.php
Outdated
| Source\CliSource::OPTION_ES_EVN_VAR, | ||
| null, | ||
| InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, | ||
| "Environment variable for elasticsearch service" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use single quotes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it's also optional by default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/Config/Source/CliSource.php
Outdated
| /** | ||
| * Environment variable for elasticsearch service. | ||
| */ | ||
| public const OPTION_ES_EVN_VAR = 'es-env-var'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EVN => ENV
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use full name, OPTION_ES_ENVIRONMENT_VARIABLE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| /** | ||
| * ES environment variables | ||
| */ | ||
| public const SERVICES_ES_ENV_VARS = self::SERVICES_ES.'.'.'env-vars'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also suggest dropping env part, variables are already self-explaining
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
b937257 to
0df1b6a
Compare
|
PR was recreated #174 |
MCLOUD-14015:Cloud Docker fixes
Description
Added option
--es-env-varfordocker-compose.ymlfile generator. Using this option, you can specify the environment variables that will be applied when starting the Elasticsearch container.This will allow you to change service settings, such as heap size for JVM or Elasticsearch options.
Parameter changes for JVM are available from image version 1.7
Changing Elasticsearch parameters using environment variables is available starting from version 5.2
Fixed Issues (if relevant)
Manual testing scenarios
[magento-cloud template](https://github.com/magento/magento-cloud).$ composer updatein the magento-cloud template directory:elasticsearchservice:$ php vendor/bin/ece-docker build:compose --es-env-var=ES_JAVA_OPTS="-Xms512m -Xmx512m" --es-env-var=node.store.allow_mmapfs=false Configuration was built.NOTE: By default, an image with Elasticsearch version 6.5 is used. For this version of Elasticsearch, the option
node.store.allow_mmapfsexists.For image varsions 5.2, 2.4, 1.7 ,this option does not exist
Forimage varsions 7.5, this parameter was renamed to node.store.allow_mmap
4. Check the file
docker-compose.yml, the following settings must exist:$ docker-compose up -d. Containers started successfullyRun the command in the container:
$ ps aux | grep -E "(Xms|Xmx)"Expected: The last values of the
-Xmsand-Xmxparameters are 512mRun the command in the container:
$ curl http://localhost:9200/_nodes 2>&1 | grep 'mmapfs'.Expected:
"allow_mmapfs":"false"should be presentContribution checklist