Giter VIP home page Giter VIP logo

gd2-testing's Introduction

gd2-testing

Just some scripts I wrote to automate setting up glusterd2 with external etcd in a test env. Haven't put much thought into generalizing yet. It was made with a brand new centos vm in mind, and a few things may be centos specific (like the glusterfs nightly repos)

There are 2 Stages (1 script/play each)

  • Stage 1: Setup nodes using bash script
    • Installing dependencies
    • Downloading and installing gd2 from source
    • Copying over some convenience scripts for running/stopping gd2 in tmux (remote_scripts/)
  • Stage 2: Deploy using ansible (which also runs some stuff from remote_scripts/)
    • Specifying one of the nodes to also run the external etcd
    • Reflecting that in gd2 configuration of all nodes
    • Starting etcd and gd2
    • Add all peers

Stage 1: run the setup_gd2.bash file on each of your 3 nodes [possibly more]:

bash --verbose setup_gd2.bash <hostname>

or

bash --verbose setup_gd2.bash <hostname> <password> (this sets up passwordless ssh with that host using sshpass)

Note: sometimes setting up passwordless ssh like this fails because the host fingerprint is not in known_hosts. I hadn't realized this because I use the following lines in my ~/.ssh/config for each test VM:

Host x.x.x.x some-optional-alias1
        Hostname x.x.x.x
        Port 22
        User root
        StrictHostKeyChecking no
        UserKnownHostsFile /dev/null
        LogLevel QUIET

I use this to setup a gd2 node after a fresh centos install. It eventually sets up a tmux session setup and connects you to it so you can watch the fireworks.

Stage 2: Go to the ansible/ directory, make an inventory file like the one below, and run the ansible play:

ansible-playbook -i inventory.yml etcd.yml

Example inventory.yml:

ghosts:
  hosts:
    g1:
      host1.example.com:
    g3:
      host2.example.com:

  children:
    etcd:
      hosts:
        g2:
          host3.example.com:

Resources:

GD2 developement guide: https://github.com/gluster/glusterd2/blob/master/doc/development-guide.md

GD2 quickstart guide: https://github.com/gluster/glusterd2/blob/master/doc/quick-start-user-guide.md

ETCD config template lives in: ansibles/templates/

gd2-testing's People

Contributors

rohantmp avatar

Watchers

James Cloos avatar Gobinda Das avatar  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.