Skip to content

Commit

Permalink
♻️ Clusters-keeper: renamed ENV variables (#5032)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg authored Nov 14, 2023
1 parent 125ae0b commit a4d9fec
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)}",
Expand All @@ -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}",
]

Expand Down
8 changes: 4 additions & 4 deletions services/clusters-keeper/tests/manual/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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\"]"
Expand Down
8 changes: 4 additions & 4 deletions services/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit a4d9fec

Please sign in to comment.