EuTester

%define=code bgcolor=#BEE554 padding=3px indent lframe% !! About Eutester Eutester provide a framework for cloud architects and administrators to validate and benchmark their various AWS-compatible cloud infrastructure options. Enterprises and research institutions are rushing to roll out their strategies for moving their mission critical applications and services to on-premise, public, or hybrid clouds. The end result of this strategy should be a fault tolerant and reliable compute, storage, and networking infrastructure. Unfortunately, choosing a private or hybrid IaaS solution to implement is not the end of the road for a cloud strategy. The next level of planning involves choosing and validating the interconnected components of the cloud infrastructure stack. The considerations necessary include, but are not limited to, choosing network topologies, hypervisors, component topology, and storage devices. What many will end up with is a few different ways to implement the end goal, a scalable and robust self service infrastructure. In order to make “apples to apples” comparisons of these options, it is necessary to have a test library that is agnostic to the underlying components and treats each cloud implementation equally by presenting results in a unified and comparable way. \\

Eutester is written in Python and leverages the boto and paramiko libraries to provide the necessary tools for quickly implementing an automated test strategy. Boto is used in order to provide connections to EC2, S3, and IAM. Paramiko is leveraged to provide root access to nodes that are running the individual cloud components.

Before trying to get eutester working please go to [| Stephen's Blog]

Python\\ EUTester Python Scripts \\ Eucalyptus Final Fail Meter review\\

copy of the readme file in the Eutester code. Eutester README.md

Here is the link to our PiratePad if anyone is interested: \\ http://piratepad.net/detT84L8Hk \\ ~Trevor

Primer to EUTester \\ http://testingclouds.wordpress.com/2012/03/04/test1/ \\ http://testingclouds.wordpress.com/2012/03/29/eutester-basics-part-ii-setting-up-a-development-environment/ \\ ~Nathan

Git Help \\ [| Tutorial video for Git]: GitHub staff member Scott Chacon explains how the Git system works overall and how to use all the basic commands. \\

[| Git tips and tricks]: Change.org's Jared Grippe shows a few tips that can be used to ease the workflow of Git users. \\ ~Marcos

Cloning and Building the eutester Repository

Git Repository for the eutester code is located at: https://github.com/eucalyptus/eutester Type: %code% git clone git://github.com/eucalyptus/eutester <<

to clone a copy of the repo onto your local machine.

You will need to install Python: <<

%code% sudo apt-get install python << <<

You will also need to install Paramiko in order to build euTester, by doing: %code% sudo apt-get install python-paramiko <<

You will also need to ensure you have boto installed as well, by doing: <<

%code% sudo apt-get install python-boto <<

Or else you will be missing a module required for euTester.

Paramiko is basically just a Python module that uses an ssh protocol that allows secure connections to remote machines. Here is a link to read up and/or download it: http://www.lag.net/paramiko/

Also, here is the link to the Boto github page. Boto is a Python interface for Amazon E2C. It is pretty much just an API for Python development on the Amazon cloud. https://github.com/boto/boto

~Steve and Trevor

cd into the eutester directory and type >>code<< python setup.py build >><< << to build the project.

Then type >>code<< python setup.py install >><< << to install the project. If you're not root, otherwise : >>code<< sudo python setup.py install >><< << ~Trevor

You should now be ready to head over to the [| EuTester Users Guide] -

What does it do?

This project is to validate a cloud. The goal is to have a scripts/program/way to confirm that a specific cloud is properly functioning and that it was properly installed (in the case it is a private cloud).

Well before we jump over to executing our first sample test case let me point out here that in order for Eutester to successfully test your Eucalyptus private cloud you need to have a configuration file for your cloud which looks something like below:

172.22.0.15 CENTOS 5.7 64 REPO [CC00 CLC SC00 WS] 172.22.0.16 CENTOS 5.7 64 REPO [NC00]

(READ REST OF POST http://lists.eucalyptus.com/pipermail/community/2012-January/000210.html)

Just adding the link that Dr. Wurst just emailed to everyone. I started reading through it (but don't have access to my laptop currently so couldn't test anything) and there seems to be a lot of good information on it. http://testingclouds.wordpress.com/2012/03/04/test1/. One thing that he does mention (for when our cluster is ready to go) is that we will need the credentials path from the Cloud Controller and Walrus - which is supposed to contain a eucarc file (don't know what that is).

In the blog above, he put a link to the API documentation - which seems like it will be VERY helpful in the future if we need to write our own testing scripts. https://github.com/eucalyptus/eutester/wiki/API-Documentation

I'll keep adding as I learn more. \\ ~ Nathan

The EuTester module is split into two different classes: eutester and eucaops. Eutester class provides key framework pieces such as configurations, credentials, connections, and test primitives. Eucaops class inherits the framework provided by eutester in order to validate operations against a cloud. \\ ~Marcos

The Eutester is to be run from a local machine in order to verify a cloud set-up, i.e., does it (the cloud) do what we want it to do, when we want it to do it, how we want it done.

The following is an excellent post, which is a follow-on to the above mailserve link.

http://jeevanullas.in/blog/2012/01/testing-eucalyptus-cloud-now-made-easy/ Before the tester can be used certain things must be set:

a) The eucalyptus cloud already setup

b) Access to [| CLC] via SSH - we may want to add some info on SSH c) At-least one EMI registered

!!   Find the bug tracker:

The EuTester bug tracker is located [| here].

!!!   What issues are there?

As of now there are seven issues listed on the EuTester bug tracker. They are as follows:

