In previous part we were I was describing the TFS 2015 build system and how to create your first build template. Today, I will describe how to prepare environment, where the build will be done.
To run the own build process you need some PC, where you have all needed to do the build. You can choose to use some VPC, your workstation or another server, it does not matter. What you need for the build:
- Windows compatible with the used NAV version
- Correct NAV version installed (or you can install it as part of the build if you want)
- SQL server compatible with the NAV version (on same server or different, does not matter)
- PowerShell scripts – scripts needed for the build must be available on the server (or could be installed as part of the build/source code)
- VSO Agent – the process, which will run the build for you
In case of NAV, you cannot use the Build agents available as part of the Team Services, because you need to install NAV on the machine. Thus it must be your own PC/VPC, but it does not matter if on prem or somewhere in cloud. It could be used together with Team Services.
I think that I do not need to describe how to create clean VPC with all the prerequisities, except the VSO Agent.
When all is prepared and you need to install the VSO Agent on your build server, all you need is to open your TFS web portal and navigate into the Administration of your server, Agent pools tab, and select Download agent.
Download the agent, expand in somewhere and run the ConfigureAgent.cmd as admin. There you need to put few values to correctly configure the agent:
- Name of the agent – it is on you how you will name it
- URL for the TFS – enter the URL of the TFS server without the Collection part, e.g. http://tfs:8080/tfs or enter the URL of your Team Services
- Agent pool – use the default if you do not want to create separate Agent pool. Agent pools could be used to create separate groups of agents for different purposes.
- Path of the work folder – folder, where the source repositories will be saved and where all the processing will run. Put it on fast disc, it will help to keep the build time short (SSD).
- Install the agent as Windows Service – I am answering NO here, because I want to run NAV test suite, which need GUI. If you will only build the NAV and not run the tests, you can install the Agent as Windows service and it will automatically start after restarts etc. If you do not install the agent as service, you need to log into the server under account under which you want to run the agent and run it manually each time the server is restarted (or script this somehow)