Giter VIP home page Giter VIP logo

virtual-ip's Introduction

Virtual-IP

Build Status Go Report Card GitHub release GitHub

Virtual-IP can be used to share a Virtual/Floating IP address between many computers. The IP address is assigned to only one computer. If that computer goes down, the same IP address is then reassigned to another computer in the cluster.

Features

  • Self contained binary that can be downloaded from GitHub
  • Docker Image on Docker Hub
  • No external dependencies as in sevices
  • Uses Raft Consensus for cluster communication

Usage

Assuming that you have the following setup:

  • three Linux servers with the IP addresses: 192.168.0.101, 192.168.0.102, 192.168.0.103)
  • the three servers have the network interface eth1
  • the Virtual-IP is 192.168.0.50
  • the port 10000 for Raft on all three servers is free

Binary

Download the binary from release page.

Then on each server run the following commands

Server1 (192.168.0.101):

sudo virtual-ip -id server1 -bind 192.168.0.101:10000 -peers server1=192.168.0.101:10000,server2=192.168.0.102:10000,server3=192.168.0.103:10000 -interface eth1 -virtual-ip 192.168.0.50

Server2 (192.168.0.102):

sudo virtual-ip -id server2 -bind 192.168.0.102:10000 -peers server1=192.168.0.101:10000,server2=192.168.0.102:10000,server3=192.168.0.103:10000 -interface eth1 -virtual-ip 192.168.0.50

Server3 (192.168.0.103):

sudo virtual-ip -id server3 -bind 192.168.0.102:10000 -peers server1=192.168.0.101:10000,server2=192.168.0.102:10000,server3=192.168.0.103:10000 -interface eth1 -virtual-ip 192.168.0.50

Docker

Alternatively, the Docker Image can be used like this.

Server1 (192.168.0.101):

docker run -ti --rm --privileged --net=host darxkies/virtual-ip -id server1 -bind 192.168.0.101:10000 -peers server1=192.168.0.101:10000,server2=192.168.0.102:10000,server3=192.168.0.103:10000 -interface eth1 -virtual-ip 192.168.0.50

Server2 (192.168.0.102):

docker run -ti --rm --privileged --net=host darxkies/virtual-ip -id server2 -bind 192.168.0.102:10000 -peers server1=192.168.0.101:10000,server2=192.168.0.102:10000,server3=192.168.0.103:10000 -interface eth1 -virtual-ip 192.168.0.50

Server3 (192.168.0.103):

docker run -ti --rm --privileged --net=host darxkies/virtual-ip -id server3 -bind 192.168.0.102:10000 -peers server1=192.168.0.101:10000,server2=192.168.0.102:10000,server3=192.168.0.103:10000 -interface eth1 -virtual-ip 192.168.0.50

Build

To build from source code you need make and Docker, then run the following commands:

git clone [email protected]:darxkies/virtual-ip.git
cd virtual-ip
make

The commands generate the binary virtual-ip in the current directory.

virtual-ip's People

Contributors

darxkies avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

virtual-ip's Issues

Integrates virtual-ip with systemctl in RHEL/CentOS 7

I tried to configure virtual-ip with systemctl on CentOS 7 but it hangs, I think it is because I can not send process to background properly o don't have enough knowledge of how to configure it.

Please provide instructions of how to run "virtual-ip" as daemon or resident process not attached to console. Or if you want, how to configure systemctl to start virtual-ip on boot time and those things.

Thanks in advanced. Regards. This is a great tool.

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.