From fa3727c5fccf018589a623c1894d734d1fb73d27 Mon Sep 17 00:00:00 2001 From: clearml <> Date: Tue, 31 Dec 2024 22:07:43 +0200 Subject: [PATCH] Upgrade MongoDB, ElasticSearch and Redis versions --- apiserver/mongo/initialize/migration.py | 14 +++++++------- apiserver/requirements.txt | 8 ++++---- docker/docker-compose-win10.yml | 6 +++--- docker/docker-compose.yml | 6 +++--- fileserver/requirements.txt | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/apiserver/mongo/initialize/migration.py b/apiserver/mongo/initialize/migration.py index 345bd40..081d44d 100644 --- a/apiserver/mongo/initialize/migration.py +++ b/apiserver/mongo/initialize/migration.py @@ -47,20 +47,20 @@ def get_last_server_version() -> Version: def _ensure_mongodb_version(): db: pymongo.database.Database = get_db(Database.backend) db_version = db.client.server_info()["version"] - if not db_version.startswith("5.0"): - log.warning(f"Database version should be 5.0.x. Instead: {str(db_version)}") + if not db_version.startswith("6.0"): + log.warning(f"Database version should be 6.0.x. Instead: {str(db_version)}") return res = db.client.admin.command({"getParameter": 1, "featureCompatibilityVersion": 1}) version = nested_get(res, ("featureCompatibilityVersion", "version")) - if version == "5.0": + if version == "6.0": return - if version != "4.4": - log.warning(f"Cannot upgrade DB version. Should be 4.4. {str(res)}") + if version != "5.0": + log.warning(f"Cannot upgrade DB version. Should be 5.0. {str(res)}") return - log.info("Upgrading db version from 4.4 to 5.0") - res = db.client.admin.command({"setFeatureCompatibilityVersion": "5.0"}) + log.info("Upgrading db version from 5.0 to 6.0") + res = db.client.admin.command({"setFeatureCompatibilityVersion": "6.0"}) log.info(res) diff --git a/apiserver/requirements.txt b/apiserver/requirements.txt index 8c2aab9..e39c07a 100644 --- a/apiserver/requirements.txt +++ b/apiserver/requirements.txt @@ -6,7 +6,7 @@ boto3>=1.26 boto3-stubs[s3]>=1.26 clearml>=1.10.3 dpath>=1.4.2,<2.0 -elasticsearch==8.12.0 +elasticsearch==8.17.0 fastjsonschema>=2.8 flask-compress>=1.4.0 flask-cors>=3.0.5 @@ -19,15 +19,15 @@ jinja2 jsonmodels>=2.3 jsonschema>=2.6.0 luqum>=0.10.0 -mongoengine==0.27.0 +mongoengine==0.29.1 nested_dict>=1.61 packaging==20.3 psutil>=5.6.5 pyhocon>=0.3.35r pyjwt>=2.4.0 -pymongo==4.7.3 +pymongo==4.10.1 python-rapidjson>=0.6.3 -redis>=4.5.4,<5 +redis==5.2.1 requests>=2.13.0 semantic_version>=2.8.3,<3 setuptools>=65.5.1 diff --git a/docker/docker-compose-win10.yml b/docker/docker-compose-win10.yml index a58ba14..77b9ea2 100644 --- a/docker/docker-compose-win10.yml +++ b/docker/docker-compose-win10.yml @@ -58,7 +58,7 @@ services: nofile: soft: 65536 hard: 65536 - image: docker.elastic.co/elasticsearch/elasticsearch:8.15.3 + image: elasticsearch:8.17.0 restart: unless-stopped volumes: - c:/opt/clearml/data/elastic_7:/usr/share/elasticsearch/data @@ -87,7 +87,7 @@ services: networks: - backend container_name: clearml-mongo - image: mongo:5.0.26 + image: mongo:6.0.19 restart: unless-stopped command: --setParameter internalQueryMaxBlockingSortMemoryUsageBytes=196100200 volumes: @@ -98,7 +98,7 @@ services: networks: - backend container_name: clearml-redis - image: redis:6.2 + image: redis:7.4.1 restart: unless-stopped volumes: - c:/opt/clearml/data/redis:/data diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 197c63a..f2043ab 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -60,7 +60,7 @@ services: nofile: soft: 65536 hard: 65536 - image: docker.elastic.co/elasticsearch/elasticsearch:8.15.3 + image: elasticsearch:8.17.0 restart: unless-stopped volumes: - /opt/clearml/data/elastic_7:/usr/share/elasticsearch/data @@ -88,7 +88,7 @@ services: networks: - backend container_name: clearml-mongo - image: mongo:5.0.26 + image: mongo:6.0.19 restart: unless-stopped command: --setParameter internalQueryMaxBlockingSortMemoryUsageBytes=196100200 volumes: @@ -99,7 +99,7 @@ services: networks: - backend container_name: clearml-redis - image: redis:6.2 + image: redis:7.4.1 restart: unless-stopped volumes: - /opt/clearml/data/redis:/data diff --git a/fileserver/requirements.txt b/fileserver/requirements.txt index 8395cab..28f978e 100644 --- a/fileserver/requirements.txt +++ b/fileserver/requirements.txt @@ -5,7 +5,7 @@ flask-cors>=3.0.5 flask>=2.3.3 gunicorn>=20.1.0 pyhocon>=0.3.35 -redis>=4.5.4,<5 +redis==5.2.1 setuptools>=65.5.1 urllib3>=1.26.18 werkzeug>=3.0.1 \ No newline at end of file