Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-25832

Launch multiple slaves in parallel for jobs with same node label

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Critical Critical
    • ec2-plugin
    • None

      I use build flow plugin to kick off 200+ jobs. Each of these jobs has the same label. During this scenario, 200+ jobs are queued up. The ec2 plugin seems to process one job at time and this is a painfully slow process.

      It seems that the AWS JAVA SDK allows for launching multiple ec2 instances. Can the ec2 plugin detect the number of jobs with the same label in the queue, and then launch that many ec2 instances in parallel?

      http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/ec2/model/RunInstancesRequest.html#RunInstancesRequest%28java.lang.String,%20java.lang.Integer,%20java.lang.Integer%29

       private EC2AbstractSlave provisionOndemand(TaskListener listener) throws AmazonClientException, IOException {
      PrintStream logger = listener.getLogger();
      AmazonEC2 ec2 = getParent().connect();
      try {
      String msg = "Launching " + ami + " for template " + description;
      logger.println(msg);
      LOGGER.info(msg);
      KeyPair keyPair = getKeyPair(ec2);
      RunInstancesRequest riRequest = new RunInstancesRequest(ami, 1, 1);
      

            francisu Francis Upton
            arazauci arazauci
            Votes:
            16 Vote for this issue
            Watchers:
            27 Start watching this issue

              Created:
              Updated:
              Resolved: