Package: simpleazure
Simple Azure deploys Azure Templates and launches Virtual Machines with Service
Management API with a few steps like other cloud providers e.g. AWS.
[Documentation](https://simple-azure.readthedocs.org/)QuickStartStarting101-vm-sshkeytemplate:>>> from simpleazure import SimpleAzure
>>> saz = SimpleAzure()

# aqst is for Azure QuickStart Templates
>>> vm_sshkey_template = saz.aqst.get_template('101-vm-sshkey')

# arm is for Azure Resource Manager
>>> saz.arm.load_template(vm_sshkey_template)
>>> saz.arm.set_parameter("sshKeyData", "ssh-rsa AAAB... hrlee@quickstart")
>>> saz.arm.deploy()Docker ImageSimple Azure is available in Docker image to run.Simple Azure only:docker run -i -t lee212/simpleazureWith IPython Notebook:docker run -d -p 8888:8888 lee212/simpleazure_with_ipythonOpen a browser with the port number8888.InstallationFrom github.com:git clone https://github.com/lee212/simpleazure.git
cd simpleazure
pip install -r requirements.txt
python setup.py installfrom Pypi:pip install simpleazureCaveatsClassic (legacy) Python SDK is based onhttps://github.com/Azure/azure-sdk-for-python/blob/master/azure-servicemanagement-legacyVirtual Machines, Cloud Services and Storage are only used in the classic mode to deploy virtrual machines.PrerequisiteAzure Cli installationsudo apt-get install nodejs-legacy
sudo apt-get install npm
sudo npm install -g azure-cliAccount Setup for ASMOpen a browser tohttp://go.microsoft.com/fwlink/?LinkId=254432*-DD-MM-YYYY-credentials.publishsettingsis downloaded on a local
directoryRunazure config mode as# To run azure cli tool via the classic service
management certificate.Runazure account import <publishsettings file>Runazure account cert export~/.azure/managementCertificate.pemExample (classic mode for launching VMs)Create a VM on Windows Azure
(ubuntu 14.04 is a default image)from simpleazure import SimpleAzure as saz

azure = saz()
azure.asm.create_vm()Status can be seen here.print vars(azure.get_status())
{'error': None, 'http_status_code': u'200', 'id': u'', 'status': u'Succeeded'}orprint vars(azure.get_deployment())
{'configuration': u'<ServiceConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration">\r\n  <Role name="myvm-20735">\r\n    <Instances count="1" />\r\n  </Role>\r\n</ServiceConfiguration>',
 'created_time': u'2013-07-22T16:10:18Z',
 'deployment_slot': u'Production',
 'extended_properties': {},
 'input_endpoint_list': None,
 'label': u'bXl2bS0yMDczNQ==',
 'last_modified_time': u'',
 'locked': False,
 'name': u'myvm-20735',
 'persistent_vm_downtime_info': None,
 'private_id': u'17071ce8bea345cf1575341c8510c84a',
 'role_instance_list': <azure.servicemanagement.RoleInstanceList at 0x333b5d0>,
 'role_list': <azure.servicemanagement.RoleList at 0x333b610>,
 'rollback_allowed': False,
 'sdk_version': u'',
 'status': u'Running',
 'upgrade_domain_count': u'1',
 'upgrade_status': None,
 'url': u'http://myvm-20735.cloudapp.net/'}Example for multiple deployment (classic)cluster() function helps to deploy several VMs at once.azure = saz()
azure.asm.create_cluster()

my-cluster-vm-0-87412
{'request_id': '88c94c00288d42acaf877783f09c4558'}
my-cluster-vm-1-61293
{'request_id': 'abfd563c2c4f4926872b6b1dba27a93b'}
my-cluster-vm-2-96085
{'request_id': '29b55f6cb5e94cfdbf244a7c848c854d'}
my-cluster-vm-3-46927
{'request_id': 'b1a3446ebafe47a295df4c9d1b7d743c'}Example for multiple deployment with Azure Data Science CoreDeploy 5 VMs with Azure Data Science Core at West Europeazure = saz()
q = azure.asm.get_registered_image(name="Azure-Data-Science-Core")
azure.asm.set_image(image=q,refresh=True)
azure.asm.set_location("West Europe")
azure.asm.create_cluster(num=5)List of VMsvars(azure.asm.list_deployments().hosted_services)Terminating VMazure.asm.delete_vm()orazure.asm.delete_vm('vm-name')ClusteringTBDContacthroe.lee at gmail.com