I am trying to use the EC2 Jenkins Plugin and have some questions:
- When I add an AMI and corresponding launch details, how many instances are launched if tasks need executors and its label matches? Exactly one? If more than one, how can I configure the maximum number of instances are launched to try to provide executors to waiting tasks?
- If more than one instance can be launched per AMI, is there a way to make my configuration (that I’ve entered in the GUI) depend on the instance #? For example, if the instance number were available in something like $INSTANCE_NUMBER (e.g. 1 or 5), then I’d want to use it in my startup script. Or I’d want to use it to influence the subnet ID.
- I see a way to specify the subnet ID for the AMI, but not the private IP. I want to specify a specific private IP. Is this supported?
- In the official web page for the EC2 plugin, it shows a groovy script that supposedly runs on Jenkins startup. Is that the preferred way to customize the plugin rather than building it from source (which is actually not that difficult?) Problem is that the customizations I need won’t be static, they will depend on $INSTANCE_NUMBER, at least if the answer to the first question is that the plugin can launch multiple instances of the AMI.
(I am currently stuck on plugin version 2.0.4 due to having an older Jenkins version.)