Learning Python

Since EU Tester is written almost completely in Python, I was tasked to learning more about the language for future script writing/modification. I came across a really good website that has lessons that goes through the basics of Python: http://www.sthurlow.com/python/. It was very helpful and I would definitely recommend it to others in the class that want to pick up the language. I haven’t done much with scripting languages in the past, so Python was a new world for me. However, I got through the lessons quickly and it was very easy to pick up.

After I got the hand of the basics of Python, I started looking into the EU Tester Python code. There were a lot of functions that I did not know what they did, but using the API Documentation on the EU Tester GitHub project (https://github.com/eucalyptus/eutester/wiki/API-Documentation) and the Python Docs (http://docs.python.org/library/index.html) I was able to get the general idea of what each script was doing. While going through this code, I did start documenting what each script does (although I probably should have posted it onto the CS-Dept Wiki). I plan on continuing to go through these Python scripts and try to document what each one does even more (which is now posted on the wiki ;-) ) http://cstest.worcester.edu/wiki/pmwiki.php?n=Main.EUTesterPythonScripts

 

From the blog nathandoe » WSU CS by nathandoe and used with permission of the author. All other rights reserved by the author.

(WEEK 3)

The third week is was very exciting for me because this is the day we find out what program we are going to be working on whether is VLC, Mozilla, Libre Office or Eucalyptus. We had an debate on which people would like to work on between this programs. We couldn’t just agree with one because most students wanted to do different things. The only way to solve this problem was for everybody to write down on a peace of paper what do they want to in order for favorite to least favorite program. In the end the highest program that received the most votes was Eucalyptus. Its kind of wear because i never heard of that program before and i never though the programming code that works with this is Python. Kind of confusing but exciting in a scary way. looking forward to this exercise. 

From the blog Jose's CS 401 BLOG by Jose Luis Fernandez and used with permission of the author. All other rights reserved by the author.

3/12-3/25

Progress is being made with our class’ cluster.  Hopefully we will soon be able to add images to it, which will allow us to progress a bit futher in using the Eutester program.  For my part, I have been trying to figure out why I could not ssh into any of the instances started from a Ecalyptus image.

This was a vexing issue, made more so because others in the class were able to make it work.  I ended up installing Euca2ools onto 3 different computers in order to compare the results I got on each.  The problem came down to not being authorized to establish an ssh connection to an instance I had started.  I tried multiple times deleting and adding keypairs, and combing through the available images, thinking that somehow it was the images fault I could not establish a connection.

I finally had the choice to add an instances public key to a known_hosts file in the .ssh folder (I assumed I was doing everything up to this point correctly), but still received an error and no connection was made.  On a whim, I went into the .ssh folder and deleted the files I found there.   My next attempt was successful.

Contemplating why this would occur, I realized that the IP address used for each session remained the same, no matter if multiple instances had been created, either from the same or different images.  The problem was that ssh was uncomfortable with this and so refused to connect.

I performed an experiment, to see if I could duplicate this error.  I established ssh connections to 2 different instances of 2 different images.  I then terminated those instance and restarted them in reverse order.  This established those instances with different IP addresses.  I then attempted to ssh into the instances and got errors stating that the host keys had changed.  I feel as if this error should have been caught a while ago, but my ignorance of using ssh got in the way.

Fortunately, I can now start an instance at will and can resume becoming familiar with Eutester, with the goal of using and modifying this tool.

From the blog sflynn1976 » wsu-cs by sflynn1976 and used with permission of the author. All other rights reserved by the author.

CS401 – Eucalyptus and Amazon

Did some more research this week and found more ways in which Amazon EC2 and Eucalyptus are similar. It looks like amazon’s S3 is pretty close to what Walrus does, and Amazon’s EBS is close to what the storage controller does.

This means that we’ll be able to look at amazon’s documentation to be able to fill in some of the gaps of information in eucalyptus’s documentation, which is good.

From the blog blabbecs401 » CS401 by blabbecs401 and used with permission of the author. All other rights reserved by the author.

Week 6:

Week 6:

During the meeting this week, all groups presented their work on Eucalyptus project. I participated on EuTester bug tracker, which we could not find any issues since the software is very new. However, there were 15 issues reported on GitHub, which 9 of them are closed. The open issues are as follows:

  • Define licensing – Need to figure out what license we’re offering Eutester under. I presume GPLv3 to be compatible with the Eucalyptus product itself, but we need to be explicit. Also, need to make it clear that it is copyright Eucalyptus.

 

  • Create a standard set of debug tools available when tests fail – When a eutester test fails, we need to provide a standard set of debugging tools back to the user. This debug info should include as much as is necessary to find the possible cause of the behavior. Currently, the Eutester class provides a very basic framework for this, but we would like to expand it. Some feature ideas for the debug tools set (not the final list): grep (already implemented), euca-describe-* (get a listing of all resources in the system),              get_all_everything in boto, get logs, get topology, get distro, get build information, get environment (cpu, mem, etc),   euca-describe-everything, get test script used, self replicating code, yum, and tar. In addition, graceful error messages (for instance, some tools may only work with root privs — so we need a nice “you don’t have the privs to do that” message for non-root users, instead of spewing gibberish.)So step 1 is presumably to figure out what the final list is. :) We may need to break this into separate tickets if implementing some of these turn out to be less trivial than others.

 

  • Create a standardized Eutester log/output format- We need to standardize the way we present info about a running test to a user – essentially, output formatting. Initial Thoughts
    *date
    *file
    *function
    * severity                                                                                                                                                                                                                           Eutester currently uses the python logging library (http://docs.python.org/library/logging.html) which seems to have everything we want, but just needs to be customized. Clarksb has offered to take this on — the first step will be figuring out the format we want (and then the next bit will be implementing it).

 

  • Testing capability for Jenkins + EC2 Plugin Would like to look at test cases for Jenkins + EC2 plugin and whether this is possible to script. Jenkins has a CLI client but whether this works with EC2 Plugin is another thing: https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+CLI
  • Goals, purpose, and guidelines for contribution.  Need to produce better documentation: (1) Readme file should be bolsterd            (2) Add more sample scripts (3) Ensure sane defaults (ie requests go to ECC by default)

Work cited

https://github.com/eucalyptus/eutester/issues

From the blog Dnjoroge by Dnjoroge and used with permission of the author. All other rights reserved by the author.

EuTester

Week 5 we broke into groups to work on different projects and my group worked on setting up and applying EuTester. The EuTester code is written in Python so before I could really get started I had get more familiar with the Python language. I went through some Python tutorials and one that really helped me a lot was this one: http://www.sthurlow.com/python/ . Once we all got comfortable with Python we tired to get Eucalyptus running and then get the EuTester code running.

From the blog MarcosKnightCS401 by MarcosKnightCS401 and used with permission of the author. All other rights reserved by the author.

EuTester

Week 5 we broke into groups to work on different projects and my group worked on setting up and applying EuTester. The EuTester code is written in Python so before I could really get started I had get more familiar with the Python language. I went through some Python tutorials and one that really helped me a lot was this one: http://www.sthurlow.com/python/ . Once we all got comfortable with Python we tired to get Eucalyptus running and then get the EuTester code running.

From the blog MarcosKnightCS401 by MarcosKnightCS401 and used with permission of the author. All other rights reserved by the author.

EuTester

Week 5 we broke into groups to work on different projects and my group worked on setting up and applying EuTester. The EuTester code is written in Python so before I could really get started I had get more familiar with the Python language. I went through some Python tutorials and one that really helped me a lot was this one: http://www.sthurlow.com/python/ . Once we all got comfortable with Python we tired to get Eucalyptus running and then get the EuTester code running.

From the blog MarcosKnightCS401 by MarcosKnightCS401 and used with permission of the author. All other rights reserved by the author.

EuTester

Week 5 we broke into groups to work on different projects and my group worked on setting up and applying EuTester. The EuTester code is written in Python so before I could really get started I had get more familiar with the Python language. I went through some Python tutorials and one that really helped me a lot was this one: http://www.sthurlow.com/python/ . Once we all got comfortable with Python we tired to get Eucalyptus running and then get the EuTester code running.

From the blog MarcosKnightCS401 by MarcosKnightCS401 and used with permission of the author. All other rights reserved by the author.

EuTester

Week 5 we broke into groups to work on different projects and my group worked on setting up and applying EuTester. The EuTester code is written in Python so before I could really get started I had get more familiar with the Python language. I went through some Python tutorials and one that really helped me a lot was this one: http://www.sthurlow.com/python/ . Once we all got comfortable with Python we tired to get Eucalyptus running and then get the EuTester code running.

From the blog MarcosKnightCS401 by MarcosKnightCS401 and used with permission of the author. All other rights reserved by the author.