Ph: 2492427011205

Sonos

When I reviewed the Sonos system back in late 2008, I absolutely fell in love with it. I listened to more music while I had the Sonos review units than I had the entire previous year. I was extremely disappointed to have to give them back when the review period was over. Since that time, I've wanted to own my own Sonos gear, but frankly the price was prohibitive. Not only were they expensive themselves, but they requires speakers. I've never had high quality speakers of any sort, and adding those to the cost of the already expensive Sonos system was just not practical for me.

Sonos has changed their line-up a bit since I reviewed them, though. They now offer their wireless magic packaged into two different speaker selections: the Play:3 and the Play:5. They're still expensive, but the bundled units felt like a more approachable price. Additionally, they consumed less space than the older product plus external speakers. I decided to splurge and buy one of each, plus the requisite Zone Bridge to tie them together. This was ostensibly a Christmas gift for the whole family.

I waffled for a long time before committing to the purchase, because it's a sizeable investment in something we didn't really need. Moreover, I considered just getting a pair of Play:3 speakers but finally decided that the line-in on the Play:5 was a worthwhile investment should we ever decide to use it as the speaker for our movie watching. I ultimately reconciled the high price with the knowledge that this was an investment into something we'd be enjoying for a very long time.

Since they arrived, we've been making great use of them. Whether we're streaming music from Pandora, or listening to our collection of MP3s, or just streaming NPR stations, we've been using them daily. We listen to more news programming while at home -- while eating breakfast or eating dinner -- now than ever before. Sure, a simple radio in the kitchen might have accomplished this same task, but being able to use our various smartphones and tablets to find programming from all around the world is a real joy.

And being able to switch from news to music with the push of a button is simply wonderful. The kids both have the Sonos app installed on their iPod Touches, and enjoy controlling the streaming music for the whole house. They can crank the music in the living room while romping with Josephine while Angela and I can have a conversation in the kitchen while listening to the same music at a more modest volume.

The Sonos system was as easy to setup as it was when I reviewed it three years ago. It's simple, and it just works without any surprises or fuss. I was a little disappointed to find that Last.fm requires a paid subscription in order to stream to Sonos, but Pandora works just fine. And of course I have tens of gigabytes of MP3s of my favorite music available to stream at any time. All in all, the Sonos has been a terrific purchase.

Thinning the herd

One of the better analogies I've ever heard for Twitter is that it's like a really crowded party: there are lots of conversations going on at any one time, and just like at a party one can casually listen in on a number of them simultaneously and choose to engage those that are most interesting. I've been trying to execute that metaphor for the last year or so, gradually following more and more people and accepting that there will be important stuff that I miss as a result. The upside is that I get exposed to more interesting stuff than I might otherwise find. But upon reflection, most of the "interesting stuff" I've been seeing on Twitter is largely ephemera: small time wasters that entertain me for a minute or two, and then fade away forever.

Since my first tweet in late 2007, I have made a pretty conscious choice to limit the number of people I follow on Twitter. I only have so much capacity each day to read what's happening in the world, and the more people I follow the less I can consume from any of them. I regularly stop following people who get really tedious or simply tweet so much as to dominate my feed. And I've resolved for 2012 to further reduce the number of people I follow.

I've decided to retire from the "crowded party" and instead focus on the people about which I really care, or at least those people who have things to say that affect my life. I already have plenty of ephemera in my life (anyone reading Boing Boing has enough ephemera to keep them busy all week long!), so I don't really need to be exposed to more.

Whereas Owen has decided to abandon Twitter, I've purged many from the list of people I follow on Twitter down this morning, and will likely reduce it even further in the days ahead. For the time being, I've elected to keep following a few "noisy" people (Cory Doctorow and William Gibson being the most prolific) because I do get some interesting news of the world from these folks.

This may well reduce the overall utility of Twitter, but I hope that it will improve my sense of connectedness to the people about which I care.

Linksys

For the last umpteen years I've been using a Linksys WRT54G (hardware version 2.2) wireless router. I've used OpenWRT, dd-wrt, and most recently Tomato custom firmware images to allow me to do things that the stock firmware didn't fully support. Through all of these permutations I've always had an open wireless network, both because I've always felt it's a pain to type in passphrases on client devices and because I think it's important to provide wireless access to neighbors in need. To date, no one has egregiously abused the wireless access I've made available to them.

But the WRT54G is getting long in the tooth. I have a couple of devices that can speak Wireless N, as well as a couple of gigabit capable devices. The WRT54G is limited to Wireless G and 10/100 Ethernet ports. I've also had a desire of late to split off our personal network traffic from that which I make available to my neighbors, so I've been looking at wireless routers that support a so-called "guest network" option. Finally, the WRT54G sometimes simply flakes out, and requires a power cycle in order to work properly. That's usually not a big deal, but it can be a real pain during the middle of a movie we're streaming from Amazon.

