Need Help with Use Case - Crete Auto Scaling Azure Build Agents on Nomad

Here is my use case :
Create self hosted azure devops build agents on a nomad cluster

I have currently created a nomad server and nomad client , and i have also submitted a job that runs multiple agents on a single client node

Plan is to export the build agent metrics to a prometheus instance in the same cluster
Prometheus is involved so that i can scale according to the job queue of my agent

Need to shift the nomad client to an azure vmss , so that it can support scaling

How i need to the auto scaling to work -

  1. DO horizontal application scaling when the agent queue is greater than 0
  2. DO cluster scaling (using azure vmss plugins) so that it will scale the cluster when the current nodes can scale the application any more


  1. Has any one done something similar for azure build agents
  2. DO i need consul for service discovery , so that my auto scaler can talk to nomad autoscaler
  3. Can the autoscaler policy target both Horizontal application scaling and cluster scaling at the same time ?
  4. How can i automate all this process ?