update
This commit is contained in:
Binary file not shown.
BIN
roles/tsg_app/files/app_master-1.0.5.5a4fb22-2.el7.x86_64.rpm
Normal file
BIN
roles/tsg_app/files/app_master-1.0.5.5a4fb22-2.el7.x86_64.rpm
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
32
roles/tsg_app/tasks/main.yml
Normal file
32
roles/tsg_app/tasks/main.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
- name: "copy tsg_app rpms to destination server"
|
||||
copy:
|
||||
src: "{{ role_path }}/files/"
|
||||
dest: /tmp/ansible_deploy/
|
||||
|
||||
- name: "install tsg_app packages"
|
||||
yum:
|
||||
name: "{{ app_packages }}"
|
||||
state: present
|
||||
skip_broken: yes
|
||||
vars:
|
||||
app_packages:
|
||||
- /tmp/ansible_deploy/app_master-1.0.5.5a4fb22-2.el7.x86_64.rpm
|
||||
- /tmp/ansible_deploy/app_control_plug-1.0.3.447fc53-2.el7.x86_64.rpm
|
||||
- /tmp/ansible_deploy/app_proto_identify-1.0.3.6c893f2-2.el7.x86_64.rpm
|
||||
- /tmp/ansible_deploy/app_sketch_local-1.0.4.0edaf58-2.el7.x86_64.rpm
|
||||
when: tsg_app_enable == 1
|
||||
|
||||
- name: "Template the appconf/main.conf"
|
||||
template:
|
||||
src: "{{ role_path }}/templates/main.conf.j2"
|
||||
dest: /home/mesasoft/sapp_run/appconf/main.conf
|
||||
tags: template
|
||||
when: tsg_app_enable == 1
|
||||
|
||||
- name: "Template the appconf/maat.conf"
|
||||
template:
|
||||
src: "{{ role_path }}/templates/maat.conf.j2"
|
||||
dest: /home/mesasoft/sapp_run/appconf/maat.conf
|
||||
tags: template
|
||||
when: tsg_app_enable == 1
|
||||
34
roles/tsg_app/templates/maat.conf.j2
Normal file
34
roles/tsg_app/templates/maat.conf.j2
Normal file
@@ -0,0 +1,34 @@
|
||||
[APP_SIGNATURE_MAAT]
|
||||
MAAT_MODE=2
|
||||
STAT_SWITCH=1
|
||||
PERF_SWITCH=1
|
||||
TABLE_INFO=appconf/app_id_tableinfo.conf
|
||||
STAT_FILE=app_id_maat.status
|
||||
EFFECT_INTERVAL_S=1
|
||||
REDIS_IP={{ maat_redis_server.address }}
|
||||
REDIS_PORT_NUM=1
|
||||
REDIS_PORT={{ maat_redis_server.port }}
|
||||
REDIS_INDEX={{ maat_redis_server.db }}
|
||||
JSON_CFG_FILE=appconf/app_id_maat.json
|
||||
INC_CFG_DIR=apprule/inc/index/
|
||||
FULL_CFG_DIR=apprule/full/index/
|
||||
EFFECTIVE_RANGE_FILE=/opt/app/etc/app_device_tag.json
|
||||
|
||||
[APP_ACTION_MAAT]
|
||||
MAAT_MODE=2
|
||||
STAT_SWITCH=1
|
||||
PERF_SWITCH=1
|
||||
TABLE_INFO=appconf/app_action_tableinfo.conf
|
||||
STAT_FILE=app_action_maat.status
|
||||
EFFECT_INTERVAL_S=1
|
||||
REDIS_IP={{ maat_redis_server.address }}
|
||||
REDIS_PORT_NUM=1
|
||||
REDIS_PORT={{ maat_redis_server.port }}
|
||||
REDIS_INDEX={{ maat_redis_server.db }}
|
||||
JSON_CFG_FILE=appconf/app_action_maat.json
|
||||
INC_CFG_DIR=apprule/inc/index/
|
||||
FULL_CFG_DIR=apprule/full/index/
|
||||
EFFECTIVE_RANGE_FILE=/opt/tsg/etc/tsg_device_tag.json
|
||||
|
||||
[MAAT]
|
||||
ACCEPT_TAGS={"tags":[{"tag":"device_id","value":"device_1"}]}
|
||||
39
roles/tsg_app/templates/main.conf.j2
Normal file
39
roles/tsg_app/templates/main.conf.j2
Normal file
@@ -0,0 +1,39 @@
|
||||
[FEEDBACK]
|
||||
QOS=1
|
||||
PUBLISH_TOPIC=APP_SIGNATURE_ID
|
||||
#CLIENT_ID=
|
||||
BROKER_LIST=tcp://192.168.40.161:1883
|
||||
|
||||
[LUA]
|
||||
ENABLE=1
|
||||
|
||||
[MAAT]
|
||||
PROFILE=./appconf/maat.conf
|
||||
|
||||
[APP_LOG]
|
||||
MODE=1
|
||||
LOG_LEVEL={{ applog_level }}
|
||||
LOG_PATH=./applog/applog
|
||||
BROKER_LIST={{ log_kafkabrokers.address }}
|
||||
COMMON_FIELD_FILE=appconf/app_log_field.conf
|
||||
|
||||
[FIELD_STAT]
|
||||
CYCLE=5
|
||||
TELEGRAF_PORT=8100
|
||||
TELEGRAF_IP=127.0.0.1
|
||||
OUTPUT_PATH=./app_stat.log
|
||||
APP_NAME=app_master
|
||||
|
||||
[SYSTEM]
|
||||
LOG_LEVEL={{ app_master_log_level }}
|
||||
LOG_PATH=./applog/app_master
|
||||
NIC_NAME={{ nic_mgr.name }}
|
||||
|
||||
[APP_SKETCH_LOCAL]
|
||||
LOG_LEVEL={{ app_sketch_local_log_level }}
|
||||
LOG_PATH=./applog/app_sketch_local/app_sketch_local
|
||||
|
||||
[CONTROL_PLUG]
|
||||
LOG_LEVEL={{ app_control_plug_log_level }}
|
||||
LOG_PATH=./applog/app_control_plug/app_control_plug
|
||||
|
||||
Reference in New Issue
Block a user