Skip to content

Commit 04a7f9d

Browse files
Matthew ChessUbuntu
andauthored
Add userdata for each LaunchSpecification (#102)
Co-authored-by: Ubuntu <[email protected]>
1 parent c15d455 commit 04a7f9d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

run.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,9 @@ def startCluster():
221221
ecsConfigFile=generateECSconfig(ECS_CLUSTER,APP_NAME,AWS_BUCKET,s3client)
222222
spotfleetConfig=loadConfig(sys.argv[2])
223223
userData=generateUserData(ecsConfigFile,DOCKER_BASE_SIZE)
224-
spotfleetConfig['LaunchSpecifications'][0]["UserData"]=userData
225-
spotfleetConfig['LaunchSpecifications'][0]['BlockDeviceMappings'][1]['Ebs']["VolumeSize"]= EBS_VOL_SIZE
224+
for LaunchSpecification in range(0,len(spotfleetConfig['LaunchSpecifications'])):
225+
spotfleetConfig['LaunchSpecifications'][LaunchSpecification]["UserData"]=userData
226+
spotfleetConfig['LaunchSpecifications'][LaunchSpecification]['BlockDeviceMappings'][1]['Ebs']["VolumeSize"]= EBS_VOL_SIZE
226227

227228

228229
# Step 2: make the spot fleet request

0 commit comments

Comments
 (0)