Tag Archives: ubuntu

How puppet rescued my botched server install

Saturday was a rainy day, so I decided to deal with switching out the root disk on my home server with an SSD that I purchased a couple weeks ago. It’s part of my quest to get all the root disks of my machines off spinning media. My home server was a build from parts machine, that’s long enough in the tooth that it won’t boot from USB. So I found a stack of CDRs upstairs, of equally dubious age, burned an Ubuntu 12.10 server iso, and started the install.

Things were chugging along quite well until the installer was supposed to install additional packages. Then it bombed out (I blame the ancient CDRs). I was able to get it to at least install grub, and get the thing to boot back onto the network.

What I found myself with was a super minimal install. It didn’t yet have a normal sources.list, it didn’t have openssh-server, it didn’t have ssh client even, it didn’t have any of the normal even minimal server install tools. I had about 30 minutes of manual to typing to get the base apt repo in, and get me so I could ssh in from upstairs to drive the rest of the process.

Boostrapping a Puppet Master

This is the machine that’s my puppet master. I had a copy of the oldroot over in one of my software raid arrays, so the moment I got that mounted, I dumped over the /etc/puppet this machine should have, and tried to just puppet my way up the rest of the way. I’d been on a month long kick to puppetize my home infrastructure, so this was a promising direction.

It turns out puppet up from nothing is a little harder when you are the puppetmaster, and dnsserver for the network as well. ūüôā So it was about another 30 minutes of manually installing what was needed to get my puppetmaster started. Once that was up, I managed to get the first puppet agent run in, and it was epic. 45 minutes chugging away pulling down all the policies I needed, applying packages and configs, all the kind of magic that prevented me from spending my whole day trying to figure out how I had this server setup before.

It also showed me where my policy had holes. I’ve got xfs filesystems now, so xfsprogs need to be in the base case. My libvirt setup didn’t actually install kvm, but in the super minimal install, that wasn’t there. I hadn’t gotten around to managing my openvpn server yet, that’s in there now.

If I was to do it again…

One thing I really need is both a puppet and puppetmaster bootstrapping script. Using puppet to manage your puppetmaster is cool and all, but there is a bit of snake eating it’s own tail to get you started that required a little more manual command slinging than I liked.

But, had I not had so much of my server policy encoded in puppet, I’d still be typing commands now to get that box up and running. So I’m sold on the whole process, even for a smallish IT environment, like a few home servers and remote guests.

Unity and Pidgin

One of the things that happened once getting to Ubuntu 12.04 was that gnome-do started acting up on me. Given that it’s a very minimally maintained project, I decided it was time to move on. Ubuntu’s dash provides a lot of the same functionality, so I finally started using it. But, I missed a few things.

Gnome-do isn’t just a launcher for programs, it’s an actions engine. It has support for Pidgin buddy lists, an I even wrote an NX launcher for it. I didn’t really want to give either of those up, so I started trying to figure out how to add those to Unity’s launcher itself.

Unity lenses, the plugins that support results, are written in either vala or python. Given that I’m trying to reflex my python muscles now, I decided that was my way in. After a few false starts I found the One Hundred Scopes project, which is an attempt to build a whole set of Unity lenses to add functions and examples for the world.

The wikipedia example is a good starting point. It gives you an idea of how to build a custom search and return results. That enabled me to build a basic launcher that fed up file urls for launching nx sessions, and I created an pushed unity-lens-nx that implements that.

But, pidgin is a little harder. There is no file to open for pidgin, this is about communicating with another program over dbus, and catching the action to do something else with dbus. Fortuntately through the help of David Callé I figured it out. Also, once I had it I found some good tricks (and a couple of undocumented dbus methods) here Р https://github.com/gregorl/Unity-Pidgin-Lens which I used as inspiration.

The net result is unity-lens-pidgin.

2 key MHVLUG people online right now

Super + b and search you buddy list. It only displays currently online buddies, and available buddies are preferred over unavailable ones. You can get it via ppa here.

