diff --git a/env-stage-hy/group_vars/all.yml b/env-stage-hy/group_vars/all.yml index d49b6f0..9abe8db 100644 --- a/env-stage-hy/group_vars/all.yml +++ b/env-stage-hy/group_vars/all.yml @@ -14,12 +14,15 @@ log_minio: address: "192.168.100.4;" port: 9000 +fs_remote: + switch: 0 + address: "192.168.10.152" + port: 8125 + kni: global: log_level: 30 tfe_node_count: 3 - tfe_data_recv_thread_num: 6 - keepalive_replay_switch: 1 watch_dog: switch: 1 maat: @@ -34,6 +37,7 @@ kni: enabled: 1 - tfe2: enabled: 1 + tfe: nr_threads: 32 keykeeper: diff --git a/env-stage-xxg/group_vars/all.yml b/env-stage-xxg/group_vars/all.yml index 75d19d8..33b25fa 100644 --- a/env-stage-xxg/group_vars/all.yml +++ b/env-stage-xxg/group_vars/all.yml @@ -13,13 +13,16 @@ log_kafkabrokers: log_minio: address: "192.168.40.223;" port: 9000 + +fs_remote: + switch: 0 + address: "192.168.10.152" + port: 8125 kni: global: log_level: 30 tfe_node_count: 3 - tfe_data_recv_thread_num: 6 - keepalive_replay_switch: 1 watch_dog: switch: 1 maat: diff --git a/roles/kni/files/kni-2.1.0.b0bbde4-1.el7.centos.x86_64.rpm b/roles/kni/files/kni-2.1.0.b0bbde4-1.el7.centos.x86_64.rpm new file mode 100644 index 0000000..fb0f2ff Binary files /dev/null and b/roles/kni/files/kni-2.1.0.b0bbde4-1.el7.centos.x86_64.rpm differ diff --git a/roles/kni/files/kni_20190702.tar.gz b/roles/kni/files/kni_20190702.tar.gz deleted file mode 100644 index 1c4c2b3..0000000 Binary files a/roles/kni/files/kni_20190702.tar.gz and /dev/null differ diff --git a/roles/kni/files/kni_20190703.tar.gz b/roles/kni/files/kni_20190703.tar.gz deleted file mode 100644 index 6306e62..0000000 Binary files a/roles/kni/files/kni_20190703.tar.gz and /dev/null differ diff --git a/roles/kni/files/sapp-4.0.3.be1157c-1.el7.x86_64.rpm b/roles/kni/files/sapp-4.0.3.be1157c-1.el7.x86_64.rpm new file mode 100644 index 0000000..d2ddd8b Binary files /dev/null and b/roles/kni/files/sapp-4.0.3.be1157c-1.el7.x86_64.rpm differ diff --git a/roles/kni/tasks/main.yml b/roles/kni/tasks/main.yml index c41e311..2df9ce1 100644 --- a/roles/kni/tasks/main.yml +++ b/roles/kni/tasks/main.yml @@ -2,32 +2,52 @@ - name: Ensures /home/tsg exists file: path=/home/tsg state=directory tags: mkdir - -- name: Extract kni.tar.gz - unarchive: - src: "{{ role_path }}/files/kni_20190703.tar.gz" - dest: /home/tsg - tags: extract + +- name: "install sapp rpms from localhost" + yum: + name: + - /tmp/ansible_deploy/sapp-4.0.3.be1157c-1.el7.x86_64.rpm + 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 template: 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 -- name: Template the main.conf - template: - src: "{{ role_path }}/templates/main.conf.j2" - dest: /home/tsg/kni/conf/main.conf - tags: template - -- 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 +- name: "enable sapp" + systemd: + name: sapp + enabled: yes + daemon_reload: yes diff --git a/roles/kni/templates/conflist.inf.j2 b/roles/kni/templates/conflist.inf.j2 new file mode 100644 index 0000000..098ab6e --- /dev/null +++ b/roles/kni/templates/conflist.inf.j2 @@ -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 \ No newline at end of file diff --git a/roles/kni/templates/gdev.conf.j2 b/roles/kni/templates/gdev.conf.j2 index b2364c5..c262fe6 100644 --- a/roles/kni/templates/gdev.conf.j2 +++ b/roles/kni/templates/gdev.conf.j2 @@ -2,5 +2,4 @@ pcapdevice={{ nic_data_incoming.name }} sendto_gdev_card={{ nic_data_incoming.name }} sendto_gdev_ip={{ nic_data_incoming.ip }} -gdev_status_switch=1 -default_keepalive_action=0 \ No newline at end of file +gdev_status_switch=1 \ No newline at end of file diff --git a/roles/kni/templates/kni.conf.j2 b/roles/kni/templates/kni.conf.j2 index f7a07b9..a4612b6 100644 --- a/roles/kni/templates/kni.conf.j2 +++ b/roles/kni/templates/kni.conf.j2 @@ -2,25 +2,24 @@ log_path = ./log/kni/kni.log log_level = {{ kni.global.log_level }} 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 }} -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] enabled = 1 -mac_addr = fe:65:b7:03:50:bd dev_eth_symbol = {{ nic_to_tfe.tfe0.name }} ip_addr = 192.168.100.2 [tfe1] enabled = 1 -mac_addr = fe:65:b7:03:50:bd dev_eth_symbol = {{ nic_to_tfe.tfe1.name }} ip_addr = 192.168.100.3 [tfe2] enabled = 1 -mac_addr = fe:65:b7:03:50:bd dev_eth_symbol = {{ nic_to_tfe.tfe2.name }} ip_addr = 192.168.100.4 @@ -54,32 +53,40 @@ kafka_brokerlist = {{ log_kafkabrokers.address }} [marsio] appsym = knifw -dev_vxlan_symbol = vxlan_user -src_mac_addr = 00:0e:c6:d6:72:c1 [kafka] queue.buffering.max.messages = 1000000 topic.metadata.refresh.interval.ms = 600000 security.protocol = MG +[dup_traffic] +switch = 1 +action = 2 +capacity = 10000000 +error_rate = 0.00001 +expiry_time = 60 + [traceid2pme_htable] mho_screen_print_ctrl = 0 mho_thread_safe = 1 mho_mutex_num = 160 -mho_hash_slot_size = 160000 -mho_hash_max_element_num = 1280000 +mho_hash_slot_size = 640000 +mho_hash_max_element_num = 2560000 mho_expire_time = 30 mho_eliminate_type = LRU -[keepalive_replay_htable] +//per thread +[tuple2stream_htable] mho_screen_print_ctrl = 0 -mho_thread_safe = 1 +mho_thread_safe = 0 mho_mutex_num = 160 -mho_hash_slot_size = 160000 -mho_hash_max_element_num = 1280000 -#must be 0 +mho_hash_slot_size = 80000 +mho_hash_max_element_num = 320000 mho_expire_time = 0 mho_eliminate_type = LRU [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 \ No newline at end of file diff --git a/roles/kni/templates/project_list.conf.j2 b/roles/kni/templates/project_list.conf.j2 new file mode 100644 index 0000000..c123d0b --- /dev/null +++ b/roles/kni/templates/project_list.conf.j2 @@ -0,0 +1,4 @@ +tcp_flow_stat struct +udp_flow_stat struct +tcp_deduce_flow_stat struct +kni_http_tag struct \ No newline at end of file diff --git a/roles/kni/templates/main.conf.j2 b/roles/kni/templates/sapp.toml.j2 similarity index 100% rename from roles/kni/templates/main.conf.j2 rename to roles/kni/templates/sapp.toml.j2 diff --git a/vars/common.yml b/vars/common.yml deleted file mode 100644 index 573bc53..0000000 --- a/vars/common.yml +++ /dev/null @@ -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 diff --git a/vars/kni.yml b/vars/kni.yml deleted file mode 100644 index 4a5dcc7..0000000 --- a/vars/kni.yml +++ /dev/null @@ -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 diff --git a/vars/tfe.yml b/vars/tfe.yml deleted file mode 100644 index 5e718c5..0000000 --- a/vars/tfe.yml +++ /dev/null @@ -1,5 +0,0 @@ -- tfe: - nr_threads: 32 - keykeeper: - mode: "debug" - no_cache : 0