Tony's ramblings on Open Source Software, Life and Photography

ubuntu

A Little Ubuntu Tip For you

Here's a little tip for you.

If you run Ubuntu and decide to make a quick backup of your home directory using cp -R -d, make sure to "eject" any network shares you mounted using the file browser.

I just found out that despite the -d (which doesn't go inside symbolic links but has no affect on nautilus mounted shares) it was trying to back up a mounted network share... that contained about 15 cd-rom images of various versions of Ubuntu. That might take a while.


Categories:

Multiple Eucalyptus Clouds Don't Fly

I just learned the hard way that you can't run multiple Eucalyptus cloud controllers on the same network.

I'd assumed that as long as each cloud had a different private address pool and physically separate cluster networks that it would work.

After about a day, the primary cloud starts detecting the secondary cloud and things went a bit haywire. The primary cloud controller crashed but left the instances still running.

Rebooting things didn't get much better either - the nodes just didn't work right. Not quite sure what the deal was but nodes would show available, but all instances would just stick at "starting" and never fully reach a running state. Checking "euca_conf --show-nodes" resulted in no instances showing associated with any nodes.

I had to power down the new test cloud and de-register it's cluster controller from the primary cloud (which magically registered itself) and a reboot or two later was able to get my primary cloud back up and running.

To clarify - I wasn't trying to run multiple clusters, but wanted a completely separate cloud with it's own clusters. For future reference: do it on a separate subnet.


Simple Changes To Secure an Ubuntu Deskop

Computer SecurityWhen you talk about desktop security there's a lot that can be discussed: user permissions, firewalls, etc. Here's a little step that gets overlooked quite a bit, but can go a long way to preventing a direct attack against your destkops.

In Ubuntu Desktop, you can deploy custom Gnome settings that override the defaults by dropping an XML file at:
/etc/gconf/gconf.xml.mandatory/%gconf-tree.xml

I use Puppet to deploy these settings to all of my Linux desktops. If you're from the Windows world, this is like using group policy, but with much more granular control.

Here's a sample of a few things you should change:


Categories:

Automount CD-ROM in Ubuntu Lucid

CD-ROMEver since Ubuntu 10.04 came out last April my CD-ROM drive has not been mounting automatically. I tried every suggestion I could find online to no avail.

Finally tonight I've fixed the problem, and another one I was unaware of.

First, the one I was unaware of - one of the tests when things go wrong with drives is to always check your cables. One of my SATA cables to my second hard drive was separating at the end, so thankfully I found that and replaced the cable before there was data corruption.

To fix the real issue, I did the following:

  • Launch Synaptic Package Manager
  • Search for "hal". Find the package named "hal" (not all the other ones that include that name) and mark for complete removal.
  • Apply the changes.
  • Search for "hal" again. This time mark for install.
  • Search for "gnome-volume-manager". Mark for install and apply.
  • Reboot.

Alternatively for those who like to use a console, here's the commands:

sudo apt-get remove --purge hal
sudo apt-get install hal
sudo apt-get install gnome-volume-manager

Categories:

My Point Is Made

I've often stated that Linux is no harder to use than Windows for the average Joe. I think now I've proved my point.

We've been slowly converting desktops in our organization to Linux for the past year and a half. About 2 months ago, I switched over four more desktops in our production area.

The employees don't get a choice in the matter - we just do it. We provide zero training in Linux. We simply have a network PXE install that automatically installs the software they need for work and places the icon for it on their desktop named in such a way that they would recognize it. One day they have Windows, the next day they come into work and Linux is there with a note on their keyboard telling them they've been switched.

We use Ubuntu 10.04 LTS with Gnome, and allow the default environment to have the menu bar at the top of the screen. I do automatically push out a change to the desktops that places the window close button back on the right side of the screen for their first login so they aren't completely confused.

Now to the point...

I just walked through the production area and noticed that those four desktops now had custom wallpapers, screensavers and in one case even had the menu bar at the bottom of the desktop.


Categories:

Why Run a Private Cloud?

With hosted cloud services available, why would you ever consider running your own private cloud? It seems that if you're going to need the equipment anyway, what do you stand to gain?

Security Implications
Yes, every vendor will tell you their cloud is secure, but who is to say that their own administrators can't get access to your instances and data for "admin" purposes? A large amount of credit card theft is done by the cashiers you commonly hand your card to. Do you trust every administrator working for Amazon EC2?

I'm not suggesting they aren't reliable or that they are out to get you. I'm suggesting it's a reality that you must consider and weigh against the type of data you plan to host or process in a vendor's cloud. With network administrators going rogue and stealing corporate data every day, it becomes a question of level of trust versus content.


Categories:

How To Customize UEC Images

Running your own Ubuntu Enterprise Cloud is great, but if you want real useful images that do what you want them to do, that you can start and stop at will, you'll want to customize them.

There's a lot of tutorials out there about how to make a new image from a boot CD, but most of those aren't going to work for you. If your infrastructure is Ubuntu Enterprise Cloud, here's the best way to do it. You'll need a Linux desktop as well, and if you are editing a 64 bit image, your desktop will need to be 64 bit as well - and running at least Ubuntu 10.04 or later.

First, you'll need to download one of the Ubuntu UEC images from http://uec-images.ubuntu.com/releases/

I downloaded the Ubuntu 10.10 RC 64 bit server image - but you'll want to pick what's good for you.

This tutorial assumes you already understand euca2ools and managing standard images on your cloud. If you are not familiar with using euca-run-instances from the command line, don't even try this yet.

After downloading the UEC image .tar.gz file, extract it's contents into a directory. You'll get several files out of it, but the one we are interested in is the one ending in .img, for instance "maverick-server-uec-amd64.img" is mine.


Categories:

Head In The Clouds

Well with much gnashing of teeth I've brought up my first private Eucalyptus cloud cluster.

As part of the testing, this web server is now hosted in the cloud. So, if things go down I'm probably tweaking it - or something crashed and I don't know about it ;-)

