Skip to content

Instantly share code, notes, and snippets.

Created January 26, 2014 13:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
import random
from pprint import pprint
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
API_KEY = 'exoscale api key'
API_SECRET_KEY = 'exoscale api secret key'
cls = get_driver(Provider.EXOSCALE)
driver = cls(API_KEY, API_SECRET_KEY)
size = [size for size in driver.list_sizes() if == 'Micro'][0]
image = [image for image in driver.list_images() if 'Ubuntu 12.04 LTS 64-bit'
name = 'exoscale-node-' + str(random.randint(0,100))
node = driver.create_node(name=name, image=image, size=size)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment