Skip to content

Commit

Permalink
added selectable ami option
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Lee committed Sep 18, 2011
1 parent 56c4288 commit 5ae7c57
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions masterSpore.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,23 +304,31 @@ def monitor(n, timeout):
if GF.confirmQuestion("This will create a master node of size "+a2+" \nAre you sure you want to continue?") is False:
sys.exit()
launchMaster(ami,a2,key)
saveState() #save incase something fails
saveState() #save incase something fails ami-1aad5273
if len(a.split(',')) == 2:
cnt=a.split(',')[0]
size=a.split(',')[1]
if len(a.split(',')) == 3:
maxPrice=curSpotCost(size)
elif len(a.split(',')) == 3:
cnt=a.split(',')[0]
size=a.split(',')[1]
maxPrice=a.split(',')[2]
if int(maxPrice) == 0:
maxPrice=curSpotCost(size)
elif len(a.split(',')) == 4:
cnt=a.split(',')[0]
size=a.split(',')[1]
maxPrice=a.split(',')[2]
ami=a.split(',')[3]
if int(maxPrice) == 0:
maxPrice=curSpotCost(size)
else:
print "Please specify in the following fashion --launch=<N>,<inst size>"
sys.exit()
try:
n=int(cnt)
if n > 0:
if GF.confirmQuestion("This will create "+str(n)+" instance(s). \nAre you sure you want to continue?") is False:
if GF.confirmQuestion("This will create "+str(n)+" instance(s). \n"+str(cnt)+"/"+str(size)+"/"+str(maxPrice)+"/"+str(ami)+"\nAre you sure you want to continue?") is False:
sys.exit()
print "Launching "+str(n)+" instances"
launchCluster(ami, size, key, maxPrice, n)
Expand Down

0 comments on commit 5ae7c57

Please sign in to comment.