{"id":79247,"date":"2018-06-10T16:10:20","date_gmt":"2018-06-10T16:10:20","guid":{"rendered":"https:\/\/www.red-gate.com\/simple-talk\/?p=79247"},"modified":"2019-08-15T13:49:49","modified_gmt":"2019-08-15T13:49:49","slug":"installing-and-setting-up-teamcity","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/blogs\/installing-and-setting-up-teamcity\/","title":{"rendered":"Installing and setting up TeamCity"},"content":{"rendered":"<p>\u00a0I\u2019ve just started a project where I\u2019ve had to set up Team City from scratch.\u00a0 Whilst I\u2019ve used Team City extensively I\u2019ve never had to start from the beginning, so I thought I\u2019d document the steps I took.<\/p>\n<p>TeamCity is a Continuous Integration tool is free to use for small teams.\u00a0 \u00a0It connects to your source control repository and can automatically trigger builds when changes are pushed into the repo.<\/p>\n<p>You can download it and get more information from here <a href=\"https:\/\/www.jetbrains.com\/teamcity\/\">https:\/\/www.jetbrains.com\/teamcity\/<\/a><\/p>\n<p>Once downloaded, double click the exe file to start installing.<\/p>\n<p>You will get a \u201cWelcome to Team City setup\u201d page, click on Next.<\/p>\n<p>Licence Agreement, click on I Agree.<\/p>\n<p>Then select the destination folder, I\u2019ll keep with the default which is c:\\teamcity but you can put it wherever suits.<\/p>\n<p>You can than select which components, I\u2019ll just take the default which is everything which, at time of writing, requires 1.1GB.<\/p>\n<p>It then starts installing, this took about 5 minutes.<\/p>\n<p>You then need to select the TeamCity server port, by default this is 80.\u00a0 It will tell you if that\u00a0 port is already busy so you can allocate a different one.<\/p>\n<p>It will then show you the \u201cConfigure Build Agent Properties\u201d which is all the details that are set as standard.\u00a0 You can add to this if you need to.<\/p>\n<p>Once you are happy click on Save.<\/p>\n<p>It will then ask for the service account to use, this can be changed afterwards.\u00a0 If you don\u2019t have a service account set up you can use the SYSTEM Account however, you may have problems later on.\u00a0 I\u2019m going to use the SYSTEM account and will probably go back and change this later, which you can do by opening the services and finding the TeamCity service and amending it that way.<\/p>\n<p>It will then ask you which services you want to start so click on next and then you get the \u201cCompleting the JetBrains TeamCity Setup Wizard\u201d so click on Finish.<\/p>\n<p>It then automatically loads the web page, and asks you where to store the path, then it asks about database connection setup.\u00a0 I selected the database type of \u201cInternal\u201d for simplicity sake.<\/p>\n<p>It will then create your TeamCity database on the instance you specify in the previous step, this does take a few minutes so be warned, or go and make a cuppa!!<\/p>\n<p>You then need to accept the licence agreement by reading\/scrolling all the way to the bottom.\u00a0 You then get prompted to set up an administrator account.<\/p>\n<p>Team City then opens on the General page which is where you can update your profile if necessary.<\/p>\n<p>Now we need to create a project, to do this click on Projects and then Create Project.<\/p>\n<p>You then get the options of which source control repository you are linking to, I\u2019m going to select \u201cFrom Bitbucket Cloud\u201d but you can select whichever is most appropriate.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-79249\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2018\/06\/TeamCity1.png\" alt=\"\" width=\"1557\" height=\"323\" \/><\/p>\n<p>You will then need to set up the connection.<\/p>\n<p>The next step we need to do is set up our connection to source control so that whenever we check anything in our build automatically runs.\u00a0 I\u2019m using BitBucket but this process works for pretty much any source control repository.\u00a0<\/p>\n<p>You will then need to enter the repository URL the username and password used to connect your repo.<\/p>\n<p>You now have a project created. By doing these steps it should have automatically setup your version control settings and the Triggers which means whatever builds you create will trigger on a push.\u00a0 You can tell these have been set up because next to Version Control Settings there should be a 1 and next to Triggers there should be a 1 as shown below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-79253\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2018\/06\/teamcity2.png\" alt=\"\" width=\"225\" height=\"388\" \/><\/p>\n<p>If you click on Version Control Settings you can see what\u2019s been setup up, and obviously you can add in additional repositories as necessary.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-79254\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2018\/06\/teamcity3.png\" alt=\"\" width=\"1368\" height=\"290\" \/><\/p>\n<p>Now click on Triggers and you can see the trigger that has been set up, if you click on Edit it tells you that the trigger has been set up as shown below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-79255\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2018\/06\/teamcity4.png\" alt=\"\" width=\"741\" height=\"257\" \/><\/p>\n<p>Your Team City environment should now be set up ready for you to add build steps.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0I\u2019ve just started a project where I\u2019ve had to set up Team City from scratch.\u00a0 Whilst I\u2019ve used Team City extensively I\u2019ve never had to start from the beginning, so I thought I\u2019d document the steps I took. TeamCity is a Continuous Integration tool is free to use for small teams.\u00a0 \u00a0It connects to your&#8230;&hellip;<\/p>\n","protected":false},"author":10747,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2],"tags":[5649,5592],"coauthors":[57570],"class_list":["post-79247","post","type-post","status-publish","format-standard","hentry","category-blogs","tag-ci","tag-teamcity"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/79247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/10747"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=79247"}],"version-history":[{"count":4,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/79247\/revisions"}],"predecessor-version":[{"id":79257,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/79247\/revisions\/79257"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=79247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=79247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=79247"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=79247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}