Please install the following applications:
And grab your enterprise token here:
This automation project will create a 3 node MariaDB cluster with the ColumnStore engine enabled as well as a MaxScale load balancer.
By manually creating an /inventory/hosts file, you may skip the Terraform portion of this tutorial and use the Ansible playbook directly to provision your existing machines.
AMI Name | AMI ID |
---|---|
CentOS7 | ami-0bc06212a56393ee1 |
CentOS8 | ami-03ef3eebb80538c74 |
Open a terminal window and clone the repository:
- Visit our website and grab your enterprise token
git clone https://github.com/mariadb-corporation/columnstore-ansible.git
cd
into the newly cloned folder- Edit these files to customize your cluster:
terraform init
terraform apply --auto-approve
ansible-playbook provision.yml
Node | Username | Password | Mode |
---|---|---|---|
pm1 | admin | DemoPassword1~ | Read/Write |
pm2 | admin | DemoPassword1~ | Read Only |
pm3 | admin | DemoPassword1~ | Read Only |
mx1 | admin | DemoPassword1~ | Load Balancer |
https://{server}:{port}/cmapi/{version}/{route}/{command}
https://<pm1_ip>:8640/cmapi/0.4.0/cluster/status
https://<pm1_ip>:8640/cmapi/0.4.0/cluster/start
https://<pm1_ip>:8640/cmapi/0.4.0/cluster/shutdown
https://<pm1_ip>:8640/cmapi/0.4.0/cluster/add-node
https://<pm1_ip>:8640/cmapi/0.4.0/cluster/remove-node
- '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://<pm1_ip>:8640/cmapi/0.4.0/cluster/status --header 'Content-Type:application/json' --header 'x-api-key:somekey123' -k | jq .
curl -s -X PUT https://<pm1_ip>: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://<pm1_ip>: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://<pm1_ip>:8640/cmapi/0.4.0/cluster/add-node --header 'Content-Type:application/json' --header 'x-api-key:somekey123' --data '{"timeout":20, "node": "<pm2_ip>"}' -k | jq .
curl -s -X PUT https://<pm1_ip>:8640/cmapi/0.4.0/cluster/remove-node --header 'Content-Type:application/json' --header 'x-api-key:somekey123' --data '{"timeout":20, "node": "<pm2_ip>"}' -k | jq .
- url:
http://<maxscale_ip>:8989
- username:
admin
- password:
mariadb
terraform destroy --auto-approve