Skip to content

Commit

Permalink
Upgrade MongoDB, ElasticSearch and Redis versions
Browse files Browse the repository at this point in the history
  • Loading branch information
clearml committed Dec 31, 2024
1 parent b7795b3 commit fa3727c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
14 changes: 7 additions & 7 deletions apiserver/mongo/initialize/migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
8 changes: 4 additions & 4 deletions apiserver/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docker/docker-compose-win10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion fileserver/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit fa3727c

Please sign in to comment.