MariaDB ColumnStore is a columnar storage engine that utilizes a massively parallel distributed data architecture. It was built by porting InfiniDB to MariaDB and has been released under the GPL license.
MariaDB ColumnStore is designed for big data scaling to process petabytes of data, linear scalability and exceptional performance with real-time response to analytical queries. It leverages the I/O benefits of columnar storage, compression, just-in-time projection, and horizontal and vertical partitioning to deliver tremendous performance when analyzing large data sets.
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)
- 1 Multi-Attach io2 SSD GFS2 Volume (Shared Metadata)
- 2 MaxScale Nodes For High Availability
† Requires Terraform v0.14.4 or above. ‡ Requires Full Ansible 2.10.5 or above. (Not Ansible-Core)
Open a terminal window and clone the repository:
git clone https://github.com/mariadb-corporation/columnstore-ansible.gitcdinto the newly cloned folder./kickstart.shThis script will help you fill in the required Terraform variables (AWS credentials, distro, etc). It will create aterraform.tfvarsfile with the variables you provided.- You can manually edit the
terraform.tfvarsfile to change any of the variables that were not set bykickstart.sh. Seevariables.tffor variable descriptions. ./deploy.shThis script will call Terraform to create the infrastructure and then Ansible to provision the nodes. Please note that if Terraform already has the infrastructure created,deploy.shwill DESTROY the existing infrastructure and create a new one.
When the playbook completes, it will also create connect.sh in the current directory. This script will allow you to connect to the created nodes by name (e.g. ./connect.sh mcs1).
Further information can be found on our official deployment guide.
- If you get an error like
Failed to update apt cache: E:Failed to fetch https://dlm.mariadb.com/repo/<token>/<rest_of_url> 403 Forbiddenwhen provisioning, you'll have to follow that link and accept the terms and conditions, then re-rundeploy.sh.
| AMI OS | AMI ID | Region | Zone |
|---|---|---|---|
| CentOS 7 | ami-0bc06212a56393ee1 | us-west-2 | us-west-2c |
From your primary node:
mcs cluster set api-key --key <api_key>
mcs cluster status
mcs cluster start
mcs cluster stop
mcs cluster node add --node <node>
mcs cluster node remove --node <node>
mcs cluster set mode --mode readonly
mcs cluster set mode --mode readwrite
coreChange directory to /var/log/mariadb/columnstore/corefilesdbrmChange directory to /var/lib/columnstore/data1/systemFiles/dbrmextentSaveBackup extent maptcritTail crit.logtdebugTail debug.logterrorTail error.logtinfoTail info.logtwarningTail warning.log
https://{server}:{port}/cmapi/{version}/{route}/{command}https://127.0.0.1:8640/cmapi/0.4.0/cluster/statushttps://127.0.0.1:8640/cmapi/0.4.0/cluster/starthttps://127.0.0.1:8640/cmapi/0.4.0/cluster/shutdownhttps://127.0.0.1:8640/cmapi/0.4.0/cluster/nodehttps://127.0.0.1:8640/cmapi/0.4.0/cluster/mode-set
- '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
$ 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 .
$ 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 .
$ 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 .
$ 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 .
$ 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 .
$ 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 .
