Coder Social home page Coder Social logo

columnstore-ansible-aws's Introduction

logo

MariaDB Enterprise Cluster / ColumnStore Engine / MaxScale Proxy

About:

This is a Terraform and Ansible project to provision a high availability MariaDB ColumnStore deployment on Amazon Web Services. This automation project will create the following system:

  • 3 MariaDB Nodes For Durability & Performance
  • 1 S3 Bucket For Object Storage (Data)
  • 2 MaxScale Nodes For High Availability

Prerequisites:

Requires Terraform v0.14.4 or above.
Requires Full Ansible 2.10.5 or above. (Not Ansible-Core)

Instructions:

Open a terminal window and clone the repository:

  1. git clone https://github.com/mariadb-corporation/columnstore-ansible.git
  2. cd into the newly cloned folder
  3. Edit variables.tf and supply your own variables.
  4. terraform init
  5. terraform plan (Optional)
  6. terraform apply --auto-approve
  7. ansible-playbook provision.yml

Further information can be found on our official deployment guide.

Current Approved AWS Image(s)
AMI OS AMI ID Region Zone
centos7 ami-0a4497cbe959da512 us-west-2 us-west-2a

Cluster Manipulation Tools

  • core Change directory to /var/log/mariadb/columnstore/corefiles
  • dbrm Change directory to /var/lib/columnstore/data1/systemFiles/dbrm
  • extentSave Backup extent map
  • mcsModule View current module name
  • mcsStart Start cluster via CMAPI
  • mcsStatus Get cluster status via CMAPI
  • mcsShutdown Shutdown cluster via CMAPI
  • tcrit Tail crit.log
  • tdebug Tail debug.log
  • terror Tail error.log
  • tinfo Tail info.log
  • twarning Tail warning.log

REST-API Instructions

Format of url endpoints for REST API:
https://{server}:{port}/cmapi/{version}/{route}/{command}
Examples urls for available endpoints:
  • https://127.0.0.1:8640/cmapi/0.4.0/cluster/status
  • https://127.0.0.1:8640/cmapi/0.4.0/cluster/start
  • https://127.0.0.1:8640/cmapi/0.4.0/cluster/shutdown
  • https://127.0.0.1:8640/cmapi/0.4.0/cluster/node
Request Headers Needed:
  • 'x-api-key': 'somekey123'
  • 'Content-Type': 'application/json'

Note: x-api-key can be set to any value of your choice during the first call to the server. Subsequent connections will require this same key

Examples using curl:
Get Status:
curl -s https://127.0.0.1:8640/cmapi/0.4.0/cluster/status --header 'Content-Type:application/json' --header 'x-api-key:somekey123' -k | jq .
Start Cluster:
curl -s -X PUT https://127.0.0.1:8640/cmapi/0.4.0/cluster/start --header 'Content-Type:application/json' --header 'x-api-key:somekey123' --data '{"timeout":20}' -k | jq .
Stop Cluster:
curl -s -X PUT https://127.0.0.1:8640/cmapi/0.4.0/cluster/shutdown --header 'Content-Type:application/json' --header 'x-api-key:somekey123' --data '{"timeout":20}' -k | jq .
Add Node:
curl -s -X PUT https://127.0.0.1:8640/cmapi/0.4.0/cluster/node --header 'Content-Type:application/json' --header 'x-api-key:somekey123' --data '{"timeout":20, "node": "<replace_with_desired_hostname>"}' -k | jq .
Remove Node:
curl -s -X DELETE https://127.0.0.1:8640/cmapi/0.4.0/cluster/node --header 'Content-Type:application/json' --header 'x-api-key:somekey123' --data '{"timeout":20, "node": "<replace_with_desired_hostname>"}' -k | jq .
Mode Set:
curl -s -X PUT https://127.0.0.1:8640/cmapi/0.4.0/cluster/mode-set --header 'Content-Type:application/json' --header 'x-api-key:somekey123' --data '{"timeout":20, "mode": "readwrite"}' -k | jq .

MaxScale GUI Info

  • url: http://<MaxScale_Public_IPv4_DNS>:8989
  • username: admin
  • password: mariadb

Clean Up

  • terraform destroy --auto-approve

columnstore-ansible-aws's People

Contributors

toddstoffel avatar mariadb-allenherrera 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.