diff --git a/services/clusters-keeper/src/simcore_service_clusters_keeper/data/docker-compose.yml b/services/clusters-keeper/src/simcore_service_clusters_keeper/data/docker-compose.yml index 87f4a6cf641..213aac41821 100644 --- a/services/clusters-keeper/src/simcore_service_clusters_keeper/data/docker-compose.yml +++ b/services/clusters-keeper/src/simcore_service_clusters_keeper/data/docker-compose.yml @@ -47,8 +47,8 @@ services: hostname: "{{.Node.Hostname}}-{{.Service.Name}}-{{.Task.Slot}}" environment: DASK_MONITORING_URL: tcp://dask-scheduler:8786 - EC2_ACCESS_KEY_ID: ${EC2_CLUSTERS_KEEPER_ACCESS_KEY_ID} - EC2_ENDPOINT: ${EC2_CLUSTERS_KEEPER_ENDPOINT} + EC2_ACCESS_KEY_ID: ${CLUSTERS_KEEPER_EC2_ACCESS_KEY_ID} + EC2_ENDPOINT: ${CLUSTERS_KEEPER_EC2_ENDPOINT} EC2_INSTANCES_ALLOWED_TYPES: ${WORKERS_EC2_INSTANCES_ALLOWED_TYPES} EC2_INSTANCES_AMI_ID: ${WORKERS_EC2_INSTANCES_AMI_ID} EC2_INSTANCES_CUSTOM_BOOT_SCRIPTS: ${WORKERS_EC2_INSTANCES_CUSTOM_BOOT_SCRIPTS} @@ -59,8 +59,8 @@ services: EC2_INSTANCES_SECURITY_GROUP_IDS: ${WORKERS_EC2_INSTANCES_SECURITY_GROUP_IDS} EC2_INSTANCES_SUBNET_ID: ${WORKERS_EC2_INSTANCES_SUBNET_ID} EC2_INSTANCES_TIME_BEFORE_TERMINATION: ${WORKERS_EC2_INSTANCES_TIME_BEFORE_TERMINATION} - EC2_REGION_NAME: ${EC2_CLUSTERS_KEEPER_REGION_NAME} - EC2_SECRET_ACCESS_KEY: ${EC2_CLUSTERS_KEEPER_SECRET_ACCESS_KEY} + EC2_REGION_NAME: ${CLUSTERS_KEEPER_EC2_REGION_NAME} + EC2_SECRET_ACCESS_KEY: ${CLUSTERS_KEEPER_EC2_SECRET_ACCESS_KEY} LOG_FORMAT_LOCAL_DEV_ENABLED: 1 LOG_LEVEL: ${LOG_LEVEL:-WARNING} REDIS_HOST: redis diff --git a/services/clusters-keeper/src/simcore_service_clusters_keeper/utils/clusters.py b/services/clusters-keeper/src/simcore_service_clusters_keeper/utils/clusters.py index 64cdf4fcb10..805d793a919 100644 --- a/services/clusters-keeper/src/simcore_service_clusters_keeper/utils/clusters.py +++ b/services/clusters-keeper/src/simcore_service_clusters_keeper/utils/clusters.py @@ -40,8 +40,8 @@ def _convert_to_env_list(entries: list[Any]) -> str: environment_variables = [ f"DOCKER_IMAGE_TAG={app_settings.CLUSTERS_KEEPER_COMPUTATIONAL_BACKEND_DOCKER_IMAGE_TAG}", - f"EC2_CLUSTERS_KEEPER_ACCESS_KEY_ID={app_settings.CLUSTERS_KEEPER_EC2_ACCESS.EC2_ACCESS_KEY_ID}", - f"EC2_CLUSTERS_KEEPER_ENDPOINT={app_settings.CLUSTERS_KEEPER_EC2_ACCESS.EC2_ENDPOINT}", + f"CLUSTERS_KEEPER_EC2_ACCESS_KEY_ID={app_settings.CLUSTERS_KEEPER_EC2_ACCESS.EC2_ACCESS_KEY_ID}", + f"CLUSTERS_KEEPER_EC2_ENDPOINT={app_settings.CLUSTERS_KEEPER_EC2_ACCESS.EC2_ENDPOINT}", f"WORKERS_EC2_INSTANCES_ALLOWED_TYPES={_convert_to_env_list(app_settings.CLUSTERS_KEEPER_WORKERS_EC2_INSTANCES.WORKERS_EC2_INSTANCES_ALLOWED_TYPES)}", f"WORKERS_EC2_INSTANCES_AMI_ID={app_settings.CLUSTERS_KEEPER_WORKERS_EC2_INSTANCES.WORKERS_EC2_INSTANCES_AMI_ID}", f"WORKERS_EC2_INSTANCES_CUSTOM_BOOT_SCRIPTS={_convert_to_env_list(app_settings.CLUSTERS_KEEPER_WORKERS_EC2_INSTANCES.WORKERS_EC2_INSTANCES_CUSTOM_BOOT_SCRIPTS)}", @@ -52,8 +52,8 @@ def _convert_to_env_list(entries: list[Any]) -> str: f"WORKERS_EC2_INSTANCES_SECURITY_GROUP_IDS={_convert_to_env_list(app_settings.CLUSTERS_KEEPER_WORKERS_EC2_INSTANCES.WORKERS_EC2_INSTANCES_SECURITY_GROUP_IDS)}", f"WORKERS_EC2_INSTANCES_SUBNET_ID={app_settings.CLUSTERS_KEEPER_WORKERS_EC2_INSTANCES.WORKERS_EC2_INSTANCES_SUBNET_ID}", f"WORKERS_EC2_INSTANCES_TIME_BEFORE_TERMINATION={app_settings.CLUSTERS_KEEPER_WORKERS_EC2_INSTANCES.WORKERS_EC2_INSTANCES_TIME_BEFORE_TERMINATION}", - f"EC2_CLUSTERS_KEEPER_REGION_NAME={app_settings.CLUSTERS_KEEPER_EC2_ACCESS.EC2_REGION_NAME}", - f"EC2_CLUSTERS_KEEPER_SECRET_ACCESS_KEY={app_settings.CLUSTERS_KEEPER_EC2_ACCESS.EC2_SECRET_ACCESS_KEY}", + f"CLUSTERS_KEEPER_EC2_REGION_NAME={app_settings.CLUSTERS_KEEPER_EC2_ACCESS.EC2_REGION_NAME}", + f"CLUSTERS_KEEPER_EC2_SECRET_ACCESS_KEY={app_settings.CLUSTERS_KEEPER_EC2_ACCESS.EC2_SECRET_ACCESS_KEY}", f"LOG_LEVEL={app_settings.LOG_LEVEL}", ] diff --git a/services/clusters-keeper/tests/manual/README.md b/services/clusters-keeper/tests/manual/README.md index 4d508b28226..a2ecd57c8a0 100644 --- a/services/clusters-keeper/tests/manual/README.md +++ b/services/clusters-keeper/tests/manual/README.md @@ -60,10 +60,10 @@ S3_SECURE=1 4. prepare clusters-keeper: ```bash CLUSTERS_KEEPER_EC2_ACCESS={} -EC2_CLUSTERS_KEEPER_ACCESS_KEY_ID=XXXXXXX -EC2_CLUSTERS_KEEPER_ENDPOINT=https://ec2.amazonaws.com -EC2_CLUSTERS_KEEPER_REGION_NAME=us-east-1 -EC2_CLUSTERS_KEEPER_SECRET_ACCESS_KEY=XXXXXXX +CLUSTERS_KEEPER_EC2_ACCESS_KEY_ID=XXXXXXX +CLUSTERS_KEEPER_EC2_ENDPOINT=https://ec2.amazonaws.com +CLUSTERS_KEEPER_EC2_REGION_NAME=us-east-1 +CLUSTERS_KEEPER_SECRET_EC2_ACCESS_KEY=XXXXXXX CLUSTERS_KEEPER_PRIMARY_EC2_INSTANCES={} PRIMARY_EC2_INSTANCES_ALLOWED_TYPES="[\"t2.micro\"]" diff --git a/services/docker-compose.yml b/services/docker-compose.yml index 0d37c5d002d..e8f63bbaaf7 100644 --- a/services/docker-compose.yml +++ b/services/docker-compose.yml @@ -86,10 +86,10 @@ services: - CLUSTERS_KEEPER_TASK_INTERVAL=${CLUSTERS_KEEPER_TASK_INTERVAL} - CLUSTERS_KEEPER_LOGLEVEL=${LOG_LEVEL:-WARNING} - CLUSTERS_KEEPER_EC2_ACCESS=${CLUSTERS_KEEPER_EC2_ACCESS} - - EC2_CLUSTERS_KEEPER_ACCESS_KEY_ID=${EC2_CLUSTERS_KEEPER_ACCESS_KEY_ID} - - EC2_CLUSTERS_KEEPER_ENDPOINT=${EC2_CLUSTERS_KEEPER_ENDPOINT} - - EC2_CLUSTERS_KEEPER_REGION_NAME=${EC2_CLUSTERS_KEEPER_REGION_NAME} - - EC2_CLUSTERS_KEEPER_SECRET_ACCESS_KEY=${EC2_CLUSTERS_KEEPER_SECRET_ACCESS_KEY} + - CLUSTERS_KEEPER_EC2_ACCESS_KEY_ID=${CLUSTERS_KEEPER_EC2_ACCESS_KEY_ID} + - CLUSTERS_KEEPER_EC2_ENDPOINT=${CLUSTERS_KEEPER_EC2_ENDPOINT} + - CLUSTERS_KEEPER_EC2_REGION_NAME=${CLUSTERS_KEEPER_EC2_REGION_NAME} + - CLUSTERS_KEEPER_EC2_SECRET_ACCESS_KEY=${CLUSTERS_KEEPER_} - LOG_FORMAT_LOCAL_DEV_ENABLED=${LOG_FORMAT_LOCAL_DEV_ENABLED} - CLUSTERS_KEEPER_PRIMARY_EC2_INSTANCES=${CLUSTERS_KEEPER_PRIMARY_EC2_INSTANCES} - PRIMARY_EC2_INSTANCES_ALLOWED_TYPES=${PRIMARY_EC2_INSTANCES_ALLOWED_TYPES}