There is plenty more to do. The search results should be smarter, especially taking into account most recently contacted buddies, which means integrating with zeitgeist or something equivalent. Ideas floating around there. I’d like to do some overlays with status icons, just to give a visual clue on either protocol or current status state.

If anyone else wants to help, or has their own ideas, I’d encourage you to join in on the conversation. The One Hundred Scopes community is pretty cool, and I’m happy to make their vision a little closer to reality.

Ubuntu upgrade: solving the unresolvable package issue

I’m doing my 3rd and 4th upgrade of machines to Ubuntu 11.10 today. The early results on my laptop have been very good (Unity seems way less crashy now), so I’m upgrading a number of other systems I’ve got.

When first trying to upgrade my home server, which has gone through a series of upgrades, I got an error like this about not being able to resolve some packages for upgrade:

E:Error, pkgProblemResolver::Resolve

Solution

It turns out that one of my past upgrades probably wasn’t done cleanly, so there were some really old packages on this system. The upgrade logs will be stored in /var/log/dist-upgrade/main.log. In that file, you’ll find an analysis of your packages that will include references to “Foreign” and “Obsolete” packages that were found.

Take the list of everything in Obsolete and run “aptitude remove” on them. As soon as it is done you can kick off the upgrade again, and all will be good.

 

Linux Desktop Speedups

Phoronix recently published an article regarding a ~200 lines Linux Kernel patch that improves responsiveness under system strain. Well, Lennart Poettering, a RedHat developer replied to Linus Torvalds on a maling list with an alternative to this patch that does the same thing yet all you have to do is run 2 commands and paste 4 lines in your ~/.bashrc file. I know it sounds¬†unbelievable, but apparently someone even ran some tests which prove that Lennart’s solution works. Read on!
More info, including the commands you need on Ubuntu, here.

ÔĽŅ

The Cloud vs. the Enterprise

“We didn’t go with them because they didn’t support Ubuntu” is something that I wouldn’t have expected listening to a cloud service creator talk about selecting cloud vendors. That is exactly what I heard when I was at CPOSC last month. I took it as a throw away statement, and didn’t think much more of it.

Until today, when I saw this graphic posted by Steven O’Grady:

There is something very interesting happening in the cloud space, and it will be very curious to see how this evolves over time.

Prettier fonts for Git Gui on Ubuntu

The default fonts for git gui (aka gitk) in Ubuntu are down right horrible.¬† Even Ubuntu 10.04 defaults to tk8.4, which doesn’t support font smoothing.¬† Fortunately there is a simple way to fix this and make a whole bunch of applications look prettier all at once.

# sudo update-alternatives –config wish
There are 3 choices for the alternative wish (providing /usr/bin/wish).

Selection    Path                   Priority   Status
————————————————————
* 0            /usr/bin/wish-default   10000     auto mode
1            /usr/bin/wish-default   10000     manual mode
2            /usr/bin/wish8.4        841       manual mode
3            /usr/bin/wish8.5        840       manual mode

Then type ‘3’ and hit enter.¬† Now you’ll be using tk8.5 by default, and miracle of miracles your eyes won’t be scarred by jagged ugly fonts in gitk anymore.

Unreasonable expectations

Yesterday I learned something about the new Ubuntu 10.04 release.¬† I doesn’t like to start correctly when applied to a 8 year computer, that has a 11 year old second video card sitting in it.

This is the desktop under my desk in the office that I largely use as a media streamer, irc proxy, and second display (via synergy) for reading documentation while I write code.¬† It turns out that some number of years ago I’d stuck my old 3dfx card (a company that when bankrupt in 2002) in there, I think when I was testing Linux DRI on that machine and the i815 driver wasn’t working correctly.

Honestly, I’d forgotten the card was in there for years.¬† But when the machine did funny things to the display during boot (just about the time it’s trying to switch to it’s fancy splash screen), I spun it around to play with cables and noticed the second vga port.¬† Removing the 3dfx Voodoo3 pci card and rebooting fixed all the issues.

Lesson learned: don’t leave hardware you don’t ever plan to use plugged into machines.

Ubuntu One – Cannonical’s storage cloud

