WANNAT WANGW v20.08 install script.
This commit is contained in:
BIN
roles/toroad/files/rpm/toroad-1.0.8.63c176a-x86_64...rpm
Normal file
BIN
roles/toroad/files/rpm/toroad-1.0.8.63c176a-x86_64...rpm
Normal file
Binary file not shown.
35
roles/toroad/tasks/main.yml
Normal file
35
roles/toroad/tasks/main.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
- name: "Creates /opt/wannat/toroad directory"
|
||||
file:
|
||||
path: /opt/wannat/toroad
|
||||
state: directory
|
||||
|
||||
- name: "copy toroad_rpm_file to destination server"
|
||||
synchronize:
|
||||
src: "{{ role_path }}/files/rpm/{{ wangw_global.rpm_files.toroad_rpm_file }}"
|
||||
dest: "/tmp/wannat_deploy/"
|
||||
|
||||
- name: "install toroad"
|
||||
yum:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
packages:
|
||||
- /tmp/wannat_deploy/{{ wangw_global.rpm_files.toroad_rpm_file }}
|
||||
|
||||
|
||||
- name: "Template the toroad.conf"
|
||||
template:
|
||||
src: "{{ role_path }}/templates/toroad.conf.j2"
|
||||
dest: /home/mesasoft/sapp_run/etc/wire_graft/wire_graft.conf
|
||||
tags: template
|
||||
|
||||
|
||||
- name: "Template the test_sip_succ.list"
|
||||
template:
|
||||
src: "{{ role_path }}/templates/test_sip_succ.list.j2"
|
||||
dest: /opt/wannat/toroad/etc/test_sip_succ.list
|
||||
tags: template
|
||||
|
||||
|
||||
|
||||
6
roles/toroad/templates/test_sip_succ.list.j2
Normal file
6
roles/toroad/templates/test_sip_succ.list.j2
Normal file
@@ -0,0 +1,6 @@
|
||||
192.168.50.145
|
||||
192.168.50.146
|
||||
192.168.50.147
|
||||
192.168.50.148
|
||||
192.168.50.149
|
||||
192.168.50.150
|
||||
30
roles/toroad/templates/toroad.conf.j2
Normal file
30
roles/toroad/templates/toroad.conf.j2
Normal file
@@ -0,0 +1,30 @@
|
||||
[main]
|
||||
http_server_listen_port=8888
|
||||
wangw_ip_list_file=wangw_ip_list_file.conf
|
||||
probe_pkt_timeout=1
|
||||
probe_retry_times=3
|
||||
|
||||
|
||||
[runtime_log]
|
||||
log_level=20
|
||||
log_file=./toroad_log/toroad.log
|
||||
|
||||
[field_stat2]
|
||||
Fs2_log_local_dir_path=./toroad_log
|
||||
Fs2_interval=3
|
||||
Fs2_server_ip=127.0.0.1
|
||||
Fs2_server_port=8125
|
||||
|
||||
|
||||
[maat]
|
||||
table_info=./etc/maat_tableinfo.conf
|
||||
#json, redis, local_file
|
||||
config_src_type=redis
|
||||
#config_src_type=json
|
||||
json_cfg_file=./etc/maat_test.json.v3
|
||||
inc_dir=./redis_dump/
|
||||
full_dir=./redis_dump/
|
||||
redis_server_ip={{wangw_global.toroad.redis_server_ip}}
|
||||
redis_server_port={{wangw_global.toroad.redis_server_port}}
|
||||
redis_index={{wangw_global.toroad.redis_index}}
|
||||
accetp_tags_file=/opt/tsg/etc/tsg_device_tag.json
|
||||
2
roles/toroad/templates/wangw_ip_list_file.conf.j2
Normal file
2
roles/toroad/templates/wangw_ip_list_file.conf.j2
Normal file
@@ -0,0 +1,2 @@
|
||||
#WANGW ip_address, per line
|
||||
192.168.40.137
|
||||
BIN
roles/wangw/files/rpm/libwangw-1.0.8.dbd02f6-x86_64...rpm
Normal file
BIN
roles/wangw/files/rpm/libwangw-1.0.8.dbd02f6-x86_64...rpm
Normal file
Binary file not shown.
BIN
roles/wangw/files/rpm/libwire_graft-1.0.19.7cdff59-x86_64...rpm
Normal file
BIN
roles/wangw/files/rpm/libwire_graft-1.0.19.7cdff59-x86_64...rpm
Normal file
Binary file not shown.
BIN
roles/wangw/files/tools/maat_redis_tool
Normal file
BIN
roles/wangw/files/tools/maat_redis_tool
Normal file
Binary file not shown.
48
roles/wangw/tasks/main.yml
Normal file
48
roles/wangw/tasks/main.yml
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
- name: "copy wangw_rpm_file to destination server"
|
||||
synchronize:
|
||||
src: "{{ role_path }}/files/rpm/{{ wangw_global.rpm_files.wangw_rpm_file }}"
|
||||
dest: "/tmp/wannat_deploy/"
|
||||
|
||||
- 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: "install wangw"
|
||||
yum:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
packages:
|
||||
- /tmp/wannat_deploy/{{ 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: "Creates ./etc/wannat directory"
|
||||
file:
|
||||
path: /home/mesasoft/sapp_run/etc/wannat
|
||||
state: directory
|
||||
|
||||
- name: "Creates ./etc/wire_graft directory"
|
||||
file:
|
||||
path: /home/mesasoft/sapp_run/etc/wire_graft
|
||||
state: directory
|
||||
|
||||
- name: "Template the wangw.conf"
|
||||
template:
|
||||
src: "{{ role_path }}/templates/wangw.conf.j2"
|
||||
dest: /home/mesasoft/sapp_run/etc/wannat/wangw.conf
|
||||
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
|
||||
52
roles/wangw/templates/wangw.conf.j2
Normal file
52
roles/wangw/templates/wangw.conf.j2
Normal file
@@ -0,0 +1,52 @@
|
||||
[main]
|
||||
#在线模式用vxlan, 测试模式用ethernet, 即标准ethernet/IP协议
|
||||
NAT_GW_tunnel_mode=vxlan
|
||||
|
||||
#NAT GW的内部互联网卡名称
|
||||
NAT_GW_tunnel_device={{wangw_global.wangw.NAT_GW_tunnel_device}}
|
||||
|
||||
#NAT GW的内部互联IP地址, 端口使用vxlan默认值, 要求对方也开放UDP 4789端口
|
||||
NAT_GW_tunnel_ip={{wangw_global.wangw.NAT_GW_tunnel_ip}}
|
||||
|
||||
|
||||
#接收来自NAT GW的包, 需要创建sapp的独立发包线程, 目前暂时只支持1个.
|
||||
I2E_independent_thread_num=1
|
||||
|
||||
[session]
|
||||
|
||||
#最大并发连接数
|
||||
max_session_num=100000
|
||||
|
||||
#连续no_pkt_timeout秒没有数据包, 认为此连接已超时, 可以删除
|
||||
no_pkt_timeout=60
|
||||
|
||||
|
||||
[runtime_log]
|
||||
log_file=./wannat_log/wannat.log
|
||||
log_level=10
|
||||
|
||||
[field_stat2]
|
||||
Fs2_log_local_dir_path=./wannat_log
|
||||
Fs2_server_ip=127.0.0.1
|
||||
Fs2_server_port=8125
|
||||
Fs2_interval=3
|
||||
|
||||
[maat]
|
||||
table_info=./etc/wannat/tableinfo.conf
|
||||
#json, redis, local_file
|
||||
#config_src_type=local_file
|
||||
config_src_type=redis
|
||||
#config_src_type=json
|
||||
json_cfg_file=./etc/wannat/gtest.json
|
||||
inc_dir=./redis_dump/
|
||||
full_dir=./redis_dump/
|
||||
redis_server_ip={{wangw_global.wangw.redis_server_ip}}
|
||||
redis_server_port={{wangw_global.wangw.redis_server_port}}
|
||||
redis_index={{wangw_global.wangw.redis_index}}
|
||||
|
||||
[no_nat_gw_selt_test]
|
||||
test_eth_mode_nat_type=snat
|
||||
test_eth_mode_vlink_id=0
|
||||
test_eth_mode_link_dir=E
|
||||
test_eth_bpf="port 80"
|
||||
|
||||
10
roles/wangw/templates/wire_graft.conf.j2
Normal file
10
roles/wangw/templates/wire_graft.conf.j2
Normal file
@@ -0,0 +1,10 @@
|
||||
[main]
|
||||
|
||||
[record_link_info]
|
||||
stream_project_tag_enable=1
|
||||
|
||||
#用于标识本机ip使用哪块网卡,可能是管理口,可能是其他业务口
|
||||
identification_by_which_device=enp8s0
|
||||
|
||||
[log]
|
||||
log_level=20
|
||||
10
wangw-install.yml
Normal file
10
wangw-install.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
- hosts: wangw
|
||||
roles:
|
||||
- wangw
|
||||
|
||||
|
||||
- hosts: toroad
|
||||
roles:
|
||||
- toroad
|
||||
|
||||
30
wangw-uninstall.yml
Normal file
30
wangw-uninstall.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
- hosts: wangw
|
||||
tasks:
|
||||
- name: "stop sapp service"
|
||||
service:
|
||||
name: sapp
|
||||
state: stopped
|
||||
ignore_errors: yes
|
||||
when: install_sapp | bool
|
||||
|
||||
- name: "stop toroad service"
|
||||
service:
|
||||
name: toroad
|
||||
state: stopped
|
||||
ignore_errors: yes
|
||||
|
||||
- name: "uninstall wangw plug"
|
||||
yum:
|
||||
name: "libwangw"
|
||||
state: absent
|
||||
|
||||
- name: "uninstall toroad"
|
||||
yum:
|
||||
name: "toroad"
|
||||
state: absent
|
||||
|
||||
- name: "uninstall libwire_graft plug"
|
||||
yum:
|
||||
name: "libwire_graft"
|
||||
state: absent
|
||||
32
xxg_integration_env/group_vars/all.yml
Normal file
32
xxg_integration_env/group_vars/all.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
wangw_global:
|
||||
sapp:
|
||||
install: false
|
||||
packet_io:
|
||||
inbound_route_dir: 0
|
||||
internal_device: "vxlan_user"
|
||||
external_device: "eth4"
|
||||
packet_io_depolyment:
|
||||
mode: "inline"
|
||||
|
||||
wangw:
|
||||
NAT_GW_tunnel_device: "enp8s0"
|
||||
NAT_GW_tunnel_ip: "192.168.40.134"
|
||||
redis_server_ip: "192.168.40.120"
|
||||
redis_server_port: 7003
|
||||
redis_index: 0
|
||||
|
||||
toroad:
|
||||
redis_server_ip: "192.168.40.120"
|
||||
redis_server_port: 7003
|
||||
redis_index: 0
|
||||
|
||||
wiregraft:
|
||||
identification_by_which_device:"enp8s0"
|
||||
|
||||
rpm_files:
|
||||
wangw_rpm_file: "libwangw-1.0.8.dbd02f6-x86_64...rpm"
|
||||
wire_graft_rpm_file: "libwire_graft-1.0.19.7cdff59-x86_64...rpm"
|
||||
toroad_rpm_file: "toroad-1.0.8.63c176a-x86_64...rpm"
|
||||
|
||||
|
||||
|
||||
12
xxg_integration_env/hosts.xxg
Normal file
12
xxg_integration_env/hosts.xxg
Normal file
@@ -0,0 +1,12 @@
|
||||
[all:vars]
|
||||
ansible_user=root
|
||||
install_sapp=false
|
||||
install_device_sn=false
|
||||
install_device_tag=false
|
||||
|
||||
[wangw]
|
||||
192.168.40.161
|
||||
|
||||
[toroad]
|
||||
192.168.40.134
|
||||
|
||||
32
xxg_test_env/group_vars/all.yml
Normal file
32
xxg_test_env/group_vars/all.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
wangw_global:
|
||||
sapp:
|
||||
install: false
|
||||
packet_io:
|
||||
inbound_route_dir: 0
|
||||
internal_device: "vxlan_user"
|
||||
external_device: "eth4"
|
||||
packet_io_depolyment:
|
||||
mode: "inline"
|
||||
|
||||
wangw:
|
||||
NAT_GW_tunnel_device: "enp8s0"
|
||||
NAT_GW_tunnel_ip: "192.168.40.133"
|
||||
redis_server_ip: "192.168.44.3"
|
||||
redis_server_port: 7002
|
||||
redis_index: 0
|
||||
|
||||
toroad:
|
||||
redis_server_ip: "192.168.44.3"
|
||||
redis_server_port: 7002
|
||||
redis_index: 0
|
||||
|
||||
wiregraft:
|
||||
identification_by_which_device:"enp8s0"
|
||||
|
||||
rpm_files:
|
||||
wangw_rpm_file: "libwangw-1.0.8.dbd02f6-x86_64...rpm"
|
||||
wire_graft_rpm_file: "libwire_graft-1.0.19.7cdff59-x86_64...rpm"
|
||||
toroad_rpm_file: "toroad-1.0.8.63c176a-x86_64...rpm"
|
||||
|
||||
|
||||
|
||||
12
xxg_test_env/hosts.xxg
Normal file
12
xxg_test_env/hosts.xxg
Normal file
@@ -0,0 +1,12 @@
|
||||
[all:vars]
|
||||
ansible_user=root
|
||||
install_sapp=false
|
||||
install_device_sn=false
|
||||
install_device_tag=false
|
||||
|
||||
[wangw]
|
||||
192.168.40.137
|
||||
|
||||
[toroad]
|
||||
192.168.40.133
|
||||
|
||||
Reference in New Issue
Block a user