Managing multiple Thoughtworks Go agents on Linux

704 views Asked by At

I am setting up a Thoughtworks Go server for a continuous delivery environment on a Linux server. I have installed the server and agent from RPM on the same machine and have them working correctly. I can stop and start the agent using the provided script /etc/init.d/go-agent, and the server can see when the agent stops or becomes available again.

I now want to add multiple agents on the same server. I am able to add agents using the instructions at http://www.thoughtworks.com/products/docs/go/13.1/help/admin_install_multiple_agents.html - I create a new directory and run the command to create the necessary files. When I do that, the server sees the new agents become available.

The problem is with stopping and restarting the new agents. If I run /etc/init.d/go-agent stop it stops all the agents. If I then run /etc/init.d/go-agent start, it only starts the original agent I installed through RPM.

Do I need to add new scripts to manage the additional agents? Or modify the existing scripts or configuration?

Anyone have any experience managing multiple Thoughtworks Go agents on the same server in a Linux environment?

1

There are 1 answers

0
jeremyjjbrown On

You can find each agents process id - PID separately by first using

ps -ef | grep go-agent

to get the pid of each go agent. And, then you can kill only the ones you want manually with.

kill -15 <pid number>

I would stop the last one with the init.d stop command

There is probably no simple way for the go-agent start-stop script (the script service calls) to know which agent to stop.