I am currently implementing autoscaling on a Jenkins server. I am hosting Jenkins on an ec2 instance.
I want to enable new Jenkins slave instances on demand.
I have followed the instructions here https://medium.com/@DoctorNantucket/auto-scaling-jenkins-builders-with-packer-ansible-and-aws-e84f4d0a3853. However, when I click on “Provision via ”, the instance is created and connecting to it on port 22 results in an error.
The instance is created, and I have validated that the security group that I am adding has port 22 open in the Inbound Rules.
Does anyone know the reason for this error? Once fixed, will the Jenkins Slaves be created on demand? - What determines whether they are needed? Is an autoscaling group set up in AWS a more stable and scalable approach (e.g. AWS EC2 Autoscaling: Defining a master instance, which is never terminated) ?