Coder Social home page Coder Social logo

kattunga / back-to-work Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nackstein/back-to-work

0.0 3.0 1.0 0 B

back-to-work is a failover cluster manager written in POSIX shell scripting language

License: MIT License

Shell 97.62% Perl 2.38%

back-to-work's Introduction

back-to-work

back-to-work is a failover cluster manager written in POSIX shell scripting language

Introduction

back-to-work is a failover cluster manager written in POSIX shell scripting language. It aims to be able to move resources between a set of servers in case of hardware failure or other configurable events. AFAIK there are no other maintained failover cluster software in public domain and one can think that POSIX shell (or other shell scripting language) is not suited for this kind of task. But on the pros side shell scripting is one of the most well known language by UNIX sysadmin (author included) and this is why it's the chosen language for back-to-work (it's written by a sysadmin for sysadmins :D). With back-to-work you will have a working program with few line of codes and very likely you will be able to read it, understand it and debug it if you find problems or customize it to fit your needs! back-to-work is very portable and run on Linux, HP-UX, OpenBSD, CYGWIN, ESXi.

Installation

Installing back-to-work is simple as downloading the source (tar or zip) and explode it in the directory of choice on every server of your cluster. You will need another program to make back-to-work running: dex-lock. You can download dex-lock here: https://code.google.com/p/dex-lock/

Usually you will explode back-to-work and dex-lock in the same directory (the author likes the directory /opt/shell-cluster-suite :D)

If you choose to install back-to-work and dex-lock in the same path you can avoid to configure dex-lock location otherwise edit the file conf/lock_path with the path you choose for dex-lock.

Remember: a good configuration is one with at least 3 lock server. You can make a cluster of 2 failover nodes + 1 lock server with all 3 servers acting as lock server. Less than 3 lock server will expose you to cluster failure in the event of one server failure (thus defeating the cluster role).

Configuration

Once you have installed back-to-work you have to configure 2 thing:

  • the shell interpreter
  • the list of cluster nodes

To configure the shell interpreter move to the directory of back-to-work and run the script utils/set-shell /bin/sh (change the /bin/sh parameter with the full path to the shell you want to use, it must be a POSIX compliant shell, dash is a good options since it's very fast, bash is slower but ok, ash is ok, other POSIX shell are ok :D). Then edit the file conf/cluster_nodes with the space separeted list host hostname of your cluster member. This list is used only to query the cluster status. If you forget to edit it you will survive anyway.

Remember to configure dex-lock too. Read the wiki on the dex-lock project for this.

Using it

For a first test you can move to the back-to-work main directory and run:

verbose=1 ./back-to-work dummy

execute the same command on every cluster node. You will see that only one will be able to start the package dummy. On the terminale of the active node hit CTRL-C to stop the package, wait some time and see another node becoming the active one!

Bla bla bla

wiki incomplete. read the code :D

back-to-work's People

Contributors

nackstein avatar

Watchers

 avatar  avatar  avatar

Forkers

bravesoftdz

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.