Skip to content

Amirjab21/LLM-battles

Repository files navigation

Experiment to create a k3s cluster with a master and multiple workers. Each node is an LLM and they communicate with eachother using gRPC. Use Terraform to provision servers and Ansible for setting up dependencies across machines. K3S then used to set up cluster.

*Verifying Operations:

SSH into master node using generated inventory

ssh root@$(terraform output -raw master_ip)

Check node status

kubectl get nodes

Check system pods

kubectl get pods -A

Create test deployment

kubectl create deployment nginx-test --image=nginx:alpine

Verify pod distribution

kubectl get pods -o wide

Destroying terraform-provisioned services:

Destroy all Terraform-managed resources

terraform destroy

You'll be prompted to confirm destruction

Type "yes" when ready

Clean up generated files

rm -rf k3s-token inventory.ini k3s.yaml

terraform commands

Initialize

terraform init

Plan and save to file

terraform plan -out=cluster.plan

Apply with saved plan

terraform apply "cluster.plan"

Verify infrastructure

terraform output ansible-inventory -i inventory.ini --list

Run Ansible playbook

ansible-playbook -i inventory.ini k3s-setup.yml -vvv

When finished

terraform destroy -auto-approve rm -rf cluster.plan

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors