feat!: remove the ai-stack role and ai_mainframes group #55
No reviewers
Labels
No labels
bug
cannot reproduce
duplicate
enhancement
help wanted
invalid
need info
need triage
need verification
not a bug
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
claudiomaradonna/castrum!55
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "remove-ai-stack"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
The
ai-stackrole ran LocalAI, LocalAGI and LocalRecall as a standalonecompose project on hosts in
ai_mainframes; one host in one tenant usedit. The stack is moving to the separate Ansible that manages the Docker
Swarm, so castrum no longer needs the role, its group, its molecule
scenario, the
community.dockercollection only it used, or themigration guide that handed a hand-run stack to it. Keeping a deprecated
role or adding a one-off uninstall mode were considered and set aside.
What changed
roles/ai-stack/,group_vars/ai_mainframes.yml, its.gitignoreexception, its
MOLECULE_ROLESandservice_rolesentries,community.dockeranddocs/MIGRATION-AI-STACK.mdare removed. Before,a host in
ai_mainframesgot the stack, theai-stacknftables chain(3000/8080) and
docker-enginethrough the role's meta dependency;after,
ai_stack_enabledand the group do nothing.docker-enginenow stands alone:docker_engine_gpu_requireddefaultsto
falseinstead of followingai_stack_gpu_enabled, its tasks losethe
ai-stacktag, andinstallmode no longer installspython3-requests, which only the stack's health wait needed.The
firewall-applyscenarios and thepeer_derivationandfirewall_rendergates usedai-stack's port file as an example; theynow cover the same rules through
webserver(open rule, including thatit names no source),
swarm(sources-only rule) andgluster. Thedocumentation's
--tags ai-stackexamples useswarm.Breaking, with action required before the next
fortify.ymlrun ona host that joined
ai_mainframes: back up/opt/ai-stack/data/localrecall, stop the stack withdocker compose -f /opt/ai-stack/compose.yml down, remove the host fromai_mainframesand itsai_stack_*host variables, and, where the hostkeeps Docker and wants its engine asserted, set
docker_engine_enabled(and
docker_engine_gpu_requiredfor a GPU) in itshost_vars. That runremoves the
ai-stackchain; running containers are left as they were./opt/ai-stack/.envand the vaulted secrets stay until removed by hand.How to verify
Setup as in CONTRIBUTING; base
13cfd32(main), branch
remove-ai-stackat607ddc0.git grep -n -i -E 'ai[-_]stack|ai_mainframes|MIGRATION-AI-STACK|localagi|localrecall|community\.docker'prints nothing (on the base,
git grep -lwith it lists 33 files);git grep -il localailists only
roles/traefik-routes/, whose example route keeps thatfictional name. Run: as expected.
branch's
tests/fixtures/peer_derivation/andtests/gates/check_peer_derivation.sh, copied onto the base, passthere, and pass on the branch:
./tests/gates/check_peer_derivation.shprints "peer derivation: swarm and gluster admit exactly the
reachable peer…". Run: passed on both.
make checkpasses on the branch and on each of its three commits.Run: passed.
make test, that is thefirewall-applymoleculescenarios
defaultandpeered, the remaining roles' scenarios andthe
tag_propagationgate, because podman was absent where this wasbuilt. Expected: every scenario passes and
grep '^ERROR'findsnothing.
Considerations
ai-stack's port file was the only one with a templatedopen:value, so no test renders one now. No remaining port file uses one,
and
firewall-applycastsopenwith| bool.python3-requestskeep it; only newinstallruns stop installing it.