Creating Multiple Cruise Agent Services on the Same Windows Box April, 2010
The official procedure for installing multiple Cruise agents on the same box is pretty hokey IMO since it requires a logged on user. You can just run multiple Cruise agents as services which is a much better approach. It's actually pretty simple:
- Stop the default Cruise agent service and delete it. (sc delete "Cruise Agent")
- Create a folder under "[Program Files]" called "Cruise Agents" (Plural, the singular folder is what the installer creates). Under the "[Program Files]\Cruise Agents" (Plural) folder create a folder for each instance you want (I just did "Instance1", "Instance2" and so on) and then copy the contents of the "[Program Files]\Cruise Agent" (Singular) folder into each of these instance folders. NOTE: As an side I tried to set it up so that there was one bin folder and multiple config folders (Per instance) but gave up after about 15 minutes. If someone knows how to do this it would really simplify things and save on a few hundred mb of disk space.
- Delete the "[Program Files]\Cruise Agents\InstanceN\config\guid.txt" file in each of the instance folders if it exists. A fresh guid will be automatically generated when the instance starts. ("N" being the instance number)
- Delete the "[Program Files]\Cruise Agents\InstanceN\
- Open the "[Program Files]\Cruise Agents\InstanceN\config\wrapper-agent.conf" file for each instance and make the following modifications :
- wrapper.java.command=C:\Program Files (x86)\Cruise Agents\InstanceN\jdk\bin\java
- wrapper.ntservice.name=Cruise AgentN
- wrapper.ntservice.displayname=Cruise Agent N
- wrapper.ntservice.description=Cruise Agent N
- Now create a windows service for each of your instances (sc create "Cruise AgentN" binPath= "\"C:\Program Files (x86)\Cruise Agents\InstanceN\cruisewrapper.exe\" -s \"C:\Program Files (x86)\Cruise Agents\InstanceN\config\wrapper-agent.conf\"" DisplayName= "Cruise Agent 1" start= auto):
- Start the services and you should be good to go. You may need to delete the old instance definition from the Cruise config file so it doesn't show up in the list.