Managing services with tctl commands


As an administrator, use the tctl commands to manage services. Services can be of the following types:

  • Global services: These services are enabled for all active tenants.
  • Tenant services: These services are enabled for specific tenants according to the tenant requirements, such as BMC Helix Operations Management. These services are automatically enabled for all active trial tenants. However, they are not automatically enabled for active licensed tenants.
  • External services: These services are not a part of the same Kubernetes cluster as that of BMC Helix IT Operations Management. For example, BMC IT Service Management may not be a part of the same cluster as that of BMC Helix IT Operations Management. These services are not automatically enabled for licensed or trial tenants.


To register a service

Use one of the following commands:

  • tctl create service -f <service json file>

    For this command, provide the complete path to the JSON file.

  • tctl create service -v <json payload with escaped quotes>

    For this command, use the JSON template directly by escaping the double quotation marks (\").


To register an external service

Use the following commands to register an external service; for example, the ITSM service:

tctl register service itsm


To activate a tenant service

Use the following command to activate a tenant service, for a tenant of the type license:

tctl activate service <tenantid> -i <serviceid>


To activate an external service

Use one of the following commands to activate an external service, for a tenant of the type license:

  • tctl activate service <tenantid> -i <serviceid> -f  <service json file>

    For this command, provide the complete path to the JSON file.

  • tctl activate service <tenantid> -i <serviceid> -v  <json payload with escaped quotes>

    For this command, use the JSON template directly by escaping the double quotation marks (\").



To update a service

Use one of the following commands to update a service:

  • tctl update service <service id> -f <service json file>

    For this command, provide the complete path to the JSON file.

  • tctl update service <service id> -v <service json content> 

    For this command, use the JSON template directly by escaping the double quotation marks (\").


To update a tenant service

Use one of the following commands to update a tenant service:

  • tctl update tenant-service <tenant id> -i <service id> -f <service json file>

    For this command, provide the complete path to the JSON file.

  • tctl update tenant-service <tenant id> -i <service id> -v <service json content> 

    For this command, use the JSON template directly by escaping the double quotation marks (\").


To list services

  • Use the following command to get the list of all registered services on a stack:

    tctl get service
  • Use the following command to get details of a service in the tabular format based on its service ID:

    tctl get service <service id>
  • Use the following command to get details of a service in the JSON format based on its service ID:

    tctl get service <service id> -o json
  • Use the following command to get details of all tenant services that are activated for a tenant:

    tctl get tenant-service <tenant id>


To merge a service

Use one of the following commands to merge a service:

  • tctl merge service -f <service json file>

    For this command, provide the complete path to the JSON file.

  • tctl merge service -v <service json content>   

    For this command, use the JSON template directly by escaping the double quotation marks (\").


To deactivate a tenant service

Use one of the following commands to deactivate a tenant service:

  • tctl update tenant-service <tenant id> -i <service id>  -f <service json file>

    For this command, provide the complete path to the JSON file.

  • tctl update tenant-service <tenant id> -i <service id> -v "{ \"status\": \"INACTIVE\" }"

    For this command, use the JSON template directly by escaping the double quotation marks (\").

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*