I used Ubuntu 10.10 Release Candidate as the platform, with two servers - one is the cloud controller with 8 cores and 6 GB of RAM and the other is the node controller with 16 cores and 24 GB of RAM. If the test runs well, I plan to add several more nodes and move a lot of infrastructure into it.

I've had a few issues, one of which I still haven't solved - the storage controller mounts volumes into the hosting node instead of the virtual instance when you try to mount a storage volume. Not a big issue because I'd already planned to use iSCSI hosted from several NAS appliances for the majority of the storage.

Look for a write-up of my experiences in a couple of days.


Categories:

Ubuntu 10.10 Beta Cloud Login Issue

I'm setting up my first Ubuntu Enterprise Cloud and ran into a slight gotcha...

For one thing, the accepted tutorial is flat out wrong. It recommends running "apt-get update" on the node that's on a private LAN with no direct Internet connection. Like that would work.

More importantly, if you follow the tutorial it has you update your Eucalyptus installation before you log into the web interface the first time. I learned the hard way that this just doesn't work - the login interface will then reject all login attempts. Apparently something in the upgrade scripts doesn't handle a pending first-login state well at all. Even completely removing and purging the eucalyptus-cloud and eucalyptus-cc packages didn't help.

Finally I reinstalled the entire box from scratch, logged into the web admin and set my password, then ran the updates.

After a reboot, Eucalyptus didn't even start. Completely struck out.

Then I realized that the Release Candidate of Ubuntu 10.10 came out yesterday, so I downloaded that and started again. More on that later.


Changing a Linux Server Partitions With a GUI

Retro TwitterContinuing my "avoid the console" series, I'm going to cover remotely managing partitions on a Linux server. Yes, this will involve a bit of console, but this will set you on a path to using GUI tools on your servers without having to install a complete windowing environment. Installing a complete desktop-like environment is a waste of resources for most servers, so keeping things to a minimum helps to streamline and allow your servers to do more things with less hardware.

A lot of new Linux users don't realize it, but a Linux desktop has both a "server" and a "client" for drawing things on the screen. This allows you to separate the program's interface from the machine it's running on and display it remotely.

The most powerful way to remotely manage Linux servers is using the SSH (Secure SHell.) It's like a DOS prompt for your server that you can use securely and remotely. The beauty is that if set up properly, it can tunnel a windowed program through that connection to display on your local desktop. Just don't get confused as to what is running where.