Friday, January 28, 2011

... then God made Midterm Week and saw that it was good!


Thank God for Midterm Week!  I finally get to do some major tweaking in the PC Lab! If you take a look at my previous posting, you'll see what issues I'm trying to address.


Student Stations:
So, what I am doing today is reinstalling all the Student Stations with the 32bit Ubuntu 10.10 Desktop Edition (maverick meerkat). As detailed below, I will be adding jre for firefox (3D graphs in jmol and screencast-o-matic) as well as SAGE to each of these fresh installs.

Teacher Stations:
The Teacher Stations will build upon the Student Station installation steps listed below. I will add to these stations WINE+VTI (on screen graphing calculator emulator - I might even add this to the student boxes for TI programming final project), xournal (pen app), VLC (video viewer), handbrake (video editor) and flash (youtube) for firefox.


Servers:
These boxes will build upon the Teacher Station installation as listed above. In addtion I will install vsftp, openssh, and jdk (apcs) from http://java.sun.com
Servers will retain the 32bit Ubuntu 10.04 Desktop Edition (upgraded from lucid lynx to maverick meercat).


DORM:
First there was RTFM (Read The Fraking Manual)!
Then there was KISS (Keep It Simple Stupid)!!
Now, I just made up DORM (Download Once, Read Many)!!!
As I will be downloading a lot of the aforementioned apps for each station, I decided to download whatever I could to my USB memory stick to save time. This will be especially important for the servers as they don't have Internet access as of yet. So, I will download vsftp, openssh and jdk ahead of time from another station (its convenient that these are stand alone files without any dependencies). jre and flash are actually quick downloads, so I skipped storing those for now as I am focused on the student stations. As a result, I have the following folders on my USB stick.


UBUNTU_STUDENT:
-current jre *.bin from http://www.java.com
-current SAGE *.lzma from http://www.sagemath.org

UBUNTU_TEACHER:
-handbrake from synaptic package manager
-VLC from http://packages.ubuntu.com (50 dependencies!)
-WINE from synaptic  package manager
-VTI from http://www.ticalc.org/archives/files/fileinfo/84/8442.html 
-xournal from http://xournal.sourceforge.net
-flash from adobe (auto-installs first time you try to youtube)
UBUNTU_SERVER:
-current jdk *.bin from http://java.sun.com
-current openssh *.deb from http://packages.ubuntu.com
-current vsftp *.deb from http://packages.ubuntu.com
-my modified vsftp.conf where I uncommented a few lines and added "anon_root=/home/ftp" at the end of the file which I stored at  http://pastebin.com



Step 1)
Boot Ubuntu CD, click install, answer on screen questions and run install. Make sure to make Student Stations boot without a passwd (unlike Teacher Stations and Servers). Also, make box name and userid the same so box name shows on top right of screen after boot up.
-students = alpha beta gamma delta, epsilon eta zeta theta
-students = iota kappa lambda mu, nu omicron iks pi 
-students = rho sigma tao upsilon, phi psi chi omega
-teacher = shadowfax
-server1 = guardian
-server2 = caprica

Step 2)
When asked to prepare partitions, do so as follows:
    /dev/sda1    fat32    42GB    (resize, but no other changes, leave wimpdoze partition alone)
    /dev/sda2    swap    256MB (change to swap)
    /dev/sda3    ext3     41GB    (change to ext3 + format + / partition)


Step 3)
-when the install process is done, reboot and remove the CD
-once the PC reboots and you get to the desktop, right click the vertical arrow icon on the top right and edit the Ethernet interfaces
    eth0 set to auto DHCP (proxy and passwd needed for internet)
    eth1: ip = 10.5.129.x (private linux lan)
            mask = 255.255.0.0
            gw = 10.5.0.254
            dns = 10.1.1.19
-test intranet connections with nautilus/ftp to 10.5.254.245
-internet connections will be tested later (via proxy and passwd) when downloading *.bin, *.lzma and *.deb files


Step 4)
-system/preferences/monitors set to highest resolution
-system/preferences/screensaver set to 2 hours
-right click desktop and select /change background to set your background and click visual effects for compiz
-system/administration/printers set network printer HP Laser Jet 4250 at 10.10.254.212


Step 5)
-install SAGE *.lzma by copying it to /usr/local as root. 
-extract SAGE *.lzma and rename dir as sage.
-add path "/usr/local/sage:" to /etc/environment
-make executable script startSAGE containing
    cd /usr/local/sage
    ./sage -n
-test script as user before rebooting to add admin passwd
-add startSAGE to system/preferences/startupapplications



Step 6)
Install jre1.6.0_23 as a Firefox plugin for 3D graphics in SAGE
-system/preferences/networkproxy (turn on proxy)
-use firefox to download latest jre *.bin file from http://www.java.com to /usr/lib/firefox-addons/plugins
-open a terminal and 
    cd /usr/lib/firefox-addons/plugins
    chmod 755 *.bin
    ./j*.bin
