Mulltiple GoCD build agents on Windows?

93 views
Skip to first unread message

Emil

unread,
Aug 17, 2021, 8:55:45 AM8/17/21
to go-cd
Hi Fellas,

Is it possible to have multiple agents installed on the same windows box, windows is not mentioned in the docs?
I tried silent install. but I got the following in the log:

Previous Install dir is C:\GoCD\agent, checking if upgrade is possible...
Go Agent 21.2.0-12498 is already installed.

Is there any workaround?

Thanks,
Emil

Aravind SV

unread,
Aug 17, 2021, 9:49:08 AM8/17/21
to Emil, go-cd

Hello Emil,

You should be able to just use the zip version of it to run multiple agents: https://www.gocd.org/download/#zip

That will work on any OS.

Regards,
Aravind

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/94a39e58-1a1b-4647-ae4b-23de177dd65bn%40googlegroups.com.

cal...@vertify.com

unread,
Aug 17, 2021, 12:44:42 PM8/17/21
to go-cd
I recently setup additional agents as Windows services. Here are my rough notes:

 * Copy "C:\Program Files (x86)\Go Agent" to "C:\Program Files (x86)\Go Agent2"
 * Delete files in 'config' folder (guid.txt, token, etc)
 * Edit 'wrapper-config/wrapper.conf' to match new service name (wrapper.displayname, wrapper.description)
 * sc create GoAgent2 binPath= "C:\Program Files (x86)\Go Agent2\wrapper\wrapper-windows-x86-64.exe" displayName= "Go Agent2" start= auto
 * Go to Control Panel -> Services and set the logon account for GoAgent2
 * Use Regedit
  * copy ImagePath value from   HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Go Agent
  * Edit that value and paste to ImagePath at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\GoAgent2
 * Start Service GoAgent2

Emil

unread,
Aug 18, 2021, 6:41:15 AM8/18/21
to go-cd
Hi Aravind,

Thank you for your reply - it was very helpful :)

I have installed multiple agents now, but on the agents page in GoCD the agent name is identical for all installed agent!? All agents run as windows service and the name of the windows service is using the wrapper.name value from wrapper-config/wrapper.conf and the names are unique, however the agent name on the agents page is identical (it is the hostname) - How can I explicitly set the agent name displayed on the GoCD agents page?

Many Thanks,
Emil

Emil

unread,
Aug 18, 2021, 7:07:23 AM8/18/21
to go-cd
Thanks for the notes - I had the same idea too and saved it for my reference.

However, it was easier to download the agent zip install and to use the batch scripts in the bin/ folder to install the windows service after modifying the properties in wrapper-config/wrapper.conf 

One problem I have now is that on the GoCD agents page the agent name for all agents is identical - the value is the machine hostname instead the windows service name! Any idea how to set the agent name displayed on the agents page?

Thanks,
Emil

Chad Wilson

unread,
Aug 18, 2021, 8:27:16 AM8/18/21
to go...@googlegroups.com
I believe this should be possible when using agent auto-registration and agent.auto.register.hostname: https://docs.gocd.org/current/advanced_usage/agent_auto_register.html

-Chad

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.

Aravind SV

unread,
Aug 18, 2021, 11:05:48 AM8/18/21
to Chad Wilson, go...@googlegroups.com

That’s right. I think it’s possible to change the name (to be any name), only if using auto-registration. If not, it uses the hostname and you might have to use the agent work directory to differentiate it.

Cheers,
Aravind

Emil

unread,
Aug 18, 2021, 12:42:40 PM8/18/21
to go-cd
Hey Chad,

you were spot on - thank you!
Using setting the value of agent.auto.register.hostname with auto-registration worked like a charm, however I had to delete the existing guid.txt & token files to allow the auto-registration to kick-in once the service is restarted!

Thank you for your help!

Emil

Reply all
Reply to author
Forward
0 new messages