Category Archives: open source

CS 401 – Networking is Difficult

So I haven’t posted here in awhile. In CS 401 I have been trying unsuccessfully to create a working Eucalyptus cloud. At this point the basic system is in place: The core services are running. Users can sign up for an account on our cloud. Users can upload kernels and OS images. However, when a user tries to launch a virtual machine instance everything falls apart. The instances are forever stuck in the “pending” state.

I was using the “managed” networking mode for Eucalyptus. However, upon testing if the network was “VLAN clean.” I followed the instructions here and alas, the VLAN was not clean. It seems like more of a headache to get the VLAN to function than it is to switch to the “managed-novlan” networking mode.

The “managed-novlan” mode required me to manually configure an ethernet bridge for Eucalyptus to use. I followed the instructions in the Eucalyptus 3.0 Installation Guide and everything seems to work (running `service network restart` shows no errors), but now the Cluster Controller cannot communicate with the Node Controllers. This means that there are no available resources advertised for VMs. So now I cannot even try to start up a VM instance. πŸ™

I only have basic networking knowledge so these issues have been a real headache for me. The fine folks on the #eucalyptus IRC channel have been helping me out with everything but everytime we eliminate an issue there is another one to take its place.

In other news, Eucalyptus project member Andy Grimm will be visiting WSU this week. I’m looking forward to talking with him and hopefully I can convince him to give me some on-site assistance with the servers.

From the blog David Thompson Β» WSU CS by davexunit and used with permission of the author. All other rights reserved by the author.

Behind on the blogs, sorry for that

Unfortunately I mistakenly deleted my Xubuntu off of my virtual machine instead of Ubuntu, don’t ask me how I managed. Β I started over the day before but after I installed Python back, updated boto, paramiko, and all that jazz I get to the point where Β thought I was in the clear but two lines down:

