Monthly Archives: March 2012

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.

Researching EuTester

Over the past few weeks we have been discussing whether or not we should break into different groups to focus our individual efforts on smaller parts of the Eucalyptus project. I have joined the grouping working with EuTester, basically EuTester from what I have read is simply a way to test a Eucalyptus or Amazon cloud and it can be pretty much customizable. I have learned that it is written in python code and with a little knowledge of the code you can write specific test cases for it to simulate. After further research I arrived at the github Eutester site located here.

My specific portion of work for this project focuses on the EuTester bug tracker, so I was able to look through the github site and find the issue reports that currently exist. Now at this point in time it really doesn’t help me since I do not have a working EuTester build or access to a cloud to test it on, but that is what I will be working on in the upcoming weeks.

I have just now begun reading the Eutester Basics Part I blog post which explains getting setup in a little more detail, and have also begun using our classes wiki to update my findings and also to read what other classmates are encountering as they try setting up EuTester.

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

Week 7: Crossroads

Stroke of bad luck this week, we lost the head node due to a failed CPU fan. Dave has had a few bumps in the road due to a combination of software issues and system limitations. The conversation has been to bouncing back and forth solutions to the problem at hand.

Do we revert to CentOs 5 a no longer updated distro in an effort to get the cluster up? I wanted to pass this information to the rest of the class so I emailed this to the whole class in an effort to bring everyone into the loop and to understand the current predicament we are in.

New Hardware

Pros:

Immediately fixes the issue using the kvm hypervisor.
Will be a reusable asset for the CS department for years to come
Less frequent hardware issues

Cons: 

No spare parts or support can be provided by on site techs.
Most expensive option.
Will delay the completion of the cluster.

Old Hardware:

Pros:

Least expensive.
Cluster would be up for class utilization faster.
Our experience could help Eucalyptus streamline instructions for “ancient” machines.
On site tech support.

Cons:

This cluster would most likely only be viable for this semester.
Minimal resources will reduce the flexibility of the cluster.
Higher chance of hardware failure (already been proven)
Requires CentOs 5 which is no longer an updated distro of this OS.
Eucalyptus may not even be interested in new documentation on a build using CentOs 5. (guessing)

My Vote: (New Hardware)

In my opinion after evaluating the factors above, new machines are the better way to go even if it does mean a longer delay on the cluster’s completion. This may not have covered all the pro’s and con’s but I thought this was a good way to show the bottom line issues we are facing.

From the blog Mike's Blog. [ CS 401 ] by Michael Iudiciani and used with permission of the author. All other rights reserved by the author.

Working with Euca2ools

The past two weeks I have been working on documenting Euca2ools with Dhmitri and Chris. Euca2ools is a collection of Linux command-line tools for interacting with a Eucalyptus cloud. There is documentation on the Eucalyptus website on how to get Euca2ools installed and working but it can be a confusing process, especially if you aren’t extremely familiar with the Linux command line, like I am. Dhmitri did a great job of consolidating all of the steps required and posting them on our wiki. He also added a few steps of his own that may not be apparent to a Linux novice. I followed his steps and was able to get a working Euca2ools installation after a fair amount of trial and error.

Based on my experiences, I expanded on Dhmitri’s instructions and tried to add more explanation of what you are actually doing with Euca2ools and why. I also added some nice color formatting to try and spice up the page and make it easier to follow. Check it out here:Β http://cstest.worcester.edu/wiki/pmwiki.php?n=Main.Euca2ools

As of right now the page is not finished– for some reason I am blocked from making further edits to the page! I wonder if it is because I made too many edits in a short time and the page is locked. Hopefully this gets resolved soon and I can make the remaining planned changes to the page.

From the blog Code Your Enthusiasm Β» WSU CS by Jon and used with permission of the author. All other rights reserved by the author.

CS401 –

Well, we’re into actually working on the project now. I am working on creating some documentation on the general architecture of a Eucalyptus cloud. I feel like this will be a good thing forΒ  the project to have. It appears as though the architecture of a Eucalyptus cloud is very similar to that of Amazon’s EC2. That should be a good starting point for describing the Eucalyptus cloud.

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

Starting From Scratch

Of course, something would go wrong. Β The fan in one of the machines has died. Β We are also running into compatibility issues. Β Dave fears the hardware in the current machines may not be supported. Β Today, we discussed plausible alternative solutions. Β Red hat has provided us with a small amount of money that we could use to buy a couple of new machines to get up and running. Β Karl is also going to check with IT and see if they have any newer machines that we could use.

Meanwhile, Dave is going to see what he can do as far as software progress while we wait for a new hardware solution. Β He will switch around one of the nodes and the CLC and try to continue so little time is lost. Β I seem to be so busy with work at EMC, and numerous meetings that it has been very difficult to keep up with everything. Β I have a conference at the NSF next week during Spring break too. Β It feels like for every fire I put out, 3 more start.

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

Week 6: Updates on new assignments

This week mostly we did it was like little presentation from all the groups on the new assignment from week 5. My group has the EuTester bugging part. On EuTester we couldn’t find many of the information because it is new software. We can find the bug report for the EuTester on https://github.com/eucalyptus/eutester/issues. The total [&hellip

From the blog E. Lekdushi CS401 by elekdushi and used with permission of the author. All other rights reserved by the author.

Week 5: Evaluation on what we have done and what we will do next

In this week meeting we did discussed a lot of the things like what will be the plan for the future assignments about the class CS 401, presentation about the progress of setting up our cluster network, the way how to rate the Eucalyptus, to trying the EuTester software, and using new tool about team [&hellip

From the blog E. Lekdushi CS401 by elekdushi and used with permission of the author. All other rights reserved by the author.

Meeting 6 – More research on Eutester

There were a lot of research I had to do on the Eutester since we will be using this framework a lot later on to test out the cloud. So the first thing I decided to do is try to understand the code in Eutester files. They’re written in Python so I started with understanding Python language first. In general Python is an OOP language that is kinda similar to Java, so it didn’t take long to pick it up. I went through some manuals and tutorials online and put together the main differences between Python and other programming languages on the wiki. Here is the link: http://cs.worcester.edu/wiki/index.php?n=Main.Python.

And also thanks to prof. Wurst for providing us with useful links to Eutester blogs that I was able to test out some commands. Well but first thing first, if anyone has an outdated Boto version installed on his/her computer (latest version is 2.2), he/she needs to get the latest version. Here the link to get it http://pypi.python.org/pypi/boto

After that is taken care of, I decided to try out the commands that were shown on the blog http://testingclouds.wordpress.com/2012/03/04/test1/ to test out the connectivity of the instance. Everything went smoothly up to when I was ready to ping the instance. But it failed, the ping was unsuccessful.

This was one busy week for me but I really learned a lot and finally, I’ve started to get my hands on testing out the EuTester. Can’t wait to test it out on our cloud.

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