Thursday, July 30, 2009

Solar Installation - Part 1




So Step 1 in our solar project was upgrading the electrical panel. All of my breakers were spoken for, so I had to add a line side distribution box for the solar to interconnect. The junction box at the bottom allows me to add a sub-panel into my main distribution panel. The PV system will connect into this dedicated sub-panel.

Thanks to Joseph of Jackpot Electric for the nice, clean installation!

For other articles in this series, see:
http://blog.dustinkirkland.com/search/label/Solar

:-Dustin

Wednesday, July 29, 2009

Going Solar in Austin, Texas


We're working hard to make your Ubuntu Server as energy efficient as possible, and I'm quite proud of that.

Personally taking it one step further, last week I signed a contract on a 6650W Photovoltaic System, to be installed on my roof while I'm in Dublin for the Karmic Distro Sprint.

The system consists of a total of 38 Solarworld 175 Watt Solar Panels, and a PVI-6000-OUTD-US Aurora Photovoltaic Inverter. It should supply the majority of our electricity (according to PV Watts) and pay itself off within a couple years (after rebate).

We contracted the system through my buddy Vincent Guerrero of Texas Solar Power Company, here in Austin, Texas, taking advantage of one of the most generous and progressive solar rebate programs in the country, offered by Austin Energy.

I figured I should blog our experience in case anyone else out there is considering the same. I'll keep you posted on the installation and performance of the system.

For other articles in this series, see:
http://blog.dustinkirkland.com/search/label/Solar

Cheers,
:-Dustin

Byobu Slides for Your LoCo or LUG!




Do you want to be a rock star in your LoCo or LUG?

Give a presentation or demonstration on Byobu!

The hard work is already done, as I have created a set of slides for you, available under the Creative Commons Attribution-Share Alike 3.0 license.

There's also a screencast available at YouTube:

I know a couple of people have done something like this with their groups in the past few months, and I thought I'd help out by providing some screenshots and documentation.

Enjoy,
:-Dustin

PowerNap in the Podcasts




Howdy all-

If you don't already follow the Ubuntu Podcast and the Ubuntu UK Podcast, you really should! Both are community driven multimedia presentations that cover the news in the Linux and Ubuntu communities. These guys provide a tremendous service to the world of Ubuntu.

Nick Ali and Josh Chase discuss PowerNap in the Ubuntu Podcast Episode #31. They did a good job explaining the design, uses, and advantages of it. Give it a listen...

And the Ubuntu UK Podcast guys (Ciemon Dunville, Alan Pope, Tony Whitmore, Dave Walker) interviewed your humbled author in S02E09, The Dimensions of Time. We talked about the Ubuntu Server, PowerNap, KVM, and eCryptfs.

Enjoy!

:-Dustin

Monday, July 27, 2009

Restricting Who Can Encrypt their $HOME or $HOME/Private in Ubuntu




I'm listening to the UK Podcast S02E09 right now, and there was a question from a user about restricting who can encrypt their home or private directory under Ubuntu. (A bit later in the broadcast, these fine fellows interview yours truly.)

Dave Walker and Alan Pope were discussing this. Perhaps you have a shared system at home and you want to encrypt your home directory, but don't want to give this privilege to your unruly 10 year old ;-)

Here's a simple recipe for solving this using Unix Discretionary Access Controls:

sudo addgroup ecryptfs
sudo usermod -a -G ecryptfs [allowed users]
sudo chown root:ecryptfs /sbin/mount.ecryptfs_private
sudo chmod 4750 /sbin/mount.ecryptfs_private

So you create an ecryptfs group, add your allowed users to the ecryptfs group, chown the setuid binary 4750, such that only users in the ecryptfs group can execute it. Done!

I'll note that Fedora 11 ships with /sbin/mount.ecryptfs_private permissioned by default in such a way. I don't plan to change Ubuntu's default behavior unless required by the Ubuntu Security Team.


-rwsr-x--- 1 root ecryptfs 12216 2009-07-21 02:36 /sbin/ecryptfs_private*



Cheers,
:-Dustin

Thursday, July 23, 2009

Slashdot (Power Capping) and What Ubuntu is Doing

I just read this article, referenced by Slashdot: Power Capping the Data Center.

And I thought I'd borrow this video (one of my favorites) from IBM:



I think that we in the Ubuntu Server Community are leading the charge in developing an energy-efficient server class Linux distribution.

It is my hope that by the 10.04 LTS release, the Ubuntu Server is widely recognized as the de facto Green Computing Server Platform.

