Help Desk

Submit a ticket My Tickets
Welcome
Login

Partner Solution: Configuring Multiple GroundRunners as Windows Services

This article is only applicable to OneCloud customers that interact with multiple tenants.  This article is not intended as a solution for clustering GroundRunners.

When needing to configure multiple GroundRunners on a single Windows machine, several steps need to be taken.  

  • 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

C:\OneCloud\GroundRunners

Installation directory for Primary GroundRunner (PRIMARY_ONECLOUD_TENANT is the actual name of the OneCloud tenant; for example, OneCloud-Demo)

C:\OneCloud\GroundRunners\PRIMARY_ONECLOUD_TENANT
  • 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 COMPANY_TOKEN parameter.  Be sure to save the update!  The company token value is found in OneCloud under Admin > Runners > Downloads

  • Create a new Windows service using the following command line.  Please note that the space following the equals sign on the binPath parameter is required.  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.
sc create GroundRunnerService_TENANT binPath= "ROOT_DIR\NEW_TENANT\GroundRunnerMonitor.exe"
  • Update the Display Name of the new service using the following command line.   The space following the equals sign on the displayName parameter is required.  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.
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.

  • 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"

Please feel free to ask any questions or offer feedback on this post.  If you need additional assistance, email us at support@onecloud.io.

Login to post a comment