Announcement: TorqueBox

May 18th, 2009

I announced the TorqueBox project today.

It’s the coolest platform for your Ruby applications, ever.  Really.

New JBoss-Rails Release & Reminder

December 3rd, 2008

Just a reminder, in case anyone didn’t make the jump..

My Ruby/Rails/JBoss blogging is going on over at Odd Thesis these days.

That includes this announcement about the 1.0.0-Beta-2 release that just popped.

Your Neighborhood Starbucks

December 2nd, 2008

Over the summer, I relocated to a farming community in southwest Virginia.  Around the middle of August, the Starbucks that’d been under construction finally opened, to much rejoicing.  I’ve spent many a dollar and hour in that store, enjoying a lovely beverage and the fast internet.

Over the Thanksgiving holiday, we drank up all the ground coffee at the house.  Heading into town to get more on Saturday night, we managed to show up 15 minutes after the store closed, just as the workers were about to leave.  We’d assumed they were open until 11pm, not 10pm, on a Saturday.  We were wrong.

Nonetheless, a worker named Thomas sent his coworkers on home, dragged me into the store, and insisted on grinding the 2 pounds of coffee I was in need of.

He gave them to me on an IOU, since the registers had been counted and closed.  I returned the next morning to pay my coffee debt, after enjoying some of the fresh-ground joe.

Sure, it’s sometimes fun to demonize the corporate coffee culture, but at least the Wytheville Starbucks feels like a local coffeeshop, populated with our neighbors on both sides of the counter.

I’d wanted to praise Thomas to the store manager, but I’ve missed him every time I’ve been in since Saturday.  So I figure a blog would suffice, too.

Of course, this happened after we’d spent the holidays driving down to Georgia and back, stopping not once, but twice at Starbucks that had been shuttered.  Billboards along the highway still proclaimed “Exit here, turn left!” But it turns out they were billboards of disappointment, as those stores had been downsized in September.

I was glad to return to my hometown, neighborhood Starbucks.

Workblog

November 10th, 2008

Just when I’ve trained my boss to read this blog to keep up with my status, I go and launch another blog, specifically for my workstuff.  In addition to blogs about JBoss things, it’ll include other documentation for building, installing and using the related projects.  The projects are grouped into constellations based around theses.  Hence the name:

In addition to being a new blog, it’s also my attempt to eat my own dogfood and prove it all works in the Real World.

The Odd Thesis site runs entirely on the JBoss-Rails stack.

I’ll still blog random crap here at fnokd, but if you’re looking for my JBoss experiments, add the Odd Thesis feed to your reader.  I’ve initially imported appropriate posts and comments from this blog.

Trip Report: Raleigh RubyCamp

October 20th, 2008

I did the round-trip from the land of cows to Raleigh to attend the Raleigh RubyCamp over the weekend.

I think I heard about 80 folks showed up, but I’m not certain on that.

Mark (root@37s) and James did a very nice job of organizing it.  They provided good coffee and donuts to start the morning right.  Krispy Kreme is never a bad idea.

We gathered, and a handful of folks presented introductions about what they wanted to do a session on.  We then figured out the slots, and got started.

Brenton Leanhardt talked about Genome and Cobbler, two emerging technologies at Red Hat.  Cobbler helps to stitch together distributions, Kickstarts and repositories, while Genome helps manage the inventory of virtualization hardware and the guest instances running on them.

His use-case for the technologies is the fact that we’ve got Xen hosts running on machines scattered under desks and in closets, which have been donated to a virtual pool.

Where did you launch that instance last month?  Where can you launch a new instance today?  Genome helps answer those questions.  Many of the Genome bits are Camping apps.

I presented my short slide-deck about JBoss-Rails.

Mark Imbriaco led an open discussion about Rails deployments.  It ended up mostly being us asking how 37signals did things.  He described their hosting environment, their occasional frustrations with Mongrel, along with some stories about running migrations against a 100gig database.

Sean Cribbs talked about his experience in joining and then leading open-source projects, particularly Radiant CMS.  He discussed breaking up the core into many plugins and modules, and the uptick in community participation that followed.

Overall it was a great weekend, and I even got some nice t-shirts out of it.  Not bad.

Preliminary slides for JBoss-Rails at RubyCamp

October 18th, 2008

Thanks to the typical demo demons, I’ve been unable to get everything functioning perfect for instantaneous clustering on EC2 by tomorrow.

Oh well.

But here’s the first draft of some slides I’m taking with me to the Raleigh RubyCamp.

It’s a BarCamp style event, so I anticipate the slides probably changing throughout the day. I’ll published updates if needed.

Run level, run!

October 17th, 2008

Trying to debug why my init scripts weren’t initing on EC2, I checked all the normal places.

The chkconfig tool reported that my services should be on at runlevel 3:


jboss   0:off   1:off   2:off   3:on    4:off   5:on    6:off

My /etc/inittab says I was booting to runlevel 3:


id:3:initdefault:

Yet the console did not show my things to be spinning.  A little googling around, I found the runlevel command (I’m not a linux expert…) which explained to me I was in runlevel 4.


N 4

