Xgrid running on AppleTV

I got Xgrid running on my AppleTV for no real reason other than to see if I could do it. I’ve documented what I did on the AwkwardTV wiki and past the jump.

Update: I found a few bugs in the startup/shutdown of the xgridagentd. All relevant changes are now on the AwkwardTV wiki.

Technorati Tags: ,

This procedure will show you how to setup you AppleTV as an Xgrid node. I’m not really sure why you’d want to do this, but this is proof-of-concept. There’s not a whole lot of Xgrid-aware apps out there, but Techspansion’s excellent video converter VisualHub is aware. I am not responsible for any damage you may cause your AppleTV

This all assumes you have an Intel Mac with Tiger. This also falls into the “this hack uses OSX/Intel binaries, and therefore is not legally distributable. No support whatsoever is given to anyone. Do this at your own risk” category.

Essential Software

Recommended Software

  • XgridLite – A prefpane to make your Mac into an Xgrid Controller for your local network
  • MacFUSE – MacFUSE core
  • SSHFS for MacFUSE – lets you mount SSH volumes on your desktop, used heavily in this how-to
  • Xgrid Mandelbrot from the the Developer tools from your OS X install DVD. Open /Developer/Examples/Xgrid/GridMandelbrot/GridMandelbrot.xcodeproj in Xcode and hit the Build and Go button.

Controller Configuration

In a terminal window on your Mac, turn on the Xgrid controller daemon
sudo xgridctl controller start

We’re going to make your Mac a client node in our grid too, so open your Sharing Prefpane, check the box for Xgrid under the Services tab, and click the Configure button. Set it to use a specific controller, and your machine’s hostname should show up in the dropdown.

Open the Xgrid Admin app that installed with the admin tools pack from /Applications/Server/Xgrid Admin.app. Click the Agents tab, and your Mac should show up.

Node Configuration
Copying the necessary Frameworks to the AppleTV

  • Make sure you’ve upgraded your SSHd
  • Give root on the AppleTV a password. SSH into it, and do
    sudo passwd root
  • Remount your AppleTV’s root as read/write
    sudo mount -uw /
  • If you haven’t already, mount your ATV with SSHFS/MacFuse. Make sure you’ve mounted the root (/) while logged in as root. In the following examples, my AppleTV is mounted on my Mac at /Volumes/appletv.local
  • Bang out the following commands in a terminal window
  • cp /Library/Preferences/com.apple.xgrid.agent.plist /Volumes/appletv.local/Library/Preferences

    mkdir -p /Volumes/appletv.local/private/etc/xgrid/agent

    cp /private/etc/xgrid/agent/com.apple.xgrid.agent.plist.default /Volumes/appletv.local/private/etc/xgrid/agent/

    cp -Rf /System/Library/Frameworks/XgridFoundation.framework /Volumes/appletv.local/System/Library/Frameworks

    cp -Rf /System/Library/LaunchDaemons/com.apple.xgridagentd.plist /Volumes/appletv.local/System/Library/LaunchDaemons

    cp -Rf /System/Library/PrivateFrameworks/XgridInterface.framework /Volumes/appletv.local/System/Library/PrivateFrameworks

    cp /usr/bin/xgrid /Volumes/appletv.local/usr/bin/xgrid

    cp -Rf /usr/libexec/xgrid/ /Volumes/appletv.local/usr/libexec

    cp -Rf /usr/sbin/xgridctl /Volumes/appletv.local/usr/sbin/xgridctl

    cp -Rf /System/Library/PrivateFrameworks/BEEP.framework /Volumes/appletv.local/System/Library/PrivateFrameworks/

Start up the Agent
/usr/sbin/xgridctl agent on
/usr/sbin/xgridctl agent start

Then check the status
/usr/sbin/xgridctl status
Should come back with something like
610 ?? Ss 0:00.56 xgridagentd

If nothing comes back and you get a prompt, the agentd isn’t running.

At this point, you should see another processor and another agent in your Xgrid Admin tool. For example, my MacBook shows up as two processors/one agent, and my AppleTV shows up as an additional processor/agent.

Test the Grid
Build and run the Xgrid Mandelbrot app from the Developer Tools examples. If you watch the Agents and tab in the Xgrid Admin app, you should see your Mac and AppleTV go back and forth from Available to Working.

At this point, you’re done! Your AppleTV will launch the xgridagentd at boot, and accept tasks. Go buy more AppleTVs/Macs and build yourself a supercomputer.

Further Reading
Apple’s Xgrid Page
MacDevCenter article on Xgrid
Wikipedia article

Advertisements

16 Responses to “Xgrid running on AppleTV”

  1. Macenstein » Macenstein Archive » Set up an Apple TV render farm Says:

    […] professafresh over at AwkwardTV has posted instructions on how to set up your Apple TV as an Xgrid node on your network. The list of reasons you may want to DO such a thing is short, and consists mainly of “Why not?”. […]

  2. Feed Me Feeds » Blog Archive » AppleTV hacked to run Xgrid Says:

    […] Read | Permalink | Email this | Comments […]

  3. GadgetsPlanet.info » AppleTV hacked to run Xgrid Says:

    […] Read | Permalink | Email this | Comments […]

  4. AppleTV hacked to run Xgrid » Girls Love Gadgets Says:

    […] Read | Permalink | Email this | Comments […]

  5. 设计界 » Blog Archive » AppleTV hacked to run Xgrid Says:

    […] Read | Permalink | Email this | Comments […]

  6. AppleTV hacked to run Xgrid at LifeParticles.com Says:

    […] Read | Permalink | Email this | Comments […]

  7. Clover Thoughts | AppleTV hacked to run Xgrid Says:

    […] Read | Permalink | Email this | Comments […]

  8. fresh wordpress installation » AppleTV hacked to run Xgrid Says:

    […] Read | Permalink | Email this | Comments […]

  9. Multimedias.mobi » AppleTV hacked to run Xgrid Says:

    […] Read | Permalink | Email this | Comments […]

  10. Jammed.mobi » AppleTV hacked to run Xgrid Says:

    […] Read | Permalink | Email this | Comments […]

  11. Your Gadget Guide » Blog Archive » AppleTV hacked to run Xgrid Says:

    […] Read | Permalink | Email this | Comments […]

  12. Top Posts « WordPress.com Says:

    […] Xgrid running on AppleTV [image] I got Xgrid running on my AppleTV for no real reason other than to see if I could do it. I’ve documented […] […]

  13. Xgrid auf dem AppleTV » at HDTV Space Says:

    […] Cluster-Software Xgrid läuft mit einem Hack auch auf dem AppleTV, berichtet professafresh. Xgrid kann im Stile Folding@home über Apple’s Bonjour-Technologie in einem lokalen Netzwerk […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: