Configuring Clusters
The following section explains how to configure the cluster for your specific deployment.
Kubernetes Cluster
On K8S Cluster:
- Get the service name using the command:
kubectl get svc
- 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 - 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
- Follow these additional sub-steps:
- List the running pods using the command:
kubectl get pods
- Connect to the tml-cm pod using the command:
kubectl exec -it {tml-cm-pod-name} bash
- 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" }
- 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
- List the running pods using the command:
- 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:
- 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 '"'
- Connect to tml-cm container:
- List the running containers:
docker ps
- Connect to tml-cm container:
docker exec -it {tml-cm-container-name} bash
- 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" }
- Configure the tml-log service to send data to the tml-reporting pod:
cm import config --componentType logservice --file /home/builder/reporting-property.json
- List the running containers:
- 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
- Get the service name using the command:
oc get svc
- 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. - 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
- Follow these additional sub-steps:
- List the running pods using the command:
oc get pods
- Connect to tml-pod using the command:
oc exec -it {tml-cm-pod-name} bash
- 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" }
- Configure the tml-log service to send data to the tml-reporting pod:
cm import config --componentType logservice --file /home/builder/reporting-property.json
- List the running pods using the command:
- 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
Copyright © 2022. Cloud Software Group, Inc. All Rights Reserved.