March 14, 2016

TeamCity - 手動安裝Build Agent

TeamCity - 安裝額外的Build Agent中提到了使用Windows安裝檔方式安裝Build Agent,過程中仍需些微地以手動方式修改設定檔。我們也可以完全手動方式安裝Build Agent,當然安裝過程相對地又更複雜些。

先至Agents頁面,點選Install Build Agents下載安裝檔


手動安裝需點選Zip file distribution下載安裝檔(buildAgent.zip)。預設安裝好的第一個Build Agent路徑位於C:\TeamCity\buildAgent,所以如果安裝的是第二個Build Agent,建議解壓縮在C:\TeamCity\buildAgent2,以此類推。

C:\TeamCity\buildAgent2\conf\buildAgent.dist.properties更名為buildAgent.properties並修改serverUrlname以及ownPort



開啟C:\TeamCity\buildAgent2\launcher\conf\wrapper.conf並修改wrapper.java.command(可直接參考C:\TeamCity\buildAgent\launcher\conf\wrapper.conf)、wrapper.ntservice.namewrapper.ntservice.displaynamewrapper.ntservice.description



最後以管理員權限依序執行C:\TeamCity\buildAgent2\bin下的install.batservice.install.batservice.start.bat,稍等一下即可在Agents頁面看到第二個Build Agent。

March 13, 2016

TeamCity - 安裝額外的Build Agent

TeamCity(以版本9.1.6為例)在安裝完成後,預設會同時安裝並啟動一個Build Agent,在TeamCity Professional中,最多可允許使用三個Build Agent(但可額外購買Build Agent來增加限制數量)。一個Build Agent在同一時間只能處理一個Build Job,如果同時有多個Build Job需要處理而只有一個Build Job,就只能按照先後順序來處理。所以我們通常會安裝額外的Build Agent同時處理多個Build Job,例如目前我的團隊在執行的一個專案中便用了四個Build Agent。

安裝Build Agent可以透過手動或是自動安裝(實際上是半自動,梢後說明)的方式進行,不論哪種方式,都需先至Agents頁面,點選Install Build Agents安下載安裝檔

自動安裝需點選MS Windows Installer下載安裝檔(agentInstaller.exe)。




預設安裝好的第一個Build Agent路徑位於C:\TeamCity\buildAgent,所以如果安裝的是第二個Build Agent,建議安裝在C:\TeamCity\buildAgent2



接下來先暫停,我們需要先手動修改位於C:\TeamCity\buildAgent2\launcher\conf\wrapper.conf的設定檔。修改的部份為wrapper.ntservice.namewrapper.ntservice.displaynamewrapper.ntservice.description如下


接下來再回到安裝畫面修改serverUrlnameownPort。serverUrl為TeamCity的位址,name為Build Agent名稱,而ownPort為Build Agent所使用的連接埠,預設為9090,如果預設安裝好的Build Agent已使用這個port number,這邊就需要做修改。






安裝完成後稍等一下即可在Agents頁面看到第二個Build Agent。


March 7, 2016

Git Extensions not working in Visual Studio 2015

I'm not a fan of git command line so I use Git Extensions to conduct all the git operations as possible and I've been using it for 2 years. It's really a great tool. Recently I start using VS 2015 in one of my projects and after installation, I can't seem to find Git Extentions in the context menu or toolbar. It's just gone!

OK so I took a look at the official site and found it unsupported for VS 2015 and it's a known issue.

Luckily, there's a VS 2015 extension to this issue. After installing it, I see Git Extensions tool buttons appear in the toolbar. If you still can't see it, right click on the toolbar and see if it's unchecked.