When needing to configure multiple GroundRunners on a single Windows machine, several steps need to be taken. Please note that this article is only applicable to OneCloud customers that interact with multiple tenants. It is not intended as a solution for clustering GroundRunners.
Step 1: Install GroundRunner
A base install of the GroundRunner should be performed using the MSI installer even if a prior installation of the GroundRunner was performed using the Command Line Interface (CLI). It is recommended to create a common directory in which the GroundRunner components will be installed. Please note, GroundRunners do not have to be installed on the C:\ drive, the below is an example common path but could be deployed on any local drive on the Windows machine.
Root GroundRunners Directory
Installation directory for Primary GroundRunner
Step 2: Update Windows Service Name & Display Value
Once the GroundRunner install is complete and prior to starting the Windows service, update the Windows Service Name and Display Value using the following command line. The space following the equals sign on the displayName parameter is required and ]Tenant Name] is the actual name of the OneCloud tenant (e.g., OneCloud-Demo)
sc config "GroundRunnerService" displayname= "GroundRunner (Tenant Name)"
- Open Windows Services (services.msc), refresh the list of services, and confirm the name displayed is updated. Test that the Windows Service is able to start.
- Create a new directory under the root GroundRunners directory. The directory name should match the name of the additional OneCloud tenant (e.g., OneCloud-Training)
- Copy the GroundRunnerMonitor.exe, ocrunner.exe, and ocrunner.config files from the primary GroundRunner installation directory to the newly created directory. Do not copy the config.readonly.json file!
- In the new directory, open the ocrunner.config file with any text editor and update the following:
- -- PORT will need to be uncommented and port specified. Two GroundRunners cannot run on the same port.
- -- COMPANY_TOKEN parameter. The company token value is found in OneCloud under Admin > Runners > Downloads
- Be sure to save the update!
- Create a new Windows service using the following command line. Be sure to update TENANT (e.g., OneCloud-Training) to the tenant name on the GroundRunnerService_TENANT parameter. The path (ROOT_DIR\NEW_TENANT) should be the local path to the newly created directory from the earlier step. Please note that the space following the equals sign on the binPath parameter is required.
sc create GroundRunnerService_TENANT binPath= "ROOT_DIR\NEW_TENANT\GroundRunnerMonitor.exe"
- Update the Display Name of the new service using the following command line. Be sure to replace TENANT with the actual name specified in the previous step and update TENANT_NAME to the actual name of the additional OneCloud tenant. Note that the space following the equals sign on the displayName parameter is required.
sc config "GroundRunnerService_TENANT" displayName= "GroundRunner (TENANT_NAME)"
- Refresh Windows Services and confirm the additional service has been installed. Start the service to confirm the installation and then activate the new GroundRunner in the OneCloud tenant.
Step 3: Configure Automatic Start (Optional)
Optionally, the new service can be configured to start automatically. To modify the new service to start automatically, the following command line can be used. The space following the equals sign on the start parameter is required. Be sure to replace TENANT with the actual name as performed in the prior step.
sc config "GroundRunnerService_TENANT" start= "auto"