A TrustBuilder Server (TB Server) within the context of the TrustBuilder Administrator (TBA) is a reference to an installation of TrustBuilder.
A TB Server maybe on a different physical machine to where TBA is installed and running or on the same application server.
The communication between TBA and TB Servers is made between the management port (default 8888) that is configured in the server and in the configuration.
TrustBuilder configurations are related to TB Servers for export.
The TB_HOME (being the directory where the TB server stores it's configuration files) belonging to a TB Server can be imported and a configuration created in TBA from the imported files.
Adding a New TrustBuilder Server
Servers can be created from the Configs & Servers page.
Initially there are no TrustBuilder servers configured clicking the New Server button provides a form to configure a reference to a single TrustBuilder server.
This is a unique name for this TB server. This is used only within TBA
Related Configuration ID
If this TB Server has a configuration related to it the id is displayed here.
The ip address or host of the TB Server. This can be remote or localhost
The management port to allow communication between TBA and this TB Server.
This is a comma delimited list of tags that can be used to filter the view of TB Servers.
A description of the TB Server. Also placed in the configuration.
Since version 8.0 the Management Port is only set on the server. It is no longer set in the configuration as with previous versions.
Once the form is saved a new, unrelated, TB server is created on the page.
With each TB Server there is a number of buttons to perform tasks. Depending upon the state of the server, if it is related to a configuration or not, then different buttons are visible. For instance if a server is not related to a configuration then there will be no export or restart buttons available.
The buttons are represented as icons. To see the purpose of the button leave the mouse hovering over the icon for a short time.
![server log button](../../img/core/admin/server-button-logs.png)
The logs button will tail the logs generated by the TrustBuilder engine fo this server. The logs open in a new window.
![server export button](../../img/core/admin/server-button-export.png)
Export will be visible if a configuration is related to this server. This will export the complete configuration just to this server.
![server test button](../../img/core/admin/server-button-test.png)
Test the connection to the server from TBA. If connection is successful then the TB version is returned.
![server edit button](../../img/core/admin/server-button-edit.png)
Edit a TB Sever. The same form will be presented as when you add a new TB Server.
![server copy button](../../img/core/admin/server-button-copy.png)
Make a copy of the TB Server. If there is configuration related to this TB Server the relationship will also be copied.
![server import button](../../img/core/admin/server-button-import.png)
Import the complete contents of the TB_HOME of the server. If the TB_HOME is empty nothing will be imported.
![server delete button](../../img/core/admin/server-button-delete.png)
Delete the TB Server. There is no undo the delete is final. If a configuration is related to this TB Server the relationship will be deleted but the configuration will not.
Relating a TB Server to a TB Configuration
Configurations are listed to the left of the Administration screen (see the chapter concerning configurations).
To related a TB Configuration to a TB Server drag the configuration box onto a TB Server box.
More that one TB Server can be related to one configuration. The relationship between TB Configurations and TB Servers is a one configuration to none or many servers.
Once a TB Configuration is related to a TB Server the TB Server is coloured green, the detail of the configuration is displayed within the TB Server and buttons to export and restart that configuration are made available.
To highlight the related configuration move the mouse over the configuration name. The configuration on the left will then be coloured green.
Breaking the Relationship between a TB Server and a TB Configuration
To break the relationship from a TB Server click the rubbish bin icon to the right of the configuration detailed within the TB Server box.
The TB Server will then lose it's colour.
Another option is to drag and drop another configuration. This will automatically break the relationship with the current configuration and assign the new one.
Export a Configuration to a TB Server
When exporting from a TB Server block the complete configuration including all workflows, scripts, templates, layout files and workflow tests is exported.
To enable export first make a relationship between the TB Configuration that is to be exported and the TB Server that the configuration is to be exported to by dragging and dropping the configuration box onto the server box.
Then the Export button will appear on both the server and the configuration. This provides more than one strategy for exporting configurations to servers.
Export one configuration to every related server
Export one configuration to a single server even when related to multiple
Click the Export button.
If there are override properties a form will be presented to enter the values (see the chapter on override properties for details).
If the export is successful a status message is displayed at the bottom of the screen. If there is an error an error message will be displayed.
Restart a Server
You can only restart servers that have configurations related to them.
To restart the server click the restart button at the bottom of the TB Server box.
If successful a status message will be displayed at the bottom of the screen. If the Engine that has been restarted has any messages, such as startup failed due to a script syntax error for instance, then a warning will be displayed listing the messages and their severity.
The warning message can be dismissed by clicking the X in the top right corner.
Since version 8.0 it is possible to sort servers into a specific order. This has no impact other than the display of the servers. To sort servers drag a server to the desired position the other server blocks will re-position whilst this is done. Drop the server to save the positions.
Testing Server Connection
To test the connection to a TB server to check that it is up and running for instance click the Test button. This will make a call to the TB server's engine via the management port to retrieve the version of TB running on that server. If successful a notification is displayed and logged in the notifications box. If a connection cannot be achieved after 20 seconds a time out message is displayed.
Tailing Server Logs
The logs generated by TrustBuilder can be retrieved and tailed by clicking the logs button. This will open a new window and will start showing the logs if the server can be reached and it returns logs. The logs will show automatically in the log window of the TB server that was clicked. The logs will tail automatically. To stop tailing the log click the Stop Tailing Log button. To restart tailing the log click the Restart Tailing log button.
Once in the log console a different server can be selected to tail. Only one server can be tailed at one time.