From cb65435ac6c91e8b407ad1313ef9bca38862f50c Mon Sep 17 00:00:00 2001 From: Richard Liu Date: Tue, 10 Jul 2018 19:06:46 -0700 Subject: [PATCH] added security group id column --- aws-experiment-launch/configuration.txt | 16 ++++++++-------- aws-experiment-launch/create_and_deploy.py | 5 +++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/aws-experiment-launch/configuration.txt b/aws-experiment-launch/configuration.txt index 88fef8859..d713ce4b5 100644 --- a/aws-experiment-launch/configuration.txt +++ b/aws-experiment-launch/configuration.txt @@ -1,8 +1,8 @@ -1,us-east-1,virginia-key-benchmark,virginia-security-group,virginia,ami-b70554c8 -2,us-east-2,ohio-key-benchmark,ohio-security-group,ohio,ami-8c122be9 -3,us-west-1,california-key-benchmark,california-security-group,california,ami-e0ba5c83 -4,us-west-2,oregon-key-benchmark,oregon-security-group,oregon,ami-a9d09ed1 -5,ap-northeast-1,tokyo-key-benchmark,tokyo-security-group,tokyo,ami-e99f4896 -6,ap-southeast-1,singapore-key-benchmark,singapore-security-group,singapore,ami-05868579 -7,eu-central-1,frankfurt-key-benchmark,frankfurt-security-group,frankfurt,ami-7c4f7097 -8,eu-west-1,ireland-key-benchmark,ireland-security-group,ireland,ami-466768ac \ No newline at end of file +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,sg-0789078f1c76defbe +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,sg-020cb5729fa212d43 +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,sg-05f9b60044a19dfb2 +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,sg-0aa8954acb79fdb58 \ No newline at end of file diff --git a/aws-experiment-launch/create_and_deploy.py b/aws-experiment-launch/create_and_deploy.py index 309a029de..66d64f4e6 100644 --- a/aws-experiment-launch/create_and_deploy.py +++ b/aws-experiment-launch/create_and_deploy.py @@ -18,6 +18,7 @@ class InstanceResource: REGION_NAME = 'region_name' REGION_KEY = 'region_key' REGION_SECURITY_GROUP = 'region_security_group' +REGION_SECURITY_GROUP_ID = 'region_security_group_id' REGION_HUMAN_NAME = 'region_human_name' INSTANCE_TYPE = 't2.micro' 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 # https://github.com/boto/boto/issues/350#issuecomment-27359492 - # 'GroupName': config[region_number][REGION_SECURITY_GROUP] - 'GroupId': 'sg-06f90158506dca54f' + 'GroupId': config[region_number][REGION_SECURITY_GROUP_ID] } ], '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_HUMAN_NAME] = mylist[4] config[region_num][REGION_AMI] = mylist[5] + config[region_num][REGION_SECURITY_GROUP_ID] = mylist[6] return config ##### UTILS ####