TSG v21.02.
This commit is contained in:
BIN
roles/toroad/files/rpm/toroad-1.1.11.b0562a5-2.el7.x86_64.rpm
Normal file
BIN
roles/toroad/files/rpm/toroad-1.1.11.b0562a5-2.el7.x86_64.rpm
Normal file
Binary file not shown.
Binary file not shown.
12
roles/toroad/files/service/toroad.service
Normal file
12
roles/toroad/files/service/toroad.service
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=toroad service
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=/opt/wannat/toroad
|
||||||
|
ExecStart=/opt/wannat/toroad/toroad
|
||||||
|
Restart=always
|
||||||
|
RestartSec=5s
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
- name: "copy toroad_rpm_file to destination server"
|
- name: "copy toroad_rpm_file to destination server"
|
||||||
synchronize:
|
synchronize:
|
||||||
src: "{{ role_path }}/files/rpm/{{ wangw_global.rpm_files.toroad_rpm_file }}"
|
src: "{{ role_path }}/files/rpm/{{ wangw_global.rpm_files.toroad_rpm_file }}"
|
||||||
dest: "/tmp/wannat_deploy/"
|
dest: "/tmp/"
|
||||||
|
|
||||||
- name: "Creates /opt/wannat/toroad/etc directory"
|
- name: "Creates /opt/wannat/toroad/etc directory"
|
||||||
file:
|
file:
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
state: present
|
state: present
|
||||||
vars:
|
vars:
|
||||||
packages:
|
packages:
|
||||||
- /tmp/wannat_deploy/{{ wangw_global.rpm_files.toroad_rpm_file }}
|
- /tmp/{{ wangw_global.rpm_files.toroad_rpm_file }}
|
||||||
|
|
||||||
- name: "Template the toroad.conf"
|
- name: "Template the toroad.conf"
|
||||||
template:
|
template:
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
[main]
|
[main]
|
||||||
http_server_listen_port=8888
|
http_server_listen_port={{wangw_global.wiregraft.toroad_server_port}}
|
||||||
wangw_ip_list_file=wangw_ip_list_file.conf
|
|
||||||
probe_pkt_timeout=1
|
probe_pkt_timeout=1
|
||||||
probe_retry_times=2
|
probe_retry_times=5
|
||||||
|
|
||||||
|
|
||||||
[runtime_log]
|
[runtime_log]
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
#WANGW ip_address, per line
|
|
||||||
192.168.40.137
|
|
||||||
Binary file not shown.
BIN
roles/wangw/files/rpm/libwangw-1.2.0.7322d17-2.el7.x86_64.rpm
Normal file
BIN
roles/wangw/files/rpm/libwangw-1.2.0.7322d17-2.el7.x86_64.rpm
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2,17 +2,7 @@
|
|||||||
- name: "copy wangw_rpm_file to destination server"
|
- name: "copy wangw_rpm_file to destination server"
|
||||||
synchronize:
|
synchronize:
|
||||||
src: "{{ role_path }}/files/rpm/{{ wangw_global.rpm_files.wangw_rpm_file }}"
|
src: "{{ role_path }}/files/rpm/{{ wangw_global.rpm_files.wangw_rpm_file }}"
|
||||||
dest: "/tmp/wannat_deploy/"
|
dest: "/tmp/"
|
||||||
|
|
||||||
- name: "copy wiregraft_rpm_file to destination server"
|
|
||||||
synchronize:
|
|
||||||
src: "{{ role_path }}/files/rpm/{{ wangw_global.rpm_files.wire_graft_rpm_file }}"
|
|
||||||
dest: "/tmp/wannat_deploy/"
|
|
||||||
|
|
||||||
- name: "copy wiregraft_devel_rpm_file to destination server"
|
|
||||||
synchronize:
|
|
||||||
src: "{{ role_path }}/files/rpm/{{ wangw_global.rpm_files.wire_graft_devel_rpm_file }}"
|
|
||||||
dest: "/tmp/wannat_deploy/"
|
|
||||||
|
|
||||||
- name: "install wangw"
|
- name: "install wangw"
|
||||||
yum:
|
yum:
|
||||||
@@ -20,33 +10,12 @@
|
|||||||
state: present
|
state: present
|
||||||
vars:
|
vars:
|
||||||
packages:
|
packages:
|
||||||
- /tmp/wannat_deploy/{{ wangw_global.rpm_files.wangw_rpm_file }}
|
- /tmp/{{ wangw_global.rpm_files.wangw_rpm_file }}
|
||||||
|
|
||||||
- name: "install wiregraft"
|
|
||||||
yum:
|
|
||||||
name: "{{ packages }}"
|
|
||||||
state: present
|
|
||||||
vars:
|
|
||||||
packages:
|
|
||||||
- /tmp/wannat_deploy/{{ wangw_global.rpm_files.wire_graft_rpm_file }}
|
|
||||||
|
|
||||||
- name: "install wiregraft_devel"
|
|
||||||
yum:
|
|
||||||
name: "{{ packages }}"
|
|
||||||
state: present
|
|
||||||
vars:
|
|
||||||
packages:
|
|
||||||
- /tmp/wannat_deploy/{{ wangw_global.rpm_files.wire_graft_devel_rpm_file }}
|
|
||||||
|
|
||||||
- name: "Creates ./etc/wannat directory"
|
- name: "Creates ./etc/wannat directory"
|
||||||
file:
|
file:
|
||||||
path: /home/mesasoft/sapp_run/etc/wannat
|
path: /home/mesasoft/sapp_run/etc/wannat
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: "Creates ./etc/wire_graft directory"
|
|
||||||
file:
|
|
||||||
path: /home/mesasoft/sapp_run/etc/wire_graft
|
|
||||||
state: directory
|
|
||||||
|
|
||||||
- name: "Template the wangw.conf"
|
- name: "Template the wangw.conf"
|
||||||
template:
|
template:
|
||||||
@@ -54,8 +23,3 @@
|
|||||||
dest: /home/mesasoft/sapp_run/etc/wannat/wangw.conf
|
dest: /home/mesasoft/sapp_run/etc/wannat/wangw.conf
|
||||||
tags: template
|
tags: template
|
||||||
|
|
||||||
- name: "Template the wire_graft.conf"
|
|
||||||
template:
|
|
||||||
src: "{{ role_path }}/templates/wire_graft.conf.j2"
|
|
||||||
dest: /home/mesasoft/sapp_run/etc/wire_graft/wire_graft.conf
|
|
||||||
tags: template
|
|
||||||
|
|||||||
@@ -2,6 +2,12 @@
|
|||||||
#在线模式用vxlan, 测试模式用ethernet, 即标准ethernet/IP协议
|
#在线模式用vxlan, 测试模式用ethernet, 即标准ethernet/IP协议
|
||||||
NAT_GW_tunnel_mode=vxlan
|
NAT_GW_tunnel_mode=vxlan
|
||||||
|
|
||||||
|
#本地监听端口
|
||||||
|
NAT_GW_tunnel_recv_port={{wangw_global.wangw.NAT_GW_tunnel_listen_port}}
|
||||||
|
|
||||||
|
#DNAT首包发送给NATGW时, 对端的监听端口
|
||||||
|
NAT_GW_tunnel_send_port={{wangw_global.wangw.NAT_GW_tunnel_remote_port}}
|
||||||
|
|
||||||
#NAT GW的内部互联网卡名称
|
#NAT GW的内部互联网卡名称
|
||||||
NAT_GW_tunnel_device={{wangw_global.wangw.NAT_GW_tunnel_device}}
|
NAT_GW_tunnel_device={{wangw_global.wangw.NAT_GW_tunnel_device}}
|
||||||
|
|
||||||
@@ -12,8 +18,13 @@ NAT_GW_tunnel_ip={{wangw_global.wangw.NAT_GW_tunnel_ip}}
|
|||||||
#接收来自NAT GW的包, 需要创建sapp的独立发包线程, 目前暂时只支持1个.
|
#接收来自NAT GW的包, 需要创建sapp的独立发包线程, 目前暂时只支持1个.
|
||||||
I2E_independent_thread_num=1
|
I2E_independent_thread_num=1
|
||||||
|
|
||||||
[session]
|
#重复流量识别
|
||||||
|
duplicate_pkt_prune=1
|
||||||
|
|
||||||
|
[pkt_dump]
|
||||||
|
command_port=1234
|
||||||
|
|
||||||
|
[session]
|
||||||
#最大并发连接数
|
#最大并发连接数
|
||||||
max_session_num=100000
|
max_session_num=100000
|
||||||
|
|
||||||
@@ -23,7 +34,7 @@ no_pkt_timeout=60
|
|||||||
|
|
||||||
[runtime_log]
|
[runtime_log]
|
||||||
log_file=./wannat_log/wannat.log
|
log_file=./wannat_log/wannat.log
|
||||||
log_level=10
|
log_level=30
|
||||||
|
|
||||||
[field_stat2]
|
[field_stat2]
|
||||||
Fs2_log_local_dir_path=./wannat_log
|
Fs2_log_local_dir_path=./wannat_log
|
||||||
@@ -44,9 +55,10 @@ redis_server_ip={{wangw_global.wangw.redis_server_ip}}
|
|||||||
redis_server_port={{wangw_global.wangw.redis_server_port}}
|
redis_server_port={{wangw_global.wangw.redis_server_port}}
|
||||||
redis_index={{wangw_global.wangw.redis_index}}
|
redis_index={{wangw_global.wangw.redis_index}}
|
||||||
|
|
||||||
[no_nat_gw_selt_test]
|
[no_nat_gw_self_test]
|
||||||
test_eth_mode_nat_type=snat
|
test_eth_mode_nat_type=snat
|
||||||
test_eth_mode_vlink_id=0
|
test_eth_mode_vlink_id=0
|
||||||
test_eth_mode_link_dir=E
|
test_eth_mode_link_dir=E
|
||||||
test_eth_bpf="port 80"
|
test_eth_bpf="port 80"
|
||||||
|
test_linkinfo_file=./etc/wannat/self_test.linkinfo
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
31
roles/wire_graft/tasks/main.yml
Normal file
31
roles/wire_graft/tasks/main.yml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
- name: "Creates ./etc/wire_graft directory"
|
||||||
|
file:
|
||||||
|
path: /home/mesasoft/sapp_run/etc/wire_graft
|
||||||
|
state: directory
|
||||||
|
|
||||||
|
- name: "copy wiregraft_rpm_file to destination server"
|
||||||
|
synchronize:
|
||||||
|
src: "{{ role_path }}/files/rpm/{{ wangw_global.rpm_files.wire_graft_rpm_file }}"
|
||||||
|
dest: "/tmp/"
|
||||||
|
|
||||||
|
- name: "install wiregraft"
|
||||||
|
yum:
|
||||||
|
name: "{{ packages }}"
|
||||||
|
state: present
|
||||||
|
vars:
|
||||||
|
packages:
|
||||||
|
- /tmp/{{ wangw_global.rpm_files.wire_graft_rpm_file }}
|
||||||
|
|
||||||
|
- name: "Template the wire_graft.inf"
|
||||||
|
template:
|
||||||
|
src: "{{ role_path }}/templates/wire_graft.inf.j2"
|
||||||
|
dest: /home/mesasoft/sapp_wannat/plug/platform/wire_graft/wire_graft.inf
|
||||||
|
tags: template
|
||||||
|
|
||||||
|
- name: "Template the wire_graft.conf"
|
||||||
|
template:
|
||||||
|
src: "{{ role_path }}/templates/wire_graft.conf.j2"
|
||||||
|
dest: /home/mesasoft/sapp_run/etc/wire_graft/wire_graft.conf
|
||||||
|
tags: template
|
||||||
|
|
||||||
@@ -2,18 +2,18 @@
|
|||||||
|
|
||||||
[record_link_info]
|
[record_link_info]
|
||||||
stream_project_tag_enable=1
|
stream_project_tag_enable=1
|
||||||
|
link_info_prune=1
|
||||||
#用于标识本机ip使用哪块网卡,可能是管理口,可能是其他业务口
|
#用于标识本机ip使用哪块网卡,可能是管理口,可能是其他业务口
|
||||||
identification_by_which_device={{wangw_global.wiregraft.identification_by_which_device}}
|
identification_by_which_device={{wangw_global.wiregraft.identification_by_which_device}}
|
||||||
|
|
||||||
#单个流超过此包数的才发送链路信息, 防止遭受ddos攻击疯狂发日志
|
#单个流超过此包数的才发送链路信息, 防止遭受ddos攻击疯狂发日志
|
||||||
at_least_total_num=3
|
at_least_total_num=2
|
||||||
at_least_total_byte=5
|
at_least_total_byte=10
|
||||||
|
|
||||||
[toroad]
|
[toroad]
|
||||||
sendto_toroad_enable=1
|
sendto_toroad_enable=1
|
||||||
toroad_ip={{wangw_global.wiregraft.toroad_server_ip}}
|
toroad_ip={{wangw_global.wiregraft.toroad_server_ip}}
|
||||||
toroad_port=8888
|
toroad_port={{wangw_global.wiregraft.toroad_server_port}}
|
||||||
|
|
||||||
[log]
|
[log]
|
||||||
log_level=30
|
log_level=30
|
||||||
12
roles/wire_graft/templates/wire_graft.inf.j2
Normal file
12
roles/wire_graft/templates/wire_graft.inf.j2
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[PLUGINFO]
|
||||||
|
PLUGNAME=wire_graft
|
||||||
|
SO_PATH=./plug/platform/wire_graft/libwire_graft.so
|
||||||
|
INIT_FUNC=wire_graft_init
|
||||||
|
|
||||||
|
[TCP_RAW]
|
||||||
|
FUNC_FLAG=ALL
|
||||||
|
FUNC_NAME=record_link_info_entry_raw
|
||||||
|
|
||||||
|
#[POLLING]
|
||||||
|
#FUNC_FLAG=ALL
|
||||||
|
#FUNC_NAME=wire_graft_polling_cb
|
||||||
Binary file not shown.
24
roles/wire_graft_devel/tasks/main.yml
Normal file
24
roles/wire_graft_devel/tasks/main.yml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
- name: "Creates /opt/MESA/lib directory"
|
||||||
|
file:
|
||||||
|
path: /opt/MESA/lib
|
||||||
|
state: directory
|
||||||
|
|
||||||
|
- name: "copy wiregraft_devel_rpm_file to destination server"
|
||||||
|
synchronize:
|
||||||
|
src: "{{ role_path }}/files/rpm/{{ wangw_global.rpm_files.wire_graft_devel_rpm_file }}"
|
||||||
|
dest: "/tmp/"
|
||||||
|
|
||||||
|
- name: "install wiregraft_devel"
|
||||||
|
yum:
|
||||||
|
name: "{{ packages }}"
|
||||||
|
state: present
|
||||||
|
vars:
|
||||||
|
packages:
|
||||||
|
- /tmp/{{ wangw_global.rpm_files.wire_graft_devel_rpm_file }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
19
roles/wire_graft_devel/templates/wire_graft.conf.j2
Normal file
19
roles/wire_graft_devel/templates/wire_graft.conf.j2
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
[main]
|
||||||
|
|
||||||
|
[record_link_info]
|
||||||
|
stream_project_tag_enable=1
|
||||||
|
link_info_prune=1
|
||||||
|
#用于标识本机ip使用哪块网卡,可能是管理口,可能是其他业务口
|
||||||
|
identification_by_which_device=enp6s0
|
||||||
|
|
||||||
|
#单个流超过此包数的才发送链路信息, 防止遭受ddos攻击疯狂发日志
|
||||||
|
at_least_total_num=2
|
||||||
|
at_least_total_byte=5
|
||||||
|
|
||||||
|
[toroad]
|
||||||
|
sendto_toroad_enable=1
|
||||||
|
toroad_ip=192.168.40.134
|
||||||
|
toroad_port=8888
|
||||||
|
|
||||||
|
[log]
|
||||||
|
log_level=30
|
||||||
@@ -2,9 +2,11 @@
|
|||||||
- hosts: wangw
|
- hosts: wangw
|
||||||
roles:
|
roles:
|
||||||
- wangw
|
- wangw
|
||||||
|
- wire_graft_devel
|
||||||
|
- wire_graft
|
||||||
|
|
||||||
- hosts: toroad
|
- hosts: toroad
|
||||||
roles:
|
roles:
|
||||||
|
- wire_graft_devel
|
||||||
- toroad
|
- toroad
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,13 @@
|
|||||||
wangw_global:
|
wangw_global:
|
||||||
sapp:
|
|
||||||
install: false
|
|
||||||
packet_io:
|
|
||||||
inbound_route_dir: 0
|
|
||||||
internal_device: "vxlan_user"
|
|
||||||
external_device: "eth4"
|
|
||||||
packet_io_depolyment:
|
|
||||||
mode: "inline"
|
|
||||||
|
|
||||||
wangw:
|
wangw:
|
||||||
NAT_GW_tunnel_device: "enp6s0"
|
NAT_GW_tunnel_device: "enp6s0"
|
||||||
NAT_GW_tunnel_ip: "192.168.40.134"
|
NAT_GW_tunnel_ip: "192.168.40.134"
|
||||||
redis_server_ip: "192.168.44.17"
|
redis_server_ip: "192.168.44.71"
|
||||||
redis_server_port: 7002
|
redis_server_port: 7002
|
||||||
redis_index: 0
|
redis_index: 0
|
||||||
|
|
||||||
toroad:
|
toroad:
|
||||||
redis_server_ip: "192.168.44.17"
|
redis_server_ip: "192.168.44.71"
|
||||||
redis_server_port: 7002
|
redis_server_port: 7002
|
||||||
redis_index: 0
|
redis_index: 0
|
||||||
|
|
||||||
@@ -25,8 +16,8 @@ wangw_global:
|
|||||||
toroad_server_ip: "192.168.40.134"
|
toroad_server_ip: "192.168.40.134"
|
||||||
|
|
||||||
rpm_files:
|
rpm_files:
|
||||||
wangw_rpm_file: "libwangw-1.1.4.cbc177c-2.el7.x86_64.rpm"
|
wangw_rpm_file: "libwangw-1.2.0.7322d17-2.el7.x86_64.rpm"
|
||||||
wire_graft_rpm_file: "libwire_graft-1.1.6.1d5242c-2.el7.x86_64.rpm"
|
wire_graft_rpm_file: "libwire_graft-1.2.0.7fdacbc-2.el7.x86_64.rpm"
|
||||||
wire_graft_devel_rpm_file: "libwire_graft-devel-1.1.6.1d5242c-2.el7.x86_64.rpm"
|
wire_graft_devel_rpm_file: "libwire_graft-devel-1.2.0.7fdacbc-2.el7.x86_64.rpm"
|
||||||
toroad_rpm_file: "toroad-1.1.3.466cd11-2.el7.x86_64.rpm"
|
toroad_rpm_file: "toroad-1.1.11.b0562a5-2.el7.x86_64.rpm"
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
wangw_global:
|
wangw_global:
|
||||||
sapp:
|
|
||||||
install: false
|
|
||||||
packet_io:
|
|
||||||
inbound_route_dir: 0
|
|
||||||
internal_device: "vxlan_user"
|
|
||||||
external_device: "eth4"
|
|
||||||
packet_io_depolyment:
|
|
||||||
mode: "inline"
|
|
||||||
|
|
||||||
wangw:
|
wangw:
|
||||||
NAT_GW_tunnel_device: "enp8s0"
|
NAT_GW_tunnel_device: "enp8s0"
|
||||||
NAT_GW_tunnel_ip: "192.168.40.133"
|
NAT_GW_tunnel_ip: "192.168.40.133"
|
||||||
|
NAT_GW_tunnel_listen_port: 3544
|
||||||
|
NAT_GW_tunnel_remote_port: 3544
|
||||||
redis_server_ip: "192.168.44.3"
|
redis_server_ip: "192.168.44.3"
|
||||||
redis_server_port: 7002
|
redis_server_port: 7002
|
||||||
redis_index: 0
|
redis_index: 0
|
||||||
@@ -23,10 +16,11 @@ wangw_global:
|
|||||||
wiregraft:
|
wiregraft:
|
||||||
identification_by_which_device: "enp8s0"
|
identification_by_which_device: "enp8s0"
|
||||||
toroad_server_ip: "192.168.40.133"
|
toroad_server_ip: "192.168.40.133"
|
||||||
|
toroad_server_port: "8888"
|
||||||
|
|
||||||
rpm_files:
|
rpm_files:
|
||||||
wangw_rpm_file: "libwangw-1.1.1.ce9bd59-2.el7.x86_64.rpm"
|
wangw_rpm_file: "libwangw-1.2.0.7322d17-2.el7.x86_64.rpm"
|
||||||
wire_graft_rpm_file: "libwire_graft-1.1.4.ab9badd-2.el7.x86_64.rpm"
|
wire_graft_rpm_file: "libwire_graft-1.2.0.7fdacbc-2.el7.x86_64.rpm"
|
||||||
wire_graft_devel_rpm_file: "libwire_graft-devel-1.1.4.ab9badd-2.el7.x86_64.rpm"
|
wire_graft_devel_rpm_file: "libwire_graft-devel-1.2.0.7fdacbc-2.el7.x86_64.rpm"
|
||||||
toroad_rpm_file: "toroad-1.1.3.466cd11-2.el7.x86_64.rpm"
|
toroad_rpm_file: "toroad-1.1.11.b0562a5-2.el7.x86_64.rpm"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user