Skip to content

carlewis/clues-plugin-one

Repository files navigation

CLUES ONE Connector - OpenNebula for Cluster Energy Saving System

0. DESCRIPTION

This is the connector that enables CLUES to integrate with Open Nebula
Cloud Management System.

Complete documentation can be found at

  http://www.grycap.upv.es/clues

CLUES ONE Connector is distributed under the GPL version 3 license

  CLUES ONE Connector - ONE Connector for Cluster Energy Saving System
  Copyright (C) 2011 - GRyCAP - Universitat Politecnica de Valencia
 
  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.

1. INSTALLATION

If you are following this guide, you are advised to read the whole guide prior to
start installing CLUES. In fact, this guide is very straightforward.

1.1 REQUISITES

Both CLUES and this ONE connector are based on python, so Python 2.4 or higher 
runtime and standard library must be installed in the system.

1.2 INSTALLING

The path in which CLUES system is installed will be called CLUES_PATH

  $ cd $CLUES_PATH/plugins
  $ tar xvfz clues-one3-0.88.tar.gz
  $ ln -s clues-one3-0.88 one

Configure CLUES to use this plug-in by including it in the configuration file, and
adjust the config.py configuration file inside the ONE.

Locate the ONE configuration file (e.g. /srv/cloud/one/etc/oned.cfg) and append the
next hook statement

  VM_HOOK = [
    name      = "hold_vm",
    on        = "CREATE",
    command   = "/opt/clues/plugins/one/one.wrapper.py",
    arguments = "$VMID" ]

Please make sure to adjust the "one.wrapper.py" path to the real path according to 
your CLUES installation. Also check that the user that runs the CLUES daemon has
permissions to read an execute both the "one.wrapper.py" and "one.nodeinfo"
executables.

Restart the OpenNebula daemon to make it to take into account the changes.

1.3 CONFIGURATION

Please, adjust the variables in config.py to fit your CLUES installation, but also
the ONE configuration. 

1.3.1 ONE CREDENTIALS

CLUES needs a user to interacts with ONE to be able to hold and to release virtual
machines.

Please create a user and place the ONE credentials (ONE_AUTH file) in the plugin
directory as /opt/clues/plugins/one/one_auth with the proper file permissions.

  $ chmod 400 /opt/clues/plugins/one/one_auth

Make sure that the one_auth file is readable by both the user that runs CLUES and
the user that runs OpenNebula. Otherwise you can create one file for each subsystem
with different  permissions, in case that such configuration is more suitable for you.

The most general solution would be to create a group called "clues" in which they are
included both the "oneadmin" user (the user that runs the ONE daemon) and the "clues" user
(the user that runs the CLUES daemon) and adjust the permissions for the one_auth file

  $ addgroup clues
  $ usermod -aG clues oneadmin
  $ usermod -aG clues root
  $ chown :clues /opt/clues/plugins/one/one_auth
  $ chmod 440 /opt/clues/plugins/one/one_auth

1.3.2 PLUGIN CONFIGURATION

Please adjust the next variable to provide administrative rights for the connector
in the /opt/clues/plugins/one/config.py file

  ONE_AUTH_FILENAME="/opt/clues/plugins/one/one_auth"

1.3.3 NEEDED INTEGRATION

In order to avoid ONE errors, two scripts are provided to disable (in the ONE
environment) the hosts that powered off, and later enable them when they are powered
on. They are placed in the /opt/clues/plugins/one/power.d

Please adjust the next variable to point to the plugin folder in both 50one.poweron
and 50one.poweroff files:

  PLUGIN_PATH=/opt/clues/plugins/one

Then please link both files to be properly called by the CLUES power on and power
off mechanisms:

  $ ln -s /opt/clues/plugins/one/power.d/50one.poweroff /opt/clues/bin/power.d
  $ ln -s /opt/clues/plugins/one/power.d/50one.poweron /opt/clues/bin/power.d

1.3.4 CLUES CONFIGURATION

CLUES needs to check the available resources once the ONE scheduler has deployed
the virtual machine. To ensure that the virtual machine has already allocated the
resources that ONE has assigned to it, CLUES needs to synchronize with the ONE
scheduler.

The synchronization is made by altering the variable MAX_TIME_LAUNCH in the CLUES
main config.py file (probably located in /opt/clues). You must set the MAX_TIME_LAUNCH
to the period that the ONE scheduler deploys virtual machines (by default it is set
to 30 seconds).

  MAX_TIME_LAUNCH=30

CLUES also relies on the ONE monitoring system to check whether a node has been
properly started or not. Please adjust the ONE host monitoring time to a time that
will not interfer in your work. Take into account that the default configuration
of ONE monitor the hosts each 10 minutes. That would mean that a VM that needs to
power on a node will wait up to 10 minutes even if the host has been properly
powered on. Please adjust the HOST_MONITORING_INTERVAL variable in the oned.conf
file.

  HOST_MONITORING_INTERVAL = 60

1.3.5 CHECKING THE INSTALLATION

In order to check that your system is properly configured you can execute the
one.nodeinfo command in the commandline. The output should be somehow like the next
example:

  $ ./one.nodeinfo
  dellblade15;free;free_slots=7;total_slots=16;NAME="dellblade15";TOTALCPU=1600;TOTALMEMORY=16419876;FREEMEMORY=15158736;FREECPU=1497.6;USEDMEMORY=1261140;USEDCPU=102.4;HYPERVISOR="kvm";RUNNING_VMS=2
  (...)
  dellblade01;free;free_slots=2;total_slots=8;NAME="dellblade01";TOTALCPU=800;TOTALMEMORY=16434168;FREEMEMORY=16178460;FREECPU=800;USEDMEMORY=255708;USEDCPU=0;HYPERVISOR="kvm";RUNNING_VMS=0

  
This check will tell you if there are problems in the credentials of the user, the
permissions to execute the command, etc.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published