Installing Cruise agent
Introduction
Installation
How to install Cruise agent for Windows
You must be logged in as a user with Admin privileges to install the Cruise agent on Windows.
- Double-click the cruise-agent-${version}.exe installer file and follow the prompts to install Cruise.
- During installation you will be asked to select a root path for your Cruise 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 Cruise server. If you leave this blank it will default to the local machine.
- At the end of the installation, Cruise agent registers itself as a windows service and starts running automatically.
How to install Cruise agent for Mac OSX
- Double-click the downloaded file to unzip the contents.
- Drag the Cruise 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 Cruise Agent.app icon to open the launcher.
-
The very first time you run the Cruise agent on your machine you will be prompted for the hostname or IP address of your Cruise server. By default it will try connecting to the local machine. Click the OK button to continue.
How to install Cruise agent for Linux
You must be logged in as root, or use sudo, to install Cruise on Linux. Cruise agent also requires that the Sun Java 6 JDK is installed.
The installer will create a user called cruise if one does not exist on the machine. The home directory will be set to /var/cruise. If you want to create your own cruise user, make sure you do it before you install the Cruise agent.
RPM based distributions (ie RedHat)
The Cruise 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 cruise-agent-${version}.noarch.rpm to install Cruise agent.
Debian based distributions (ie Ubuntu)
The Cruise 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 cruise-agent-${version}.deb to install Cruise agent.
The following command could be used after installation:
- Check Cruise agents' status with command sudo /etc/init.d/cruise-agent status
- Start Cruise agents with command sudo /etc/init.d/cruise-agent start
- Stop Cruise agents with command sudo /etc/init.d/cruise-agent stop
Once the package has been installed you need to configure the hostname or IP address of your Cruise server and start the agent. To do this, do the following:
- Open /etc/default/cruise-agent in your favourite text editor.
- Change the line CRUISE_SERVER=127.0.0.1 to list the hostname or IP address of your Cruise server.
- Save the file and exit your editor.
- Run /etc/init.d/cruise-agent start to start the agent.
How to install Cruise agent for Solaris
You must be logged in as root, or use sudo or pfexec, to install Cruise on Solaris. Cruise agent also requires that the Sun Java 6 JDK is installed.
The installer will create a user called cruise if one does not exist on the machine. The home directory will be set to /var/cruise. If you want to create your own cruise user, make sure you do it before you install the Cruise agent.
- Uncompress the package with the command gzip -d cruise-agent-${version}-solaris.gz
- Install the package with the command pkgadd -d cruise-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/cruise/agent:default setprop cruise-agent/server = <Server hostname or IP> svcadm refresh svc:/application/cruise/agent svcadm restart svc:/application/cruise/agent
The following command could be used after installation:
- Check Cruise agents' status with command svcs cruise/agent
- Start Cruise agents with command svcadm enable -s cruise/agent
- Stop Cruise agents with command svcadm disable -s cruise/agent
Location of files after installing Cruise agent
Windows
All the files for the Cruise agent are under its root installation folder in Windows, the default location is C:\Program Files\Cruise Agent.
Linux
/var/lib/cruise-agent /etc/default/cruise-agent /var/log/cruise-agent /usr/share/cruise-agent
Mac OSX
Some files for the Cruise agent are under its root installation folder in Mac OSX.
<<<<<<< local
/Library/Logs/CruiseAgent #contains the agent logs
=======
/Library/Logs/CruiseAgent #contains the agent logs
~/Library/Preferences/com.thoughtworks.studios.cruise.agent.properties #contains the agent preferences
]]>
>>>>>>> other
Some logging information is also written to /var/log/system.log
Solaris
/var/lib/cruise-agent /usr/share/cruise-agent /var/log/cruise-agent
Registering your agent with the server
For security reasons, all newly installed Cruise agents need to be approved on the Cruise server before work is assigned to them. This prevents an unauthorized person from getting access to your source code. To approve a newly installed Cruise agent, do the following:
- Open the Cruise server dashboard
-
Click on the "Agents" tab and find the Cruise agent you've just installed on the list
-
Click on "Approve" and the agent listing will turn green. The Cruise server will now schedule work for this agent