Giter VIP home page Giter VIP logo

bare-asterisk-load-balancer's Introduction

Bare* Load Balancer

Proof-of-Concept work on various types of cluster load balancers for bare{metal,VM,whatever} k8s deployments.

Development Guide

IMPORTANT: Make sure you do all of the following in the first load balancer because that's how I did it and I don't have time to figure out how to do parameterization so that it's smart enough to know that it's not running on the first load balancer. OK??! OK. Just gonna walk it off now. Have a nice day.

Prerequisites

  1. GNU Make

Prepare Your Python Environment

This section is OPTIONAL but RECOMMENDED since it guarantees safety of your main Python environment or any other virtual environments you have lying around. That said, you're free to skip this part and just go with python3 -m venv ./.venv. Just make sure to activate that virtualenv before you go to the next section!

  1. Install pyenv so that you can test with different versions of Python
curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
  1. Append the following to your ~/.bashrc then log out and log back in
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
  1. Install development packages
sudo apt install build-essential libssl-dev zlib1g-dev libbz2-dev \
    libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
    xz-utils tk-dev libffi-dev liblzma-dev python3-openssl git
  1. Install Python 3.7
pyenv install 3.7.7

NOTE: For more available versions, run pyenv install --list

  1. Create a virtualenv for this project
pyenv virtualenv 3.7.7 bare-asterisk-load-baalancer
pyenv local bare-asterisk-load-baalancer 3.7.7

Your newly created virtualenv should now be activated if your prompt changed to something like the following:

(bare-asterisk-load-baalancer) ubuntu@dev-18-04-2:/path/to/your/charm$

or, should you happen to be using my dotfiles, if the prompt includes the following:

... via ๐Ÿ v3.7.7 (bare-asterisk-load-balancer)

Set Up The keepalived + IPVS LBs

Copy the sample inventory file

cp inventory.yml.example inventory.yml

Modify the values of each entry under the all->vars stanza in that file as needed. Once you have the variables just right, run:

make keepalived

Other Handy Commands

Install Dependencies (It Will Know If It Needs to or Not)

make dependencies

Start Over (Removes dependencies)

make clean

Really Start Over (Remove Ansible Roles too!)

make clean all=t

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.