mirror of
https://github.com/clearml/clearml-server
synced 2025-05-11 15:21:30 +00:00
Update driver requirements
Refactor ES initialization
This commit is contained in:
parent
b9996e2c1a
commit
8908c7dcf9
@ -60,7 +60,7 @@ class DatabaseFactory:
|
|||||||
log.info(f"Using override mongodb host {override_hostname}")
|
log.info(f"Using override mongodb host {override_hostname}")
|
||||||
if override_port:
|
if override_port:
|
||||||
log.info(f"Using override mongodb port {override_port}")
|
log.info(f"Using override mongodb port {override_port}")
|
||||||
|
|
||||||
for key, alias in get_items(Database).items():
|
for key, alias in get_items(Database).items():
|
||||||
if key not in db_entries:
|
if key not in db_entries:
|
||||||
missing.append(key)
|
missing.append(key)
|
||||||
|
@ -82,15 +82,10 @@ def check_elastic_empty() -> bool:
|
|||||||
es_logger.addFilter(log_filter)
|
es_logger.addFilter(log_filter)
|
||||||
for retry in range(max_retries):
|
for retry in range(max_retries):
|
||||||
try:
|
try:
|
||||||
hosts = cluster_conf.get("hosts", None)
|
|
||||||
http_auth = (
|
|
||||||
es_factory.get_credentials("events")
|
|
||||||
if cluster_conf.get("secure", True)
|
|
||||||
else None
|
|
||||||
)
|
|
||||||
args = cluster_conf.get("args", {})
|
|
||||||
es = Elasticsearch(
|
es = Elasticsearch(
|
||||||
hosts=hosts, http_auth=http_auth, **args
|
hosts=cluster_conf.get("hosts", None),
|
||||||
|
http_auth=es_factory.get_credentials("events", cluster_conf),
|
||||||
|
**cluster_conf.get("args", {})
|
||||||
)
|
)
|
||||||
return not es.indices.get_template(name="events*")
|
return not es.indices.get_template(name="events*")
|
||||||
except exceptions.NotFoundError as ex:
|
except exceptions.NotFoundError as ex:
|
||||||
@ -118,10 +113,7 @@ def init_es_data():
|
|||||||
|
|
||||||
log.info(f"Applying mappings to ES host: {hosts_config}")
|
log.info(f"Applying mappings to ES host: {hosts_config}")
|
||||||
args = cluster_conf.get("args", {})
|
args = cluster_conf.get("args", {})
|
||||||
http_auth = (
|
http_auth = es_factory.get_credentials(name)
|
||||||
es_factory.get_credentials(name)
|
|
||||||
if cluster_conf.get("secure", True)
|
|
||||||
else None
|
|
||||||
)
|
|
||||||
res = apply_mappings_to_cluster(hosts_config, name, es_args=args, http_auth=http_auth)
|
res = apply_mappings_to_cluster(hosts_config, name, es_args=args, http_auth=http_auth)
|
||||||
log.info(res)
|
log.info(res)
|
||||||
|
@ -3,7 +3,7 @@ bcrypt>=3.1.4
|
|||||||
boltons>=19.1.0
|
boltons>=19.1.0
|
||||||
boto3==1.14.13
|
boto3==1.14.13
|
||||||
dpath>=1.4.2,<2.0
|
dpath>=1.4.2,<2.0
|
||||||
elasticsearch>=7.0.0,<8.0.0
|
elasticsearch==7.13.3
|
||||||
fastjsonschema>=2.8
|
fastjsonschema>=2.8
|
||||||
flask-compress>=1.4.0
|
flask-compress>=1.4.0
|
||||||
flask-cors>=3.0.5
|
flask-cors>=3.0.5
|
||||||
@ -16,15 +16,16 @@ jinja2==2.11.3
|
|||||||
jsonmodels>=2.3
|
jsonmodels>=2.3
|
||||||
jsonschema>=2.6.0
|
jsonschema>=2.6.0
|
||||||
luqum>=0.10.0
|
luqum>=0.10.0
|
||||||
mongoengine==0.19.1
|
mongoengine==0.23.1
|
||||||
nested_dict>=1.61
|
nested_dict>=1.61
|
||||||
packaging==20.3
|
packaging==20.3
|
||||||
psutil>=5.6.5
|
psutil>=5.6.5
|
||||||
pyhocon>=0.3.35
|
pyhocon>=0.3.35
|
||||||
pyjwt<2.0.0
|
pyjwt<2.0.0
|
||||||
pymongo[srv]==3.12
|
pymongo[srv]==3.12.0
|
||||||
python-rapidjson>=0.6.3
|
python-rapidjson>=0.6.3
|
||||||
redis>=2.10.5
|
redis==3.5.3
|
||||||
|
redis-py-cluster>=2.1.3
|
||||||
related>=0.7.2
|
related>=0.7.2
|
||||||
requests>=2.13.0
|
requests>=2.13.0
|
||||||
semantic_version>=2.8.3,<3
|
semantic_version>=2.8.3,<3
|
||||||
|
Loading…
Reference in New Issue
Block a user