Better overall documentation is needed. Some things that can be better organized:Readme file should be bolsterd/Add more sample scripts/Ensure sane defaults (ie requests go to ECC by default)
 * issue #2: Goals, purpose, and guidelines for contribution

A standard set of debugging tools should be provided to the user whenever an EuTester test fails. As much debug info as possible should be included to help figure out the cause of the behavior. Right now the EuTester class’s debug system is too basic and we want expand on it to make it more useful.
 * issue #10: Create a standard set of debug tools available when tests fail

The need to figure out what license can be Eutester under. First proposition is from Gregdek that GPLv3 to be compatible with the Eucalyptus product itself, but there is the need to be explicit. Also need to be clear that it's copyright Eucalyptus.
 * issue #12: Define licensing

One suggestion is a testrunner such as: http://tungwaiyip.info/software/HTMLTestRunner.html
 * issue #22: Need to investigate a tool that represents test results visually

Which produces a report that looks like: http://tungwaiyip.info/software/sample_test_report.html

Eucaops has grown a little too large for liking and should be split in               chunks as follows: EC2ops S3ops IAMops We would then have a Cloudops class that would inherit from all of these 3 classes. The current Eucaops would then inherit from Cloudops and include anything that is necessary to use Euca (for example modifying properties) that does not apply to AWS.
 * issue #24: Restructure Eucaops into multiple modules

Currently Eucalyptus rely on the password to be passed in to Eucaops or               Eutester in order to determine whether there will be needing to connect to                machines (ie create machine objects). There should be a way to say that you want connections to machines without passing in a password.
 * issue #25: Need way for machine access when keys have been previously synced

According to hspencer77 on EuTester bug tracker when you create a               config_file with only the CLC, CC, SC and WS, an error occurs when tests are executed because tests are ran from the CLC. This does not keep the tests from being ran, but this give the impression that there is an               error.that
 * issue #28: Feature Request: Allow for NC to be an optional value in config_file


 * issue #29: About this issue I suggest for everybody to ignore it because it is mistake

1) get rid of self.options; use options throughout script              2) get rid of while loop grabbing creds 3) git rid of if statements for checking config_file or credpath; eutester takes care of that              4) get logs if only debug flag is passed 5) add everything that i make a global variable to self.              6) keep options for a cloud admin, not cloud user 7) make sure command runs on the CC              8) get rid of line 101 and 102 (removed None assignments) 9) don't wait on instance to run; get rid of line 119              10) get rid of grabbing uname -a 11) maintain list of reservations              12) only print result if there is an error - get rid of else; use tester.critical instead of print
 * issue #32: Added Changes Requested from Code Review Session in eutester meeting

When run_instance is called in Eucaops it chooses to convert the boto instances to euinstances only if the instance is reachable. Instead it should always return the euinstance and just not pass keys to the Euinstance constructor which will ensure that the euinstance will not try to create an SSH connection.
 * issue #33: run_instance should still provide a euinstance regardless of reachability

Currently there is an implementation in place in eutester that allows for logs to be gathered during the execution of a testcase. The implementation is simply a prototype and is hard coded in a way that does not expose the features full potential. In order to make the log capturing more flexible it should be implemented in the machine class and allow capturing an arbitrary file.
 * issue #34: Move logging functionality from eutester.py to the machine class

I always think that everything should be kept track of in order to have an idea of what is going on with the project. The past may help us to understand the present. This is my point why we should know about closed issues. There are 22 closed issues for the EuTester.


 * issue #1: eutester should allow the opening of multiple ssh connections
 * issue #3: inclusion of test to reproduce https://bugs.launchpad.net/eucalyptus/+bug/737335
 * issue #4: Goals, purpose, and guidelines for contribution
 * issue #5: Testing capability for Jenkins + EC2 Plugin
 * issue #6: create_ssh does not pass correct key file name argument
 * issue #7: get_emi in eucaops selects de-registered image
 * issue #8: README.md
 * issue #9: Create a standardized Eutester log/output format
 * issue #11: connect to walrus should use s3_url
 * issue #13: Now using Euinstance in Eucaops
 * issue #14: Continuing integration of euinstance, removed some debug information
 * issue #15: Continue implementation of euservice class and machine class
 * issue #16: Comments from WSU CS 401
 * issue #17: More comments from WSU CS 401
 * issue #18: Update eutester/__init__.py
 * issue #19: Added fix for eutester to work with Dynamic DNS-enabled Eucalyptus 2.0 Clouds
 * issue #20: Fixed initial pull request
 * issue #21: Added fix to handle Dynamic DNS-enabled Eucalyptus 2.0 Clouds
 * issue #26: Allow credpath option with config_file option when instantiating Eucaops
 * issue #27: Added test case for security group (iptables) cruft #
 * issue #30: Re-do previous pull request
 * issue #31: adding test case for disassociate address bug

Contributors: '-Michael Kenny-' '-Eduart Lekdushi-' '-Daniel Njoroge-' '-Marcos Knight-' '-Joseph Gaval-' '-Jose Fernandez-'

Tasks:

What does it do?
 * Stephen Flynn
 * Mike Rossetti

What does it test?


 * James Celona
 * Trevor Hodde

Where do we install it?
 * Trevor Hodde
 * Nathan Doe
 * James Forkey
 * Chris Embree
 * Jose Fernandez
 * Marcos Knight
 * Armindo Andrade

What issues are there?


 * Michael Kenny
 * Eduart Lekdushi
 * Daniel Njoroge
 * Marcos Knight
 * Joseph Gaval