增加kni部署脚本
This commit is contained in:
@@ -14,12 +14,15 @@ log_minio:
|
|||||||
address: "192.168.100.4;"
|
address: "192.168.100.4;"
|
||||||
port: 9000
|
port: 9000
|
||||||
|
|
||||||
|
fs_remote:
|
||||||
|
switch: 0
|
||||||
|
address: "192.168.10.152"
|
||||||
|
port: 8125
|
||||||
|
|
||||||
kni:
|
kni:
|
||||||
global:
|
global:
|
||||||
log_level: 30
|
log_level: 30
|
||||||
tfe_node_count: 3
|
tfe_node_count: 3
|
||||||
tfe_data_recv_thread_num: 6
|
|
||||||
keepalive_replay_switch: 1
|
|
||||||
watch_dog:
|
watch_dog:
|
||||||
switch: 1
|
switch: 1
|
||||||
maat:
|
maat:
|
||||||
@@ -34,6 +37,7 @@ kni:
|
|||||||
enabled: 1
|
enabled: 1
|
||||||
- tfe2:
|
- tfe2:
|
||||||
enabled: 1
|
enabled: 1
|
||||||
|
|
||||||
tfe:
|
tfe:
|
||||||
nr_threads: 32
|
nr_threads: 32
|
||||||
keykeeper:
|
keykeeper:
|
||||||
|
|||||||
@@ -14,12 +14,15 @@ log_minio:
|
|||||||
address: "192.168.40.223;"
|
address: "192.168.40.223;"
|
||||||
port: 9000
|
port: 9000
|
||||||
|
|
||||||
|
fs_remote:
|
||||||
|
switch: 0
|
||||||
|
address: "192.168.10.152"
|
||||||
|
port: 8125
|
||||||
|
|
||||||
kni:
|
kni:
|
||||||
global:
|
global:
|
||||||
log_level: 30
|
log_level: 30
|
||||||
tfe_node_count: 3
|
tfe_node_count: 3
|
||||||
tfe_data_recv_thread_num: 6
|
|
||||||
keepalive_replay_switch: 1
|
|
||||||
watch_dog:
|
watch_dog:
|
||||||
switch: 1
|
switch: 1
|
||||||
maat:
|
maat:
|
||||||
|
|||||||
BIN
roles/kni/files/kni-2.1.0.b0bbde4-1.el7.centos.x86_64.rpm
Normal file
BIN
roles/kni/files/kni-2.1.0.b0bbde4-1.el7.centos.x86_64.rpm
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
roles/kni/files/sapp-4.0.3.be1157c-1.el7.x86_64.rpm
Normal file
BIN
roles/kni/files/sapp-4.0.3.be1157c-1.el7.x86_64.rpm
Normal file
Binary file not shown.
@@ -3,31 +3,51 @@
|
|||||||
file: path=/home/tsg state=directory
|
file: path=/home/tsg state=directory
|
||||||
tags: mkdir
|
tags: mkdir
|
||||||
|
|
||||||
- name: Extract kni.tar.gz
|
- name: "install sapp rpms from localhost"
|
||||||
unarchive:
|
yum:
|
||||||
src: "{{ role_path }}/files/kni_20190703.tar.gz"
|
name:
|
||||||
dest: /home/tsg
|
- /tmp/ansible_deploy/sapp-4.0.3.be1157c-1.el7.x86_64.rpm
|
||||||
tags: extract
|
state: present
|
||||||
|
|
||||||
|
- name: "install kni rpms from localhost"
|
||||||
|
yum:
|
||||||
|
name:
|
||||||
|
- /tmp/ansible_deploy/kni-2.1.0.b0bbde4-1.el7.centos.x86_64.rpm
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Template the sapp.toml
|
||||||
|
template:
|
||||||
|
src: "{{ role_path }}/templates/sapp.toml.j2"
|
||||||
|
dest: /home/mesasoft/sapp_run/etc/sapp.toml
|
||||||
|
tags: template
|
||||||
|
|
||||||
|
- name: Template the project_list.conf
|
||||||
|
template:
|
||||||
|
src: "{{ role_path }}/templates/project_list.conf.j2"
|
||||||
|
dest: /home/mesasoft/sapp_run/etc/project_list.conf
|
||||||
|
tags: template
|
||||||
|
|
||||||
|
- name: Template the conflist.inf
|
||||||
|
template:
|
||||||
|
src: "{{ role_path }}/templates/conflist.inf.j2"
|
||||||
|
dest: /home/mesasoft/sapp_run/plug/conflist.inf
|
||||||
|
tags: template
|
||||||
|
|
||||||
|
- name: Template the gdev.conf
|
||||||
|
template:
|
||||||
|
src: "{{ role_path }}/templates/gdev.conf.j2"
|
||||||
|
dest: /home/mesasoft/sapp_run/etc/gdev.conf
|
||||||
|
tags: template
|
||||||
|
|
||||||
- name: Template the kni.conf
|
- name: Template the kni.conf
|
||||||
template:
|
template:
|
||||||
src: "{{ role_path }}/templates/kni.conf.j2"
|
src: "{{ role_path }}/templates/kni.conf.j2"
|
||||||
dest: /home/tsg/kni/conf/kni/kni.conf
|
dest: /home/mesasoft/sapp_run/etc/kni/kni.conf
|
||||||
tags: template
|
tags: template
|
||||||
|
|
||||||
- name: Template the main.conf
|
- name: "enable sapp"
|
||||||
template:
|
systemd:
|
||||||
src: "{{ role_path }}/templates/main.conf.j2"
|
name: sapp
|
||||||
dest: /home/tsg/kni/conf/main.conf
|
enabled: yes
|
||||||
tags: template
|
daemon_reload: yes
|
||||||
|
|
||||||
- name: bootup sapp
|
|
||||||
blockinfile:
|
|
||||||
path: /etc/rc.d/rc.local
|
|
||||||
marker: "## {mark} bootstrap mrzcpd and kni"
|
|
||||||
block: |
|
|
||||||
systemctl start mrzcpd
|
|
||||||
systemctl start mrtunnat
|
|
||||||
sleep 15
|
|
||||||
cd /home/tsg/kni; ./r2
|
|
||||||
|
|
||||||
|
|||||||
8
roles/kni/templates/conflist.inf.j2
Normal file
8
roles/kni/templates/conflist.inf.j2
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[platform]
|
||||||
|
./plug/platform/g_device_plug/g_device_plug.inf
|
||||||
|
|
||||||
|
[protocol]
|
||||||
|
./plug/protocol/http/http.inf
|
||||||
|
|
||||||
|
[business]
|
||||||
|
./plug/business/kni/kni.inf
|
||||||
@@ -3,4 +3,3 @@ pcapdevice={{ nic_data_incoming.name }}
|
|||||||
sendto_gdev_card={{ nic_data_incoming.name }}
|
sendto_gdev_card={{ nic_data_incoming.name }}
|
||||||
sendto_gdev_ip={{ nic_data_incoming.ip }}
|
sendto_gdev_ip={{ nic_data_incoming.ip }}
|
||||||
gdev_status_switch=1
|
gdev_status_switch=1
|
||||||
default_keepalive_action=0
|
|
||||||
@@ -2,25 +2,24 @@
|
|||||||
log_path = ./log/kni/kni.log
|
log_path = ./log/kni/kni.log
|
||||||
log_level = {{ kni.global.log_level }}
|
log_level = {{ kni.global.log_level }}
|
||||||
tfe_node_count = {{ kni.global.tfe_node_count }}
|
tfe_node_count = {{ kni.global.tfe_node_count }}
|
||||||
tfe_data_recv_thread_num = {{ kni.global.tfe_data_recv_thread_num }}
|
|
||||||
manage_eth = {{ nic_mgr.name }}
|
manage_eth = {{ nic_mgr.name }}
|
||||||
keepalive_replay_switch = {{ kni.global.keepalive_replay_switch }}
|
deploy_mode = normal
|
||||||
|
tun_name = tun_kni
|
||||||
|
src_mac_addr = 00:0e:c6:d6:72:c1
|
||||||
|
dst_mac_addr = fe:65:b7:03:50:bd
|
||||||
|
|
||||||
[tfe0]
|
[tfe0]
|
||||||
enabled = 1
|
enabled = 1
|
||||||
mac_addr = fe:65:b7:03:50:bd
|
|
||||||
dev_eth_symbol = {{ nic_to_tfe.tfe0.name }}
|
dev_eth_symbol = {{ nic_to_tfe.tfe0.name }}
|
||||||
ip_addr = 192.168.100.2
|
ip_addr = 192.168.100.2
|
||||||
|
|
||||||
[tfe1]
|
[tfe1]
|
||||||
enabled = 1
|
enabled = 1
|
||||||
mac_addr = fe:65:b7:03:50:bd
|
|
||||||
dev_eth_symbol = {{ nic_to_tfe.tfe1.name }}
|
dev_eth_symbol = {{ nic_to_tfe.tfe1.name }}
|
||||||
ip_addr = 192.168.100.3
|
ip_addr = 192.168.100.3
|
||||||
|
|
||||||
[tfe2]
|
[tfe2]
|
||||||
enabled = 1
|
enabled = 1
|
||||||
mac_addr = fe:65:b7:03:50:bd
|
|
||||||
dev_eth_symbol = {{ nic_to_tfe.tfe2.name }}
|
dev_eth_symbol = {{ nic_to_tfe.tfe2.name }}
|
||||||
ip_addr = 192.168.100.4
|
ip_addr = 192.168.100.4
|
||||||
|
|
||||||
@@ -54,32 +53,40 @@ kafka_brokerlist = {{ log_kafkabrokers.address }}
|
|||||||
|
|
||||||
[marsio]
|
[marsio]
|
||||||
appsym = knifw
|
appsym = knifw
|
||||||
dev_vxlan_symbol = vxlan_user
|
|
||||||
src_mac_addr = 00:0e:c6:d6:72:c1
|
|
||||||
|
|
||||||
[kafka]
|
[kafka]
|
||||||
queue.buffering.max.messages = 1000000
|
queue.buffering.max.messages = 1000000
|
||||||
topic.metadata.refresh.interval.ms = 600000
|
topic.metadata.refresh.interval.ms = 600000
|
||||||
security.protocol = MG
|
security.protocol = MG
|
||||||
|
|
||||||
|
[dup_traffic]
|
||||||
|
switch = 1
|
||||||
|
action = 2
|
||||||
|
capacity = 10000000
|
||||||
|
error_rate = 0.00001
|
||||||
|
expiry_time = 60
|
||||||
|
|
||||||
[traceid2pme_htable]
|
[traceid2pme_htable]
|
||||||
mho_screen_print_ctrl = 0
|
mho_screen_print_ctrl = 0
|
||||||
mho_thread_safe = 1
|
mho_thread_safe = 1
|
||||||
mho_mutex_num = 160
|
mho_mutex_num = 160
|
||||||
mho_hash_slot_size = 160000
|
mho_hash_slot_size = 640000
|
||||||
mho_hash_max_element_num = 1280000
|
mho_hash_max_element_num = 2560000
|
||||||
mho_expire_time = 30
|
mho_expire_time = 30
|
||||||
mho_eliminate_type = LRU
|
mho_eliminate_type = LRU
|
||||||
|
|
||||||
[keepalive_replay_htable]
|
//per thread
|
||||||
|
[tuple2stream_htable]
|
||||||
mho_screen_print_ctrl = 0
|
mho_screen_print_ctrl = 0
|
||||||
mho_thread_safe = 1
|
mho_thread_safe = 0
|
||||||
mho_mutex_num = 160
|
mho_mutex_num = 160
|
||||||
mho_hash_slot_size = 160000
|
mho_hash_slot_size = 80000
|
||||||
mho_hash_max_element_num = 1280000
|
mho_hash_max_element_num = 320000
|
||||||
#must be 0
|
|
||||||
mho_expire_time = 0
|
mho_expire_time = 0
|
||||||
mho_eliminate_type = LRU
|
mho_eliminate_type = LRU
|
||||||
|
|
||||||
[field_stat]
|
[field_stat]
|
||||||
stat_path = ./fs2_kni.status
|
remote_switch = {{ fs_remote.switch }}
|
||||||
|
remote_ip = {{ fs_remote.address }}
|
||||||
|
remote_port = {{ fs_remote.port }}
|
||||||
|
local_path = ./fs2_kni.status
|
||||||
4
roles/kni/templates/project_list.conf.j2
Normal file
4
roles/kni/templates/project_list.conf.j2
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
tcp_flow_stat struct
|
||||||
|
udp_flow_stat struct
|
||||||
|
tcp_deduce_flow_stat struct
|
||||||
|
kni_http_tag struct
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
- maat_redis_server:
|
|
||||||
address: 192.168.100.3
|
|
||||||
port: 7002
|
|
||||||
db: 0
|
|
||||||
- cert_store_server:
|
|
||||||
address: 192.168.100.1
|
|
||||||
port: 9991
|
|
||||||
- log_kafkabrokers:
|
|
||||||
address: "192.168.100.4:9092"
|
|
||||||
- log_minio:
|
|
||||||
address: "192.168.100.4;"
|
|
||||||
port: 9000
|
|
||||||
20
vars/kni.yml
20
vars/kni.yml
@@ -1,20 +0,0 @@
|
|||||||
- kni:
|
|
||||||
global:
|
|
||||||
log_level: 30
|
|
||||||
tfe_node_count: 3
|
|
||||||
tfe_data_recv_thread_num: 6
|
|
||||||
keepalive_replay_switch: 1
|
|
||||||
watch_dog:
|
|
||||||
switch: 1
|
|
||||||
maat:
|
|
||||||
readconf_mode: 2
|
|
||||||
default_action: 128
|
|
||||||
send_logger:
|
|
||||||
switch: 1
|
|
||||||
tfe_nodes:
|
|
||||||
- tfe0:
|
|
||||||
enabled: 1
|
|
||||||
- tfe1:
|
|
||||||
enabled: 1
|
|
||||||
- tfe2:
|
|
||||||
enabled: 1
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
- tfe:
|
|
||||||
nr_threads: 32
|
|
||||||
keykeeper:
|
|
||||||
mode: "debug"
|
|
||||||
no_cache : 0
|
|
||||||
Reference in New Issue
Block a user