CLI tool to interact with NodeFitter
NodeFitter is a simple VM autoscaler created for the "Fog and Cloud Computing" course at the University of Trento, Italy.
The goal was to create a VM autoscaler capable of automatically deploying VMs and making them join a Kubernetes cluster for it to be able to schedule pods.
This repository hosts a practical CLI to interact with NodeFitter.
For the purpose of this project the CLI is meant to be run inside a Docker container alongside the
autoscaler. From the Submission repository, run:
cd nodefitter
docker compose upTo run this project by itself, install the Go language package on your device (golag-go on Debian-based
distributions), then run:
go installEnsure the installation path (~/go/bin by default) is included in your $PATH
With the Docker container running, execute:
docker exec <container> /app/scalerctl <subcommand> <args>The available subcommands are:
get: returns information about VMs and threshold.get vms: to get the current local list of VMs. The resource usage gets updated at every scheduling cycle, otherwise it will appear as "Not Available" (N/A) if currently not available.get cpu: to get the current CPU threshold.get ram: to get the current memory threshold.
set: overwrite the current threshold of free resources below which a new VM will be scheduled. The initial values come from theschedulerConfig.yamlfile required by the autoscaler.set cpu <percentage>to set the free % of CPU usage (1–100).set ram <Mb>to set the free memory in Mb.
stop: pause the scheduling process.start: resume the scheduling process.