Elastic Cloud Computing Cluster (EC3) is a tool to create elastic virtual clusters on top of Infrastructure as a Service (IaaS) providers, either public (such as Amazon Web Services, Google Cloud or Microsoft Azure) or on-premises (such as OpenNebula and OpenStack). We offer recipes to deploy TORQUE (optionally with MAUI) and SLURM clusters that can be self-managed with CLUES: it starts with a single-node cluster and working nodes will be dynamically deployed and provisioned to fit increasing load, in terms of the number of jobs at the LRMS (Local Resource Management System). Working nodes will be undeployed when they are idle. This introduces a cost-efficient approach for Cluster-based computing.
The program ec3 requires Python 2.6+, PLY, PyYAML and an IM server, which is used to launch virtual machines. By default ec3 uses our public IM server in servproject.i3m.upv.es. Optionally you can deploy a local IM server executing the next commands:
sudo pip install im sudo service im start
PyYAML and PLY are usually available in distribution repositories (python-yaml, python-ply in Debian; PyYAML, python-ply in Red Hat; and PyYAML, PLY in pip).
ec3 can be download from this git repository:
git clone https://github.com/grycap/ec3
In the created directory there is the python executable file ec3, which provides the
command-line interface described next.
First create a file auth.txt with a single line like this:
id = provider ; type = EC2 ; username = <<Access Key ID>> ; password = <<Secret Access Key>>
Replace <<Access Key ID>> and <<Secret Access Key>> with the corresponding values
for the AWS account where the cluster will be deployed. It is safer to use the credentials
of an IAM user created within your AWS account.
This file is the authorization file (see Authorization file), and can have more than one set of credentials.
The next command deploys a TORQUE cluster based on an Ubuntu image:
$ ec3 launch mycluster torque ubuntu-ec2 -a auth.txt -y WARNING: you are not using a secure connection and this can compromise the secrecy of the passwords and private keys available in the authorization file. Creating infrastructure Infrastructure successfully created with ID: 60 ▄▟▙▄¨ Front-end state: running, IP: 132.43.105.28
If you deployed a local IM server, use the next command instead:
$ ec3 launch mycluster torque ubuntu-ec2 -a auth.txt -u http://localhost:8899
This can take several minutes.
Bear in mind that you have to specify a resource manager (like torque in our example) in addition to the images that you want to deploy (e.g. ubuntu-ec2). For more information about this check the templates documentation.
You can show basic information about the deployed clusters by executing:
$ ec3 list
name state IP nodes
---------------------------------------------
mycluster configured 132.43.105.28 0
Once the cluster has been deployed, open a ssh session to the front-end (you may need to install the sshpass library):
$ ec3 ssh mycluster Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-24-generic x86_64) Documentation: https://help.ubuntu.com/ ubuntu@torqueserver:~$
You may use the cluster as usual, depending on the LRMS. For Torque, you can decide to submit a couple of jobs using qsub, to test elasticity in the cluster:
$ for i in 1 2; do echo "/bin/sleep 50" | qsub; done
Notice that CLUES will intercept the jobs submited to the LRMS to deploy additional working nodes if needed. This might result in a customizable (180 seconds by default) blocking delay when submitting jobs when no additional working nodes are available. This guarantees that jobs will enter execution as soon as the working nodes are deployed and integrated in the cluster.
Working nodes will be provisioned and relinquished automatically to increase and decrease the cluster size according to the elasticity policies provided by CLUES.
Enjoy your virtual elastic cluster!
- EC3 Command-line Interface.
- Templates.
- Information about available templates:
ec3 templates [--search <topic>] [--full-description].