I’m quite impressed by how agressively the Cannonical team is getting when it comes to cloud computing.  They’re integrating eucalyptus into Ubuntu 9.10, which is open source software that lets you build your own “Amazon-like” cloud.  Eucalyptus even implements the same APIs so that all those hundreds of EC2 applications work with it.

But the Cannonical folks haven’t stopped there.  They recently launched Ubuntuone, which is a storage cloud.  Anyone running Ubuntu 9.04 can sign up for an invite (I did last month, and just got mine yesterday).  This provides you with 2 GB of cloud storage for free, or 10 GB for a nominal fee.  The mechanics behind Ubuntuone is an applet that’s running which synchronizes $HOME/Ubuntu One directory on changes.  It’s not rocket science, but it is seemlessly integrated.

At 2 GB of free space, this isn’t for keeping media in sync.  It will do a fair job with text documents, and I’ve started to put my ebooks and pdfs into it for easy reading wherever I am.  I’m also considering redoing my dot files sharing in this manner, though that will mean symlinking into the Ubuntuone directory, as it doesn’t seem like you can share beyond it.

Another interesting feature is a “share with others” on those documents.  That opens this up to be a ghetto version of google docs, at least amongst Ubuntu users.  Again, while this is not rocket science, usability is a huge feature here, and the fact that it is so seemless starts to bring a lot of value to having a whole office on Ubuntu. 

This is where I think Cannonical is making a really brilliant play.  Previously Linux on the Desktop was always about being interoperable with other people’s stuff, as it was the edge case, and the value in running all Linux on the desktop was low.  With really useful, Linux only, services like Ubuntu One, there is now an incentive to get everyone there.  The Mac folks have been playing this game for years with all their zeroconf tools that work on a local network, and it definitely helped shore up offices of Mac users.

Kudos to Mark and the Ubuntu folks for thinking past just desktop clones and really starting to push cloud as a concept into Ubuntu across the board.  It makes me excited to be both a Linux and Ubuntu user, and I can’t wait to see what they add to my platform of choice next.

Ubuntu Jaunty Roundup

I’ve now migrated my work laptop to Ubuntu 9.04 (Jaunty), which went pretty smoothly.  I played some games to use internal mirrors, but still use the graphical update process (instead of just dist-upgrade), which all worked out well.

New in Jaunty

One of the bigger items that got press for Jaunty was their new notification system.  I really does rock.  It looks slick, and is very consistent, and I’m a fan.  I’m also a fan of the new splash screen.  All these bits are cosmetic, but something that looks beautiful is important in using a computing environment.

Bugs Fixed

I’ve had a number of bugs that I used to have to work around, now they work correctly:

  • there used to be a race in bringing up superswitcher when gnome started that meant it didn’t get to lock out the caps lock key.  So I had to stop and restart it after a fresh login.  That appears fixed.
  • Jaunty now understands the right suspend settings for my nvidia card, no need to adjust that in the acpi hal configs any more.
  • emacs-snapshot is now current enough that it loads my configs perfectly.  For the first time in 10 years I’m now running a prebuilt version of emacs/xemacs for daily development.  /usr/local just got a bit smaller for me.

Dear Amarok… why do you suck now?

The Amarok team took their application off a cliff with version 2.0 (which is now what’s in Jaunty).  All support for syncing devices is gone.  While some aspects of their UI is neat, including podcast search, I’m really not interested in going back to rsync for device management.  It’s also really unclear that is ever coming back.  Fortunately, banshee seems to have gotten pretty good, so that’s where I’m at now.

Update notifier, where did you go?

Update manager doesn’t display the orange star for daily updates any more.  There is a workaround listed in the bug, and a lot of this is wrapped up in the philosophy of the new notification system.  However, I really liked my daily updates.  I get that the team was trying to get stuff out of the notification tray but this seems to be throwing the baby out with the bathwater.

Final Thoughts

It’s really nice to see Canonical push Linux into something that is beautiful, consistant, and flexible.  I find myself tweaking my volume settings just to get the nice notifications. ūüôā