Configuring Clusters

The following section explains how to configure the cluster for your specific deployment.

Kubernetes Cluster

On K8S Cluster:
  1. Get the service name using the command:
    kubectl get svc
  2. Get the reporting service name and form below complete service url.
    The Reporting service DNS name is based on the zone and namespace in which the reporting pod is deployed. It should be in the following format:
    <pod-name>.<reporting-svc-name>.<namespace>.svc.<domain-name>
    For example, if the reporting pod is deployed in "tml540" namespace and domain name for your cluster is "cluster.local" and reporting pod would always be deployed in first zone, so the pod name and service name are going to be reporting-set-0-0 and reporting-svc-0 repectively, then reporting service DNS would be: reporting-set-0-0.reporting-svc-0.tml540.svc.cluster.local
  3. Verify that the above URL is reachable from the CM pod in each zone. For example:
    ping reporting-set-0-0.reporting-svc-0.tml540.svc.cluster.local
  4. Follow these additional sub-steps:
    1. List the running pods using the command:
      kubectl get pods
    2. Connect to the tml-cm pod using the command:
      kubectl exec -it {tml-cm-pod-name} bash
    3. Prepare the reporting-property.json file at /home/builder location with the following content:
      {
       "td_agent_container_output_channelType" : "FORWARD",
       "td_agent_metric_output_channelType" : "FORWARD",
       "td_agent_verbose_output_channelType" : "FORWARD",
       "td_agent_output_channelType" : "FORWARD",
       "td_agent_out_forward_servers" : "<Reporting service name>:24224",
       "td_agent_out_metric_forward_servers" : "<Reporting service name>:24225",
       "td_agent_out_container_forward_servers" : "<Reporting service name>:24226",
       "td_agent_out_verbose_forward_servers" : "<Reporting service name>:24227"
      }
    4. Configure the tml-log service to send data to the tml-reporting pod using the command:
      cm import config --componentType logservice --file /home/builder/reporting-property.json
  5. You should see the log service geting reconfigured as shown below:
    cm import config --componentType logservice --file /home/builder/reporting.json
    Using cluster [clustername]
    Using Zone [us-east-1c]
    Component ID                          Type            Name                                                                   Status          Last Heartbeat Received     Host            Service Port(s)           
    ------------------------------------- --------------- ---------------------------------------------------------------------- --------------- --------------------------- --------------- ---------------------------
    8c425111-eb3f-4964-86dc-60f145f43790  logservice      log-set-1-0.log-svc-1.default.svc.cluster.local                        ACTIVE          Feb 09 2021 04:48:24 +0000  192.168.35.203  24224                     
    a8458d2b-69d3-40c4-9c65-d58ef2932a8a  logservice      log-set-1-1.log-svc-1.default.svc.cluster.local                        ACTIVE          Feb 09 2021 04:48:16 +0000  192.168.33.82   24224                     
    Updating the TMGC after the change
    Successfully updated the TMGC component 8c425111-eb3f-4964-86dc-60f145f43790 for components of type logservice
    Updating the TMGC after the change
    Successfully updated the TMGC component a8458d2b-69d3-40c4-9c65-d58ef2932a8a for components of type logservice
    Successfully imported configuration properties for the scope map[zone:us-east-1c] for components of type logservice

Swarm Cluster