eutester = Eutester(credpath=”../credentials”) Β – gives me a syntax error “syntax error near unexpected token ‘(‘ and I can’t figure out whats going on. Β  Been on the IRC for the past few hours, no one has been around to explain this to me. Β I tried redoing my credentials but unfortunately that didn’t solve the problem. Β  Turns out you have to run python before entering any of those commands but now I’m getting file not found, still better than a stupid syntax error.

I figured out my problem, thanks to Coady and testingcloud’s blog. Β  I ended up getting this:

http://i.imgur.com/Cj6Gp.jpg

I’m glad I got thatΒ credentialsΒ thing sorted out, now I can start helping out much more.

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

Tutorial – Installing GNU FM

I recently heard about a neat little site called libre.fm that provides a last.fm like service for listening to and sharing your musical interests. Libre.fm, however, runs on free software, respects user privacy, and includes only freely licensed music. The software that powers libre.fm is called GNU FM. I installed it on my home server just to check it out. This post explains what I had to do to get a working installation. The GNU/Linux distribution that I am using is Debian Squeeze. Hopefully this guide can be of help to someone.

Prerequisites

This guide makes the assumption that you already have a functional web server (Apache, nginx, etc.), PHP 5, and database server (either MySQL or PostgreSQL).

Setup Database

I made a MySQL user specifically for GNU FM

CREATE USER 'gnufm'@'localhost' IDENITIFIED BY 'yourpassword';

Create a database

CREATE DATABASE gnufm;

Download Source

GNU FM uses Git for version control. The source is available from gitorious. Clone the repository with the following command.

git clone git://gitorious.org/foocorp/gnu-fm.git

Install Gnukebox

From the gnu-fm directory, copy the server application, gnukebox, to the web server directory.

cp -r gnukebox/ /var/www/

From your web browser, go to http://yourwebserver/gnukebox/install.php. It’s quite straight forward. Enter the information in for your database server like the database name and the user that you have created.

If the web server cannot write to the directory in which you installed gnukebox, you will see a page that prints out the configuration code that you will need to manually insert into the config.php file in the gnukebox directory.

Install Nixtape

From the gnu-fm directory, copy the web interface, nixtape, to the web server directory.

cp -r nixtape/ /var/www/

From your web browser, go to http://yourwebserver/nixtape/install.php. You will enter the same database details as you did for gnukebox and give your GNU FM server a name.

Once again, if the web server cannot write to the directory in which you installed nixtape, you will see a page that prints out the configuration code that you will need to manually insert into the config.php file in the nixtape directory.

Nixtape requires some extra PHP libraries to be installed along with it. Please note that the version numbers of these libraries may be different depending on how far you in the future you are coming from. Which means that copy/paste’ing the commands I give you will not work, but you’ll probably only have to change the version number in the command to make it work.

Install ADOdb

ADOdb is a database abstraction library for PHP. Installing the library takes just a simple apt-get.

apt-get install php5-adodb libphp-adodb

Install Smarty

Smarty is a PHP templating library that nixtape uses for all web pages. There are packages available in the Debian Squeeze repository, but GNU FM does not work with them. The problem is the result of a slightly different path to the files contained in the Debian package. Since the GNU FM repo has a .tar.gz archive of Smarty within it, we’ll just install that instead.

From the gnu-fm directory, cd to the external_dependencies directory.

Extract Smarty and the Smarty text plugin.

tar zxf Smarty-2.6.22.tar.gz
tar zxf smarty-gettext-1.0b1.tgz

Copy the needed files to the nixtape directory.

mkdir /var/www/nixtape/smarty
cp -r Smarty-2.6.22/libs/ /var/www/nixtape/smarty
cp smarty-gettext-1.0b1/block.t.php /var/www/nixtape/smarty/plugins

Create a templates_c directory for compiled templates and make it writeable by the web server user.

mkdir /var/www/nixtape/themes/gnufm/templates_c
chgrp www-data /var/www/nixtape/themes/gnufm/templates_c
chmod 775 /var/www/nixtape/themes/gnufm/templates_c

Profit!

At this point I was able to have a working GNU FM installation. There are still plenty of things left to do such as add music, add a new theme, etc. Maybe once I get around to doing those things I will make a follow-up tutorial. Anywho, I hope this has been of some use to you folks out there in Internet land. Still having a hard time setting up GNU FM? If so, head on over to #libre.fm on irc.freenode.net and ask the developers for help. Oh, and don’t forget to leave a comment if there’s an error or something you would like me to improve in this tutorial. You can also leave a comment and say what a great guy I am. πŸ™‚

Take it easy.

From the blog David Thompson Β» WSU CS by davexunit and used with permission of the author. All other rights reserved by the author.

CS 401 – New Computers! Spring Break!

In my last blog post I mentioned that the computers that we were using to run Eucalyptus servers were too old to support hardware virtualization, a feature that we absolutely must have. I thought we were doomed, but luckily the IT department was able to give us 9 computers that are much more recent. The computers aren’t new by any means, but the CPUs are dual core and hardware virtualization is supported so I am quite content with them.

On Friday, Prof. Wurst and I set up several of the computers and installed CentOS 6.2 on them. I have already read and written a lot of documentation about how to compile Eucalyptus from source, so it did not take me very long to get the Eucalyptus services running on the new machines. The services, aside from the NCs, are running for the most part on 3 machines now. We decided that it would be best to let the Walrus service have its own server where previously it was on the same server as the CLC. So, the CLC, Walrus, SC, and CC are operational again. I have registered the Walrus, SC, and CC servers (CC and SC are on the same machine, by the way) with the CLC. However, the system is reporting that the SC and Walrus are broken and I have not yet resolved that issue.

In the meantime I decided to set up a couple of NCs, but in trying to set up the ethernet bridge for KVM to use, I managed to lock myself out of one of the servers when I did a `system network restart`. I guess I screwed up the configuration files! It’s not much of an issue because tomorrow I will be going to campus to work in the server room with Mike Iudiciani and I will resolve the issue there.

In doing all of this work, I have found a bug in the `euca_conf` tool. One role of euca_conf is to get credentials for access to the Eucalyptus system via command line. The command line switch for this is –get-credentials. I started the `eucalyptus-cloud` service and tried to get my credentials via euca_conf. However, I just got a “list index out of range” error printed to my terminal. After waiting for some time, the command worked successfully and I got my credentials. The problem appears to be that the cloud services were not fully functional when I tried to get the credentials, and euca_conf did not properly handle the situation and crashed. I will be filing a bug report about this shortly.

In other news, spring break is this week, but since we are running way behind schedule I will be working on this project a lot over the break. Setting up these servers has proven to be much more difficult than anticipated so I will be spending a lot of time trying to catch up to where we should be and hopefully the result of all of this hard work will be a finally functional Eucalyptus cloud.

 

From the blog David Thompson Β» WSU CS by davexunit and used with permission of the author. All other rights reserved by the author.

CS 401 – Tons of Progress… And Yet Another Roadblock

I’ll start with the bad news. On Sunday, March 4th, I tried to SSH into the CLC from home to try to get some more work done. I was greeted with a timeout. Neo, the CLC, was down. It turns out that the CPU fan was dead and the system overheated. We have 8 machines and it was just my luck that the CLC machine had the bad fan. So, either permanently or temporarily, I’m going to be using Morpheus as the CLC. Luckily, I had already rsync’d the Eucalyptus binaries to a few other servers so I could easily continue my work.

As an initial test, I’m using 3 of our servers to make a minimal working configuration. There are a lot of things that have to be done to each machine such as adding repositories, downloading dependencies, initializing PostgreSQL, and finally initializing Eucalyptus. There are 3 init scripts that Eucalyptus provides: eucalyptus-cloud, eucalyptus-cc, and eucalyptus-nc. Walrus, CLC, and SC require eucalyptus-cloud to be running. CC require eucalyptus-cc. Each node requires the eucalyptus-nc service. On the CLC machine, I registered it to be used for Walrus and the SC. We have another server, named Trinity, being used for the CC that needs to be registered with the CLC.

Now that the CLC and CC were operational, it was time to start up a node. This is where I ran into even more trouble. The computers we’re using as servers are older machines with CPUs that do not support hardware virtualization. With the release of RHEL 6, KVM is the supported hypervisor for virtualization. Unfortunately, KVM requires hardware virtualization support in order to function so it is not a possible option for us to use. The Xen hypervisor, on the other hand, doesn’t need to have hardware virtualization in order to function. The problem is that support for it was dropped in RHEL 6 so it is not so trivial to install now. The Xen wiki has a tutorial about installing Xen on a RHEL 6 system, which is quite long. I am slowly working through this tutorial to build the Xen packages that I need. It is an unfortunate situation because it is a very time consuming process. I was really hoping to have this system functional by today so I am a bit disappointed that I once again failed to meet my goals.

To end on a positive note, I am starting to become familiar with the Eucalyptus software. The more I start/restart the services and register/deregister components, the less confused I become about how the Eucalyptus system functions. I have written quite lengthy documentation on the CS401 wiki about all of my progress that another classmate has been using to help setup other machines that will later be used as nodes.

From the blog David Thompson Β» WSU CS by davexunit and used with permission of the author. All other rights reserved by the author.

CS 401 – Does Eucalyptus Fail?

My homework assignment (besides continuing my ongoing struggle with installing Eucalyptus) was to take a look at Tom “Spot” Callaway‘s “How to tell if a FLOSS project is doomed to FAIL” and see how many points of fail that the Eucalyptus project has. I had the pleasure of meeting Spot and hearing him give this talk at Western New England College and it was very entertaining.

Now, how badly does Eucalyptus fail? By my calculations they had 55 points of fail which means that “Babies cry when your code is downloaded”. I think I may have been a bit too rough with my analysis. I really do like the Eucalyptus project, but as a new user that is also completely new to the cloud computing concept, it’s hard to figure out exactly what to do and how to do it. There is documentation but there is not enough of it. From my understanding the Eucalyptus team acknowledges that and one of our goals this semester is to improve documentation for users, and who better to write documentation for new users than… new users!

In addition to the documentation fails (I forgive you, Eucalyptus devs, I hate writing documentation as well πŸ˜‰, as far as I can tell there are no unit tests for the source code to check for bugs that may have creeped in. That alone earned Eucalyptus +25 points of fail and pushed the project into the crying babies category.

Once again, from what I have seen, the Eucalyptus project is great. Their developers have been supportive and responsive when I’ve had issues. As a FOSS advocate, the freedom of using a free and open source cloud computing platform far outweighs the convenience of a proprietary system that is easier for newcomers. Eucalyptus is much more win than fail, and I hope that my class can help the developers improve the usability of the software.

From the blog David Thompson Β» WSU CS by davexunit and used with permission of the author. All other rights reserved by the author.

Fail Meter Analysis of Eucalyptus

Professor Wurst decided after viewing this articleΒ that we should gauge the project that we plan on spending an entire semester, I guess now is the best time do find out is after we’veΒ committedΒ to the project. Β Kind of thought it was a bit silly at first but the more I worked on the test the more I learned about Eucalyptus. Β After all was said and done it turns out the project isn’t going to completely bomb, which wouldn’t have been the best for the class, or the project…

The tests are broken into several categories:

  • Size
  • Source Control
  • Building From Source
  • Bundling
  • System Install
  • Code Oddities
  • Communication
  • Releases
  • History
  • Licensing
  • Documentation

It’s about a 60 somethingΒ questioner, each question assigns a “fail” value to it and tallies it up at the end. Β Some of the questions were pretty silly like, “Β Your website doesn’t have any documentation” (this isn’t a question, I know).

I learned a pretty good amount about Eucalyptus with this project, pretty much because 50% of what I was looking at had me scratching my head or asking “How would I even find that out”. Β Got to poke around the source code online in git and on a website calledΒ fossiesΒ the link I gave is directly to the Eucalyptus section of it. Β Also this is the my first “big project” of code that I’ve looked at and it feels pretty daunting to see so much code spread out in so many classes but, it’s also awesome to see it all working in unison.

 

 

For now my main goal is to continue to read wiki’s and try to play around with Euca2ools and be able to be much more fluent on the systems so I’m not like a lost puppy.

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

Sorry for the Absence

Unfortunately I haven’t posted in a pretty long time, and I’m sorry about that to those few who are following.

 

Recently my main focus was to pick aΒ distributionΒ of Linux I wanted to use. Β I tried mint and cent and didn’t much care for either of them, to be frank. Β I’ve been using Archlinux for one of my classes and love learning though that distro but it proved to be an extra level of difficulty I could do without in this class, pretty much I kept bothering Dave about this or that and felt back. Β I ended up talking with some friends and they suggested Xubuntu which is a lightweight distro of Ubuntu. Β Since I am running the OS in a virtual box the more lightweight the better. Β I reinstalled Git and Euca2ools and have just been reading a wiki every now and then. Β I am eager to really start the class once the cluster is all set up and I know how to use it properly.

 

I’ll be posting again tomorrow about our homework assignment once I finish it (aka start it)

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

CS 401 – Building a Small Cluster with Eucalyptus

I consider myself an amateur system administrator. I know my way around a Linux machine. I know how to use basic command line utilities. I know how to use Vim. I work on servers at my internship. I maintain about 4. Now, here I am in CS 401… with 8 machines that I need to not only install an OS on and configure, but make them talk to each other as a full Eucalyptus cluster. It’s taking far longer to set this up than expected, but I feel accomplished because it took a lot of work to get to where I am today.

Understanding Eucalyptus

I came into this project knowing literally nothing about cloud computing. But from reading the Eucalyptus documentation, I have a vague understanding of what the various components do.

The first component is the Cloud Controller (CLC). The CLC is the gateway for access to a cluster. It basically runs the show. Note that I said clusters, plural. The CLC make high-level decisions and talks to the cluster controllers. Next, is Walrus, a persistent storage system for the users virtual machine images. The data is organized into buckets (get it?). Walrus can be installed on the same server as the CLC. The Cluster Controller (CC) is in charge of managing several Node Controllers (NCs). The CC also handles access to the Storage Controller (SC) which interfaces with different storage methods. The NCs are servers that run a virtual machine hypervisor (such as KVM or Xen).Β  The hypervisor manages all the virtual machines (VMs) that are running on the server. Put it all together and you have yourself a cloud!

Preparing Servers

My class has 8 machines running CentOS 6.1. One server will be the CLC, running Walrus as well. One server will be the CC/SC. The remaining 6 will be our nodes. If combining tasks on the servers becomes a problem, it shouldn’t be too difficult to move them to other servers, the only downside being that we will have less NCs.

I was confused about which VM hypervisor was going to be installed on the machines. All of the Eucalyptus 2.0 guides were giving instructions to install Xen. However, when I tried to install the Xen packages, they were not found. After some googling, I learned that with CentOS 6, support for Xen was dropped in favor of KVM.

Compiling from Source

I grabbed the latest and greatest code from the Eucalyptus Launchpad page. I found 3 helpful documents that allowed me to successfully build Eucalyptus. one two three. I’ve been documenting the process as I go on the CS 401 Wiki. It took A LOT of reading and some help from the #eucalyptus IRC channel, but I did it! CS 401 is now in possession of some fresh 3.1 binaries.

Installing Eucalyptus

Now that I have Eucalyptus 3.1 built, I need to install it on all of our machines. I have been using rsync to copy the binaries to the other servers. The CLC, CC, SC,Β  Walrus, and NC require different Eucalyptus services to be running in order for them to function. As of this writing I am currently having some trouble initializing the databases on the NCs.

I’ve made more progress this past week than any other week so far. Hopefully we can have a functional system in a week’s time.

From the blog David Thompson Β» WSU CS by davexunit and used with permission of the author. All other rights reserved by the author.

CS 401 – Week 4

This week’s (actually last week now, 2/13) class was all about Git. Git is a wonderful version control system that I already use frequently for my own personal projects. Git is a distributed version control system rather than a centralized version control system like Subversion or CVS. This means that everyone that works in a code repository has a full copy of the source code history. There is often a central storage place for the “official” source code but in theory there is no central hub that is relied upon by others.

What did we learn how to do? Well, Karl Wurst made us some test repositories on the CS git server. This included a few example files that we would edit. My team “cloned” the repository and made the changes, and when some of us tried to “push” the changes back… CONFLICT! Prof. Wurst had designed the exercise in such a way that we would see a merge conflict occur. When a merge conflict happens, git alters the conflicted files by putting in both your version and the conflicts marked by special characters. I simply deleted what was unnecessary to resolve the conflict, and “committed” the changes to my repository. Now I was able to push successfully.

In System Administrator land, Mike Iudiciani and I have been working to put together a small cluster on which we will install the Eucalyptus software. We’ve run into a lot of annoying problems with OS installation and the networking configuration. We were first plagued with bad install media, and then we had trouble getting the machines online. Once we finally had good install CDs, I talked to IT about how to configure our machines network interfaces and voila, we were online. Now begins the process of installing the Eucalyptus software.

From the blog David Thompson Β» WSU CS by davexunit and used with permission of the author. All other rights reserved by the author.