def launch(): try: instanceList = aws.launchEC2Image() print instanceList[0].id nodeList.append(instanceList[0].id) return Response('{ "instanceid":"'+instanceList[0].id+'"}', 200, mimetype='application/json') except: traceback.print_exc() return Response('{ "message":"Unable to launchEC2Image" }', 400, mimetype='application/json')
def elasticdeploy(): # here we want to deploy an instance then launch the appropriate fabric script instance = aws.launchEC2Image("ElasticServer"); return "Deploy elastic fabric... VM ID = " +instance[0].id
def producerdeploy(): # here we want to deploy an instance then launch the appropriate fabric script instance = aws.launchEC2Image("ProducerServer"); return "Deploy producer... VM ID= " +instance[0].id
def kafkadeploy(): # here we want to deploy an instance then launch the appropriate fabric script instance = aws.launchEC2Image("KafkaServer"); return "Deploy Kafka VM ID = " +instance[0].id