Today I bought a Linksys E3200. It has most of the features I want: A/B/G/N wireless support, 10/100/1000 Ethernet, and a guest network. It has support for Dyn dynamic DNS, a service on which I rely; though it sadly does not support DNS-O-Matic.

Setup was easy, and I was able to get everything configured without any real hassle. It wasn't until I was all finished that I noticed no local domain name was being supplied to clients. Indeed, there are no local DNS controls anywhere inside the E3200 configuration pages (that I could find) which means that none of my local clients could address one another by name. This meant my Sonos couldn't find my NAS to stream music, and the Mac connected to my TV couldn't find the NAS to stream movies.

With the WRT54G -- through all the custom firmwares I used -- I had a local caching DNS resolver that was able to arbitrate local client names. I used skippy.lan as my local domain name, and have come to rely on foo.skippy.lan being a resolvable address.

The workaround for this problem was to install and configure DNSmasq onto my Pogoplug NAS, and then to configure the E3200 to tell clients to use the Pogoplug as their primary DNS server. This somewhat defeats the purpose of the E3200, because it means that my network is now dependent on two devices for full (internal) functionality. It also places just a little more load on the Pogoplug, a device with extremely limited resources that I'm trying to maximize.

After a couple hours of use, the E3200 works as expected, so I'm moderately satisfied with it. I may try to flash a custom firmware onto it in the future, but for now I'm just going to stick with the stock image and see what happens.

Habari as a Service

When I first heard about OpenShift, I was underwhelmed. Hosting accounts aren't that hard to find or set up, so the whole Platform-as-a-Service initiative struck me as a solution looking for a problem. But the more I poked around, the more I realized that this was a pretty great offering for developers. I'm not a developer by trade or training, so the obvious utility of PaaS slipped past me at first. As a sysadmin, I'm much more interested in the L and A portions of the LAMP stack than I am in the P. :)

Red Hat has a guide on how to create an OpenShift quickstart for hosted applications. Notably absent from the list of extant quickstart apps was Habari, so I decided to remedy that! Here are my notes for what I did.

First, obviously, I needed to create an OpenShift account. After creating my account, I published my ssh public key to my account. Creating an OpenShift account creates a domain in which your apps will run. My account name is "skippy", so my OpenShift domain is also "skippy".

Next I installed the OpenShift client tools:

$ sudo gem install rhc

I tried to create an application:

$ cd ~/code
$ rhc-create-app -a habari07 -t php-5.3 -l skippy@skippy.net

but got the following error:

