コード例 #1
0
def start_sp():
  
  ami = core.get_image("SP2013 Demo")
  s = core.get_instance(core.start_spot( ami.id, "m1.large", placement="us-east-1c"))

  core.wait_running(s)
  core.set_name( s, "SP2013" )

  return s
コード例 #2
0
#!/usr/bin/python

import core
import os

if __name__ == "__main__":  

  core.init()

  img = core.get_image("selenium")
  spot = core.start_spot(img.id, 'm1.small')

  inst_id = core.get_instance( spot )
  core.wait_running( inst_id )

  inst = core.get_instance_by_id(inst_id) 

  os.system("cli53 rrcreate quest.com selenium A %s --replace" % inst.private_ip_address)
  core.log( 'selenium started at %s' % inst.public_dns_name )