Unable to render embedded object: File (TeamCity48.png) not found.

TeamCity 2018.x Documentation

Documentation for Previous Versions

Icon

You are viewing the documentation of TeamCity 2018.x, which is not the most recently released version of TeamCity.
View this page in the latest documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.

 

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • be able to open outbound HTTP connections to the server address (the same address you use in the browser to view the TeamCity UI, configured in buildAgent.properties file)
  • have full permissions (read/write/delete) to the following directories recursively: <agent home> (necessary for automatic agent upgrade and agent tools support), <agent work>, <agent temp>, and agent system directory (set by workDir, tempDir and systemDir parameters in buildAgent.properties file)
  • be able to launch processes (to run builds).
  • be able to launch nested processes with the following parent process exit (this is used during agent upgrade)


Windows

  • Log on as a service (to run as Windows service)
  • Start/Stop service (to run as Windows service, necessary for the agent upgrade to work, see also Microsoft KB article)
  • Debug programs (required for take process dump functionality)
  • Reboot the machine (required for agent reboot functionality) 

  • To be able to monitor performance of a build agent run as a Windows service, the user starting the agent must be a member of the Performance Monitor Users group

...

  • the user must be able to run the shutdown command (for the agent machine reboot functionality and the machine shutdown functionality when running in a cloud environment)
  • when using systemd, it shoul dnot kill the processes on the main proces exit (use RemainAfterExit=yes)

Build-related Permissions

...

To run agent automatically on the machine boot under Linux, configure daemon process with the agent.sh start command to start it and agent.sh stop command to stop it. Refer to an example procedure below

For systemd, check example confiuration file:

Expand
titleteamcityagent.service

[Unit]
Description=TeamCity Build Agent
After=network.target

[Service]
Type=oneshot

User=teamcityagent
Group=teamcityagent
ExecStart=/home/teamcityagent/agent/bin/agent.sh start
ExecStop=-/home/teamcityagent/agent/bin/agent.sh stop

# Support agent upgrade as the main process starts a child and exits then
RemainAfterExit=yes
# Support agent upgrade as the main process gets SIGTERM during upgrade and that maps to exit code 143
SuccessExitStatus=0 143

[Install]
WantedBy=default.target

 

For init.d refer to an example procedure:

1. Navigate to the services start/stop services scripts directory:

...