summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlijia <[email protected]>2020-05-27 18:29:41 +0800
committerlijia <[email protected]>2020-05-27 18:29:41 +0800
commitc50ee0b77ca8e52acb2f1cc1754e55bc6d0ae5cb (patch)
treebe49fa1b0ce575ca296cd64502896c0d06b16e8c
parentf5aa803b67f0fda1cc98cdd9ca1898fec4cbc99d (diff)
更新RPM包; 增加获取本地设备ID文件: tsg_sn.json.
-rw-r--r--cec6_env/group_vars/all.yml23
-rw-r--r--cec6_env/hosts.xxg2
-rw-r--r--roles/sled-mcn0/files/rpm/houyi-1.3.0.4694576-1.el7.x86_64.rpmbin479264 -> 0 bytes
-rw-r--r--roles/sled-mcn0/files/rpm/houyi-1.3.3.74e3c7f-1.el7.x86_64.rpmbin0 -> 480180 bytes
-rw-r--r--roles/sled-mcn0/files/rpm/houyi-common-tools-1.0.2.800e146-1.el7.x86_64.rpmbin23152 -> 0 bytes
-rw-r--r--roles/sled-mcn0/files/rpm/houyi-common-tools-1.0.3.d76bd15-1.el7.x86_64.rpmbin0 -> 23496 bytes
-rw-r--r--roles/sled-mcn0/files/rpm/net_flood-2.1.1.a06f126-1.el7.x86_64.rpmbin241368 -> 0 bytes
-rw-r--r--roles/sled-mcn0/files/rpm/net_flood-2.1.4.0ffe326-1.el7.x86_64.rpmbin0 -> 241456 bytes
-rw-r--r--roles/sled-mcn0/files/rpm/wire-graft-1.0.1.8750969-1.el7.x86_64.rpmbin18088 -> 0 bytes
-rw-r--r--roles/sled-mcn0/files/rpm/wire-graft-1.0.2.b2ec3a2-1.el7.x86_64.rpmbin0 -> 21632 bytes
-rw-r--r--roles/sled-mcn0/tasks/main.yml11
-rw-r--r--roles/sled-mcn0/templates/houyi.conf.j213
-rw-r--r--roles/sled-mcn0/templates/tsg_sn.json.j23
-rw-r--r--xxg_env/group_vars/all.yml13
14 files changed, 49 insertions, 16 deletions
diff --git a/cec6_env/group_vars/all.yml b/cec6_env/group_vars/all.yml
index cb463e8..f72623a 100644
--- a/cec6_env/group_vars/all.yml
+++ b/cec6_env/group_vars/all.yml
@@ -3,10 +3,10 @@ houyi_global:
install: false
packet_io:
inbound_route_dir: 1
- internal_device: "enp175s0f0"
- external_device: "enp175s0f1"
+ internal_device: "enp175s0f1"
+ external_device: "enp175s0f0"
packet_io_depolyment:
- mode: "mirror"
+ mode: "transparent"
houyi:
redis_server_ip: "192.168.70.125"
@@ -14,14 +14,17 @@ houyi_global:
redis_index: 0
rpm_files:
- houyi_rpm_file: "houyi-1.2.0.647fcd4-1.el7.x86_64.rpm"
- houyi_common_tools_rpm_file: "houyi-common-tools-1.0.0.ed74540-1.el7.x86_64.rpm"
- houyi_plug_rpm_file: "houyi-plug-1.2.0.281c7ec-1.el7.x86_64.rpm"
- net_flood_rpm_file: "net_flood-2.0.3.8d3d59b-1.el7.x86_64.rpm"
- sapp_rpm_file: "sapp-4.0.8.c43dbc1-1.el7.x86_64.rpm"
- wire_graft_rpm_file: "wire-graft-1.0.0.d757e02-1.el7.x86_64.rpm"
+ houyi_rpm_file: "houyi-1.3.3.74e3c7f-1.el7.x86_64.rpm"
+ houyi_common_tools_rpm_file: "houyi-common-tools-1.0.3.d76bd15-1.el7.x86_64.rpm"
+ houyi_plug_rpm_file: "houyi-plug-1.3.0.99bb9d9-1.el7.x86_64.rpm"
+ net_flood_rpm_file: "net_flood-2.1.4.0ffe326-1.el7.x86_64.rpm"
+ sapp_rpm_file: "sapp-4.0.12.f8435d8-x86_64...rpm"
+ wire_graft_rpm_file: "wire-graft-1.0.2.b2ec3a2-1.el7.x86_64.rpm"
kafka:
brokers: "192.168.70.128:9092"
interval: 30
- topic_name: "ACTIVE-DEFENCE-EVENT-LOG" \ No newline at end of file
+ topic_name: "ACTIVE-DEFENCE-EVENT-LOG"
+
+ log:
+ device_id: "1" \ No newline at end of file
diff --git a/cec6_env/hosts.xxg b/cec6_env/hosts.xxg
index f4b06af..05c65fe 100644
--- a/cec6_env/hosts.xxg
+++ b/cec6_env/hosts.xxg
@@ -2,7 +2,7 @@
ansible_user=root
[sled-mcn0]
-192.168.70.203
+192.168.70.113
[tsg-all:children]
sled-mcn0
diff --git a/roles/sled-mcn0/files/rpm/houyi-1.3.0.4694576-1.el7.x86_64.rpm b/roles/sled-mcn0/files/rpm/houyi-1.3.0.4694576-1.el7.x86_64.rpm
deleted file mode 100644
index bfe21db..0000000
--- a/roles/sled-mcn0/files/rpm/houyi-1.3.0.4694576-1.el7.x86_64.rpm
+++ /dev/null
Binary files differ
diff --git a/roles/sled-mcn0/files/rpm/houyi-1.3.3.74e3c7f-1.el7.x86_64.rpm b/roles/sled-mcn0/files/rpm/houyi-1.3.3.74e3c7f-1.el7.x86_64.rpm
new file mode 100644
index 0000000..c59072e
--- /dev/null
+++ b/roles/sled-mcn0/files/rpm/houyi-1.3.3.74e3c7f-1.el7.x86_64.rpm
Binary files differ
diff --git a/roles/sled-mcn0/files/rpm/houyi-common-tools-1.0.2.800e146-1.el7.x86_64.rpm b/roles/sled-mcn0/files/rpm/houyi-common-tools-1.0.2.800e146-1.el7.x86_64.rpm
deleted file mode 100644
index e84b8ac..0000000
--- a/roles/sled-mcn0/files/rpm/houyi-common-tools-1.0.2.800e146-1.el7.x86_64.rpm
+++ /dev/null
Binary files differ
diff --git a/roles/sled-mcn0/files/rpm/houyi-common-tools-1.0.3.d76bd15-1.el7.x86_64.rpm b/roles/sled-mcn0/files/rpm/houyi-common-tools-1.0.3.d76bd15-1.el7.x86_64.rpm
new file mode 100644
index 0000000..7bbeb1b
--- /dev/null
+++ b/roles/sled-mcn0/files/rpm/houyi-common-tools-1.0.3.d76bd15-1.el7.x86_64.rpm
Binary files differ
diff --git a/roles/sled-mcn0/files/rpm/net_flood-2.1.1.a06f126-1.el7.x86_64.rpm b/roles/sled-mcn0/files/rpm/net_flood-2.1.1.a06f126-1.el7.x86_64.rpm
deleted file mode 100644
index d129333..0000000
--- a/roles/sled-mcn0/files/rpm/net_flood-2.1.1.a06f126-1.el7.x86_64.rpm
+++ /dev/null
Binary files differ
diff --git a/roles/sled-mcn0/files/rpm/net_flood-2.1.4.0ffe326-1.el7.x86_64.rpm b/roles/sled-mcn0/files/rpm/net_flood-2.1.4.0ffe326-1.el7.x86_64.rpm
new file mode 100644
index 0000000..d58c0ce
--- /dev/null
+++ b/roles/sled-mcn0/files/rpm/net_flood-2.1.4.0ffe326-1.el7.x86_64.rpm
Binary files differ
diff --git a/roles/sled-mcn0/files/rpm/wire-graft-1.0.1.8750969-1.el7.x86_64.rpm b/roles/sled-mcn0/files/rpm/wire-graft-1.0.1.8750969-1.el7.x86_64.rpm
deleted file mode 100644
index 93ba41c..0000000
--- a/roles/sled-mcn0/files/rpm/wire-graft-1.0.1.8750969-1.el7.x86_64.rpm
+++ /dev/null
Binary files differ
diff --git a/roles/sled-mcn0/files/rpm/wire-graft-1.0.2.b2ec3a2-1.el7.x86_64.rpm b/roles/sled-mcn0/files/rpm/wire-graft-1.0.2.b2ec3a2-1.el7.x86_64.rpm
new file mode 100644
index 0000000..be222ed
--- /dev/null
+++ b/roles/sled-mcn0/files/rpm/wire-graft-1.0.2.b2ec3a2-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 da5c200..3e899d9 100644
--- a/roles/sled-mcn0/tasks/main.yml
+++ b/roles/sled-mcn0/tasks/main.yml
@@ -137,6 +137,17 @@
src: "{{ role_path }}/templates/houyi.conf.j2"
dest: /opt/houyi/bin/houyi_etc/houyi.conf
tags: template
+
+- name: "Creates /opt/tsg/etc directory"
+ file:
+ path: /opt/tsg/etc
+ state: directory
+
+- name: "Template tsg_sn.json"
+ template:
+ src: "{{ role_path }}/templates/tsg_sn.json.j2"
+ dest: /opt/tsg/etc/tsg_sn.json
+ tags: template
- name: "copy houyi.service to destination server"
synchronize:
diff --git a/roles/sled-mcn0/templates/houyi.conf.j2 b/roles/sled-mcn0/templates/houyi.conf.j2
index b37d5a6..9d5e31a 100644
--- a/roles/sled-mcn0/templates/houyi.conf.j2
+++ b/roles/sled-mcn0/templates/houyi.conf.j2
@@ -4,6 +4,19 @@ send_pkt_dev_name=tap_houyi
log_path=./houyi_log/runtime.log
log_level=20
+#为了方便, 容错处理, 关于方向的定义, 以下表述全是一个意思:
+#由内向外: C2I, CtoI, CTOI, ItoE, I2E,
+#由外向内: I2C, ItoC, ITOC, EtoI, E2I,
+[flood]
+#此处加一个配置文件, 便于在不同环境测试.
+#正式环境下, 默认肯定是ItoE的
+default_send_dir=I2E
+
+[reflection]
+#此处加一个配置文件, 便于在不同环境测试.
+#正式环境下, 默认肯定是ItoE的
+default_send_dir=I2E
+
[maat]
table_info=./houyi_etc/maat_tableinfo.conf
#json, redis, local_file
diff --git a/roles/sled-mcn0/templates/tsg_sn.json.j2 b/roles/sled-mcn0/templates/tsg_sn.json.j2
new file mode 100644
index 0000000..3986e47
--- /dev/null
+++ b/roles/sled-mcn0/templates/tsg_sn.json.j2
@@ -0,0 +1,3 @@
+{
+ "sn": {{houyi_global.log.device_id}}
+} \ No newline at end of file
diff --git a/xxg_env/group_vars/all.yml b/xxg_env/group_vars/all.yml
index b33fb4c..1814391 100644
--- a/xxg_env/group_vars/all.yml
+++ b/xxg_env/group_vars/all.yml
@@ -14,14 +14,17 @@ houyi_global:
redis_index: 0
rpm_files:
- houyi_rpm_file: "houyi-1.3.0.4694576-1.el7.x86_64.rpm"
- houyi_common_tools_rpm_file: "houyi-common-tools-1.0.2.800e146-1.el7.x86_64.rpm"
+ houyi_rpm_file: "houyi-1.3.3.74e3c7f-1.el7.x86_64.rpm"
+ houyi_common_tools_rpm_file: "houyi-common-tools-1.0.3.d76bd15-1.el7.x86_64.rpm"
houyi_plug_rpm_file: "houyi-plug-1.3.0.99bb9d9-1.el7.x86_64.rpm"
- net_flood_rpm_file: "net_flood-2.1.1.a06f126-1.el7.x86_64.rpm"
+ net_flood_rpm_file: "net_flood-2.1.4.0ffe326-1.el7.x86_64.rpm"
sapp_rpm_file: "sapp-4.0.12.f8435d8-x86_64...rpm"
- wire_graft_rpm_file: "wire-graft-1.0.1.8750969-1.el7.x86_64.rpm"
+ wire_graft_rpm_file: "wire-graft-1.0.2.b2ec3a2-1.el7.x86_64.rpm"
kafka:
brokers: "192.168.40.224:9092"
interval: 30
- topic_name: "ACTIVE-DEFENCE-EVENT-LOG" \ No newline at end of file
+ topic_name: "ACTIVE-DEFENCE-EVENT-LOG"
+
+ log:
+ device_id: "1" \ No newline at end of file