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

Launch multiple slaves in parallel for jobs with same node label

    XMLWordPrintable

Details

    • New Feature
    • Status: Resolved (View Workflow)
    • Critical
    • Resolution: Fixed
    • ec2-plugin
    • None

    Description

      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);
      

      Attachments

        Activity

          arazauci arazauci created issue -
          vthakur Vikas Thakur made changes -
          Field Original Value New Value
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          maxdrib Maxwell Dribinsky made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 159813 ] JNJira + In-Review [ 186249 ]
          timguy2 Tom Lachner made changes -
          Attachment jenkins_18minForNewSlave.png [ 37013 ]
          raihaan Raihaan Shouhell made changes -
          Resolution Fixed [ 1 ]
          Status Reopened [ 4 ] Resolved [ 5 ]

          People

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

            Dates

              Created:
              Updated:
              Resolved: