1、新增dump_rtp_pcap安装2、整合配置变量

This commit is contained in:
fumingwei
2021-04-25 17:19:23 +08:00
parent 6e495828f0
commit fb1c66c76c
11 changed files with 137 additions and 72 deletions

View File

@@ -90,6 +90,7 @@
roles:
- {role: framework, tags: framework}
- {role: packet_dump, tags: packet_dump}
- {role: dump_rtp_pcap, tags: dump_rtp_pcap}
- hosts: app_global
remote_user: root

View File

@@ -70,6 +70,9 @@ sapp:
send_only_threads_max: 1
bind_mask: 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,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43
inbound_route_dir: 1
prometheus_enable: 1
prometheus_port: 9273
prometheus_url_path: "/metrics"
########################################
#Kni Config
@@ -107,38 +110,42 @@ mrtunnat:
#########################################
#Tsg_app
tsg_app_enable: 0
app_global_ip: "1.1.1.1"
applog_level: 10
app_master_log_level: 10
app_sketch_local_log_level: 10
app_control_plug_log_level: 10
tsg_app:
enable: 0
breakpad_upload_url: http://10.4.63.4:9000/api/2/minidump/?sentry_key=3203b43fd5384a7dbe6a48ecb1f3c595
data_center: Kyzylorda
tsg_master_entrance_id: 9
nic_mgr:
name: em1
sapp_prometheus_enable: 1
sapp_prometheus_port: 9273
sapp_prometheus_url_path: "/metrics"
firewall:
hos_serverip: "192.168.40.223"
hos_serverport: 9098
hos_accesskeyid: "default"
hos_secretkey: "default"
hos_poolsize: 100
hos_thread_sum: 32
hos_cache_size: 102400
hos_fs2_serverip: "127.0.0.1"
hos_fs2_serverport: 10086
APP_SKETCH_LOG_LEVEL: 10
APP_SKETCH_LOG_PATH: "./tsglog/app_sketch_local/app_sketch_local"
APP_SKETCH_L7_PROTOCOL_LABEL: "BASIC_PROTO_LABEL"
APP_SKETCH_QOS: 1
APP_SKETCH_PUBLISH_TOPIC: "APP_SIGNATURE_ID"
APP_SKETCH_BROKER_LIST: "tcp://192.168.40.161:1883"
hos_serverip: "192.168.40.223"
hos_serverport: 9098
hos_accesskeyid: "default"
hos_secretkey: "default"
hos_poolsize: 100
hos_thread_sum: 32
hos_cache_size: 102400
hos_fs2_serverip: "127.0.0.1"
hos_fs2_serverport: 10086
APP_SKETCH_LOG_LEVEL: 10
APP_SKETCH_LOG_PATH: "./tsglog/app_sketch_local/app_sketch_local"
APP_SKETCH_L7_PROTOCOL_LABEL: "BASIC_PROTO_LABEL"
APP_SKETCH_QOS: 1
APP_SKETCH_PUBLISH_TOPIC: "APP_SIGNATURE_ID"
APP_SKETCH_BROKER_LIST: "tcp://192.168.40.161:1883"
dump_rtp_pcap:
aws_access_key_id: "default"
aws_secret_access_key: "default"
aws_session_token: "c21f969b5f03d33d43e04f8f136e7682"
consume_bootstrap_servers: ['192.168.44.14:9092']
endpoint_url: "http://192.168.44.67:9098/hos/"
produce_bootstrap_servers: "192.168.44.14:9092"
queue_size: 5000000
coroutine_max_num: 200
coroutine_num: 100
qfull_mode: 0
qfull_interval: 5

View File

