File tree Expand file tree Collapse file tree 7 files changed +12
-12
lines changed
src/simcore_service_autoscaling/modules/cluster_scaling
clusters-keeper/src/simcore_service_clusters_keeper/modules Expand file tree Collapse file tree 7 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ async def launch_instances(
174174 {
175175 "AssociatePublicIpAddress" : True ,
176176 "DeviceIndex" : 0 ,
177- "SubnetId" : instance_config .subnet_id ,
177+ "SubnetId" : instance_config .subnet_ids ,
178178 "Groups" : instance_config .security_group_ids ,
179179 }
180180 ],
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ class EC2InstanceConfig:
134134 ami_id : str
135135 key_name : str
136136 security_group_ids : list [str ]
137- subnet_id : str
137+ subnet_ids : list [ str ]
138138 iam_instance_profile : str
139139
140140
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ def ec2_instance_config(
9797 ami_id = aws_ami_id ,
9898 key_name = faker .pystr (),
9999 security_group_ids = [aws_security_group_id ],
100- subnet_id = aws_subnet_id ,
100+ subnet_ids = aws_subnet_id ,
101101 iam_instance_profile = "" ,
102102 )
103103
Original file line number Diff line number Diff line change @@ -816,7 +816,7 @@ async def _launch_instances(
816816 ].ami_id ,
817817 key_name = app_settings .AUTOSCALING_EC2_INSTANCES .EC2_INSTANCES_KEY_NAME ,
818818 security_group_ids = app_settings .AUTOSCALING_EC2_INSTANCES .EC2_INSTANCES_SECURITY_GROUP_IDS ,
819- subnet_id = app_settings .AUTOSCALING_EC2_INSTANCES .EC2_INSTANCES_SUBNET_ID ,
819+ subnet_ids = app_settings .AUTOSCALING_EC2_INSTANCES .EC2_INSTANCES_SUBNET_ID ,
820820 iam_instance_profile = app_settings .AUTOSCALING_EC2_INSTANCES .EC2_INSTANCES_ATTACHED_IAM_PROFILE ,
821821 ),
822822 min_number_of_instances = 1 , # NOTE: we want at least 1 if possible
Original file line number Diff line number Diff line change @@ -311,10 +311,10 @@ async def _add_remove_buffer_instances(
311311 ami_id = ec2_boot_specific .ami_id ,
312312 key_name = app_settings .AUTOSCALING_EC2_INSTANCES .EC2_INSTANCES_KEY_NAME ,
313313 security_group_ids = app_settings .AUTOSCALING_EC2_INSTANCES .EC2_INSTANCES_SECURITY_GROUP_IDS ,
314- subnet_id = app_settings .AUTOSCALING_EC2_INSTANCES .EC2_INSTANCES_SUBNET_ID ,
314+ subnet_ids = app_settings .AUTOSCALING_EC2_INSTANCES .EC2_INSTANCES_SUBNET_ID ,
315315 iam_instance_profile = app_settings .AUTOSCALING_EC2_INSTANCES .EC2_INSTANCES_ATTACHED_IAM_PROFILE ,
316316 ),
317- min_number_of_instances = num_to_start ,
317+ min_number_of_instances = 1 , # NOTE: we want at least 1
318318 number_of_instances = num_to_start ,
319319 max_total_number_of_instances = app_settings .AUTOSCALING_EC2_INSTANCES .EC2_INSTANCES_MAX_INSTANCES ,
320320 )
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ def _(instance_type: InstanceTypeType) -> EC2InstanceConfig:
5151 ami_id = aws_ami_id ,
5252 key_name = faker .pystr (),
5353 security_group_ids = [aws_security_group_id ],
54- subnet_id = aws_subnet_id ,
54+ subnet_ids = aws_subnet_id ,
5555 iam_instance_profile = "" ,
5656 )
5757
Original file line number Diff line number Diff line change @@ -46,10 +46,10 @@ async def _get_primary_ec2_params(
4646 app_settings .CLUSTERS_KEEPER_PRIMARY_EC2_INSTANCES .PRIMARY_EC2_INSTANCES_ALLOWED_TYPES .items ()
4747 )
4848 )
49- ec2_instance_types : list [
50- EC2InstanceType
51- ] = await ec2_client . get_ec2_instance_capabilities (
52- instance_type_names = { ec2_type_name }
49+ ec2_instance_types : list [EC2InstanceType ] = (
50+ await ec2_client . get_ec2_instance_capabilities (
51+ instance_type_names = { ec2_type_name }
52+ )
5353 )
5454 assert ec2_instance_types # nosec
5555 assert len (ec2_instance_types ) == 1 # nosec
@@ -77,7 +77,7 @@ async def create_cluster(
7777 ami_id = ec2_instance_boot_specs .ami_id ,
7878 key_name = app_settings .CLUSTERS_KEEPER_PRIMARY_EC2_INSTANCES .PRIMARY_EC2_INSTANCES_KEY_NAME ,
7979 security_group_ids = app_settings .CLUSTERS_KEEPER_PRIMARY_EC2_INSTANCES .PRIMARY_EC2_INSTANCES_SECURITY_GROUP_IDS ,
80- subnet_id = app_settings .CLUSTERS_KEEPER_PRIMARY_EC2_INSTANCES .PRIMARY_EC2_INSTANCES_SUBNET_ID ,
80+ subnet_ids = app_settings .CLUSTERS_KEEPER_PRIMARY_EC2_INSTANCES .PRIMARY_EC2_INSTANCES_SUBNET_ID ,
8181 iam_instance_profile = app_settings .CLUSTERS_KEEPER_PRIMARY_EC2_INSTANCES .PRIMARY_EC2_INSTANCES_ATTACHED_IAM_PROFILE ,
8282 )
8383 new_ec2_instance_data : list [EC2InstanceData ] = await ec2_client .launch_instances (
You can’t perform that action at this time.
0 commit comments