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 <complete path to the service JSON file>
  • tctl create service -v <json payload with escaped quotes>

    Use the JSON template directly with escape character and double quotation marks (\").


To register an external service

Use the following command 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 <tenant id> -i <service id>


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 <tenant id> -i <service id> -f <complete path to the service JSON file>
  • tctl activate service <tenant id> -i <service id> -v <json payload with escaped quotes>

    Use the JSON template directly with escape character and double quotation marks (\").


To update a service

Use one of the following commands:

  • tctl update service <service id> -f <complete path to the service JSON file>
  • tctl update service <service id> -v <service json content> 

    Use the JSON template directly with escape character and double quotation marks (\").


To update a tenant service

Use one of the following commands:

  • tctl update tenant-service <tenant id> -i <service id> -f <complete path to the service JSON file>
  • tctl update tenant-service <tenant id> -i <service id> -v <service json content> 

    Use the JSON template directly with escape character and double quotation marks (\").


To list services

Use the following command:

  • To get the list of all registered services on a stack:

    tctl get service
  • To get details of a service in the tabular format based on its service ID:

    tctl get service <service id>
  • To get details of a service in the JSON format based on its service ID:

    tctl get service <service id> -o json
  • 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:

  • tctl merge service -f <complete path to the service JSON file>
  • tctl merge service -v <service json content>   

    Use the JSON template directly with escape character and double quotation marks (\").


To deactivate a tenant service

Use one of the following commands:

  • tctl update tenant-service <tenant id> -i <service id>  -f <complete path to the service JSON file>
  • tctl update tenant-service <tenant id> -i <service id> -v "{ \"status\": \"INACTIVE\" }"

    Use the JSON template directly with escape character and double quotation marks (\").



 

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