Installing Agent on Cloud Servers

Created:2024-07-03 Last Modified:2024-08-23

This document was translated by ChatGPT

#1. Introduction

If you are not using K8s, this chapter will detail how to deploy the DeepFlow Agent on your cloud servers.

Once the DeepFlow Agent starts running on the cloud server, it will automatically and non-intrusively collect observability data (AutoMetrics, AutoTracing, AutoProfiling) from the applications on the cloud server and automatically inject cloud resource tags into all observability data (AutoTagging).

#2. Deployment Topology

Deployment Topology

Deployment Topology

#3. Pre-deployment Checks

Entering cloud platform information and successfully learning cloud server resources through the cloud platform API interface are prerequisites for deploying the DeepFlow Agent on cloud servers:

  • If the cloud platform has not been entered, please first enter the cloud platform and configure the correct cloud platform API connection information. Refer to the chapter Entering Cloud Platform in DeepFlow.
  • If the cloud platform has been entered, please check on the DeepFlow web page under Resources - Compute Resources - Cloud Servers by searching via IP to confirm whether the cloud server has been successfully learned. Refer to the steps in the image below:

Check Cloud Server List

Check Cloud Server List

#4. Deploying the Agent

#4.1 Obtain teamId

teamId is the Team ID, used to identify the organization to which the DeepFlow Agent belongs. Refer to the steps in the image below:

Obtain teamId (Team ID)

Obtain teamId (Team ID)

#4.2 Obtain agentGroupID

agentGroupId is the Collector Group ID, used to identify the collector group to which the DeepFlow Agent belongs. Refer to the steps in the image below:

Obtain agentGroupId (Collector Group ID)

Obtain agentGroupId (Collector Group ID)

提示

The purpose of creating a collector group is to configure different operating policies to facilitate the grouped management of DeepFlow Agent operating policies.

#4.3 Obtain Installation Package

For Docker environments, it is recommended to deploy using Docker Compose mode, which does not require manually obtaining the installation package.

For non-Docker environments, please contact Yunshan technical support to obtain the installation package.

#4.4 Install Agent Package

unzip deepflow-agent-rpm.zip  # please contact us
yum -y localinstall x86_64/deepflow-agent-1.0*.rpm
1
2
unzip deepflow-agent-deb.zip  # please contact us
dpkg -i x86_64/deepflow-agent-1.0*.systemd.deb
1
2
touch /etc/deepflow-agent.yaml

cat << EOF > deepflow-agent-docker-compose.yaml
version: '3.2'
services:
  deepflow-agent:
    image: hub.deepflow.yunshan.net/public/deepflow-agent:v6.5
    container_name: deepflow-agent
    restart: always
    #privileged: true  ## Docker version below 20.10.10 requires the opening of the privileged mode, See https://github.com/moby/moby/pull/42836
    cap_add:
      - SYS_ADMIN
      - SYS_RESOURCE
      - SYS_PTRACE
      - NET_ADMIN
      - NET_RAW
      - IPC_LOCK
      - SYSLOG
    volumes:
      - /etc/deepflow-agent.yaml:/etc/deepflow-agent/deepflow-agent.yaml:ro
      - /sys/kernel/debug:/sys/kernel/debug:ro
      - /var/run/docker.sock:/var/run/docker.sock
    network_mode: "host"
    pid: "host"
EOF

docker compose -f deepflow-agent-docker-compose.yaml up -d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

#4.5 Modify Agent Configuration File

Modify the DeepFlow Agent configuration file (default location: /etc/deepflow-agent.yaml)

controller-ips:
  - agent.cloud.deepflow.yunshan.net
vtap-group-id-request: 'g-xxxxxxxxxx' # FIXME: agent-group ID
team-id: 't-xxxxxxxxxx' # FIXME: Team ID
1
2
3
4

Explanation of key field values:

Field Purpose Value Exception Description
controller-ips Address of the DeepFlow Server that the DeepFlow Agent will connect to agent.cloud.deepflow.yunshan.net If this address is incorrect, the DeepFlow Agent will fail to register
teamId The Team ID, used by the DeepFlow Server to determine the organization to which the DeepFlow Agent belongs Obtained from DeepFlow page If this ID is incorrect, the DeepFlow Agent will fail to register
vtap-group-id-request The Collector Group ID, used by the DeepFlow Server to issue operating policies Obtained from DeepFlow page If this ID is invalid, the DeepFlow Server will issue the default group policy to the DeepFlow Agent

#4.6 Start Agent Service

systemctl enable deepflow-agent
systemctl restart deepflow-agent
1
2