Working as a Solution Architect for Aerospike I often have occasion to create Aerospike clusters on the fly. These might be for benchmarking, demonstration purposes or investigation of a query from a prospect or customer.
Although Aerospike is straightforward to configure and install, the relatively small number of steps you have to go through does begin to add up in aggregate. This becomes more significant when you might add in the need to configure TLS, encryption on disk, strong consistency, java benchmarking client or rack awareness to name a few of the options available.
One possibility is to make use of Aerospike Kubernetes but if what you’re doing demands high levels of performance, casual use will steer you towards using VMs.
To that end I’ve put together aerospike-ansible a collection of Ansible scripts allowing configurable automation of the build of Aerospike clusters. The focus is on doing this on AWS as that’s the platform that Ansible best supports, but with a little inventory nous you can leverage these scripts on bare metal or alternate cloud provider environments*.
The scripts go beyond simply building clusters. The configurable deployment of Aerospike Java benchmarking clients and the Prometheus/Grafana based Aerospike Monitoring is also handled by the repository.
The README goes into full detail, but key supported options are
- Instance type
- Hosts per AZ
- Encryption at rest (*)
- Strong Consistency — including roster setup with rack awareness (*)
- Prometheus/Grafana monitoring stack
- Aerospike Version
(*) Aerospike Enterprise Only
There’s also a video showing end to end setup of the full Aerospike cluster/client/monitoring stack on a fresh Vagrant instance. It’s around 25 minutes long but it also goes through possible wrinkles relating to installation of Ansible plus IAM setup. Colleagues tell me these scripts take as little as 5 minutes to use for the first time, even with zero knowledge of Ansible.
I’m envisaging this being helpful to those looking to get Aerospike up and running for the first time. It allows easy setup for proof of concept and development work, while providing a production grade facility. You can tear it down just as easily as you stood it up, keeping costs low.
Providing additional recipes for operational procedures such as rolling upgrades or cluster migration is very much on the cards, so I hope to get further assets and blog posts out in this area.
Any questions/comments — please feed back through the GitHub issues facility.
[*] See the README for Google Cloud Platform details