Upgrade MongoDB, ElasticSearch and Redis versions

This commit is contained in:
clearml 2024-12-31 22:07:43 +02:00
parent b7795b3e2e
commit fa3727c5fc
5 changed files with 18 additions and 18 deletions

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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