1、增加cert-redis的安装包及task

2、同步修改deploy.yml
3、为tsgconf/main.conf增加一个kafka的动态配置
4、修改tfe.conf中mc_default_eth的动态配置变量
5、原certstore中的r2、r3文件含有dos字符,修复该问题
This commit is contained in:
zhangzhihan
2020-01-20 01:03:39 +08:00
parent 9e24d4bcdf
commit a402dc2e89
18 changed files with 1149 additions and 16 deletions

View File

@@ -60,7 +60,6 @@ kni:
enabled: 1 enabled: 1
tfe: tfe:
nr_threads: 16 nr_threads: 16
mc_cache_eth: ens1.100
keykeeper: keykeeper:
mode: "normal" mode: "normal"
no_cache: 0 no_cache: 0

View File

@@ -11,6 +11,7 @@
- kni - kni
- firewall - firewall
- certstore - certstore
- cert-redis
- hosts: blade-01 - hosts: blade-01
roles: roles:

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -0,0 +1,16 @@
[Unit]
Description=Redis persistent key-value database
After=network.target
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/usr/local/bin/start-cert-redis
ExecStop=killall redis-server
Type=forking
RuntimeDirectory=redis
RuntimeDirectoryMode=0755
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,6 @@
#!/bin/bash
#
cp -rf redis-server /usr/local/bin/
cp -rf redis-cli /usr/local/bin
cp -rf cert-redis.service /usr/lib/systemd/system/
cp -rf start-cert-redis /usr/local/bin

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,4 @@
#!/bin/bash
#
/usr/local/bin/redis-server /home/ceiec/cert-redis/6379/6379.conf

View File

@@ -0,0 +1,15 @@
- name: "copy cert-redis to destination server"
copy:
src: "{{ role_path }}/files/"
dest: /home/tsg
mode: 0755
- name: "install cert-redis"
shell: cd /home/tsg/cert-redis;sh install.sh
- name: "start cert-redis"
systemd:
name: cert-redis.service
state: started
daemon_reload: yes
enabled: yes

View File

@@ -4,26 +4,13 @@
src: "{{ role_path }}/files/" src: "{{ role_path }}/files/"
dest: "/tmp/ansible_deploy/" dest: "/tmp/ansible_deploy/"
#- name: "install redis"
# yum:
# name:
# - /tmp/ansible_deploy/jemalloc-3.6.0-1.el7.x86_64.rpm
# - /tmp/ansible_deploy/redis-3.2.12-2.el7.x86_64.rpm
# state: present
#- name: "enable redis"
# systemd:
# name: redis
# enabled: yes
# state: started
- name: Ensures /home/tsg exists - name: Ensures /home/tsg exists
file: path=/home/tsg state=directory file: path=/home/tsg state=directory
tags: mkdir tags: mkdir
- name: install certstore - name: install certstore
unarchive: unarchive:
src: "{{ role_path }}/files/certstore-base-online-20200108.tar.gz" src: "{{ role_path }}/files/certstore-base-online-20200119.tar.gz"
dest: /home/tsg dest: /home/tsg
- name: template certstore configure file - name: template certstore configure file

View File

@@ -34,6 +34,12 @@
dest: /home/mesasoft/sapp_run/etc/gdev.conf dest: /home/mesasoft/sapp_run/etc/gdev.conf
tags: template 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: "enable sapp" - name: "enable sapp"
systemd: systemd:
name: sapp name: sapp

View File

@@ -0,0 +1,47 @@
[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=enp8s0
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

View File

@@ -30,7 +30,7 @@ service_cache_expire_seconds=600
# default 0 # default 0
mc_cache_enable=1 mc_cache_enable=1
# default eth0 # default eth0
mc_cache_eth={{ tfe.mc_cache_eth }} mc_cache_eth={{ nic_inner_ctrl.name }}
# default NULL # default NULL
mc_cache_broker_list={{ log_kafkabrokers.address }} mc_cache_broker_list={{ log_kafkabrokers.address }}
# default PXY-EXCH-INTERMEDIA-CERT # default PXY-EXCH-INTERMEDIA-CERT

BIN
tsg-scripts.zip Normal file

Binary file not shown.