summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlijia <[email protected]>2020-03-30 17:50:02 +0800
committerlijia <[email protected]>2020-03-30 17:50:02 +0800
commit6a628c5fe632555ebb66078cd2e26fe27486f030 (patch)
treeac31d42af436078642c0ac6b86c01088e519d3e0
parentf28b134cb578a1994330f345a4eca92ecaf53249 (diff)
更新相关模块的rpm包.HEADmaster
-rw-r--r--depend_library/bind9-v9_14_9_with_config.tgz (renamed from roles/sled-mcn0/files/rpm/bind9-v9_14_9_with_config.tgz)bin6336039 -> 6336039 bytes
-rw-r--r--depend_library/curl-7.69.0.tar.gzbin0 -> 4131547 bytes
-rw-r--r--depend_library/readme.txt5
-rw-r--r--houyi-uninstall.yml24
-rw-r--r--roles/sled-mcn0/files/etc/houyi_plug_arp_network.conf11
-rw-r--r--roles/sled-mcn0/files/rpm/houyi-1.0.0.bf9f5bf-1.el7.x86_64.rpmbin476140 -> 0 bytes
-rw-r--r--roles/sled-mcn0/files/rpm/houyi-1.2.0.78327cd-1.el7.x86_64.rpmbin0 -> 478844 bytes
-rw-r--r--roles/sled-mcn0/files/rpm/houyi-common-tools-1.0.1.e757dda-1.el7.x86_64.rpmbin0 -> 19300 bytes
-rw-r--r--roles/sled-mcn0/files/rpm/houyi-plug-1.1.8.8198e4f-1.el7.x86_64.rpmbin12756 -> 0 bytes
-rw-r--r--roles/sled-mcn0/files/rpm/houyi-plug-1.2.0.203ee5c-1.el7.x86_64.rpmbin0 -> 58548 bytes
-rw-r--r--roles/sled-mcn0/files/rpm/net_flood-2.0.3.2e9450d-1.el7.x86_64.rpmbin24308 -> 0 bytes
-rw-r--r--roles/sled-mcn0/files/rpm/net_flood-2.1.0.27094d7-1.el7.x86_64.rpmbin0 -> 239700 bytes
-rw-r--r--roles/sled-mcn0/files/rpm/sapp-4.0.7.f31c99c-1.el7.x86_64.rpmbin377012 -> 0 bytes
-rw-r--r--roles/sled-mcn0/files/rpm/sapp-4.0.8.c43dbc1-1.el7.x86_64.rpmbin0 -> 388384 bytes
-rw-r--r--roles/sled-mcn0/tasks/main.yml33
-rw-r--r--roles/sled-mcn0/templates/houyi_plug.conf.j22
-rw-r--r--roles/sled-mcn0/templates/houyi_plug_arp_network.conf.j27
-rw-r--r--roles/sled-mcn0/templates/houyi_send_log.conf.j212
-rw-r--r--roles/sled-mcn0/templates/send_raw_pkt.conf.j24
-rw-r--r--xxg_env/group_vars/all.yml16
20 files changed, 85 insertions, 29 deletions
diff --git a/roles/sled-mcn0/files/rpm/bind9-v9_14_9_with_config.tgz b/depend_library/bind9-v9_14_9_with_config.tgz
index ce33380..ce33380 100644
--- a/roles/sled-mcn0/files/rpm/bind9-v9_14_9_with_config.tgz
+++ b/depend_library/bind9-v9_14_9_with_config.tgz
Binary files differ
diff --git a/depend_library/curl-7.69.0.tar.gz b/depend_library/curl-7.69.0.tar.gz
new file mode 100644
index 0000000..b5e408d
--- /dev/null
+++ b/depend_library/curl-7.69.0.tar.gz
Binary files differ
diff --git a/depend_library/readme.txt b/depend_library/readme.txt
new file mode 100644
index 0000000..d3d1228
--- /dev/null
+++ b/depend_library/readme.txt
@@ -0,0 +1,5 @@
+1-BIND���ڲ���DNS����
+2-CURL����CC_flood��url��������
+ licurl��url�������ܣ���7.62.0�汾�Ժ��ṩ,
+ https://curl.haxx.se/libcurl/c/curl_url.html
+ houyi���þ�̬���ӿ�curl-7.69.0
diff --git a/houyi-uninstall.yml b/houyi-uninstall.yml
index 4123892..76b53a7 100644
--- a/houyi-uninstall.yml
+++ b/houyi-uninstall.yml
@@ -5,22 +5,29 @@
service:
name: sapp
state: stopped
-
+ ignore_errors: yes
+
- name: "stop houyi service"
service:
name: houyi
state: stopped
+ ignore_errors: yes
- - name: "uninstall sapp"
- yum:
- name: "sapp"
- state: absent
+# - name: "uninstall sapp"
+# yum:
+# name: "sapp"
+# state: absent
- name: "uninstall houyi"
yum:
name: "houyi"
state: absent
+ - name: "uninstall houyi-common-tools"
+ yum:
+ name: "houyi-common-tools"
+ state: absent
+
- name: "uninstall houyi-plug"
yum:
name: "houyi-plug"
@@ -30,11 +37,4 @@
yum:
name: "net_flood"
state: absent
-
- - name: "remove sapp"
- file:
- path: /home/mesasoft/sapp_run/
- state: absent
- force: 1
-
\ No newline at end of file
diff --git a/roles/sled-mcn0/files/etc/houyi_plug_arp_network.conf b/roles/sled-mcn0/files/etc/houyi_plug_arp_network.conf
new file mode 100644
index 0000000..e26cac4
--- /dev/null
+++ b/roles/sled-mcn0/files/etc/houyi_plug_arp_network.conf
@@ -0,0 +1,11 @@
+#arp查询的源ip不能随意写, 因为可能不通过sapp, 必须要保证两端ip段不一致
+#或者是写个肯定不存在的sip和smac, arp回复时也能过sapp.
+
+#dir network mask-bit-num mac-addr
+#dir: 0:C2I, 1:I2C
+#houyi模块对方向的定义: houyi_send_dir_t,
+#HOUYI_SEND_DIR_C2I = 0, 内-->外, outbound, 看第一个字母象形, O 0
+#HOUYI_SEND_DIR_I2C = 1, 外-->内, inbound , 看第一个字母象形, I 1
+#example:
+0 10.3.22.128 255.255.255.128 46:9d:8e:37:53:11
+1 10.3.22.0 255.255.255.128 46:9d:8e:37:53:22
diff --git a/roles/sled-mcn0/files/rpm/houyi-1.0.0.bf9f5bf-1.el7.x86_64.rpm b/roles/sled-mcn0/files/rpm/houyi-1.0.0.bf9f5bf-1.el7.x86_64.rpm
deleted file mode 100644
index fbddb94..0000000
--- a/roles/sled-mcn0/files/rpm/houyi-1.0.0.bf9f5bf-1.el7.x86_64.rpm
+++ /dev/null
Binary files differ
diff --git a/roles/sled-mcn0/files/rpm/houyi-1.2.0.78327cd-1.el7.x86_64.rpm b/roles/sled-mcn0/files/rpm/houyi-1.2.0.78327cd-1.el7.x86_64.rpm
new file mode 100644
index 0000000..13799bf
--- /dev/null
+++ b/roles/sled-mcn0/files/rpm/houyi-1.2.0.78327cd-1.el7.x86_64.rpm
Binary files differ
diff --git a/roles/sled-mcn0/files/rpm/houyi-common-tools-1.0.1.e757dda-1.el7.x86_64.rpm b/roles/sled-mcn0/files/rpm/houyi-common-tools-1.0.1.e757dda-1.el7.x86_64.rpm
new file mode 100644
index 0000000..c104637
--- /dev/null
+++ b/roles/sled-mcn0/files/rpm/houyi-common-tools-1.0.1.e757dda-1.el7.x86_64.rpm
Binary files differ
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
deleted file mode 100644
index 6bde648..0000000
--- a/roles/sled-mcn0/files/rpm/houyi-plug-1.1.8.8198e4f-1.el7.x86_64.rpm
+++ /dev/null
Binary files differ
diff --git a/roles/sled-mcn0/files/rpm/houyi-plug-1.2.0.203ee5c-1.el7.x86_64.rpm b/roles/sled-mcn0/files/rpm/houyi-plug-1.2.0.203ee5c-1.el7.x86_64.rpm
new file mode 100644
index 0000000..ce16c5d
--- /dev/null
+++ b/roles/sled-mcn0/files/rpm/houyi-plug-1.2.0.203ee5c-1.el7.x86_64.rpm
Binary files differ
diff --git a/roles/sled-mcn0/files/rpm/net_flood-2.0.3.2e9450d-1.el7.x86_64.rpm b/roles/sled-mcn0/files/rpm/net_flood-2.0.3.2e9450d-1.el7.x86_64.rpm
deleted file mode 100644
index 2175410..0000000
--- a/roles/sled-mcn0/files/rpm/net_flood-2.0.3.2e9450d-1.el7.x86_64.rpm
+++ /dev/null
Binary files differ
diff --git a/roles/sled-mcn0/files/rpm/net_flood-2.1.0.27094d7-1.el7.x86_64.rpm b/roles/sled-mcn0/files/rpm/net_flood-2.1.0.27094d7-1.el7.x86_64.rpm
new file mode 100644
index 0000000..a3bf8d7
--- /dev/null
+++ b/roles/sled-mcn0/files/rpm/net_flood-2.1.0.27094d7-1.el7.x86_64.rpm
Binary files differ
diff --git a/roles/sled-mcn0/files/rpm/sapp-4.0.7.f31c99c-1.el7.x86_64.rpm b/roles/sled-mcn0/files/rpm/sapp-4.0.7.f31c99c-1.el7.x86_64.rpm
deleted file mode 100644
index ea05fc1..0000000
--- a/roles/sled-mcn0/files/rpm/sapp-4.0.7.f31c99c-1.el7.x86_64.rpm
+++ /dev/null
Binary files differ
diff --git a/roles/sled-mcn0/files/rpm/sapp-4.0.8.c43dbc1-1.el7.x86_64.rpm b/roles/sled-mcn0/files/rpm/sapp-4.0.8.c43dbc1-1.el7.x86_64.rpm
new file mode 100644
index 0000000..fe357da
--- /dev/null
+++ b/roles/sled-mcn0/files/rpm/sapp-4.0.8.c43dbc1-1.el7.x86_64.rpm
Binary files differ
diff --git a/roles/sled-mcn0/tasks/main.yml b/roles/sled-mcn0/tasks/main.yml
index 14fe5d4..561ed6b 100644
--- a/roles/sled-mcn0/tasks/main.yml
+++ b/roles/sled-mcn0/tasks/main.yml
@@ -14,19 +14,32 @@
src: "{{ role_path }}/files/rpm/{{ houyi_global.rpm_files.net_flood_rpm_file }}"
dest: "/tmp/houyi_deploy/"
-- name: "copy sapp_rpm_file to destination server"
+- name: "copy houyi_common_tools_rpm_file to destination server"
synchronize:
- src: "{{ role_path }}/files/rpm/{{ houyi_global.rpm_files.sapp_rpm_file }}"
+ src: "{{ role_path }}/files/rpm/{{ houyi_global.rpm_files.houyi_common_tools_rpm_file }}"
dest: "/tmp/houyi_deploy/"
+
+#- name: "copy sapp_rpm_file to destination server"
+# synchronize:
+# src: "{{ role_path }}/files/rpm/{{ houyi_global.rpm_files.sapp_rpm_file }}"
+# dest: "/tmp/houyi_deploy/"
+
+#- name: "install sapp"
+# yum:
+# name: "{{ packages }}"
+# state: present
+# vars:
+# packages:
+# - /tmp/houyi_deploy/{{ houyi_global.rpm_files.sapp_rpm_file }}
-- name: "install sapp"
+- name: "install houyi-common-tools"
yum:
name: "{{ packages }}"
state: present
vars:
packages:
- - /tmp/houyi_deploy/{{ houyi_global.rpm_files.sapp_rpm_file }}
-
+ - /tmp/houyi_deploy/{{ houyi_global.rpm_files.houyi_common_tools_rpm_file }}
+
- name: "install houyi"
yum:
name: "{{ packages }}"
@@ -74,8 +87,14 @@
src: "{{ role_path }}/templates/houyi.inf.j2"
dest: /home/mesasoft/sapp_run/plug/business/houyi/houyi.inf
tags: template
+
+- name: "Template the houyi_send_log.conf"
+ template:
+ src: "{{ role_path }}/templates/houyi_send_log.conf.j2"
+ dest: /opt/houyi/bin/houyi_etc/houyi_send_log.conf
+ tags: template
-- name: "Template the houyi.inf"
+- name: "Template the houyi_plug.conf"
template:
src: "{{ role_path }}/templates/houyi_plug.conf.j2"
dest: /home/mesasoft/sapp_run/houyi_etc/houyi_plug.conf
@@ -119,4 +138,4 @@
systemd:
name: sapp
enabled: yes
- daemon_reload: yes \ No newline at end of file
+ daemon_reload: yes
diff --git a/roles/sled-mcn0/templates/houyi_plug.conf.j2 b/roles/sled-mcn0/templates/houyi_plug.conf.j2
index 3407f6b..740046e 100644
--- a/roles/sled-mcn0/templates/houyi_plug.conf.j2
+++ b/roles/sled-mcn0/templates/houyi_plug.conf.j2
@@ -3,6 +3,6 @@ log_path=./houyi_log/runtime.log
log_level=20
log_interval=3
-fs2_remote_server_ip=192.168.40.1
+fs2_remote_server_ip=127.0.0.1
fs2_remote_server_port=8152
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 247dac2..0d9a523 100644
--- a/roles/sled-mcn0/templates/houyi_plug_arp_network.conf.j2
+++ b/roles/sled-mcn0/templates/houyi_plug_arp_network.conf.j2
@@ -3,6 +3,9 @@
#dir network mask-bit-num mac-addr
#dir: 0:C2I, 1:I2C
+#houyi模块对方向的定义: houyi_send_dir_t,
+#HOUYI_SEND_DIR_C2I = 0, 内-->外, outbound, 看第一个字母象形, O 0
+#HOUYI_SEND_DIR_I2C = 1, 外-->内, inbound , 看第一个字母象形, I 1
#example:
-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
+0 10.3.22.128 255.255.255.128 46:9d:8e:37:53:11
+1 10.3.22.0 255.255.255.128 46:9d:8e:37:53:22 \ No newline at end of file
diff --git a/roles/sled-mcn0/templates/houyi_send_log.conf.j2 b/roles/sled-mcn0/templates/houyi_send_log.conf.j2
new file mode 100644
index 0000000..fb14444
--- /dev/null
+++ b/roles/sled-mcn0/templates/houyi_send_log.conf.j2
@@ -0,0 +1,12 @@
+[field_stat2]
+Fs2_log_enable=1
+Fs2_log_local_dir_path=./log
+Fs2_server_ip=127.0.0.1
+Fs2_server_port=8125
+Fs2_interval=2
+
+[kafka]
+Kafka_log_enable=1
+kafka_brokers={{houyi_global.kafka.brokers}}
+Kafka_interval={{houyi_global.kafka.interval}}
+kafka_topic_name={{houyi_global.kafka.topic_name}}
diff --git a/roles/sled-mcn0/templates/send_raw_pkt.conf.j2 b/roles/sled-mcn0/templates/send_raw_pkt.conf.j2
index f69d1da..fc36216 100644
--- a/roles/sled-mcn0/templates/send_raw_pkt.conf.j2
+++ b/roles/sled-mcn0/templates/send_raw_pkt.conf.j2
@@ -9,8 +9,8 @@
## (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
+0 pag {{houyi_global.sapp.packet_io.external_device}} ens4 dna0 dpdk ppf npacket qnf n95 eth1 topsec eth1 vxlan_user smith dpdk dpdk pag
+1 pag {{houyi_global.sapp.packet_io.internal_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
diff --git a/xxg_env/group_vars/all.yml b/xxg_env/group_vars/all.yml
index 7dd411f..edf557c 100644
--- a/xxg_env/group_vars/all.yml
+++ b/xxg_env/group_vars/all.yml
@@ -1,7 +1,7 @@
houyi_global:
sapp:
packet_io:
- inbound_route_dir: 0
+ inbound_route_dir: 1
internal_device: "eth5"
external_device: "eth4"
@@ -11,7 +11,13 @@ houyi_global:
redis_index: 0
rpm_files:
- houyi_rpm_file: "houyi-1.0.0.bf9f5bf-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
+ houyi_rpm_file: "houyi-1.2.0.78327cd-1.el7.x86_64.rpm"
+ houyi_common_tools_rpm_file: "houyi-common-tools-1.0.1.e757dda-1.el7.x86_64.rpm"
+ houyi_plug_rpm_file: "houyi-plug-1.2.0.203ee5c-1.el7.x86_64.rpm"
+ net_flood_rpm_file: "net_flood-2.1.0.27094d7-1.el7.x86_64.rpm"
+ sapp_rpm_file: "sapp-4.0.8.7010e12-1.el7.x86_64.rpm"
+
+ kafka:
+ brokers: "192.168.40.224:9092"
+ interval: 10
+ topic_name: "ACTIVE-DEFENCE-EVENT-LOG" \ No newline at end of file