Giter Club home page Giter Club logo

online_failover_rails's Introduction

Online failover rails

Why ?

Online.net, our hosting provider, has a pretty interface to manage failovers, but not really handy when it comes to manage an entire host, or many guests on a heavy-loaded host. In the heat of the moment, it’s hard to remember which ip has to be switched, and to which host. With this tool, you can name your servers and failovers, and configure in advance your preferred backup server for each guest.

After this (very) little configuration, you are ready to failover your guests or an entire host, with one button, and failback when the “master” host is operational again.

Recent add : you can now add uri to be tested roughly (nmap + netcat on 80 and 443) to check whether your services are up or not. To do that, simply click on a failover (IP) and add your services with ports (usually 80, 443, 25, 21, 22).

This app is intented to be installed locally, so there’s no authentication system yet.

Installation - you may :

  • Clone the repo

  • Execute ‘bundle install’

  • Execute ‘rails generate initializer’ to create the config files

  • Put your online api token in /config/initalizers/online_token.rb

  • Execute ‘rake db:migrate’

  • Then start the project : ‘rails s’ in development mode.

  • Once started, navigate the rails app root.

How to use

  • Click once on “Snapshot Online setup”, this will import your servers and failovers locally.

  • Assign a backup server for each failover. You can also set a name to each server and/or failover to make it more human readable :)

  • You can now failover, only an app or a whole host.

  • By clicking the IP, you can add some services to test.

  • Execute ‘RAILS_ENV=production bin/rake pinger:test_all’ or add it to crontab to test your services and report their state in web interface.

  • You can alter /config/initalizers/event_bus.rb to trigger some events when a service fails (SMS or email alert, ssh commands…)

TODO

  • Add an authentication system (devise ?)

  • Write some tests

  • Handle errors in a better way

  • Do some translations

  • Use OAuth instead of API token

  • Make the Snapshot button refresh the local failovers (if switch was made directly on online.net console)

Author : Slash4 from Jumboweb

online_failover_rails's People

Contributors

goundar avatar slash4 avatar raubineau avatar

Stargazers

Jérémy avatar

Watchers

 avatar James Cloos avatar  avatar  avatar  avatar

online_failover_rails's Issues

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.