added security group id column

pull/37/head
Richard Liu 6 years ago
parent 33d334f6ad
commit cb65435ac6
  1. 16
      aws-experiment-launch/configuration.txt
  2. 5
      aws-experiment-launch/create_and_deploy.py

@ -1,8 +1,8 @@
1,us-east-1,virginia-key-benchmark,virginia-security-group,virginia,ami-b70554c8 1,us-east-1,virginia-key-benchmark,virginia-security-group,virginia,ami-b70554c8,sg-04d0b62ee08ce8800
2,us-east-2,ohio-key-benchmark,ohio-security-group,ohio,ami-8c122be9 2,us-east-2,ohio-key-benchmark,ohio-security-group,ohio,ami-8c122be9,sg-0789078f1c76defbe
3,us-west-1,california-key-benchmark,california-security-group,california,ami-e0ba5c83 3,us-west-1,california-key-benchmark,california-security-group,california,ami-e0ba5c83,sg-0a66ccb6ab9161a14
4,us-west-2,oregon-key-benchmark,oregon-security-group,oregon,ami-a9d09ed1 4,us-west-2,oregon-key-benchmark,oregon-security-group,oregon,ami-a9d09ed1,sg-020cb5729fa212d43
5,ap-northeast-1,tokyo-key-benchmark,tokyo-security-group,tokyo,ami-e99f4896 5,ap-northeast-1,tokyo-key-benchmark,tokyo-security-group,tokyo,ami-e99f4896,sg-009aeb97f675c1ad5
6,ap-southeast-1,singapore-key-benchmark,singapore-security-group,singapore,ami-05868579 6,ap-southeast-1,singapore-key-benchmark,singapore-security-group,singapore,ami-05868579,sg-05f9b60044a19dfb2
7,eu-central-1,frankfurt-key-benchmark,frankfurt-security-group,frankfurt,ami-7c4f7097 7,eu-central-1,frankfurt-key-benchmark,frankfurt-security-group,frankfurt,ami-7c4f7097,sg-0bb06fcd8b25b5910
8,eu-west-1,ireland-key-benchmark,ireland-security-group,ireland,ami-466768ac 8,eu-west-1,ireland-key-benchmark,ireland-security-group,ireland,ami-466768ac,sg-0aa8954acb79fdb58

@ -18,6 +18,7 @@ class InstanceResource:
REGION_NAME = 'region_name' REGION_NAME = 'region_name'
REGION_KEY = 'region_key' REGION_KEY = 'region_key'
REGION_SECURITY_GROUP = 'region_security_group' REGION_SECURITY_GROUP = 'region_security_group'
REGION_SECURITY_GROUP_ID = 'region_security_group_id'
REGION_HUMAN_NAME = 'region_human_name' REGION_HUMAN_NAME = 'region_human_name'
INSTANCE_TYPE = 't2.micro' INSTANCE_TYPE = 't2.micro'
REGION_AMI = 'region_ami' REGION_AMI = 'region_ami'
@ -51,8 +52,7 @@ def create_launch_specification(region_number, instanceType):
{ {
# In certain scenarios, we have to use group id instead of group name # In certain scenarios, we have to use group id instead of group name
# https://github.com/boto/boto/issues/350#issuecomment-27359492 # https://github.com/boto/boto/issues/350#issuecomment-27359492
# 'GroupName': config[region_number][REGION_SECURITY_GROUP] 'GroupId': config[region_number][REGION_SECURITY_GROUP_ID]
'GroupId': 'sg-06f90158506dca54f'
} }
], ],
'ImageId': config[region_number][REGION_AMI], 'ImageId': config[region_number][REGION_AMI],
@ -393,6 +393,7 @@ def read_configuration_file(filename):
config[region_num][REGION_SECURITY_GROUP] = mylist[3] config[region_num][REGION_SECURITY_GROUP] = mylist[3]
config[region_num][REGION_HUMAN_NAME] = mylist[4] config[region_num][REGION_HUMAN_NAME] = mylist[4]
config[region_num][REGION_AMI] = mylist[5] config[region_num][REGION_AMI] = mylist[5]
config[region_num][REGION_SECURITY_GROUP_ID] = mylist[6]
return config return config
##### UTILS #### ##### UTILS ####

Loading…
Cancel
Save