opentargets / issues

Issue tracker for Open Targets Platform and Open Targets Genetics Portal
https://platform.opentargets.org https://genetics.opentargets.org
Apache License 2.0
12 stars 2 forks source link

Update deployment to use Opensearch #3355

Closed mbdebian closed 4 days ago

mbdebian commented 4 days ago

Describe the bug Our Standalone deployment tool for platform is using Elasticsearch in the data backend but we replaced that service with Opensearch several releases ago.

Observed behaviour When deploying platform, it reports an error for Elasticsearch backend, which doesn't get deployed.

Expected behaviour The whole Open Targets Platform should launch, and use Opensearch instead of Elasticsearch in the data backend

To Reproduce Steps to reproduce the behaviour:

  1. Checkout our standalone deployment tool
  2. Set profile 2406-gcs, make set_profile profile='2406-gcs'
  3. Launch the platform, make platform_up
  4. See error
    docker-compose -f docker-compose.yml up -d --wait
    WARN[0000] /Users/mbernal/tmp/standalone/standalone-deployment-platform/docker-compose.yml: `version` is obsolete 
    [+] Running 4/5
    ✔ Container standalone-deployment-platform-nginx-1  Healthy                                                                                                            0.7s 
    ✔ Container ot-ch                                   Healthy                                                                                                            0.7s 
    ✔ Container ot-ai-api                               Healthy                                                                                                            0.7s 
    ⠸ Container ot-es                                   Waiting                                                                                                            3.3s 
    ✔ Container ot-api                                  Healthy                                                                                                            0.7s 
    container ot-es exited (1)
    make: *** [platform_up] Error 1
mbdebian commented 4 days ago

Apart from updating the data backend, the error with the container seems to be related to the logs folder for ES:

ot-es      | {"type": "server", "timestamp": "2024-06-24T12:53:29,575Z", "level": "ERROR", "component": "o.e.b.ElasticsearchUncaughtExceptionHandler", "cluster.name": "ot-es-cluster", "node.name": "070a9bbc2f90", "message": "uncaught exception in thread [main]", 
ot-es      | "stacktrace": ["org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: Unable to access 'path.logs' (/usr/share/opensearch/logs)",
ot-es      | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:174) ~[elasticsearch-7.10.2.jar:7.10.2]",
ot-es      | "at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161) ~[elasticsearch-7.10.2.jar:7.10.2]",
ot-es      | "at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.10.2.jar:7.10.2]",
ot-es      | "at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127) ~[elasticsearch-cli-7.10.2.jar:7.10.2]",
ot-es      | "at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.10.2.jar:7.10.2]",
ot-es      | "at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126) ~[elasticsearch-7.10.2.jar:7.10.2]",
ot-es      | "at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.10.2.jar:7.10.2]",
ot-es      | "Caused by: java.lang.IllegalStateException: Unable to access 'path.logs' (/usr/share/opensearch/logs)",
ot-es      | "at org.elasticsearch.bootstrap.FilePermissionUtils.addDirectoryPath(FilePermissionUtils.java:72) ~[elasticsearch-7.10.2.jar:7.10.2]",
ot-es      | "at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:299) ~[elasticsearch-7.10.2.jar:7.10.2]",
ot-es      | "at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:253) ~[elasticsearch-7.10.2.jar:7.10.2]",
ot-es      | "at org.elasticsearch.bootstrap.Security.configure(Security.java:121) ~[elasticsearch-7.10.2.jar:7.10.2]",
ot-es      | "at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:222) ~[elasticsearch-7.10.2.jar:7.10.2]",
ot-es      | "at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) ~[elasticsearch-7.10.2.jar:7.10.2]",
ot-es      | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.10.2.jar:7.10.2]",
mbdebian commented 4 days ago

Profiles updated for releases: