diff options
| author | lijia <[email protected]> | 2020-01-07 18:04:44 +0800 |
|---|---|---|
| committer | lijia <[email protected]> | 2020-01-07 18:04:44 +0800 |
| commit | 5ca1b86905f90c748574d9718fc33333df746934 (patch) | |
| tree | 514f7dde110e0ceb4d500245c016ac7ef4060f6d | |
| parent | 76d3a99a062c838873e5b48dd26d4017014f7bfa (diff) | |
更新rpm文件; 修改uninstall流程; 修改配置文件更新参数.
| -rw-r--r-- | houyi-uninstall.yml | 12 | ||||
| -rw-r--r-- | roles/sled-mcn0/files/rpm/houyi-plug-1.0.0.9b70834-1.el7.x86_64.rpm | bin | 12092 -> 0 bytes | |||
| -rw-r--r-- | roles/sled-mcn0/files/rpm/houyi-plug-1.1.8.8198e4f-1.el7.x86_64.rpm | bin | 0 -> 12004 bytes | |||
| -rw-r--r-- | roles/sled-mcn0/tasks/main.yml | 8 | ||||
| -rw-r--r-- | roles/sled-mcn0/templates/houyi_plug_arp_network.conf.j2 | 4 | ||||
| -rw-r--r-- | roles/sled-mcn0/templates/sapp.toml.j2 | 6 | ||||
| -rw-r--r-- | roles/sled-mcn0/templates/send_raw_pkt.conf.j2 | 17 | ||||
| -rw-r--r-- | xxg_env/group_vars/all.yml | 10 | ||||
| -rw-r--r-- | xxg_env/hosts.xxg | 4 |
9 files changed, 35 insertions, 26 deletions
diff --git a/houyi-uninstall.yml b/houyi-uninstall.yml index 1824f24..4123892 100644 --- a/houyi-uninstall.yml +++ b/houyi-uninstall.yml @@ -37,14 +37,4 @@ state: absent force: 1 - - name: "remove sapp service" - file: - path: /usr/lib/systemd/system/sapp.service - state: absent - force: 1 - - - name: "remove houyi service" - file: - path: /usr/lib/systemd/system/houyi.service - state: absent - force: 1
\ No newline at end of file +
\ No newline at end of file diff --git a/roles/sled-mcn0/files/rpm/houyi-plug-1.0.0.9b70834-1.el7.x86_64.rpm b/roles/sled-mcn0/files/rpm/houyi-plug-1.0.0.9b70834-1.el7.x86_64.rpm Binary files differdeleted file mode 100644 index 55d1d9c..0000000 --- a/roles/sled-mcn0/files/rpm/houyi-plug-1.0.0.9b70834-1.el7.x86_64.rpm +++ /dev/null diff --git a/roles/sled-mcn0/files/rpm/houyi-plug-1.1.8.8198e4f-1.el7.x86_64.rpm b/roles/sled-mcn0/files/rpm/houyi-plug-1.1.8.8198e4f-1.el7.x86_64.rpm Binary files differnew file mode 100644 index 0000000..1ce9e5f --- /dev/null +++ b/roles/sled-mcn0/files/rpm/houyi-plug-1.1.8.8198e4f-1.el7.x86_64.rpm diff --git a/roles/sled-mcn0/tasks/main.yml b/roles/sled-mcn0/tasks/main.yml index 6748a71..14fe5d4 100644 --- a/roles/sled-mcn0/tasks/main.yml +++ b/roles/sled-mcn0/tasks/main.yml @@ -51,14 +51,18 @@ packages: - /tmp/houyi_deploy/{{ houyi_global.rpm_files.net_flood_rpm_file }} - - - 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 send_raw_pkt.conf" + template: + src: "{{ role_path }}/templates/send_raw_pkt.conf.j2" + dest: /home/mesasoft/sapp_run/etc/send_raw_pkt.conf + tags: template + - name: "Template the conflist.inf" template: src: "{{ role_path }}/templates/conflist.inf.j2" diff --git a/roles/sled-mcn0/templates/houyi_plug_arp_network.conf.j2 b/roles/sled-mcn0/templates/houyi_plug_arp_network.conf.j2 index 068b289..247dac2 100644 --- a/roles/sled-mcn0/templates/houyi_plug_arp_network.conf.j2 +++ b/roles/sled-mcn0/templates/houyi_plug_arp_network.conf.j2 @@ -4,5 +4,5 @@ #dir network mask-bit-num mac-addr #dir: 0:C2I, 1:I2C #example: -0 192.168.10.0 24 46:9d:8e:37:53:11 -1 192.168.10.128 24 46:9d:8e:37:53:22
\ No newline at end of file +0 192.168.10.0 255.255.255.128 46:9d:8e:37:53:11 +1 192.168.10.128 255.255.255.128 46:9d:8e:37:53:22
\ No newline at end of file diff --git a/roles/sled-mcn0/templates/sapp.toml.j2 b/roles/sled-mcn0/templates/sapp.toml.j2 index a281849..77f9a2e 100644 --- a/roles/sled-mcn0/templates/sapp.toml.j2 +++ b/roles/sled-mcn0/templates/sapp.toml.j2 @@ -18,7 +18,7 @@ bind_mask=[] ### because it comes from other device, so it needs to be specified manually, ### if inbound_route_dir=1, then outbound_route_dir=0, vice versa, ### in other words, outbound_route_dir = 1 ^ inbound_route_dir; -inbound_route_dir=0 +inbound_route_dir={{houyi_global.sapp.packet_io.inbound_route_dir}} ### note, BSD_packet_filter, if you do not want to set any filter rule, keep it empty as "" BSD_packet_filter="" @@ -32,11 +32,11 @@ BSD_packet_filter="" ### receive from external interface, route dir is 1. [packet_io.internal.interface] type=pcap - name={{houyi_global.sapp.packet_io.inbound_device}} + name={{houyi_global.sapp.packet_io.internal_device}} [packet_io.external.interface] type=pcap - name={{houyi_global.sapp.packet_io.outbound_device}} + name={{houyi_global.sapp.packet_io.external_device}} [packet_io.polling] ### note, polling_priority = call sapp_recv_pkt every call polling_entry times, diff --git a/roles/sled-mcn0/templates/send_raw_pkt.conf.j2 b/roles/sled-mcn0/templates/send_raw_pkt.conf.j2 new file mode 100644 index 0000000..f69d1da --- /dev/null +++ b/roles/sled-mcn0/templates/send_raw_pkt.conf.j2 @@ -0,0 +1,17 @@ +#发送原始报文配置, +#因平台可能运行在不同环境下, 底层参数类型也不同, +#如普通模式下使用网卡名称, DPDK模式下使用端口号, PFRING模式下使用index号, 还可能扩充其他模式. +#target_id用于表示给哪个接收端发送, +#至于发送的数据包底层MAC、目标IP等, 由上层插件负责填充, 平台只负责发送完整原始包. +#target_id相当于数据库表的外键 + +# (0:pag,1:pcap,2:dumpfile,3:pfring,4:DPDK,5:ppf,6:NPacket,7:qnf,8:N95,9:pcap-dumpfile-list,10:topsec, +## (11:ipfile, 12:marsio4, 13:agent_smith, 14:dpdk_vxlan, 15:marsio_vxlan, 16:pag_marsio + +#target_id +0 pag {{houyi_global.sapp.packet_io.internal_device}} ens4 dna0 dpdk ppf npacket qnf n95 eth1 topsec eth1 vxlan_user smith dpdk dpdk pag +1 pag {{houyi_global.sapp.packet_io.external_device}} ens5 dna0 dpdk ppf npacket qnf n95 eth1 topsec eth1 vxlan_user smith dpdk dpdk pag +#1 pag eth1 eth1 dna0 dpdk ppf npacket qnf n95 eth1 topsec eth1 p7p1 smith dpdk dpdk pag +#2 pag eth1 eth1 dna0 dpdk ppf npacket qnf n95 eth1 topsec eth1 p7p1 smith dpdk dpdk pag +#3 pag eth1 eth1 dna0 dpdk ppf npacket qnf n95 eth1 topsec eth1 p7p2 smith dpdk dpdk pag +#4 pag eth1 eth1 dna0 dpdk ppf npacket qnf n95 eth1 topsec eth1 p7p2 smith dpdk dpdk pag diff --git a/xxg_env/group_vars/all.yml b/xxg_env/group_vars/all.yml index c79802a..b955ba9 100644 --- a/xxg_env/group_vars/all.yml +++ b/xxg_env/group_vars/all.yml @@ -1,15 +1,17 @@ houyi_global: sapp: packet_io: - inbound_device: "eth0" - outbound_device: "eth1" + inbound_route_dir: 0 + internal_device: "eth5" + external_device: "eth4" + houyi: - redis_server_ip: "192.168.40.120" + redis_server_ip: "192.168.40.131" redis_server_port: 7002 redis_index: 0 rpm_files: houyi_rpm_file: "houyi-1.0.0.26712da-1.el7.x86_64.rpm" - houyi_plug_rpm_file: "houyi-plug-1.0.0.9b70834-1.el7.x86_64.rpm" + houyi_plug_rpm_file: "houyi-plug-1.1.8.8198e4f-1.el7.x86_64.rpm" net_flood_rpm_file: "net_flood-2.0.3.2e9450d-1.el7.x86_64.rpm" sapp_rpm_file: "sapp-4.0.7.f31c99c-1.el7.x86_64.rpm"
\ No newline at end of file diff --git a/xxg_env/hosts.xxg b/xxg_env/hosts.xxg index 4077c7a..91ddfab 100644 --- a/xxg_env/hosts.xxg +++ b/xxg_env/hosts.xxg @@ -1,9 +1,5 @@ [all:vars] ansible_user=root -houyi_rpm_file=houyi-1.0.0.26712da-1.el7.x86_64.rpm -houyi_plug_rpm_file=houyi-plug-1.0.0.2a4c05f-1.el7.x86_64.rpm -net_flood_rpm_file=net_flood-2.0.3.6ae51f2-1.el7.x86_64.rpm -sapp_rpm_file=sapp-4.0.7.06731c3-1.el7.x86_64.rpm [sled-mcn0] 192.168.40.133 |
