Git Product home page Git Product logo

ansible-cockroachdb's Introduction

ansible-cockroachdb

OUTDATED - NEW README COMING SOON

Requirements:

  • Ansible (developed on 2.1.0.0)
  • Vagrant (developed on 1.8.1)
  • Virtualbox (developed on 5.0.24)
  • Internets (needed to download the cockroach and Nginx software)
After the requirements are fullfilled and the repo is cloned, do the following:
  1. hosts.yml defines the number of hosts you want with IP-adresses, cpu, ram etc. It also sets the path to the vagrant insecure_private_key that is needed for vagrant to communicate with the VM's. So that should be set to wherever your file is (defaults to c:\Users<user>.vagrant.d\ on windows, ~/.vagrant.d/ on Linux/Mac)

  2. vagrant up <- this builds the VM's as per the specification in hosts.yml. It also creates the inventory file (inventory) that Ansible will use.

  3. ansible-playbook install-cockroachdb.yml -i inventory

optionally add:

  • -e sync_clocks=true to force a ntpdate -u before doing the installation
  • -e configure_lb=true to configure a Nginx node that will act as loadbalancer for the admin-gui and also for the db cluster.

If you want to add more nodes to the cluster, just modify the hosts.yml file, run vagrant up and run the playbook again. This will install cockroach on the new node and add it to the cluster.

If the loadbalancer is configured the admin-gui can be reached at http://192.168.9.40:8080, and if not it can be reached on any of the individual nodes http://192.168.9.4{1..3}:8080

Note

  • If this is run on windows you will need to install Ansible in a linux VM (or use docker) and run the playbook from there.
  • It is also possible to install Ansible in Babun etc, but it doesn't work so well....
  • Ansible is also installed in the Vagrant box that is specified, so it is also possible to run the playbook from one of those VM's.
  • Just make the insecure_private_key available to the VM, make sure the permissions are 0600 or 0400 and run the playbook.

e.g

  • vagrant ssh lb
  • cp /vagrant/insecure_private_key .
  • chmod 0400 insecure_private_key
  • ANSIBLE_HOST_KEY_CHECKING=false ansible-playbook /vagrant/install-cockroachdb.yml -i /vagrant/inventory

ansible-cockroachdb's People

Contributors

oravirt avatar msandstr avatar kkarthikk936 avatar

Watchers

James Cloos 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.