Giter Club home page Giter Club logo

galera-update-bench's Introduction

Usage

This repository sets up 3 LXC containers containing a Galera cluster, a container running HAProxy, and can run a set of benchmarks against the Galera cluster.

To set up the LXC containers, run the create-env.sh script after pulling this repository:

git clone [email protected]:jaypipes/galera-update-bench
cd galera-update-bench
./scripts/create-env.sh

Output of the create-env.sh script should look something like the following:

jaypipes@minty:~/repos/galera-update-bench$ ./scripts/create-env.sh 
[sudo] password for jaypipes: 
Started haproxy container...
Started Galera cluster node container #1...
Started Galera cluster node container #2...
Started Galera cluster node container #3...
NAME            STATE    IPV4        IPV6  GROUPS  AUTOSTART  
------------------------------------------------------------
base-container  STOPPED  -           -     -       NO         
galera1         RUNNING  10.0.3.245  -     -       NO         
galera2         RUNNING  10.0.3.19   -     -       NO         
galera3         RUNNING  10.0.3.101  -     -       NO         
haproxy         RUNNING  10.0.3.74   -     -       NO         
Added host keys for haproxy cluster node container...
Added host keys for Galera cluster node container #1...
Added host keys for Galera cluster node container #2...
Added host keys for Galera cluster node container #3...

Note that the create-env.sh script automatically adds the host keys for each of the LXC containers to your SSH known_hosts file, so to log into one of the Galera LXC nodes, simply SSH to it as the ubuntu user:

jaypipes@spearmint$ ssh [email protected]
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-37-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Sun Feb 22 20:30:03 EST 2015

  System load:  0.33             Processes:           26
  Usage of /:   2.0% of 1.61TB   Users logged in:     0
  Memory usage: 35%              IP address for eth0: 10.0.3.245
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud


Last login: Sun Feb 22 20:30:03 2015 from 10.0.3.1

Once the LXC containers are ready, you can install the Galera and HAProxy software within the containers using the Ansible playbooks:

pushd ansible
ansible-playbook -i hosts site.yml
popd

You may execute commands, including checking for the status of the Galera cluster, using lxc-attach -n <CONTAINER_NAME> -- <COMMAND>:

jaypipes@spearmint$ sudo lxc-attach -n galera1 -- mysql -uroot -e "show global status like 'wsrep_cluster%'" 
+--------------------------+--------------------------------------+
| Variable_name            | Value                                |
+--------------------------+--------------------------------------+
| wsrep_cluster_conf_id    | 2                                    |
| wsrep_cluster_size       | 3                                    |
| wsrep_cluster_state_uuid | 471b8e63-bafb-11e4-a9c0-d67ae6216c67 |
| wsrep_cluster_status     | Primary                              |
+--------------------------+--------------------------------------+

To run the benchmark scripts, execute the scripts/benchmark.sh script:


galera-update-bench's People

Contributors

jaypipes avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

pkholkin

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.