Git Product home page Git Product logo

carp-ucarp-unix-linux's Introduction

CARP/UCARP install and configure to UNIX/Linux servers

This article describes the python script which automatically installs and configures CARP for UNIX (FreeBSD) and UCARP for Linux (Ubuntu, CentOS6 or CentOS7) servers. The script requires an IP address, login, password, virtual IP and CARP password as input parameters. Determination of the type of operating system is performed automatically.

  • The test environment consists of Ubuntu, CentOS6, CentOS7, FreeBSD servers in which the CARP/UCARP will be configured. Each type of OS has 2 machines:

    Ubuntu          CentOS6         CentOS7         FreeBSD
    172.16.100.10   172.16.100.11   172.16.100.12   172.16.100.13
    172.16.100.20   172.16.100.21   172.16.100.22   172.16.100.23
    
    VIP: 172.16.100.100
    
  • Only machines of one type of OS can be configured at a time:

images/carptopology.jpg

  • Note: The python script uses fabric library which requires BASH to be installed on all FreeBSD machines. Please use the following commands:

    # pkg install -y bash
    # echo "fdesc /dev/fd  fdescfs  rw  0  0" >> /etc/fstab ; mount -a
    # chsh -s bash root ; cp /usr/local/bin/bash /bin/
    

Execute script to configure servers.

  • FreeBSD:

images/freebsd_success.jpg

  • Ubuntu:

images/ubuntu_success.jpg

  • CentOS6:

images/centos6_success.jpg

  • CentOS7:

images/centos7_success.jpg

  • You can test the system by shutting down the master node while pinging the VIP. Only one ping should be lost.

images/ping_result.jpg

If you try to use different types of operation systems for master and slave nodes, you will get the following notification and script will not perform the installation.

  • Try with FreeBSD and Ubuntu servers:

images/failed_bsd_ubuntu.jpg

  • Try with Ubuntu and CentOS6 server:

images/ubuntu-centos6.jpg

  • Try with CentOS6 and CentOS7 server:

images/cos6-cos7.jpg

  • Use the following commands to download and execute code files:

    # git clone https://github.com/jamalshahverdiev/carp-ucarp-unix-linux.git
    # cd carp-ucarp-unix-linux
    # ./carp-ucarp.py
    

carp-ucarp-unix-linux's People

Contributors

jamalshahverdiev avatar

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.