@@ -81,6 +81,10 @@ sapp:
send_only_threads_max: 1
bind_mask: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24
inbound_route_dir: 1
prometheus_enable: 1
prometheus_port: 9273
prometheus_url_path: "/metrics"
#########################################
#Sapp Double-Arm Config
@@ -121,12 +125,8 @@ mrtunnat:
#########################################
#Tsg_app
tsg_app_enable: 1
app_global_ip: "1.1.1.1"
applog_level: 10
app_master_log_level: 10
app_sketch_local_log_level: 10
app_control_plug_log_level: 10
tsg_app:
enable: 1
#########################################
#ATCA Config
@@ -162,23 +162,34 @@ breakpad_upload_url: http://127.0.0.1:9000/api/2/minidump/?sentry_key=3556bac347
data_center: Beijing
tsg_master_entrance_id: 0
sapp_prometheus_enable: 1
sapp_prometheus_port: 9273
sapp_prometheus_url_path: "/metrics"
hos_serverip: "192.168.40.223"
hos_serverport: 9098
hos_accesskeyid: "default"
hos_secretkey: "default"
hos_poolsize: 100
hos_thread_sum: 32
hos_cache_size: 102400
hos_fs2_serverip: "127.0.0.1"
hos_fs2_serverport: 10086
firewall:
hos_serverip: "192.168.40.223"
hos_serverport: 9098
hos_accesskeyid: "default"
hos_secretkey: "default"
hos_poolsize: 100
hos_thread_sum: 32
hos_cache_size: 102400
hos_fs2_serverip: "127.0.0.1"
hos_fs2_serverport: 10086
APP_SKETCH_LOG_LEVEL: 10
APP_SKETCH_LOG_PATH: "./tsglog/app_sketch_local/app_sketch_local"
APP_SKETCH_L7_PROTOCOL_LABEL: "BASIC_PROTO_LABEL"
APP_SKETCH_QOS: 1
APP_SKETCH_PUBLISH_TOPIC: "APP_SIGNATURE_ID"
APP_SKETCH_BROKER_LIST: "tcp://192.168.40.161:1883"
APP_SKETCH_LOG_LEVEL: 10
APP_SKETCH_LOG_PATH: "./tsglog/app_sketch_local/app_sketch_local"
APP_SKETCH_L7_PROTOCOL_LABEL: "BASIC_PROTO_LABEL"
APP_SKETCH_QOS: 1
APP_SKETCH_PUBLISH_TOPIC: "APP_SIGNATURE_ID"
APP_SKETCH_BROKER_LIST: "tcp://192.168.40.161:1883"
dump_rtp_pcap:
aws_access_key_id: "default"
aws_secret_access_key: "default"
aws_session_token: "c21f969b5f03d33d43e04f8f136e7682"
consume_bootstrap_servers: ['192.168.44.14:9092']
endpoint_url: "http://192.168.44.67:9098/hos/"
produce_bootstrap_servers: "192.168.44.14:9092"
queue_size: 5000000
coroutine_max_num: 200
coroutine_num: 100
qfull_mode: 0
qfull_interval: 5

View File

@@ -0,0 +1,22 @@
- name: "dump-rtp-pcap: copy dump-rtp-pcap rpm package to destination"
copy:
src: "{{ role_path }}/files/"
dest: /tmp/ansible_deploy/
- name: "dump-rtp-pcap: install dump-rtp-pcap rpm from localhost"
yum:
name:
- /tmp/ansible_deploy/dump_rtp_pcap-1.0.2.445da24-2.el7.x86_64.rpm
state: present
- name: "dump-rtp-pcap: Template the dump_rtp_pcap.json"
template:
src: "{{ role_path }}/templates/dump_rtp_pcap.json.j2"
dest: /home/mesasoft/dump_rtp_pcap/dump_rtp_pcap.json
tags: template
- name: "start dump_rtp_pcap"
systemd:
name: dump_rtp_pcap.service
enabled: yes
daemon_reload: yes

View File

@@ -0,0 +1,23 @@
{
"endian":"little",
"aws_access_key_id": "{{ dump_rtp_pcap.aws_access_key_id }}",
"aws_secret_access_key": "{{ dump_rtp_pcap.aws_secret_access_key }}",
"aws_session_token": "{{ dump_rtp_pcap.aws_session_token }}",
"bucket_name": "rtp-log",
"consume_auto_offset_reset":"latest",
"consume_bootstrap_servers": ["{{ dump_rtp_pcap.consume_bootstrap_servers | join("\",\"") }}"],
"consume_topic": "INTERNAL-RTP-LOG",
"endpoint_url": "{{ dump_rtp_pcap.endpoint_url }}",
"file_prefix":"rtp_log",
"group_id": "rtp-log-1",
"produce_bootstrap_servers": "{{ dump_rtp_pcap.produce_bootstrap_servers }}",
"produce_topic": "VOIP-RECORD-LOG",
"region_name": "us-east-1",
"save_speed_emit_interval":30,
"upload_speed_emit_interval":30,
"queue_size":{{ dump_rtp_pcap.queue_size }},
"coroutine_max_num":{{ dump_rtp_pcap.coroutine_max_num }},
"coroutine_num":{{ dump_rtp_pcap.coroutine_num }},
"qfull_mode":{{ dump_rtp_pcap.qfull_mode }},
"qfull_interval":{{ dump_rtp_pcap.qfull_interval }}
}