-then
    cd ~/.mozilla
    mkdir plugins
    cd plugins
    ln -s /usr/lib/firefox-addons/plugins/jre1.6.0_23/lib/i386/libnpjp2.so
-test firefox with "about:plugins" as the url to see that jre was plugged in!


Step 7)
-disable games: sudo chmod 700 /usr/games/*
-careful when you do: sudo chmod 700 /home/* on the servers to secure saved files. We need to undo that for the ftp files: sudo chmod 755 /home/ftp or noone will be able to use anonymous ftp!


Step 8)
-install optional software like VLC, handbrake, xournal and games via aptitude+proxy or synaptic or http://packages.ubuntu.com
-on the servers, install openssh and vsftp via dpkg. 
-install the jdk in /usr/local and add the directory containing java, javac, javadoc and appletviewer to /etc/environment as per instructions from http://java.sun.com
-system/preferences/networkproxy (turn off proxy)


HTH, good luck with your Linux boxes!


Thursday, January 27, 2011

Problems, Problems, Everywhere....

Fall Semester 2010 is finally over at good old Baldwin High!  Its time for a little introspection and tweaking, shall we?

Computer Math
We tried a new curriculum here based on Gary and Maria Litvin's text "Mathematics for the Digital Age" which is really an introduction to Discrete Mathematics using python. I think my students did well with this new approach.

PROBLEM 1: We went a little slowly and only covered 5 chapters including MCQ tests and Labs. Well, actually, I'm starting with Lab 5 in Advanced Computer Math next week.
SOLUTION 1: Next year I think we can go a bit faster as we are more familiar with the curriculum now.

PROBLEM 2: We used http://www.sagemath.org which is based on python to do our classwork and labs. This worked well for a while, but recently we've been experiencing a lot of lag.
SOLUTION 2: This is Midterm Week. As such, I have a little time to experiment in my PC Classroom. I am looking into installing SAGE on every PC in class so everyone has their own private server and we have no lag! Ideally, I should set up a single private SAGE server for my students to login to, but I'm waiting on some new server hardware, so we'll revisit this issue then.

AP Computer Science
We are doing pretty well here. We covered 6 chapters of Cay Horstmann's Computing Concepts with Java 5th edition and 2 units of the Gridworld Case study.

PROBLEM 3: Our ftp/ssh server finally crashed. It ran literally 24x7 for 13 or more years if memory servers. It had Slackware Linux 3.0 installed for Pete's sake!
SOLUTION 3: I have to look into setting up a temporary server. I have a new Xeon 32bit dual-core but it has no internet access as of yet. So, I can install Linux using an Ubuntu Desktop Edition CD, but its hard to download server apps like openssh and vsftp.

PROBLEM 4: Whenever I want to show a youtube, I have to switch over to Windows since my 64bit Ubuntu installation cannot run flash.
SOLUTION 4: Since I'm installing SAGE on all my Linux boxes, I thought a fresh install of Ubuntu 10.10 Desktop edition would be in order. So, while I'm at it, I think I'll downgrade to 32bit. Flash and Wine, just to mention a few utilities, are easier to install and maintain in 32bit. I've been running 64bit OSs for about a year now and found little benefit in everyday usage. I have a 64bit OS for the cluster, that's all we really need on our 64bit Athlon dual-cores. My Teacher Station should then be able to run flash in Linux. I wonder if my Airliner Slate will work better in 32bit. It is way to sensitive in 64bit!

preCalculus
We have no problems here as we are on track to have a month and a half or so at the end of the year to do some real Calculus. That was the plan all along in 4R-11. This is a custom course for Juniors who want to take AP Calculus AB next year. So, we cover a traditional preCalculus class a little bit on the fast side. I am looking to replace my Airliner Slate, however, with a full-fledged TouchScreen Laptop to integrate the slate and the mic into one device. I will also be able to control the Teacher Station via RDP rather than BlueTooth as the Slate does or via several wires (audio, video, Ethernet) as my current Laptop does.

AP Calculus BC
We are good to go here as well. I'm just wondering what I'm going to do with a new SmartBoard! You heard what I said, I will still use my Airliner Slate, but I'm scheduled for a SmartBoard installation soon to replace my current PC Projector/Screen and speakers. I'm pushing for the extra wide xi model (74 inches wide, 46 inches tall) as a standard SmartBoard has only about 61 inches of writing space. My students are used to a much wider screen when I do my fake SmartBoarding and Screen-casting.

Tuesday, January 25, 2011

Man, Moment and Machine on HISI



Just a quick note about a new show I caught by accident last week on the History International cable channel.  IDK if this is really a new show, but its new for me!  HISI is certainly new on my Optimum Cable provider.  I think its channel 168?

Anyway, this episode was about the life of Galileo and his troubles with the inquisition.  One of the narrators was Dava Sobel who had written a very interesting biography a couple of years ago.  The general theme was the age old battle between Science and Religion.  People tend to make this generalization all the time, I don't think this theme is really valid, however.  Many scientists in history were very devout in their own right.  In fact, as a scientist myself, I was drawn to science because of my religion, not in spite of it!  How better to understand the works of God?

There's a similar feud between Creationism and Evolution.  Again, I don't see the problem.  I don't take the Book of Genesis in the Bible verbatim.   I think of Genesis as a metaphor.  For example, when it states that God made the Heavens and the Earth in 6 days and rested on the 7th, who's to say how long a day is?  Maybe a day is really a millennium (1000 years).  This definition of day would actually make the Creationists, who do take the Bible literally, very happy as they think that the Earth and everything on it was created less than 5000 years ago.  However, who's to say a day isn't longer still, say an eon (1000000 years) which is closer to what the Evolutionists think?

I think we have to get away from making all these generalizations.  For example, my least favorite generalization is "Math is too tough and I'll never need to know this stuff anyway!"

 Generally Speaking,

Sunday, January 16, 2011

CIS(theta) Meeting IX (2010-2011) - try, try, try, try, try, try, ...., again!!!


Aim: 
pelican HPC 2.2 64bit: If at first you don't succeed, try, try, try, try, try, try, ...., again!!!

Attending: 
CIS(theta) 2010-2011: DavidG, HerbertK, JoshG, RyanH

Reading: 
pelican HPC CD 64bit version 2.2: /home/usr/*
pelican HPC CD 64bit version 2.2: /usr/bin/pelican*

http://pelicanhpc.788819.n4.nabble.com/pelicanHPC-ReMaster-td3163841.html

It's been a while since I blogged, but that's just because we've been busy trying out several Linux liveCD distributions for setting up High Performance Clusters!  As you will see in the nabble link above, we have a thread on the http://www.pelicanhpc.org forum regarding our efforts in getting pelicanHPC working on our LAN even though we have tons of DHCP conflicts.  We also tried out Cluster By Night which does not suffer from the DHCP problem as it sets up public key authenticated ssh to connect nodes which works right out of the box!  I'm also revisiting BCCD as detailed below.

BCCD Update
I just recently revisited the Bootable Cluster CD project sponsored by the University of Northern Iowa.  Years ago, when Paul Gray started the project, he was very helpful to my students in setting up an openMOSIX cluster using BCCD.  This was back in the day when clusterKNOPPIX and QUANTIAN were the only other competitors.  Now, Paul is not so intimately involved with the project.  Take a look at the BCCD links listed above.  You will see the main site, the site for version 3.0 and the developers' forum to which I have contributed a little in December and January.  So, now it seems there's a team of developers involved from the littleFe project to Earlham and Contra Costa Colleges.

Last week I downloaded their latest ISO (3.0 for 64bit).  The problem with this distro is that its slightly too big for a CD, so I had to burn a DVD.  Another issue is that when BCCD boots, it copies itself to RAM.  An ISO file has some compression associated with it, so the 800MB ISO expands to over 1GB in RAM.  I cannot use this ISO as my worker nodes, 64bit Athlon dual-cores, only have 750MB RAM.  Next step will be to try the 32bit ISO which is smaller.  In fact, I did try the 32bit version on my Xeon dual-cores and the system seems to boot all the way but then fails just when the X windowed desktop should appear.  I'll try to boot with the linux 4 cheat code next time.



Cluster by Night Screencast from Dept. Dirigible Flightcraft on Vimeo.
Cluster By Night Update
Cluster By Night is proving to be very interesting.  Kevin Lynagh created 2 ISOs for 32bit arch.  One boots the Master and then each Worker node uses a separate ISO.  So, we burned 1 master and 7 workers to test out CbN.  Each ISO is only about 15MB so its a fast download, burn and boot!  You get a  full openMPI installation and you can boot up the cluster using public key authenticated ssh in a mater of minutes.  There are sample apps on CbN but not much source code or dox.  So, we booted up a 32bit pelicanHPC 2.2 CD and compiled flops.f using mpif77 -o flops flops.f since doing so in CbN causes errors.  It would seem that the openMPI installation on CbN is incomplete.  At least gfortran is missing.  Then I copied the executable program flops to the CbN master node from sftp user@10.10.129.21 as pelicanHPC which was running on worker node #21.  Then we ran cbn_run -np 16 flops from the master and got 8 nodes, 16 cores running at nearly 7GFLOPS!  Again, openMPI is incomplete as using mpi_run causes a ton of errors too!  All in all, CbN is very promising. 


Pelican Update
We are focusing this week's readings on the files on a booted pelicanHPC 2.2 64bit CD.  We printed out all the files in /home/user (including pelican_config) and all the files starting /usr/bin/pelican* (system scripts for starting the cluster).  Michael Creel says we should be able to modify how pelicanHPC boots by editing pelican_config and putting it in a persistent home volume called PELHOME.  In this manner, we hope to disable pelican's DHCP server so as to use the existing DHCP service on eth0 already.  Once we eliminate the DHCP conflicts, we should be able to boot the worker nodes from the one master CD via PXE after all.  Wish us luck!

Well, that's all for this week!  Please stay tuned.  We hope this record will help others trying to make their own clusters.  Also, if you have any hints or pointers, please leave a comment to let us know.  

Happy Clustering,