BitTorrent Plugin for TeamCity
Some time ago we announced the plugin that turns TeamCity into a torrent tracker and a seeder for large artifacts.
Judging by the flow of feedback — both positive and not so much — the plugin is in use by quite a few of our users. To remedy the not-so-much part, we are presenting a new version of the plugin, BitTorrent Support, today.
If you’re new to BitTorrent, you might want to read our previous post on the subject first. For those familiar with the plugin, here is the list of the critical performance and security bug fixes, as well as the new features:
- Optimized downloading speed in the torrent library (TW-49963)
- Optimized memory usage by seeded torrents on the server and agent sides (TW-35395)
- Optimized server resource usage on a build finish
- Security fix related to modifying torrents settings by non-server admin users (TW-9523)
- Ability to switch the plugin on/off for particular projects and build configurations
- A large number of minor fixes.
Setting up the plugin
Once you restart the server, a new link, Torrent Settings, will appear in the Administration area. By default, the plugin is disabled. To enable it server-wide, check the options for the TeamCity server and agents (you can later disable the plugin for some of the projects or build configurations if required):
For the plugin to work correctly, TCP ports in the 6881-6889 interval should be open on the TeamCity server and agents.
If the plugin works correctly and you checked the options on the Torrent settings page, in the subsequent builds the agents will use the BitTorrent protocol to download all large artifacts (over 10Mb by default). The details will be logged: see the example of the build log in the Verbose mode:
[16:09:35][Resolving artifact dependencies] Downloading TeamCity.tar.gz via BitTorrent protocol. [16:09:36][Resolving artifact dependencies] Download successful. Avg speed 208154 kb/s. [16:09:37][Resolving artifact dependencies] Started seeding /home/user/Downloads/TeamCity2017-2/buildAgent/system/.artifacts_cache/<XXX.XX.XXX.XX>_8111/httpAuth/repository/download/Test_Artifact/6.tcbuildid/TeamCity.tar.gz
Users can also download artifacts from the server via the BitTorrent protocol. To download a torrent file, click the torrent icon near the artifact name:
Enabling / disabling the plugin for particular projects and build configurations, as well as controlling the artifacts size available via BitTorrent can be done using the configuration parameters described in the technical notes to the plugin’s Github repository.