summaryrefslogtreecommitdiff
path: root/roles/sapp
diff options
context:
space:
mode:
authorzhangzhihan <[email protected]>2020-04-01 10:31:23 +0800
committerzhangzhihan <[email protected]>2020-04-01 10:31:23 +0800
commitbeb4590a5d1576af6e839423d6235734b1dd97e1 (patch)
treeeadbc5d8607b3318db9c5ed0b19251b49c3a4f2a /roles/sapp
parent6e8fd6579768bed075ca9ab92fdf8dbca68e16f5 (diff)
优化双臂模式部署
Diffstat (limited to 'roles/sapp')
-rw-r--r--roles/sapp/tasks/main.yml18
-rw-r--r--roles/sapp/templates/maat.conf.j230
-rw-r--r--roles/sapp/templates/main.conf.j247
3 files changed, 5 insertions, 90 deletions
diff --git a/roles/sapp/tasks/main.yml b/roles/sapp/tasks/main.yml
index 131d5b1..54b70b4 100644
--- a/roles/sapp/tasks/main.yml
+++ b/roles/sapp/tasks/main.yml
@@ -10,6 +10,11 @@
- /tmp/ansible_deploy/sapp-4.0.5.3385992-1.el7.x86_64.rpm
state: present
+- name: make dir
+ file:
+ path: /home/mesasoft/sapp_run/tsgconf
+ state: directory
+
- name: Template the sapp.toml
template:
src: "{{ role_path }}/templates/sapp.toml.j2"
@@ -34,19 +39,6 @@
dest: /home/mesasoft/sapp_run/etc/gdev.conf
tags: template
-- name: Template the tsgconf/main.conf
- template:
- src: "{{ role_path }}/templates/main.conf.j2"
- dest: /home/mesasoft/sapp_run/tsgconf/main.conf
- tags: template
-
-
-- name: Template the tsgconf/maat.conf
- template:
- src: "{{ role_path }}/templates/maat.conf.j2"
- dest: /home/mesasoft/sapp_run/tsgconf/maat.conf
- tags: template
-
- name: "enable sapp"
systemd:
name: sapp
diff --git a/roles/sapp/templates/maat.conf.j2 b/roles/sapp/templates/maat.conf.j2
deleted file mode 100644
index f723e36..0000000
--- a/roles/sapp/templates/maat.conf.j2
+++ /dev/null
@@ -1,30 +0,0 @@
-[STATIC]
-MAAT_MODE=2
-STAT_SWITCH=1
-PERF_SWITCH=1
-TABLE_INFO=tsgconf/tsg_static_tableinfo.conf
-STAT_FILE=tsg_static_maat.status
-EFFECT_INTERVAL_S=1
-REDIS_IP={{ maat_redis_server.address }}
-REDIS_PORT_NUM=1
-REDIS_PORT=7002
-REDIS_INDEX=0
-JSON_CFG_FILE=tsgconf/tsg_maat.json
-INC_CFG_DIR=tsgrule/inc/index/
-FULL_CFG_DIR=tsgrule/full/index/
-
-[DYNAMIC]
-MAAT_MODE=2
-STAT_SWITCH=1
-PERF_SWITCH=1
-TABLE_INFO=tsgconf/tsg_dynamic_tableinfo.conf
-STAT_FILE=tsg_dynamic_maat.status
-EFFECT_INTERVAL_S=1
-REDIS_IP={{ dynamic_maat_redis_server.address }}
-REDIS_PORT_NUM=1
-REDIS_PORT=7002
-REDIS_INDEX=1
-JSON_CFG_FILE=tsgconf/tsg_maat.json
-INC_CFG_DIR=tsgrule/inc/index/
-FULL_CFG_DIR=tsgrule/full/index/
-
diff --git a/roles/sapp/templates/main.conf.j2 b/roles/sapp/templates/main.conf.j2
deleted file mode 100644
index 2e3b994..0000000
--- a/roles/sapp/templates/main.conf.j2
+++ /dev/null
@@ -1,47 +0,0 @@
-[FTP_PLUG]
-LOG_PATH=./tsglog/fw_ftp_plug/fw_ftp_plug
-LOG_LEVEL=10
-TIMEOUT=600
-[MAIL_PLUG]
-LOG_PATH=./tsglog/fw_mail_plug/fw_mail_plug
-LOG_LEVEL=10
-TIMEOUT=600
-[HTTP_PLUG]
-LOG_PATH=./tsglog/fw_http_plug/fw_http_plug
-LOG_LEVEL=10
-[DNS_PLUG]
-LOG_PATH=./tsglog/fw_dns_plug/fw_dns_plug
-LOG_LEVEL=10
-[MAAT]
-PROFILE=./tsgconf/maat.conf
-IP_ADDR_TABLE=TSG_OBJ_IP_ADDR
-SUBSCRIBER_ID_TABLE=TSG_OBJ_SUBSCRIBER_ID
-CB_SUBSCRIBER_IP_TABLE=TSG_DYN_SUBSCRIBER_IP
-
-[TSG_LOG]
-MODE=1
-NIC_NAME={{ nic_mgr.name }}
-MAX_SERVICE=1
-LOG_LEVEL=10
-LOG_PATH=./tsglog/tsglog
-BROKER_LIST={{ log_kafkabrokers.address }}
-COMMON_FIELD_FILE=tsgconf/tsg_log_field.conf
-
-[STATISTIC]
-CYCLE=0
-TELEGRAF_PORT=8100
-TELEGRAF_IP=127.0.0.1
-OUTPUT_PATH=./tsg_statistic.log
-APP_NAME=statistic
-
-[FIELD_STAT]
-CYCLE=3
-TELEGRAF_PORT=8125
-TELEGRAF_IP=127.0.0.1
-OUTPUT_PATH=./tsg_stat.log
-APP_NAME=tsg_master
-
-[SYSTEM]
-LOG_LEVEL=10
-LOG_PATH=./tsglog/tsg_master
-POLICY_PRIORITY_LABEL=POLICY_PRIORITY