View File

@@ -73,23 +73,23 @@ log_service=2
[HOS_CONF]
hos_serverip="{{ hos_serverip }}"
hos_serverport={{ hos_serverport }}
hos_accesskeyid="{{ hos_accesskeyid }}"
hos_secretkey="{{ hos_secretkey }}"
hos_poolsize={{ hos_poolsize }}
hos_thread_sum={{ hos_thread_sum }}
hos_cache_size={{ hos_cache_size }}
hos_fs2_serverip="{{ hos_fs2_serverip }}"
hos_fs2_serverport={{ hos_fs2_serverport }}
hos_serverip="{{ firewall.hos_serverip }}"
hos_serverport={{ firewall.hos_serverport }}
hos_accesskeyid="{{ firewall.hos_accesskeyid }}"
hos_secretkey="{{ firewall.hos_secretkey }}"
hos_poolsize={{ firewall.hos_poolsize }}
hos_thread_sum={{ firewall.hos_thread_sum }}
hos_cache_size={{ firewall.hos_cache_size }}
hos_fs2_serverip="{{ firewall.hos_fs2_serverip }}"
hos_fs2_serverport={{ firewall.hos_fs2_serverport }}
[APP_SKETCH_LOCAL]
LOG_LEVEL={{ APP_SKETCH_LOG_LEVEL }}
LOG_PATH="{{ APP_SKETCH_LOG_PATH }}"
L7_PROTOCOL_LABEL="{{ APP_SKETCH_L7_PROTOCOL_LABEL }}"
LOG_LEVEL={{ firewall.APP_SKETCH_LOG_LEVEL }}
LOG_PATH="{{ firewall.APP_SKETCH_LOG_PATH }}"
L7_PROTOCOL_LABEL="{{ firewall.APP_SKETCH_L7_PROTOCOL_LABEL }}"
[APP_SKETCH_FEEDBACK]
QOS={{ APP_SKETCH_QOS }}
PUBLISH_TOPIC="{{ APP_SKETCH_PUBLISH_TOPIC }}"
QOS={{ firewall.APP_SKETCH_QOS }}
PUBLISH_TOPIC="{{ firewall.APP_SKETCH_PUBLISH_TOPIC }}"
#CLIENT_ID=
BROKER_LIST="{{ APP_SKETCH_BROKER_LIST }}"
BROKER_LIST="{{ firewall.APP_SKETCH_BROKER_LIST }}"

View File

@@ -8,7 +8,7 @@
{% endif %}
./plug/platform/app_proto_identify/app_proto_identify.inf
./plug/platform/tsg_master/tsg_master.inf
{% if tsg_app_enable == 1 %}
{% if tsg_app.enable == 1 %}
./plug/platform/app_master/app_master.inf
{% endif %}
@@ -32,7 +32,7 @@
./plug/business/fw_ftp_plug/fw_ftp_plug.inf
./plug/business/fw_quic_plug/fw_quic_plug.inf
./plug/business/conn_telemetry/conn_telemetry.inf
{% if tsg_app_enable == 1 %}
{% if tsg_app.enable == 1 %}
./plug/business/app_sketch_local/app_sketch_local.inf
{% endif %}
{% if tsg_access_type == 2 %}

View File

@@ -189,9 +189,9 @@ dictator_enable=0
app_name=sapp
[profiling.log.prometheus]
prometheus_enabled={{ sapp_prometheus_enable }}
prometheus_port={{ sapp_prometheus_port }}
prometheus_url_path="{{ sapp_prometheus_url_path }}"
prometheus_enabled={{ sapp.prometheus_enable }}
prometheus_port={{ sapp.prometheus_port }}
prometheus_url_path="{{ sapp.prometheus_url_path }}"
[TOOLS]
[tools.pkt_dump]

View File

@@ -12,5 +12,5 @@
vars:
app_packages:
- /tmp/ansible_deploy/app_sketch_local-2.0.5.ff1622f-2.el7.x86_64.rpm
when: tsg_app_enable == 1
when: tsg_app.enable == 1

View File

@@ -27,6 +27,7 @@
roles:
- {role: framework, tags: framework}
- {role: packet_dump, tags: packet_dump}
- {role: dump_rtp_pcap, tags: dump_rtp_pcap}
- hosts: app_global
remote_user: root