latenighttales / alcali

Featureful Saltstack GUI
https://alcali.dev
MIT License
356 stars 61 forks source link

Question: Salt master returners #263

Closed ShaunMaher closed 3 years ago

ShaunMaher commented 3 years ago

I'm really loving Alcali. It might enable me to get some of my CLI-phobic colleagues to embrace SaltStack. Thanks for your efforts.

I'm installing Alcali on a Salt Master server using the alcali-formula (i.e. not docker). I'm trying to get the postgres returner setup correctly. I setup the returner to use master_job_cache: postgres and that seems to work OK but I noticed that the example configuration in your documentation references an alcali returner. I dug around a bit and found alcali_postgres.py which looks like the postgres equivalent.

So, my question is, should I be using the Alcali returners or the SaltStack provided postgres one? Is the Alcali returner only relevant to Docker installs maybe or will I lose Alcali functionallity if I use the SaltStack provided returner?

In the event that using the SaltStack provided returner is preferred, is it possible to use the "pgjsonb" returner or would this make Alcali sad? I only ask because I implemented a monitoring solution that uses pgjsonb before discovering Alcali and don't want to have to rework it if I don't have to.

mattLLVW commented 3 years ago

first, thanks for the kind words!

So, my question is, should I be using the Alcali returners or the SaltStack provided postgres one

You should use the one provided by Saltstack. The one i created will automatically refresh the Keys database on "salt/auth" and "salt/key" events, but it will probably have a big overhead depending on how many minions you are managing. The only difference is that you'll have to manually refresh keys: https://alcali.dev/views/keys/ Here's the relevant code: https://github.com/latenighttales/alcali/blob/69f9cd197ac8603d2944226ba89274e569d0840d/docker/saltconfig/salt/_returners/alcali_postgres.py#L285

In the event that using the SaltStack provided returner is preferred, is it possible to use the "pgjsonb" returner or would this make Alcali sad?

It'll make Alcali very sad. For Alcali to be both compatible with mariaDB and Postgres, the DB schema must be the same.

ShaunMaher commented 3 years ago

Thank you for the clarifications and thanks again for your hard work. It is appreciated.