Installing Go agent
Introduction
Installation
How to install Go agent for Windows
You must be logged in as a user with Admin privileges to install the Go agent on Windows.
- Double-click the go-agent-${version}.exe installer file and follow the prompts to install Go.
- During installation you will be asked to select a root path for your Go agent. In addition to holding your agent installation, this directory will contain the source code your agent checks out for every build.
-
After installing the files, the installer will prompt you for the hostname or IP address of the Go server. If you leave this blank it will default to the local machine.
- At the end of the installation, Go agent registers itself as a windows service and starts running automatically.
How to install Go agent for Mac OSX
- Double-click the downloaded file to unzip the contents.
- Drag the Go Agent.app icon to the Applications folder. This will also be the directory where the agent checks out and builds the code.
- Double-click on the Go Agent.app icon to open the launcher.
-
The very first time you run the Go agent on your machine you will be prompted for the hostname or IP address of your Go server. By default it will try connecting to the local machine. Click the OK button to continue.
How to install Go agent for Linux
You must be logged in as root, or use sudo, to install Go on Linux. Go agent also requires that the Sun Java 6 JDK is installed.
The installer will create a user called go if one does not exist on the machine. The home directory will be set to /var/go. If you want to create your own go user, make sure you do it before you install the Go agent.
RPM based distributions (ie RedHat)
The Go agent RPM installer has been tested on RedHat Enterprise Linux 5, CentOS 5 and SUSE (Linux Enterprise Server 10 SP2). It should work on most RPM based Linux distributions.
- Run rpm -i go-agent-${version}.noarch.rpm to install Go agent.
Debian based distributions (ie Ubuntu)
The Go agent .deb installer has only been tested on Ubuntu 7.10. However it should work on most Linux distributions which use debs.
- Run dpkg -i go-agent-${version}.deb to install Go agent.
The following command could be used after installation:
- Check Go agents' status with command sudo /etc/init.d/go-agent status
- Start Go agents with command sudo /etc/init.d/go-agent start
- Stop Go agents with command sudo /etc/init.d/go-agent stop
Once the package has been installed you need to configure the hostname or IP address of your Go server and start the agent. To do this, do the following:
- Open /etc/default/go-agent in your favourite text editor.
- Change the line GO_SERVER=127.0.0.1 to list the hostname or IP address of your Go server.
- Save the file and exit your editor.
- Run /etc/init.d/go-agent start to start the agent.
How to install Go agent for Solaris
You must be logged in as root, or use sudo or pfexec, to install Go on Solaris. Go agent also requires that the Sun Java 6 JDK is installed.
The installer will create a user called go if one does not exist on the machine. The home directory will be set to /var/cruise. If you want to create your own go user, make sure you do it before you install the Go agent.
- Uncompress the package with the command gzip -d go-agent-${version}-solaris.gz
- Install the package with the command pkgadd -d go-agent-${version}-solaris
- By default the agent will try connecting to localhost as the server. To change this, run the following:
svccfg -s svc:/application/go/agent:default setprop go-agent/server = <Server hostname or IP> svcadm refresh svc:/application/go/agent svcadm restart svc:/application/go/agent
The following command could be used after installation:
- Check Go agents' status with command svcs go/agent
- Start Go agents with command svcadm enable -s go/agent
- Stop Go agents with command svcadm disable -s go/agent
Location of files after installing Go agent
Windows
All the files for the Go agent are under its root installation folder in Windows, the default location is C:\Program Files\Go Agent.
Linux
/var/lib/go-agent /etc/default/go-agent /var/log/go-agent /usr/share/go-agent
Mac OSX
Some files for the Go agent are under its root installation folder in Mac OSX.
/Applications/Cruise Agent.app
/Library/Logs/CruiseAgent
~/Library/Preferences/com.thoughtworks.studios.cruise.agent.properties
Some logging information is also written to /var/log/system.log
Solaris
/var/lib/go-agent /usr/share/go-agent /var/log/go-agent
Registering your agent with the server
For security reasons, all newly installed Go agents need to be enabled on the Go server before work is assigned to them. This prevents an unauthorized person from getting access to your source code. To enable a newly installed Go agent, do the following:
- Open the Go server dashboard
- Follow the instructions here to find the agent you've just installed on the list and add the agent to your cloud. The Go server will now schedule work for this agent.