/var/lib/gems/1.8/gems/rhc-0.81.14/bin/rhc-create-app:24:in `require': no such file to load -- rhc-common (LoadError)
        from /var/lib/gems/1.8/gems/rhc-0.81.14/bin/rhc-create-app:24

The solution is to export the RUBYLIB environment variable to my shell:

$ export RUBYLIB=/var/lib/gems/1.8/gems/rhc-0.81.14/lib

I should probably add this to my ~/.bash_profile, but for now I just manually execute this each time I log into my development box.

After that, I was able to create an app:

$ rhc-create-app -a habari07 -t php-5.3 -l skippy@skippy.net

Here's the full output from that command:

Password:

Found a bug? Post to the forum and we'll get right on it.
    IRC: #openshift on freenode
    Forums: https://www.redhat.com/openshift/forums

Attempting to create remote application space: habari07
Now your new domain name is being propagated worldwide (this might take a minute)...
Pulling new repo down
Warning: Permanently added the RSA host key for IP address '184.73.107.7' to the list of known hosts.
Confirming application 'habari07' is available
  Attempt # 1

Success!  Your application 'habari07' is now published here:

      http://habari07-skippy.rhcloud.com/

The remote repository is located here:

    ssh://a21537404fdc46c5bef86ad7a5c6091b@habari07-skippy.rhcloud.com/~/git/habari07.git/

To make changes to 'habari07', commit to habari07/.

Successfully created application: habari07

OpenShift provides some stub files in the /php directory, which we don't need. Remove them:

$ rm -rf habari07/php/*

I then downloaded a zipfile of the Habari 0.7.1 source code, which is the current stable version. I unzipped the archive and copied the Habari source files to the /php directory of my OpenShift app:

$ cp -av habari-0.7.1/* habari07/php

OpenShift deletes the entire contents of your app's /php directory with every git push, which means that the Habari SQLite database needs to live outside of the /php directory. See OpenShift KB-E1002 for details.

To account for this, we need to build support for this in the Habari config.php. Thankfully, OpenShift provides a number of environment variables that describe the OpenShift application. The $_ENV['OPENSHIFT_DATA_DIR'] holds the path to the persistent file storage location for this app. So I created a config.php file in my app's /php directory with the following:

$path = $_ENV['OPENSHIFT_DATA_DIR'];

Config::set( 'db_connection', array(
        'connection_string'=>"sqlite:$path/habari.db",
        'username'=>'',
        'password'=>'',
        'prefix'=>''
));

Habari has long supported an unattended installation process, which makes deploying to OpenShift extremely easy. We can define a $blog_data array in the config.php file which will allow Habari to install itself without human intervention. I added the following to config.php:

$blog_data = array( 'blog_title' => 'Habari',
        'admin_username' => 'admin',
        'admin_pass1' => 'habari',
        'admin_pass2' => 'habari',
        'admin_email' => 'CHANGE@ME',
);

Now I'm ready to add the Habari files and my config.php to the OpenShift repository:

$ cd habari07/php
$ git add .
$ git commit -a -m 'initial Habari commit'
$ git push

I visit http://habari07-skippy.rhcloud.com in my browser and see a ready-to-use Habari blog! I can log in with username "admin" and password "habari". Success!

But that's only half the battle: a personal blog running in OpenShift. What I want is to make a template so that anyone can easily deploy a Habari blog on OpenShift.

Following the quickstart instructions, I created a GitHub repository named habari-07-sqlite-quickstart, and added that as a remote repository:

$ cd ~/code/habari07
$ git remote add github https://skpy@github.com/skpy/habari-07-sqlite-quickstart.git

I edited the README file, and copied it to README.md (is that part even necessary?) and then added them to version contol:

$ vi README
$ cp README README.md
$ git add .

Commit these files, and push them up to GitHub:

$ git commit -a -m 'adding README'
$ git push -u github master

That's it! Anyone can now follow the instructions in the README file to easily deploy their own Habari installation on OpenShift!

Once deployed, you can assign custom DNS names to your OpenShift applications with the following command:

$ rhc-ctl-app -a habari07 -c add-alias --alias openshift.skippy.net -l skippy@skippy.net

Obviously you'll need to set up the appropriate CNAME record for the alias you define to point to your app's rhcloud.com address.

I set up another repository for Habari 0.7 using MySQL, but discovered in the process that the Habari automated installation mechanism doesn't work properly for MySQL. You can still easily deploy Habari using MySQL on OpenShift, but you'll need to take note of the database details provided to you when you run

rhc-ctl-app -a $APPNAME -e add-mysql-5.1 -l $USERNAME

When you visit your app's URL, you'll get the Habari installation screen, which will require you to plug in the database details. Not a big deal, but not quite as fun as a completely automated installation!

The upcoming release of Habari 0.8 should resolve this problem for MySQL installations, so I'll make a new OpenShift Quickstart for that once it's out.

The Smallest Habari Server

Pogoplug
I acquired a Pogoplug device awhile back, and on the whole I find it a neat little gadget. The user interface is okay, but not great; but really I don't need another web-based storage location. I've already got Dropbox and Ubuntu One accounts that I hardly use, so being able to store more data online -- albeit on hardware I control -- just isn't that useful. What I would like, though, is a small, low-power Linux server that I can use for a variety of useful tasks.

The Pogoplug has 256 megabytes of RAM, so anything I might do with it needs to have minimal system requirements. I decided to try to install Habari, mostly just to see if I could. Habari can use SQLite as its datastore rather than a complex relational database server, and requires only an http process that can handle PHP. This means it can use lighttpd or nginx rather than Apache. Using SQLite severely restricts the potential performance and scalability of Habari, but with only 256MB RAM I'm already severely limited in how much I might be able to scale.

It was trivially easy to install Debian on the Pogoplug device. I booted from a USB stick which contains the root filesystem. I added a 500GB external drive, and gave it three partitions: swap, /var and /home. The Debian install had basically no services running other than sshd -- no syslog, no cups, no avahi, no nothing. I installed nginx and PHP. In order to get nginx to handle the PHP processes, I needed to install the spawn-fcgi package.

Then I just followed the Habari nginx instructions, and I had a blog running! With nginx, spawn-fcgi and a screen session connected to IRC, I still have 7 megs of unused memory, and I haven't dipped into swap at all!

skippy@debian:~$ free -m
             total       used       free     shared    buffers     cached
Mem:           249        242          7          0         11        205
-/+ buffers/cache:         25        224
Swap:         2047          0       2047
skippy@debian:~$ vmstat -a
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free  inact active   si   so    bi    bo   in   cs us sy id wa
 0  0      0   7328 197228  37972    0    0     0    25   36   39  0  0 99  0

Of course this little blog isn't actually handling any traffic, but it's nice to know that I have a self-contained, self-hosted Habari environment on which I can hack.

 1 2 3  126 Next →

About

Brewer philosopher.

User



You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser