Java web start agents
Operations Center provides a mechanism to share agents across Client Masters. This works across wide variety of launcher types, including the option to Launch agents via Java Web Start launcher type (also known as inbound agent launcher.)
A critical difference between normal inbound agents and inbound agents in Operations Center concerns how the JVM used to connect to the client master gets its JVM options.
When you configure a shared agent with an inbound agent launcher, the resulting shared agent will show you a Java Web Start launch button.
You’ll now go to a machine you plan to use as an agent, start a browser, access this same page, then click the launch button to start Java Web Start. You should see a small GUI window. When the GUI window says "Connected", it indicates that the computer is now under the control of Operations Center.
The UI in Operations Center changes to indicate that the shared agent is available to be leased to Client Masters:
On supported platforms, this GUI gives you a menu option to install it as a service, enabling it to start automatically upon machine boot-up. You’ll want to do install as a service if you plan to use the computer as an agent permanently.
If the computer you plan to use as an agent does not have a GUI, you can run the command indicated in the above UI. See the Jenkins Wiki page for a discussion of the same topic.
When you have multiple identical inbound agents, it becomes tedious to configure shared agents individually. To simplify this, Operations Center provides a "Java Web Start agents" cloud type in the shared cloud setting.
To configure a shared cloud in this manner, select "Java Web Start agents" as the cloud type and fill in the details of the inbound agent.
All the inbound agents connected to this share the exact same settings.
When you finish the settings, you’ll see the same Java Web Start launch button as with the inbound shared agent.
The difference here is that you can launch an agent from this button multiple times on different computers, and they are all grouped into one big pool. The "current pool size" section indicates the number of inbound agents that are currently controlled by Operations Center, including ones that are leased to Client Masters.
Inbound agents work a little differently in Operations Center compared to stand-alone Jenkins. This section describes those differences.
In stand-alone Jenkins, an inbound client connects to a master, establishes a channel, becomes an agent, and starts taking orders from the master to perform builds and other tasks.
In Operations Center, the same inbound client connects to the Operations Center and establishes a channel in the exact same manner, but it does not become an agent. Instead, Operations Center keeps this client idle, until it decides to lease it to a client master. At that point, Operations Center orders the inbound client to launch a separate inbound client as a child process, then have it connect to the master to which the agent was leased.
This new child process connects to a Client Master, establishes a channel, becomes an agent, and starts taking orders from this master, until the lease ends.
One of the implications of this design is that an agent computer must be reachable by all the Client Masters to which it might be leased.