Code Monkey home page Code Monkey logo

itsout's Introduction

Itsout

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.

Why I did this

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.

What it does.

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

Also, screenshot What they see...

How the process of using this works.

Note, the remote server needs to support SSH gateways.

The hard way

  1. Login to the server with SSH
  2. Start itsout locally (foreman start)
  3. Create a new event via http://localhost:3000/admin under the "New Event" tab.
  4. Create a quick live update that you're starting work.
  5. Login to the server and disable the service that's going down.
  6. 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])
  7. Do the actual work and provide live updates via http://localhost:3000/admin.
  8. Kill the SSH tunnel
  9. 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.

Installing

So you need a ruby interpreter and bundler.

  1. git clone the repo
  2. run bundle install
  3. Edit sample.env and copy it to .env
  4. run 'foreman start' to start sinatra and faye.

itsout's People

itsout's Issues

INLINE ALL THE THINGS!

If you're putting the app up in the place of a rails app, often when nginx is sitting ahead of it, it won't serve the static assets and everything looks terribad. So, inline all the assets.

Better way to configure port forwarding when required.

Right now, you have to go to the server, disable whatever you need to take down, start the app locally, then do something like SSH -R 3000:127.0.0.1:3000 -R 9001:127.0.0.1:9001 user@host. This is a complete pain in the ass.

Rack Mount Faye

I couldn't get this to work. It'd be nice to only have a single port to forward. When configured in config.ru, the message pushes time out, even with the new url in the broadcast method.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.