TeamCity from JetBrains is my favorite build server. It “knows” what developers need, it simply works out-of-the-box instead of you spending time making it to work. There is an option to get it installed quickly with trial installation topology, when both server and single agent run on the same box. However it is preferable to isolate them from each other. Therefore I decided to create a way to provision build server farm with minimum manual operations.
TeamCity Farm is a Maven project, which results in ZIP-archive with Vagrant project. The later
- creates VM with Centos 7.0
- installs Docker
- pull necessary images and starts Docker containers with
- mySQL database
- TeamCity 9 build server
- 2 TeamCity agents
The created Centos VM and installed Docker repeat your network proxy settings. Therefore you can use the project behind the company firewall
Final result: Ready for use TeamCity build server becomes available on your machine at http://localhost:8112/
How to use it?
Get Vagrant project
You can either download the released project or get sources and run Maven
Sources can be simply downloaded here and and unpacked or, to get the latest sources from GitHub, clone the repository
git clone https://github.com/JV-ration/teamcity-farm.git cd teamcity-farm
Then change to the directory with sources and
mvn clean package
The line above will prepare ZIP file with Vagrant project in
The line below will even unpack the ZIP in
mvn clean pre-integration-test -Prun-its
Create and run VM
Unpack the archive with Vagrant project and change to that directory
Run the command below to create VM and prepare the build server
Finish configuration of the build server
When VM is fully provisioned
- open the build server at http://localhost:8112/
- accept JetBrains TeamCity license
- enter the desired administrator name and password
- authorize both agents
Happy Building 😉
What to expect shortly?
- Scripts for running Docker containers directly on your machine, so don’t have use Vagrant and Virtual Box
- Whatever is seen the project issues
- Recent JDK
- Maven 3.0.4 or higher, unless you download released Vagrant project
- Vagrant for managing virtual machine with
- Virtual Box (or another virtualization provider)
2 thoughts on “TeamCity Farm on GitHub”
Using Bamboo myself currently as it is cheaper and has nice automatic integration with Jira. But TC has a lot more features and the hierarchy of projects it offers is also quite nice when there are many similar builds.
Excellent post. thanks!