StackStorm / ansible-st2

Ansible Roles and Playbooks to deploy StackStorm
https://galaxy.ansible.com/StackStorm/stackstorm/
Apache License 2.0
100 stars 77 forks source link

Updates to install redis, so can be used as coordination backend #296

Closed amanda11 closed 3 years ago

amanda11 commented 3 years ago

Updates to make redis the default backend.

Introduced new role for redis, so that it can be remove or replaced if different coordination backend required.

ST2 unstable (and therefore 3.5) will come with libraries for redis client, and therefore redis can currently be enabled by setting st2_config ansible variable to define the coordination url.

Once bash installer also includes redis configuration, then we can make the default st2.conf specify redis url as the default

amanda11 commented 3 years ago

Not sure why tests on Ubuntu are failing when st2chatops needs the st2apikey. Have run the playbook successfully on an Ubuntu Bionic fresh VM and all passed. But also got that by looks on some CentOS runs, and then the later ones passed.

amanda11 commented 3 years ago

Found problem, with redis on Ubuntu. redis attempts to bind on both IPv4 and IPv6, but it fails to bind in our docker containers. Changing the bind to only be 127.0.0.1 works. Will work on fix for playbooks.

amanda11 commented 3 years ago

In case of stable runs then we don't want coordination url to redis, as ST2 3.4.1 won't have relevant python libraries configured.

If the Travis run passes on the unstable with the latest changes, then I will take out the defaults for coordination url in st2_config parameter. So it won't use redis coordination url unless it's the default in st2.conf in the package.

This should then pass for unstable and stable, but ST2 won't actually be using redis. But we'll know the playbooks are setup to configure redis for when url is set to redis.

Can't change the deafult in st2.conf until we have the bash installer changes under https://github.com/StackStorm/st2-packages/pull/698 merged. But once that is done we can make the co-ordination url default to redis.