So you had to pull your app for a few moments for some reason. Yeah, you're all "Man, I'm all about software as a service platform infrastructure paradigms" but… downtime.
So I had some simple apps that function as control panels for devices. Occasionally I'd have to bring down the devices that are being polled for maintenance, and having the apps display 500 errors just irritated the people looking for device specific information. Even a 500 error that politely explains what's going on isn't enough information for someone and eventually the phone would ring.
Provides push updates to maintenance issues. No need to refresh, thanks Faye. All the javascripts and CSS are put inline with rack-pagespeed so you have a monolitic document to avoid any static asset issues if you're proxying via nginx, etc.
It's also mobile friendly taking advantage of bootstrap's fluid layouts. Here's a video of a message being pushed to an iphone
Note, the remote server needs to support SSH gateways.
The hard way
- Login to the server with SSH
- Start itsout locally (foreman start)
- Create a new event via http://localhost:3000/admin under the "New Event" tab.
- Create a quick live update that you're starting work.
- Login to the server and disable the service that's going down.
- SSH into the server again, this time with remote port forwarding for ports 3000 and 9001 (ssh -R 3000:127.0.0.1:3000 [email protected])
- Do the actual work and provide live updates via http://localhost:3000/admin.
- Kill the SSH tunnel
- Start the app you took down earlier. Back in business.
The easier way
If you're using something like nginx with your app as a backend, you can keep itsout running somewhere all the time and should your app fail, have it fallback to the itsout url.
So you need a ruby interpreter and bundler.
- git clone the repo
- run bundle install
- Edit sample.env and copy it to .env
- run 'foreman start' to start sinatra and faye.