How to manage cloud resources with Python? We raise clusters on demand through several lines of code
The Simple Azure library allows you to manage cloud resources, including the creation, management, and deletion of virtual machines in a cloud environment. You can use this library for any purpose: from deploying a sandbox for Dev & Test purposes to locating and managing solutions in commercial operation.
Using Simple Azure, you can easily raise ipython notebook and ipython clusters in a cloudy environment, deploy ready virtual machines to choose from hundreds of VMDepot presented in the catalog .
Below is a brief introduction and examples of using Simple Azure for simple tasks and tasks for deploying an IPython cluster in the cloud.
Hosting machines from the VMDepot community directory
This code example selects an OpenSUSE based Azure Data Science Core virtual machine from the VMDepot community directory with a customized environment for working with big data, HPC and the following packages: cython, ipython, matplotlib, networkx, nltk, nodejs, numpy, pandas, pytables, redis, scikit-image, scikit-learn, scipy, statsmodels, sympy.
Step four - configure the master and engine nodes:
from simpleazure import config master = config.get_azure_domain(azure.results['master']) engines = [ config.get_azure_domain(x) for x in azure.results.keys()]
Name binding in the IPython plugin:
ipy.set_master(master) ipy.set_engines(engines)
Install SSH connection to the nodes:
ipy.init_ssh() ipy.connect_nodes()
Creating an IPython profile:
ipy.create_profile()
Starting IPController on master:
ipy.run_ipcontroller()
Setting engine nodes:
ipy.copy_pkey_to_nodes() # <- Temporary function to distribute id_rsa private key to node(s) ipy.copy_json2engines()
The last step is to execute ipengine on each engine node, so that they start interacting with the master:
ipy.run_ipengine() ipy.apply_ipcluster(azure)
Additional Information
More guides can be found at the following link . The details of the installation and configuration of the library are described here . You can get the source code of the library and join the development project on GitHub . The latest news and information about the project you can always find on the official website of Simple Azure .