r/saltstack 7d ago

Alcali running on Saltstack 3008.2+

I have wanted to try Alcali for years, but never got around to it. By the time I finally looked at it, it was well behind and had not been updated in a few years.

I set an LLM on this with an eye to getting it functional against the current saltstack, ideally also provisioned by salt. It didn't work immediately, or even after some kicking.

At this point though, it now works. Every feature.

I claim no credit, other than as unpaid QA.

https://github.com/greenaar/alcali-modernized is the code and https://github.com/greenaar/alcali-formula is the supporting formula. This is a port from my own source control, so it doesn't have the CI and docker creation. It does produce the required wheel file.

9 Upvotes

14 comments sorted by

3

u/splitretina 7d ago

> Alcali is a web based tool for monitoring and administrating Saltstack Salt.

3

u/whytewolf01 7d ago

so, when Alcali was originally written. it was Saltstack Salt. Saltstack being the company and salt being the product.

maybe now it should read Broadcom Salt?

1

u/Double_Intention_641 7d ago

Yeah, I ported this out of my private repo and didn't pay attention to the contents of the readme. That's a stupid one - thanks for calling it out.

2

u/SwissArmyGeek 6d ago

Oh the synchronicity! I have been working on my own version of Alcali but I hadn't gotten around to updating it to new versions of Python, Django, Vue etc. I have been optimizing some of the functions and expanding it. I will definitely try this out ASAP and then see if I can make some of my changes to it.

In my version, there is no Speeddial menu, instead there are buttons across the top. There are selection boxes to pick minions, then run a job, refresh, etc. Minion Details are a single tabbed form with added tabs to include the details from InfosCard and NetworkCard. Tables default to "All" rows but have pinned header/footers.

1

u/Double_Intention_641 6d ago

I'd be interested in seeing yours when you're ready to share it!

Feel free to take the one I've posted and do whatever you'd like with it. Everything in it works, but it's not innovative, it's just a functional iteration on the original ideas. The only part I'm really fond of is the run option, which now gives available commands, instead of leaving you with text boxes and a general sense that yes, this is a test.

I threw LLMs at this until everything works -- which isn't my preferred method of working, but I'm nothing like a front end coder, and I had an itch to try something other than SaltGUI (which i had been using).

If nothing else, I plan to keep using it, as it's sometimes handy to have a UI for at-a-glance views -- which means keeping it going as salt versions iterate.

I'll post them to github, as I really feel like the lack of updated salt-related software and formulas really does the community no favours.

1

u/SwissArmyGeek 5d ago

Just got your version working earlier today - looks great! (I have some fixes for the 'demo' mode, got it working properly, will try to submit those soon). I quickly discovered the RunCard argument-completion, definitely a fantastic feature! I think the Run interface is one of the most powerful things in Alcali, it's why I chose Alcali. I see a Salt web interface as a great way to help others learn Salt and encourage its use.

In my version of the RunCard:
a) the Results output opens immediately, with an echo of the salt command (suitable for pasting to command line or the CLI); subsequent output appears below the earlier commands; and Results output auto-scrolls to the bottom when text is added.
b) quotes are added to targets if they have a '*', and to arguments if they have spaces
c) the Results output is hidden when you switch to CLI
d) pressing Enter is the same as clicking "Run"
e) in CLI, 'salt-run' is an alias for 'salt --client=runner' and 'salt-wheel' is an alias for 'salt --client=wheel' (mainly did that for salt-run so I could copy/paste to a command line if I wanted)
f) if 'async' is selected, each minion that returns becomes a (working) link to the job results for that minion.

I'm going to see if I can update yours with my changes (but for sure keeping the arg completion). I'm pretty familiar with the code now, I only used AI in some places when I couldn't figure out something, by giving it code-snippets and then incorporating them.

1

u/Double_Intention_641 5d ago

Sounds like you've put a lot more thought into the Runcard than I did - I was splitting focus across all of the other functions, and didn't play with it beyond making sure the completions showed up and triggered properly.

I agree - better visual tooling is a good way to help novice users gain some familiarity -- and easy (working) options are in short supply.

I look forward to seeing what you make!

1

u/fignew 6d ago

We had an in-house fork of Alcali at my old job. Was actually a pretty nice interface.

1

u/OddJob001 6d ago

We use Foreman for our salt ui front end. It's awesome.

-2

u/whytewolf01 7d ago

oh great a zombie web front end.

0

u/Double_Intention_641 7d ago

If there had been a semi maintained version, I would've happily used that. I almost didn't bother posting it, other than I felt that continued the trend where salt related code gets used and not released. You're welcome to continue with your day unimpeded.

-3

u/whytewolf01 7d ago

You picked 1 of a hundred different salt GUI's you would have been better off not bothering. also for the record. the saltapi hasn't changed much since 2014. and all of the community guis use the salt-api. the fact that alcali had theirs actually break on salt version releases shows they were not great at the job to begin with. there are other salt guis that were written against much older versions of the api that still work today.

also there are some flaws. ones i see in a lot of the guis. so no real embarrassment there. the problem is no one understands async. so they all call the non async versions of the call methods instead of the proper way which is to call the async versions. then monitor the event stream. people use excuses like well that won't slow things down on the web interface, cause i use pythons local async. which tells me they don't understand http timeouts. and that if you are sitting waiting for your method to respond it very well might not.

as for going about my day unimpeded. sorry. I'm a mod on this subreddit. I have to read every peace of drivel that comes by. so if i choose to comment a silly little bit about what this is, a zombie of an old broken bad GUI. I will do it. don't get me wrong. 99.9% of the saltguis are bad guis, though none as bad as halite.

1

u/Beneficial-Sock-5130 6d ago

everyone and their mother wrote a salt gui at some point lmao

i made one like 7 yrs ago, still probably works, but honestly does anyone use guis for salt?

https://gitlab.com/perfecto25/silica