![]() |
You are viewing documentation of TeamCity 6.5.x, which is not the most recent released version of TeamCity. Please refer to the listing to choose another version. |
In this section:
Integrate with an Issue TrackerTeamCity comes with dedicated support for YouTrack, Jira and Bugzilla. Install Multiple Agents on the Same MachineSee the corresponding section under agent installation documentation. Watch Several TeamCity Servers with Windows Tray NotifierTeamCity Tray Notifier is used normally to watch builds and receive notifications from a single TeamCity server. However, if you have more than one TeamCity server and want to monitor them with Windows Tray Notifier simultaneously, you need to start a separate instance of Tray Notifier for each of the servers from the command line with the
See also details in the issue tracker. Move TeamCity Installation to a New MachineIf you need to move existing TeamCity installation to a new hardware or clean OS, it is recommended to follow instructions on copying the server from one machine to another and then switch from the old server to a new one. If you are sure you do not need the old server data you can probably perform move operations instead of copying. You can use existing license keys when you move the server from one machine to another (as long as there are no two servers running at the same time). As license keys are stored under <TeamCity Data Directory>, you transfer the license keys with all the other TeamCity settings data. A usual advice is not to combine TeamCity update with any other actions like environment or hardware changes and perform the changes one at a time so that if something goes wrong the cause can be easily tracked.
Generally it is recommended to use a domain name to access the server (in agent configuration and when users access TeamCity web UI). This way you can update the DNS entry to make the address resolve to the IP address of the new server and after all cached DNS results expire, all clients will be automatically using the new server. However, if you need to use another server address, you will need:
Move TeamCity AgentApart from the binaries, TeamCity agent stores it's configuration and data left from the builds it run. Usually the data from the previous builds makes preparation for the future builds a bit faster, but it can be deleted if necessary. The most simple way to move agent installation into a new machine or new location is to:
With these steps the agent will be recognized by TeamCity server as the same and will perform clean checkout for all the builds. Please also review the section for a list of directories that can be deleted without affecting builds consistency.
Share the build number for builds in a chain buildSuppose you have build configurations A and B that you want to build in sync: use same sources and take the same build number.
This reference is also available if you use artifact dependencies instead of snapshot. We plan to provide more option on build number sharing. Please watch/comment on TW-7745. Use an external tool that my build relies onIf you need to use specific external tool to be installed on a build agent to run your builds, you have the following options:
Change Server PortSee corresponding section in server installation instructions. Make temporary build files erased between the buildsUpdate your build script to use path stored in Retrieve Administrator PasswordOn the first start TeamCity displays Administrator Setup page. TeamCity installation should always have a user with System Administrator role in the current authentication scheme. If there is no user account with System Administrator role in the current authentication scheme, you can use If you forgot Administrator password and use internal database, you can reset the password using the instructions. Related feature requests in our tracker: TW-1964, TW-4524, TW-1681. Ho do I clear build queue if it got too many builds due to a configuration errorTry pausing the build configuration that has the builds queued. On build configuration pausing all its builds are removed form the queue.
Estimate hardware requirements for TeamCityThe hardware requirements differ for the server and the agents. The agent hardware requirements are basically determined by the builds that are run. Running TeamCity agent software introduces requirement for additional CPU time (but it can usually be neglected comparing to the build process CPU requirements) and additional memory: about 500Mb. Although, you can run build agent on the same machine as the TeamCity server, the recommended approach is to use a separate machine (though, it may be virtual) for each build agent. If you chose to install several agents on the same machine, please consider possible CPU, disk, memory or network bottlenecks that might occur. The server hardware requirements depend on the server load, which in its turn depends significantly on the type of the builds and server usage. Consider the following general guidelines. Database Note: Overview on the TeamCity hardware resources usage:
The load on the server depends on:
Based on our experience, a modest hardware like 3.2 dual core CPU, 3.2Gb memory under Windows, 1Gb network adapter can provide acceptable performance for the following setup:
However, to ensure peak load can be handled well, more powerful hardware is recommended. HDD free space requirements are mainly determined by the number of builds stored on the server and the artifacts size/build log size in each. If the builds generate large number of data (artifacts/build log/test data), using fast hard disk for storing .BuildServer/system directory and fast network between agents and server are recommended. The general recommendation for deploying large-scale TeamCity installation is to start with a reasonable hardware and add more projects to the server gradually, monitoring the performance characteristics and deciding on necessary hardware or software improvements. Anyway, best administration practices are recommended like keeping adequate disk defragmentation level, etc. If you consider cloud deployment for TeamCity agents (e.g. on Amazon EC2), please also review Setting Up TeamCity for Amazon EC2#Estimating EC2 Costs A note on agents setup in JetBrains internal TeamCity installation: Setup TeamCity in Replication/Clustering EnvironmentTeamCity does not provide specific support for any of replication/high availability or clustering solutions; however you can replicate the data that TeamCity server uses and prepare to start a new server using the same data if existing server malfunctions. When setting up TeamCity in a replication environment please note that TeamCity uses both database and file storage to save data. You can browse through TeamCity Data Backup and TeamCity Data Directory pages in to get more information on TeamCity data storing. Basically, both TeamCity data directory on disk and database that TeamCity uses should remain in a consistent state and thus should be replicated together. Only single TeamCity server instance should use database and data directory at any time. Please also ensure that the distribution of the backup server is of exactly the same version as the main server. See also information on switching from one server to another. Move TeamCity projects from one server to anotherGenerally, moving projects to a server that already have projects/build configurations configured is not supported. For addressing simple cases manually, please see a comment. Automatically create or change TeamCity build configuration settingsIf you need a level of automation and web administration UI does not suite your needs, there are two possibilities:
Attach Cucumber reporter to Ant buildIf you use Cucumber for Java applications testing you should run cucumber with --expand and special --format options. More over you should specify RUBYLIB environment variable pointing on necessary TeamCity Rake Runner ruby scripts: If you are launching Cucumber tests using Rake build language TC will add all necessary cmdline parameters and env. variables automatically. Get last successful build numberUse URL like this: The build number will be returned as a plain-text response.
Create a copy of TeamCity server with all dataOne of the ways to create a copy of the server is to create a backup, then install a new TeamCity server of the same version that you already run, ensure you have appropriate environment configured, ensure that the server uses own TeamCity Data Directory and own database and then restore the backup. If you do not want to use bundled backup functionality or need manual control over the process, here is a description of the general steps one would need to perform to manually create copy of the server:
Note: if you want to do a quick check and do not want to preserve builds history on the new server you can skip step 6 (cloning database) and all items of the step 5 marked as optional.
See also the notes on moving the server from one machine to another. Licensing issues Test-drive newer TeamCity version before upgradeIt's advised to try new TeamCity version before upgrading your production server. Usual procedure is to create a copy of your production TeamCity installation, then upgrade it, try the things out and when everything is checked, drop the test server and upgrade the main one. How do I choose OS/platform for TeamCity serverOnce the server/OS fulfills the requirements, TeamCity can run on any system. Please also review the requirements for the integrations you plan to use (e.g. integration with Microsoft TFS and VSS will work only under MS Windows) If you have no preference, Linux platforms may be more preferable due to more effective file system operations and the level of required general OS maintenance. Final Operating System choice should probably depend more on the available resources and established practices in your organization. If you choose to install 64 bit OS, TeamCity can run under 64 bit JDK (both server and agent). How do I set up deployment for my application in TeamCity
Integrating with Reporting/Metric ToolsIf you have a tool that generates some report or provides code metrics, you may want to display the data in TeamCity. The integration tasks involved are collecting the data in the scope of a build and then reporting the data to TeamCity so that they can be presented in the build results or in other ways. Data collection Presenting data in TeamCity A metrics value can be published as TeamCity statistics via service message and then displayed in a custom chart. If the tool reports code-attributing information like Inspections or Duplicates, TeamCity-bundled report can be used to display the results. A custom plugin will be necessary to process the tool-specific report into TeamCity-specific data model. Example of this can be found in XML Test Reporting plugin and FXCop plugin (see a link on Open-source Bundled Plugins). For advanced integration, a custom plugin will be necessary to store and present the data as required. See Developing TeamCity Plugins for more information on plugin development.
|