On Swarm Cluster:
  1. Get the IP of reporting container using the command:
    docker inspect {reporting_container_name} | jq ".[0].NetworkSettings.Networks.${overlay_network}.IPAMConfig.IPv4Address" | tr -d '"'
    For example, in our default confguration, overlay network would be ml5:
    docker inspect {reporting_container_name} | jq ".[0].NetworkSettings.Networks.ml5.IPAMConfig.IPv4Address" | tr -d '"'
  2. Connect to tml-cm container:
    1. List the running containers:
      docker ps
    2. Connect to tml-cm container:
      docker exec -it {tml-cm-container-name} bash
    3. Prepare the reporting-property.json file at /home/builder location with the following content:
      {
       "td_agent_container_output_channelType" : "FORWARD",
       "td_agent_metric_output_channelType" : "FORWARD",
       "td_agent_verbose_output_channelType" : "FORWARD",
       "td_agent_output_channelType" : "FORWARD",
       "td_agent_out_forward_servers" : "<Reporting_container_ip>:24224",
       "td_agent_out_metric_forward_servers" : "<Reporting_container_ip>:24225",
       "td_agent_out_container_forward_servers" : "<Reporting_container_ip>:24226",
       "td_agent_out_verbose_forward_servers" : "<Reporting_container_ip>:24227"
      }
    4. Configure the tml-log service to send data to the tml-reporting pod:
      cm import config --componentType logservice --file /home/builder/reporting-property.json
  3. You should see the log service getting reconfigured as shown below:
    cm import config --componentType logservice --file /home/builder/reporting.json
    Using cluster [clustername]
    Using Zone [us-east-1c]
    Component ID                          Type            Name                                                                   Status          Last Heartbeat Received     Host            Service Port(s)           
    ------------------------------------- --------------- ---------------------------------------------------------------------- --------------- --------------------------- --------------- ---------------------------
    8c425111-eb3f-4964-86dc-60f145f43790  logservice      log-set-1-0.log-svc-1.default.svc.cluster.local                        ACTIVE          Feb 09 2021 04:48:24 +0000  192.168.35.203  24224                     
    a8458d2b-69d3-40c4-9c65-d58ef2932a8a  logservice      log-set-1-1.log-svc-1.default.svc.cluster.local                        ACTIVE          Feb 09 2021 04:48:16 +0000  192.168.33.82   24224                     
    Updating the TMGC after the change
    Successfully updated the TMGC component 8c425111-eb3f-4964-86dc-60f145f43790 for components of type logservice
    Updating the TMGC after the change
    Successfully updated the TMGC component a8458d2b-69d3-40c4-9c65-d58ef2932a8a for components of type logservice
    Successfully imported configuration properties for the scope map[zone:us-east-1c] for components of type logservice
    

On OpenShift Cluster

  1. Get the service name using the command:
    oc get svc
  2. Get the Reporting Services name and fully formed qualified service URL.
    The Reporting Services DNS name is based on the zone and namespace in which the reporting pod is deployed. It should be in the following format:
    <pod-name>.<reporting-svc-name>.<namespace>.svc.<domain-name>
    For example, if the reporting pod is deployed in "tml540" namespace (it can be project name) and domain name for your cluster is "cluster.local" and reporting pod would always be deployed in first zone, so the pod name and service name are going to be reporting-set-0-0 and reporting-svc-0 repectively, then the Reporting Service DNS would be: reporting-set-0-0.reporting-svc-0.tml540.svc.cluster.local.
  3. Verify that the above service URL is reachable from the CM pod in each zone:. For example:
    ping reporting-set-0-0.reporting-svc-0.tml540.svc.cluster.local
  4. Follow these additional sub-steps:
    1. List the running pods using the command:
      oc get pods
    2. Connect to tml-pod using the command:
      oc exec -it {tml-cm-pod-name} bash
    3. Prepare the reporting-property.json file at /home/builder location with the following content:
      {
       "td_agent_container_output_channelType" : "FORWARD",
       "td_agent_metric_output_channelType" : "FORWARD",
       "td_agent_verbose_output_channelType" : "FORWARD",
       "td_agent_output_channelType" : "FORWARD",
       "td_agent_out_forward_servers" : "<Reporting_service_name>:24224",
       "td_agent_out_metric_forward_servers" : "<Reporting_service_name>:24225",
       "td_agent_out_container_forward_servers" : "<Reporting_service_name>:24226",
       "td_agent_out_verbose_forward_servers" : "<Reporting_service_name>:24227"
      }
    4. Configure the tml-log service to send data to the tml-reporting pod:
      cm import config --componentType logservice --file /home/builder/reporting-property.json
  5. You should see the log service getting reconfigured as shown below:
    cm import config --componentType logservice --file /home/builder/reporting.json
    Using cluster [clustername]
    Using Zone [us-east-1c]
    Component ID                          Type            Name                                                                   Status          Last Heartbeat Received     Host            Service Port(s)           
    ------------------------------------- --------------- ---------------------------------------------------------------------- --------------- --------------------------- --------------- ---------------------------
    8c425111-eb3f-4964-86dc-60f145f43790  logservice      log-set-1-0.log-svc-1.default.svc.cluster.local                        ACTIVE          Feb 09 2021 04:48:24 +0000  192.168.35.203  24224                     
    a8458d2b-69d3-40c4-9c65-d58ef2932a8a  logservice      log-set-1-1.log-svc-1.default.svc.cluster.local                        ACTIVE          Feb 09 2021 04:48:16 +0000  192.168.33.82   24224                     
    Updating the TMGC after the change
    Successfully updated the TMGC component 8c425111-eb3f-4964-86dc-60f145f43790 for components of type logservice
    Updating the TMGC after the change
    Successfully updated the TMGC component a8458d2b-69d3-40c4-9c65-d58ef2932a8a for components of type logservice
    Successfully imported configuration properties for the scope map[zone:us-east-1c] for components of type logservice