4? Really? 4? I wasn’t expecting that.

Apparently this is just how EC2/Xen work.  They force you up into runlevel 4.

What does 4 mean?  Asking the Wikipedia, you’ll see a pattern:

  • Typical linux: unused
  • Debian/Ubuntu: same as 2,3 and 5, weirdos
  • RHEL/Fedora: unused/user-definable
  • SUSE: unused/user-definable
  • Slackware/Gentoo: Same as 3, which implies graphics, even
  • Sys-V: seems to imply multi-user with graphics

I had no idea that runlevels were all over the map.  I also had no idea that EC2 would disregard my inittab and make up their own ideas.

Thanks, guys.  Another hour-long round of RPMing, kickstarting, and image-creation ahead of me…

Boot up JBoss

October 16th, 2008

On my path towards clustering a Rails app on JBoss on EC2, I stumbled across Bryan Kearney and the other Thincrust guys. With their help, I now have a JBoss AS5 + jboss-rails “appliance” ready to roll.

Grab the raw image or the VMWare image, and play along at home.

Fire up the image in your favorite virtualization environment. I give my virtual machine at least a gig of RAM. Marvel at the pretty Grub splash screen, courtesy of James Cobb (JBoss.org designer).

Let it boot on up, and you’ll notice a handful of things:

  • Very few things roll across during boot.  The image is an assembly of “just enough” OS bits.
  • Before JBoss boots, “Installing Appliance” or “Updating Appliance” will scroll by.  This is the Thincrust magic that allows adjustment of the appliance in a consistent and controlled manner (via Puppet).
  • JBoss AS 5 (with rails deployer) starts at boot.

You can login with root password of thincrust.

The login prompt will tell you the IP address of the appliance, since it probably booted off DHCP.  JBoss will be up and running at http://<IP_ADDRESS>:8080/.

You can su jboss, whose $HOME is /opt/jboss/jboss-as5, which coincidentally is $JBOSS_HOME.  The default configuration is used to start the AS.  Logs are under /opt/jboss/jboss-as5/server/default/log/.  And to deploy, just drop something into /opt/jboss/jboss-as5/server/default/deploy/ and it’ll hot-deploy.

To control the service, as root:

  • service jboss stop
  • service jboss start
  • service jboss status

I’ll make the RPMs used to build this available sometime soon. Until then, you can poke around the bits I use to create the RPMs ultimately used by Thincrust to build the appliance image. They are packaged in a way that makes my Red Hat brethren throw up in their mouths a little bit.

Also, once I test’em on EC2, I’ll throw out public AMIs for testing.

By no means is this complete. This just marked a nice spike of a milestone along the way. There’s still plenty of things that’ll poke you in the eye if you’re not careful. Always wear your safety harness. Drink plenty of fluids. Keep away from children.

Stumbling through technology

October 11th, 2008

It can sometimes be funny, the paths we take.

Once I’d verified that a Rails app deployed on JBoss would indeed cluster, I sat in my farmhouse, looking at my lone little Mac.  Not much of a cluster to play with.

So I started looking at Amazon EC2, which is truly very nice, particularly when paired with Elasticfox.

Of course, firing up a cluster on EC2 requires a nicely-produced, ready-to-boot machine image or a lot of manual configuration on each node.

Sacha pointed me to another group within Red Hat: Thincrust.

Thincrust configures a Fedora disk image with “just enough” OS bits, and provides a way to add/update applications on it.  It’s a happy mixture of Kickstart, Puppet and Yum.

The goal is to make it easy to produce “appliance” images that could be flung onto machines, real or virtual.  Need a Git server?  Fire up the Git appliance on the cloud.  Need a Drupal server?  Fire one of those up.  Need a JBoss server or cluster?  We’re working on that..

Thincrust is built upon Fedora.  My Mac is not.  But VMWare Fusion lets me run Fedora.  So I can create Fedora-based Thincrust images.  Which I’ll deploy on EC2.  Which is running Xen, probably on RHEL.  And ultimately allowing you to run your Ruby-on-Rails applications on a Java stack.

There are times I can’t remember exactly which OS, language, or virtualization environment I should be thinking in.

Elasticfox, OSX and iTerm

October 1st, 2008

Elasticfox is a nice extension for managing your relationship with EC2 from within Firefox.  It’s XUL-based, somewhat homely and odd.  But it’s so much nicer than dealing with the ec2-* scripts directly and copying Amazon’s wacky hash identifiers hither and thither.

But on OSX, the “ssh to this instance” button is wired up to Terminal.app.  I can’t stand Terminal.app.  I much prefer iTerm.

So, a little AppleScript hacking, and Elasticfox now uses iTerm to connect to instances through ssh.

Instead of jamming it all into a dozen -e options on osascript, I just put it in a file, and changed my configuration.

Elasticfox configuration

And the script itself:


on run argv
  tell application "iTerm"
    activate
    set cmd to "ssh -i " & item 1 of argv & " " & item 2 of argv
    set myterm to the last terminal
    tell myterm
      launch session "Default Session"
      tell the last session
        write text the cmd
      end tell
    end tell
  end tell
end run

Next »