Automated setup ! :-)
Spider configuration crazyness
I figured out that if I wanted easy adoption of Spider, I had to improve the setup.
Indeed, the way to setup Spider was cumbersome! If the infra (Elasticsearch cluster, Swarm applicative cluster) can be automated with Terraform and Ansible, the cluster configuration involves many assets:
- Microservices configuration: 34 files
- File beat & metric beats configuration: 2 files
- JWT keys
- SMTP configuration
- Traefik configuration
- Elasticsearch indices provisioning (and maintenance)
- Swarm cluster configuration: 10 files
All those files having parameters with consistent values, links and a lot of potential failure in case of wrong configuration. Moreover update of configuration on evolutions was really a pain involving GIT history, diff and so on.
So I decided to automate Spider setup and update.
Result
The result is ... WoW :) (not Blizzard one, my own :-p) Here is the 'minimal' configuration file to have a running Spider installation, from scratch:
22 lines :-) Neat !
How it works
Original setup
Setup instructions are summarized in 4 steps/commands and all configuration is in one file now. From this file, a bunch of scripts:
- Validate the configuration
- Take configuration templates and create the environment own configuration from them
- Provision or update the indices
- Create the original admin account
- And start the cluster :)
Here are the setup instructions:
Configuration templates are available in a GIT repo that will receives updates for all new features.
Upgrades
- 'make update' will rebase the local repo with the trunk
- After which a 'make config db cluster' will be enough to update current installation.
- And of course, in case of new required setup values in setup.yml, the user will be told, and the update stopped.
The indices update is automatic and based on metadata added to the indices. It handles parent templates, ILM policies, rolling over indices, rolling up indices and static indices.
- Rolling over, reindexing and cache purging is all handled programmatically., and automatic. This is so goood =)
What do you think? Do you like it? I did a demo of ideas and execution to Streetsmart DevOps team today... and I think we'll target the same kind of improvement for Streetsmart! Yeah :-)


































