-
Notifications
You must be signed in to change notification settings - Fork 11
Setting up TLB Server
In order for the splitter and orderer to work, historical data of test runs is used. TLB server/Go server act as the repository that stores historical test run data (test times, test result etc) that can be fetched later to figure out what tests to run, how to re-order etc.
For a detailed breakdown on the terminology, refer Starting up with Tlb
TLB supports two server configurations out of the box.
For all the configurable environment variables and discription of possible values, please refer Configuration Variables.
TLB server comes within all-jar(a java archive that carries all dependencies tlb cares about). In order to start the server, use the following command.
$ java -jar tlb-all-gXXXX.jar
. (XXXX here needs to be substituted with the corresponding version/revision of jar used).
When started this way, TLB server binds to port1 7019. Once the server is up, partitions that are to be balanced(clients), can be pointed to it by setting url on balancer side2 to the base url of the tlb server. TLB works using an abstraction called TalkToService, and TalkToTlbServer3 is just an implementation of this contract that comes with TLB.
This is enough to point balancing process to TLB server, but not enough to start balancing. Since server handles data-storage for multiple groups of balancers(which it calls jobs)4, it needs to have some sort of identifier which it can use to pin-point which version5 of what job4 is to be served etc. The balancer also needs to know how many partitions6 are gonna be used for the job, and which one of those partitions7 is a particular balancer instance executing.
TLB has inbuilt support for Go, which means TLB can balance against Go just like it balances against the TLB-Server. Running against Go obviously means the tests are run as part of a Go-Task, which will run on a Go-Agent. Additionally, because it is environment aware, it can implicit a few things while running against Go server. It deduces equivallent of things like job-name4, version5 and total partitions6 etc from the way jobs are configured under stage/pipeline etc. To make TLB work with Go, TalkToService needs to use TalkToCruise3.
However, since the other side of balancing(server) in this case is not TLB, smoothened time balancing is not available in Go based setup.
1 can be overridden, read TLB_PORT in Configuration Variables
2 read TLB_URL in Configuration Variables
3 read TALK_TO_SERVICE in Configuration Variables should be set to the fully qualified name of the implementation
4 read TLB_JOB_NAME in Configuration Variables
5 read JOB_VERSION in Configuration Variables
6 read TOTAL_PARTITIONS in Configuration Variables
7 read PARTITION_NUMBER in Configuration Variables