I would like to highlight a few of the key ways we have improved the energy efficiency of the Ubuntu Server in 9.04.

9.04
  • suspend/hibernate/resume
    • In Jaunty, we added pm-utils to the Server seed, and proved that Ubuntu Servers could suspend and hibernate, and be resumed remotely (requires support in the system's BIOS).
  • cpu frequency scaling
    • We also enabled cpu frequency scaling on the Ubuntu Server, defaulting to the on-demand governor. This ensures that Ubuntu Servers run at minimum cpu frequency and power consumption when under-utilized.
  • pwrkap
    • pwrkap is an open source project from the IBM Linux Technology Center which provides an energy use monitor and power capping enforcement tools (just what the Slashdot article is discussing!). We partnered with the LTC, working with Darrick Wong, to deliver this technology as a package in Ubuntu Universe.
  • powerman
    • powerman is another new package in Jaunty. Here, we worked with Arnaud Quette of Eaton to provide in Ubuntu a tool for manipulating Power Distribution Units (PDUs) from a central location--useful for remote operation in data centers and cluster computing.
  • Eucalyptus, EC2
    • Finally, we embarked on a tremendous effort to make the Ubuntu Server a better host and client in virtual and cloud computing environments. Cloud, grid, and utility computing, in a generic sense, provide far more scalable resources at the data center level. And being able to move computing efforts between your data center and someone else's (such as Amazon) also provides some interesting options on the power savings front.

These efforts continue in the development of Karmic 9.10.

9.10 (in progress)
  • powernap
    • PowerNap is a new free software project from Canonical that acts as sort of a "screen saver" for servers. Ubuntu Servers running PowerNap can be configured to take a specific action (like suspending, or hibernating, or powering off) when deemed inactive (no keyboard mouse activity, and none of some list of processes running).
  • powerwake
    • PowerWake is part of the PowerNap project, and provides a command line interface for remotely resuming power napping systems.
  • Ubuntu Enterprise Cloud powered by Eucalyptus
    • Eucalyptus has been enhanced to leverage PowerNap and PowerWake, to maintain a far more energy efficient cloud. Eucalyptus uses PowerNap to suspend, hibernate, or power-off nodes that are not currently running any virtual machines. New VM requests are served from the available capacity of running systems. Eucalyptus will PowerWake sleeping systems only if load requires. With PowerNap, data centers will finally realize the energy savings promised by cloud computing.
  • Condor
    • We are working on packaging Condor for Karmic. Condor is a system that "scavenges" otherwise unused computing cycles, leveraging them for a higher purpose. Think "protein folding" or "SETI@home", except in your data center, for your grid-capable applications. As such, Condor is less about saving power, but more about increasing utilization and efficiency or your computing resources. You could perhaps choose to PowerNap your under utilized hardware and save energy, or instead Condor your systems and task them to other work.
  • mpich2
    • We have also synchronized the mpich2 package from Debian, thanks to some excellent work from a few Debian developers. mpich2 is an extremely important library for high performance, grid computing applications. Whereas Condor is intended for general purpose grid computing, mpich2 is used by developers and users of very specific applications. Like Condor, mpich2 is also about using available computing resources as efficiently as possible.
So what's next? I certainly hope to continue working on energy efficiency in the Ubuntu Server. I have a few ideas about what we could do in 10.04.

10.04 (future)
  • Low Power Architectures
    • I have blogged a couple of times now (here, and here), about running the Ubuntu Server on Dell Mini's. These systems have Intel Atom processors, and run the lpia architecture. I would like to see us work more on this, and perhaps partner with the vendors on an Ubuntu Server product for these architectures.
    • Beyond that, ARM is a fascinating architecture, and will have a tremendous effect on the way we think about computing power. ARM based servers, with solid-state disks will soon run on fractions of a watt of power. Some people are excited about laptops that might have 24 hours of battery. I'm excited about Servers that have a 24 hour built-in battery backup, consume 1% of the power of their predecessors, and can fit in nooks and crannies in every room of your house.

:-Dustin

Tuesday, July 14, 2009

libvirt backport



A big thanks to everyone who has been testing the backport of Jaunty's kvm-84 to Intrepid and Hardy.

I have backported a bit more of the virtualization stack from Jaunty to Intrepid and Hardy, namely:
  • libvirt 0.6.1
Packages are available in the ~ubuntu-virt PPA:
I'm hoping some of you out there might be willing and interested to do some testing on these new packages. They fix a couple of bugs for me, including installation of Windows guests on Hardy hosts.

Please raise issues and discuss problems in Launchpad and IRC, rather than comments below.

Cheers,
:-Dustin

Monday, July 13, 2009

Introducing PowerNap!

Ladies and gentlemen, I'm pleased to announce an exciting, new open source project from Canonical for the Ubuntu Server -- PowerNap!

Mark's Karmic Koala announcement alluded to this work when he wrote:
A savvy Koala knows that the best way to conserve energy is to go
to sleep, and these days even servers can suspend and resume, so imagine
if we could make it possible to build a cloud computing facility that
drops its energy use virtually to zero by napping in the midday heat,
and waking up when there's work to be done. No need to drink at the
energy fountain when there's nothing going on. If we get all of this
right, our Koala will help take the edge off the bear market.
I have just uploaded PowerNap to Karmic, and we are well on our way to integrating the technology into the 9.10's Ubuntu Enterprise Cloud.

Actually, I spent last week in sunny Santa Barbara, California working with Dan Nurmi, of Eucalyptus Systems. We shot some amateur digital videos of Ubuntu Karmic Servers, PowerNap/PowerWake, Eucalyptus, and a Watt meter in action. I'll get those posted soon!

I'll go into much deeper technical detail on the design and implementation of PowerNap over the next few weeks in subsequent posts, but I'll give an overview here...

How Does It Work?

PowerNap operates sort of like a screen saver for servers. Besides watching the console and terminals for keyboard activity, it also watches the system's process table for activity.

An administrator defines a list of regular expressions describing some critical MONITORED_PROCESSES that should be running. When powernapd notices that all of the MONITORED_PROCESSES have been absent from the process table for some configurable ABSENT_SECONDS, powernapd emits a warning to all users of the system that it will run powernap, unless canceled within the next GRACE_SECONDS.

Sample Configuration

In the Ubuntu Enterprise Cloud case, the configuration file, /etc/powernap/config, might look something like:
MONITORED_PROCESSES = [ "^/usr/bin/kvm " ]
ABSENT_SECONDS = 300
GRACE_SECONDS = 60
Thus, if no instance of kvm runs for 5 minutes, then the system will emit a warning, and powernap after a 1 minute grace period.

PowerNap Now!

Alternatively, a system administrator can force the system to powernap immediately by either running /usr/sbin/powernap directly, or sending powernapd the "now" signal with: service powernap now. In fact, this is what the Eucalyptus Node Controller does, such that it can maintain state, and directly control its managed nodes.

What constitutes a powernap?

So, powernap will first check if /etc/powernap/action is executable, and if so, it will run that file. This will allow you, as an administrator, to run any arbitrary script or program of your design when powernapd determines that your server has become idle. Your script could send an email, for example.

echo "Inefficient server, wasting energy" | mail Al_Gore@example.com
But in the default case, powernap will check if your server supports suspend-to-ram, and if so, it will pm-suspend your system. Otherwise, it will suspend-to-disk, or power the system off, depending on the sleep states supported by your hardware.

Slick, huh? :-D

Beyond the Cloud

While PowerNap is bespoke for the Ubuntu Enterprise Cloud, I have implemented it in manner that I hope is generically useful.

In fact, I'm currently using PowerNap on my Mythbuntu front ends! My configuration currently looks something like:
MONITORED_PROCESSES = [ "mplayer", "vlc", "xine", "mythfrontend.real", "xmms", "gthumb" ]
ABSENT_SECONDS = 240
GRACE_SECONDS = 60
My hardware supports S3 suspend-to-ram, so this is great! If 4 minutes go by, where I'm not running any of my media players (mplayer, vlc, xine, mythfrontend.real, xmms), I'm given a 1 minute grace period, and then my system suspends. I have configured wake-on-usb and wake-on-lan in the BIOS, so I can resume the system in a couple of seconds either by tapping a key or sending a WoL magic packet.

But in the mean time, I've reduced the power consumption of 4 systems by 90%, for most of every day while I'm not directly using MythTV!

What about Waking Systems?

Which brings me to PowerNap's kid brother...PowerWake. /usr/bin/powerwake is another Python script. This script is designed to be a smarter, remote waking utility. Currently, it supports wake-on-lan, but it will eventually support other mechanisms, such as IPMI, and perhaps NUT.

With respect to wake-on-lan, it's "smarter" than some other wake-on-lan utilities because it uses a hierarchy of cache files, configuration files, and the current arp table, such that you can wake a system by MAC address, or IP address, or hostname. I find this far more convenient than trying to remember or look up MAC addresses. powerwake respects static configuration in /etc/ethers and maintains a dynamically learning cache of known MAC addresses in /var/cache/powerwake/ethers.

Interesting?

I'm eager to hear what other uses you might have for PowerNap and/or PowerWake for your data centers, basements, and living rooms!

Saving a few Watts,
:-Dustin

Saturday, July 11, 2009

ChromeOS: Initial Thoughts

UPDATED: I received quite a response to this article, and realize now that in fairness, I should probably soften it a bit. The title has changed, the DoJ image has been removed, and the text has been updated below.

Google argued against Microsoft's proposed acquisition of Yahoo on the grounds of anti-trust and monopolistic concerns. Quoting Google's official blog post on the matter:
Could Microsoft now attempt to exert the same sort of inappropriate and illegal influence over the Internet that it did with the PC? While the Internet rewards competitive innovation, Microsoft has frequently sought to establish proprietary monopolies -- and then leverage its dominance into new, adjacent markets.
Remember, it was Microsoft's bundling of Internet Explorer with Windows that ignited the US v. Microsoft anti-trust litigation--exclusively bundling their browser with their operating system. Is Google's moral high ground eroding, by working themselves deeper into the OS layer?

Google is a very different company from Microsoft. It has a different history, different values. Google's monopoly on the search engine market is more well deserved than Microsoft's monopoly on the operating system market. Google Search is a damn good product, arguably the best out there. Vista, yeah, not so much. I absolutely respect these things about Google.

And I'm happy to use their products--Search, Maps, Earth, Blogger, Gmail, Calendar, Analytics, Custom Search Engines, etc. Note that all of these are closed source, them. I'm looking forward to the day when I'm using Google Open Source products...

I'm thrilled that ChromeOS will be Linux based. I hope that the rest of the operating system is open source software as well. Most importantly, I hope that there's no vendor lock-in on the devices themselves. If I buy a device running ChromeOS, but want to change the software components or operating system (albeit voiding my warranty), I hope to have the ability to do so. If these devices end up being Google equivalents of iPhoness and Xboxes and Tivos, though, I don't think the world has necessarily become a better place.

If you imagine an Internet search engine monopoly, coupled with a browser and OS, the wrong company may find themselves rubbing shoulders with:
I sincerely hope Google does not become that kind of company. I have put a lot of faith into Google and many of Google's products. I really, genuinely hope that I can continue to trust Google and love their products.

:-Dustin

Friday, July 10, 2009

Call for Testing: KVM in Jaunty-Proposed

So the backport of KVM-84 to Hardy and Intrepid has been in the works since March, and we're now rounding 3rd base.

I've produced a couple of release candidates and fixed a few remaining issues. Thank you to everyone who has tested these packages and provided feedback.

The final step before releasing the backport is to ensure that these latest changes get uploaded to jaunty-updates, such that the package is in sync among Hardy, Intrepid, and Jaunty.

One more call for testing...

So I've been working hard on this, and I'm at a point where I require assistance from the community. I get emails on a weekly basis from people asking for advice on getting involved in Ubuntu. Here's your shot ;-)

There is a package in jaunty-proposed that needs to be pushed to jaunty-updates before the Hardy and Intrepid backports can take place. In order to promote the package to jaunty-updates, I need users to verify that the new package fixes the four bugs that I think it fixes, and does not cause regressions.

Please, if you have a system running Jaunty + KVM, give the -proposed package a shot, and provide feedback in the following 4 bugs:

:-Dustin

Wednesday, July 8, 2009

The Ubuntu Museum


Earlier today, Steve Langasek reminded us that Ubuntu 6.06 LTS (Dapper Drake) reaches its end of support on the desktop next week (July 14, 2009). I think it's time for a little nostalgia!

As the maintainer of Ubuntu's KVM package, I spend quite a bit of my time regression testing our virtualization stack (kvm, qemu, libvirt, virt-manager, etc). In doing so, I have constructed a massive archive of virtual machine images.

About 6 months ago, Jamie Strandboge and I kicked around the idea of creating a series of "Linux museums", honoring our heritage by providing download-able virtual appliance images that could run under KVM. Jamie is currently working on something like this for Debian's releases.

I'm pleased to introduce my contribution...The Ubuntu Museum! Here, you can find:
  • screenshots (png) of each Ubuntu desktop release
  • screencasts (mpeg) of each Ubuntu boot and shutdown sequence
  • virtual machine images (bzip2, qcow2) of each retired Ubuntu desktop release
The virtual machine images are:
  • default i386 desktop installations
  • with all packages updated to their final resting state
  • the username and password are both "ubuntu"
Obviously, these releases are completely unsupported and the images are provided for entertainment and educational purposes only!

Since I started using Ubuntu with the Breezy release, I found it quite educational to play around with Warty and Hoary--a bit of Ubuntu history I was missing. It is interesting to see the evolution of the artwork and color schemes. I find some strange satisfaction hitting a few old, memorable bugs and then thinking "boy am I glad we fixed that!" It is also pretty cool to see how much we've improved startup and shutdown times.

I recently attended an excellent presentation by Colin Watson on the history of the Debian and Ubuntu installers. He made the point that it's important to know where we've been, when we're trying to figure out where we're going.

Hopefully some of you will enjoy this trip down memory lane and perhaps learn something too!

:-Dustin

Tuesday, July 7, 2009

Virtualization Daily Upstream Builds




At UDS Karmic, we discussed providing daily builds of pristine upstream projects.

Specifically, I implemented this for the key virtualization packages, per https://blueprints.launchpad.net/ubuntu/+spec/server-karmic-pristine-daily-virt-builds:
  • qemu
  • qemu-kvm
  • libvirt
Ubuntu users are often running some version of the project older than the current development branch, it's more interesting to know if the user can reproduce the bug on the latest development sources.

I have constructed some automation that builds Debian/Ubuntu binaries for amd64, i386, and lpia platforms directly from your master git repositories every day at 11:00 UTC, and publishes them in a special, opt-in repository. These daily builds also drop any specific patches we may be carrying, in order to minimize the delta between the binaries built and your upstream sources.

Additionally, this tool also has the ability to expose build breakages, and it has revealed several during the last few weeks as I have been developing it.

If anyone has suggestions as to the utility of this resource, I would appreciate constructive feedback.

Cheers,
:-Dustin

Monday, July 6, 2009

Dell Mini9 (the server) and a Dell Mini10v Review


A few months back, I wrote about my Dell Mini9 running the Ubuntu Server. There's a picture just above, as it has been installed at my parent's house as my co-lo machine. The Mini9 is the machine standing vertically, on the far right, next to a couple of external USB hard drives, a cable modem, and the wireless access point.

I'll reiterate what I stated before... This little machine makes a perfect little server. It usually runs on less than 20W of power. And it is extremely compact, particularly considering that it has a built-in battery backup, keyboard, mouse, and video. All of this, for somewhere around $200, with Ubuntu pre-loaded. Unbeatable, really...except that the Mini9 is no longer available. :-(

Alas, the Mini9 is discontinued. I did, however, pick up a Mini10v recently. Excellent machine as well! My wife, Kim, is using it as her daily computer, and she loves it. The keyboard is far more usable than the Mini9's was. The screen is slightly bigger, and supports much better resolution. The built in web cam is very nice, and works perfectly out of the box.

There were a couple of regressions, in my opinion, from the Mini9's design, though.

In the Mini9, the SD card snapped all the way into the reader, fitting flush with the case. In the Mini10v, the card juts out by a couple of centimeters. For the Mini9, I picked up an 8GB SD card for $20 or so, and used it as /home, with the rest of Ubuntu fitting comfortably within the 4GB SSD. My Mini10v did come with a 16GB SSD, so in the end there's more space.

Also, the touchpad/mouse is really difficult to use and poorly designed. The mouse buttons are actually on the touchpad, in the corner. I find it difficult to perform a click, without also moving the cursor at the same time. I use a retractable USB mouse as much as possible.

Finally, the RAM compartment was trivial to access on the Mini9--just a single screw. The Mini10v requires major surgery to upgrade the RAM. It took me 2 hours, plus the service manual, to disassemble the entire machine and install a 2GB stick. Spend the extra few bucks and max out the memory when you order it.

Minor issues aside, this is a spectacular little machine. The base Ubuntu 8.04 installed is a solid OS. I played with it for a day or two before reinstalling with Ubuntu 9.04 Netbook remix. One word... Wow! The Netbook Remix absolutely rocks! Props to everyone involved in delivering this. Kim really likes it too, by the way. She found the interface intuitive and the unique program tabbing across the top quite useful. Jaunty's boot performance improvements are really nice too. I have highly recommend this machine to friends and family in the market for a netbook under $300. It's certainly been worth it to us.

:-Dustin