Informative Workspace with
®
Raspberry Pi
Chris Hansen, New Relic - @cxhansen
Jonathan Thurman, New Relic - @jthurman42
https://github.com/newrelic/empanada
Raspberry Pi is a trademark of the Raspberry Pi Foundation
Tuesday, October 15, 13
Informative Workspaces
Tuesday, October 15, 13
Culture of Hacking
Hacking the Culture

Tuesday, October 15, 13
Empanada Project
•Simple, open, hackable, dashboard software
•Raspberry Pi setup instructions
•Instructions for adding devices to Raspberry Pi
•Budget-conscious

Tuesday, October 15, 13
Dashboard Software

http://techcrunch.com/2012/03/22/leftronic-relaunch/

Tuesday, October 15, 13
https://ducksboard.com/landing/compete/

Tuesday, October 15, 13

http://www.smartinsights.com/goal-setting-evaluation/performance-management/real-time-businessdashboards/
What’s Important to Us

•Heads-up to when something breaks
•Heads-up to current team activity
•Window into tech community news

Tuesday, October 15, 13
Empanada Goals
•Good support for metrics and news
•No service fee
•Simple to hack
•Generic event service for integration
•Deployable anywhere
•Accessible from anywhere
Tuesday, October 15, 13
Empanada Dependencies
•AngularJS
•Google Feed API
•Masonry
•D3
•Jetty
•Java
Tuesday, October 15, 13
Browser

<div id="feedTechCrunch"/>

index.html (Dashboard Main Page)

function initialize() {
loadFeed("feedTechCrunch");
...
}

TechCrunch
New Relic
Spring
...

dashboard.js (Dashboard App)

Company Network

News Feeds
Tuesday, October 15, 13

Google
Feed API

Internet
Web APIs

Tuesday, October 15, 13
Browser

<div id="feedTechCrunch"/>
<div
ng-controller="GitHubCtl">

index.html (Dashboard Main Page)

function initialize() {
loadFeed("feedTechCrunch");
...
}
function GitHubCtl(…) {
...
}

Google
Feed API
Proxy
auth
config

dashboard.war
(Java App)
Proxy Service

dashboard.js (Dashboard App)

Company Network

Protected Web APIs
Tuesday, October 15, 13

TechCrunch
New Relic
Spring
...

Protected
Web APIs
GitHub
New Relic
HipChat
...

Internet
Proxy Service
• Allows our Angular app to get results from protected web APIs
• Restricted to GETs
• For a given external Web API, the proxy service must know:
• URL prefix path to forward (otherwise 401 status)
• Where to fetch the access token
• token insertion strategy (usually HTTP header)

Tuesday, October 15, 13
Browser

<div id="feedTechCrunch"/>
<div
ng-controller="GitHubCtl">
<div
ng-controller="BuildCtl">
index.html (Dashboard Main Page)

function initialize() {
loadFeed("feedTechCrunch");
...
}
function GitHubCtl(…) {
...
}
function BuildCtl(…) {
...
}
dashboard.js (Dashboard App)

Company Network

Events
Tuesday, October 15, 13

Google
Feed API
Proxy
auth
config

dashboard.war
(Java App)
Proxy Service

Event Service

TechCrunch
New Relic
Spring
...

Protected
Web APIs
GitHub
New Relic
HipChat
...

Internet
Event Service

Jenkins

POST /events?channel=build

Event
Service

GET /events?channel=build

Subscriber

Tuesday, October 15, 13

{

{{
"id" : 102,
"id" : : 102,
102,
"id"
"channel" : "build",
"channel" : : "build",
"build",
"channel"
"attrs" : {
"attrs" : : {
{
"attrs"
"success" : 0,
"success" : : 0,
0,
"success"
"BUILD_NUMBER" : 939,
"BUILD_NUMBER" : : 939,
939,
…"BUILD_NUMBER"
…
} …
}}
}
}}
Build Event
Build Event
Build Event
Tuesday, October 15, 13
Information Radiator

•Devices that display the Dashboard
•Various sizes based on need
•Cost can vary significanly

Tuesday, October 15, 13
Individuals
http://www.flickr.com/photos/doggie52/3920392034/
Tuesday, October 15, 13
Large Teams
Tuesday, October 15, 13
The World
http://www.flickr.com/photos/nicolas_vollmer_photo/8912698659/
Tuesday, October 15, 13
http://www.amazon.com/dp/B008A3KFB8/
ref=pe_385040_30332190_pe_175190_21431760_M3T1_ST1_dp_i1

http://www.paritynews.com/wp-content/uploads/2013/08/raspberry-pi-800x600.jpg

Just Right!
Tuesday, October 15, 13
Why Raspberry Pi?

•Full Linux stack
•HDMI output
•Cheap and Hackable!

http://www.raspberrypi.org/wp-content/uploads/2011/07/RaspiModelB.png
Tuesday, October 15, 13
Caveats
•CPU / Memory constraints
•Need to customize HDMI settings
•Overclocking issues
•New Out Of Box Software

Tuesday, October 15, 13
Extreme Feedback Devices

•Devices that manipulate your environment
•Force you to take notice
•People lose interest over time, remind them!

Tuesday, October 15, 13
Input and
Output Pins

Raspberry Pi
http://www.flickr.com/photos/tkramm/8222207452/
Tuesday, October 15, 13
Audible
http://www.flickr.com/photos/39213183@N02/6853977807/
Tuesday, October 15, 13
Tactile
http://www.flickr.com/photos/spirosk/127848247/
Tuesday, October 15, 13
Visual
http://www.flickr.com/photos/thisisbossi/7812046824/
Tuesday, October 15, 13
Aggressive
http://www.flickr.com/photos/krisbeltran/3554484948/
Tuesday, October 15, 13
Visual Wins!

•Simple, yet elegant
•Widely understood without training
•Just the right amount of Annoying

Tuesday, October 15, 13
Talkin’ GPIO

•Very simplistic endpoint
•Polls custom event status
•Quickly customizable

Tuesday, October 15, 13
Get Interactive
Tuesday, October 15, 13
Interactive Workspace

•We get information beamed at us
•What can we send back?
•Turns out we have the I in GPIO!

Tuesday, October 15, 13
Observe
http://www.flickr.com/photos/avbild/6735334913/
Tuesday, October 15, 13
Respond
http://www.flickr.com/photos/jblmpao/6077242957/
Tuesday, October 15, 13
Acknowledge
http://www.flickr.com/photos/marcusborg/2840411331/
Tuesday, October 15, 13
Overview
Tuesday, October 15, 13
Don’t move
Tuesday, October 15, 13
#fail
Tuesday, October 15, 13
Keep the dream alive!
Tuesday, October 15, 13
Motion
Sensor

Snooze
Button

Connected
Tuesday, October 15, 13
Next Steps

•Buy some hardware
•Get out our soldering iron
•Share your awesome hacks
•Check out Empanada - Soon!

Tuesday, October 15, 13
Empanada Project
•Raspberry Pi setup instructions
•Instructions for wiring the devices
•Software described here (by end of October)
•https://github.com/newrelic/empanada

Tuesday, October 15, 13
Tuesday, October 15, 13
JOIN THE TEAM

NewRelic.com/jobs

Tuesday, October 15, 13

Informative Workspace with Raspberry Pi