EasyCloud
EasyCloud is a toolkit written in Python able to interact with multiple cloud platforms, such as OpenStack, Amazon Web Services (AWS) and Google Cloud Platform (GCP).
With EasyCloud, a user can:
- start/stop/clone a VM
- manage floating IPs and volumes
- monitor the VMs health status
- gather metrics data from instances and send them into multiple sinks (e.g., save them in plain CSV files or in a Redis data store, or publish them to Apache Kafka, or even to push them on third-party monitoring systems like Prometheus)
- create/manage policies in order to prevent faults (i.e., "if the CPU utilization is higher than XX %, then clone it")
Quick start:
-
Requirements
You need an account for the cloud platform you want to use. Some cloud platform requires a payment for some service they provide, so we suggest to consult all the prices listings before using EasyCloud. Python 3.7 and pip3 19.0 are required in order to use this tool. Please note all the tests were conducted on these versions, so it is possible that an older or newer version of Python 3 can still run this program. -
Install the required core libraries
This step can be done manually or autotically with the installer script provided. In both of the cases, pip3 must be installed prior to proceeding further.-
[Automatic installation] If you want to use the installer, move to the
EasyCloud/libs_installer
directory and execute./installer.sh
Wait until the end of the process. If an error occourred during the installation, a log file will be available in the
libs_installer
directory, containing the cause of failure. -
[Manual installation] If you want to perform a manual installation, open a terminal and run the following command
pip3 install --user -r requirements.txt
-
-
Set up the configuration file
Each cloud platform provides the credentials to enable the user to interact with the platform services. You need to fill up these credentials into the specific configuration of the cloud platform you want to use. The configuration files are located in modules/platform/settings.cfg where platform is one the following options: aws_libcloud for AWS, gcp_libcloud for GCP, chameleon_libcloud for OpenStack provided by Chameleon project and openstack_libcloud for the vanilla OpenStack cloud platform. Each setting file has some mandatory settings and some optional setting as exaplained below.
-
[Mandatory settings]
-
[Amazon Web Services] First of all, go to the specific directory for AWS:
cd easycloud/modules/aws_libcloud/
and create a local copy of the config file:cp settings.cfg.template settings.cfg
Follow the instuction provided in the settings.cfg file to fill up at least the first 3 parameters that are mandatory: ec2_access_key_id, ec2_secret_access_key and ec2_default_region. -
[Google Cloud Platform (GCP)] First of all, go to the specific directory for GCP:
cd easycloud/modules/gcp_libcloud/
and create a local copy of the config file:cp settings.cfg.template settings.cfg
Follow the instuction provided in the settings.cfg file to fill up at least the first 3 parameters that are mandatory: gcp_access_key_id, gcp_secret_access_key and gcp_project. -
[OpenStack by Chameleon Project] First of all, go to the specific directory for OpenStack:
cd easycloud/modules/chameleon_libcloud/
and create a local copy of the config file:cp settings.cfg.template settings.cfg
Follow the instuction provided in the file to set up at least the first 6 parameters that are mandatory: os_auth_key_url, os_username, os_password, os_project_name, os_project_id and os_region.
Once you have filled up the mandatory parameters, you are ready to use cloud platform selected (you can skip the "optional settings" below) by following the instruction described in "Run EasyCloud" section.
-
-
Optional settings
You can then customize the platform specific settings (if available) in modules/platform/settings.cfg. For example, each platform can have a limited free-tier mode available and this mode must be enable through a variable in order to filter certain types of resources, based on the free-tier conditions. In the settings.cfg file, you will find a short guide to set up properly the optional settings. -
Run EasyCloud UI using
easycloud_launcher.sh
on macOS, BSD and GNU/Linux distributions and then follow the instructions provided by the tool. If a missing package is detected, EasyCloud won't start or will ask if it can download and install it through pip3.-
Flags
EasyCloud shell script can be launched with certain flags, in order to perform the following operations:-
--debug
save all the outgoing HTTP requests and all the incoming HTTP responses made by Libcloud inlogs/libcloud_debug.log
This setting works only if the application has been executed using the shipped shell script. -
--no_libs_check
disable the dependencies check for each module at the start of EasyCloud -
--help
display a list of available flags -
--version
display the application version
-
-
Debug messages
This application will record all the debug messages ineasycloud.log
, in order to study its behaviour and the Monitor and Rule Engine iterations.
-
-
Use EasyCloud programmaticaly by means of its intuitive API. For instance, the following program prints on the standard output all your AWS instances:
from easycloud.modules.aws_awssdk.manager import AWS config_file = '/path/to/aws/settings.cfg' # e.g., './easycloud/modules/aws_awssdk/settings.cfg' rule_file = '/path/to/rules.dct' # e.g., './rules/rules.dct' mngr = AWS(config_file=config_file, rule_file=rule_file) for instance in mngr.list_instances(): print(instance)
Wiki
Please, consult the Wiki for a more detailed explanation on how to configure EasyCloud.
Supported platforms
The following platforms are currently supported by EasyCloud
Supported measure sinks
Measure sinks are subsystems to which you can send metrics data gathered from your instances. Currently, EasyCloud supports the following measure sinks:
There is also a dummy sink that is useful for debugging and testing purpose.
Source code download
You can download the application source code from our git repository by using the git clone git@gitlab.di.unipmn.it:DCS/easycloud.git
command.
License
This project is available under the GNU General Public License v3. A copy of this license is shipped with the tool and available here.
Institute
This project is a collaborative effort made by a group of researchers and students of the
University of Eastern Piedmont Amedeo Avogadro
Department of Sciences and Innovation Technology (DiSIT)
Alessandria and Vercelli, Piedmont, Italy
https://www.disit.uniupo.it
Superadvisor
- Massimo Canonico
Contributors
- Marco Guazzone (marco.guazzone@uniupo.it)
Contact info
Credits
- Andrea Lombardo (for the original CloudTUI project)
- Davide Monfrecola (for the CloudTUI-FTS project)
- Giorgio Gambino (for the CloudTUI-FTS project)
- Irene Lovotti (for the original CloudTUI project)
- Luca Banzato (for the original EasyCloud project)
- Stefano Garione (for the CloudTUI-FTS project)