update 20.06.01

This commit is contained in:
zhangzhihan
2020-06-22 10:34:56 +08:00
parent e67c3feb23
commit e1dc6b5f62
22 changed files with 173 additions and 14 deletions

View File

@@ -55,3 +55,4 @@
- cert-redis - cert-redis
- tfe - tfe
- telegraf_statistic - telegraf_statistic
- proxy_status

View File

@@ -20,7 +20,7 @@
- /tmp/ansible_deploy/fw_ftp_plug-1.1.0.74c9a05-2.el7.x86_64.rpm - /tmp/ansible_deploy/fw_ftp_plug-1.1.0.74c9a05-2.el7.x86_64.rpm
- /tmp/ansible_deploy/fw_ssl_plug-1.0.3.30fcf35-2.el7.x86_64.rpm - /tmp/ansible_deploy/fw_ssl_plug-1.0.3.30fcf35-2.el7.x86_64.rpm
- /tmp/ansible_deploy/fw_mail_plug-1.1.0.a42c5a0-2.el7.x86_64.rpm - /tmp/ansible_deploy/fw_mail_plug-1.1.0.a42c5a0-2.el7.x86_64.rpm
- /tmp/ansible_deploy/fw_http_plug-1.1.1.d5a0b10-2.el7.x86_64.rpm - /tmp/ansible_deploy/fw_http_plug-1.2.0.a7e63c0-2.el7.x86_64.rpm
- /tmp/ansible_deploy/capture_packet_plug-debug-1.0.0.-1.el7.x86_64.rpm - /tmp/ansible_deploy/capture_packet_plug-debug-1.0.0.-1.el7.x86_64.rpm
- /tmp/ansible_deploy/clotho-debug-1.0.0.-1.el7.x86_64.rpm - /tmp/ansible_deploy/clotho-debug-1.0.0.-1.el7.x86_64.rpm
- /tmp/ansible_deploy/quic-1.1.4.9c2e0ba-2.el7.x86_64.rpm - /tmp/ansible_deploy/quic-1.1.4.9c2e0ba-2.el7.x86_64.rpm

View File

@@ -1,4 +1,5 @@
[STATIC] [STATIC]
###0:location 1:json 2:redis
MAAT_MODE=2 MAAT_MODE=2
STAT_SWITCH=1 STAT_SWITCH=1
PERF_SWITCH=1 PERF_SWITCH=1
@@ -14,6 +15,7 @@ INC_CFG_DIR=tsgrule/inc/index/
FULL_CFG_DIR=tsgrule/full/index/ FULL_CFG_DIR=tsgrule/full/index/
[DYNAMIC] [DYNAMIC]
###0:location 1:json 2:redis
MAAT_MODE=2 MAAT_MODE=2
STAT_SWITCH=1 STAT_SWITCH=1
PERF_SWITCH=1 PERF_SWITCH=1

View File

@@ -4,22 +4,23 @@
dest: "/tmp/ansible_deploy/" dest: "/tmp/ansible_deploy/"
- name: "install framework packages" - name: "install framework packages"
yum: # yum:
name: "{{ packages }}" # name: "{{ packages }}"
state: present # state: present
skip_broken: yes # skip_broken: yes
shell: "rpm -ivh /tmp/ansible_deploy/{{ packages }}"
vars: vars:
packages: packages:
- /tmp/ansible_deploy/libMESA_field_stat-1.0.1.852c2df-1.el7.x86_64.rpm - /tmp/ansible_deploy/libMESA_field_stat-1.0.1.852c2df-1.el7.x86_64.rpm
- /tmp/ansible_deploy/libMESA_field_stat2-2.9.0.16ecf3b-2.el7.x86_64.rpm - /tmp/ansible_deploy/libMESA_field_stat2-2.9.0.16ecf3b-2.el7.x86_64.rpm
- /tmp/ansible_deploylibMESA_handle_logger-1.0.9.304259e-2.el7.x86_64.rpm/ - /tmp/ansible_deploy/libMESA_handle_logger-1.0.9.304259e-2.el7.x86_64.rpm
- /tmp/ansible_deploy/libMESA_htable-3.10.11.6275308-1.el7.x86_64.rpm - /tmp/ansible_deploy/libMESA_htable-3.10.11.6275308-1.el7.x86_64.rpm
- /tmp/ansible_deploy/libMESA_prof_load-1.0.5.bf755de-1.el7.x86_64.rpm - /tmp/ansible_deploy/libMESA_prof_load-1.0.5.bf755de-1.el7.x86_64.rpm
- /tmp/ansible_deploy/libWiredLB-2.0.3.c7d131b-1.el7.x86_64.rpm - /tmp/ansible_deploy/libWiredLB-2.0.3.c7d131b-1.el7.x86_64.rpm
- /tmp/ansible_deploy/libcjson-1.7.8.542ad7f-1.el7.x86_64.rpm - /tmp/ansible_deploy/libcjson-1.7.8.542ad7f-1.el7.x86_64.rpm
- /tmp/ansible_deploy/libdocumentanalyze-2.0.4.efdfc29-1.el7.x86_64.rpm - /tmp/ansible_deploy/libdocumentanalyze-2.0.4.efdfc29-1.el7.x86_64.rpm
- /tmp/ansible_deploy/libmaatframe-2.9.2.7519c63-2.el7.x86_64.rpm - /tmp/ansible_deploy/libmaatframe-2.9.2.7519c63-2.el7.x86_64.rpm
- /tmp/ansible_deploy/librulescan-devel-2.2.0.900d2b3-2.el7.x86_64.rpm - /tmp/ansible_deploy/librulescan-2.2.0.900d2b3-2.el7.x86_64.rpm
- /tmp/ansible_deploy/libwiredcfg-2.0.2.7ce1eea-1.el7.x86_64.rpm - /tmp/ansible_deploy/libwiredcfg-2.0.2.7ce1eea-1.el7.x86_64.rpm
- /tmp/ansible_deploy/lz4-1.7.5-3.el7.x86_64.rpm - /tmp/ansible_deploy/lz4-1.7.5-3.el7.x86_64.rpm
- /tmp/ansible_deploy/librdkafka-0.11.4-1.el7.x86_64.rpm - /tmp/ansible_deploy/librdkafka-0.11.4-1.el7.x86_64.rpm

BIN
roles/proxy_status/.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -0,0 +1,11 @@
[Unit]
Description=proxy status
[Service]
ExecStart=/opt/proxy_status/proxy_start
ExecStop=/opt/proxy_status/proxy_stop
Type=oneshot
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,12 @@
#!/bin/bash
#
systemctl start tsg-env-tun-mode.service &>/dev/null &
sleep 2
systemctl start sapp.service &>/dev/null &
sleep 5
systemctl start tfe-env.service &>/dev/null &
sleep 5
systemctl start tfe.service &>/dev/null &
systemctl start certstore.service &>/dev/null &
systemctl start cert-redis.service &>/dev/null &

View File

@@ -0,0 +1,65 @@
#!/bin/bash
#
systemctl status tsg-env-tun-mode &>/dev/null
if [ $? -eq 0 ];then
echo -e "\033[32m tsg-env-tun-mode is running \033[0m"
else
echo -e "\033[31m tsg-env-tun-mode is down \033[0m"
fi
systemctl status mrzcpd &>/dev/null
if [ $? -eq 0 ];then
echo -e "\033[32m mrzcpd is running \033[0m"
else
echo -e "\033[31m mrzcpd is down \033[0m"
fi
systemctl status mrenv &>/dev/null
if [ $? -eq 0 ];then
echo -e "\033[32m mrenv is running \033[0m"
else
echo -e "\033[31m mrenv is down \033[0m"
fi
systemctl status mrtunnat &>/dev/null
if [ $? -eq 0 ];then
echo -e "\033[32m mrtunnat is running \033[0m"
else
echo -e "\033[31m mrtunnat is down \033[0m"
fi
systemctl status sapp &>/dev/null
if [ $? -eq 0 ];then
echo -e "\033[32m sapp is running \033[0m"
else
echo -e "\033[31m sapp is down \033[0m"
fi
systemctl status tfe-env &>/dev/null
if [ $? -eq 0 ];then
echo -e "\033[32m tfe-env is running \033[0m"
else
echo -e "\033[31m tfe-env is down \033[0m"
fi
systemctl status tfe &>/dev/null
if [ $? -eq 0 ];then
echo -e "\033[32m tfe is running \033[0m"
else
echo -e "\033[31m tfe is down \033[0m"
fi
systemctl status certstore &>/dev/null
if [ $? -eq 0 ];then
echo -e "\033[32m certstore is running \033[0m"
else
echo -e "\033[31m certstore is down \033[0m"
fi
systemctl status cert-redis &>/dev/null
if [ $? -eq 0 ];then
echo -e "\033[32m cert-redis is running \033[0m"
else
echo -e "\033[31m cert-redis is down \033[0m"
fi

View File

@@ -0,0 +1,12 @@
#!/bin/bash
#
systemctl stop tsg-env-tun-mode.service &>/dev/null &
systemctl stop mrzcpd.service &>/dev/null &
systemctl stop mrtunnat.service &>/dev/null &
systemctl stop sapp.service &>/dev/null &
systemctl stop tfe-env.service &>/dev/null &
systemctl stop tfe.service &>/dev/null &
systemctl stop certstore.service &>/dev/null &
systemctl stop cert-redis.service &>/dev/null &

View File

@@ -0,0 +1,27 @@
---
- name: "create /opt/proxy_status"
file:
path: /opt/proxy_status
state: directory
- name: "copy files"
copy:
src:
- "{{ role_path }}/files/proxy_start"
- "{{ role_path }}/files/proxy_status"
- "{{ role_path }}/files/proxy_stop"
dest: /opt/proxy_status
mode: 0755
- name: "copy proxy-status.service"
copy:
src: "{{ role_path }}/files/proxy-status.service"
dest: "/usr/lib/systemd/system/"
mode: 0755
- name: "enable proxy-status"
systemd:
name: proxy-status
enabled: yes
daemon_reload: yes

View File

@@ -9,13 +9,13 @@
instance_name = "sapp4" instance_name = "sapp4"
[CPU] [CPU]
{% if tsg_running_type == 0 %} {% if tsg_access_type == 0 %}
worker_threads=1 worker_threads=1
{% else %} {% else %}
worker_threads={{ sapp.worker_threads }} worker_threads={{ sapp.worker_threads }}
{% endif %} {% endif %}
### note, bind_mask, if you do not want to bind thread to special CPU core, keep it empty as [] ### note, bind_mask, if you do not want to bind thread to special CPU core, keep it empty as []
{% if tsg_running_type == 0 %} {% if tsg_access_type == 0 %}
bind_mask=[] bind_mask=[]
{% else %} {% else %}
bind_mask=[{{ sapp.bind_mask }}] bind_mask=[{{ sapp.bind_mask }}]

Binary file not shown.

22
roles/tfe/files/tfe.service Executable file
View File

@@ -0,0 +1,22 @@
[Unit]
Description=Tango Frontend Engine
Requires=tfe-env.service
After=tfe-env.service
[Service]
Type=notify
ExecStart=/opt/tsg/tfe/bin/tfe
WorkingDirectory=/opt/tsg/tfe/
TimeoutSec=3600s
RestartSec=10s
Restart=always
LimitNOFILE=524288
LimitNPROC=infinity
LimitCORE=infinity
TasksMax=infinity
Delegate=yes
KillMode=process
[Install]
WantedBy=multi-user.target

View File

@@ -4,11 +4,17 @@
src: "{{ role_path }}/files/" src: "{{ role_path }}/files/"
dest: /tmp/ansible_deploy/ dest: /tmp/ansible_deploy/
- name: "copy tfe.service to destination server"
copy:
src: "{{ role_path }}/files/tfe.service"
dest: /usr/lib/systemd/system/
mode: 0755
- name: "install tfe rpms from localhost" - name: "install tfe rpms from localhost"
yum: yum:
name: name:
- /tmp/ansible_deploy/tfe-kmod-v1.0.5.20200408-1dkms.noarch.rpm - /tmp/ansible_deploy/tfe-kmod-v1.0.5.20200408-1dkms.noarch.rpm
- /tmp/ansible_deploy/tfe-4.3.4.82f04dc-1.el7.x86_64.rpm - /tmp/ansible_deploy/tfe-4.3.5.0db794c-1.el7.x86_64.rpm
state: present state: present
- name: "template tfe-env config" - name: "template tfe-env config"

View File

@@ -1,7 +1,7 @@
{% if tsg_running_type == 0 %} {% if tsg_access_type == 4 %}
TFE_DEVICE_DATA_INCOMING={ nic_data_incoming.vf2_name }}
{% elif tsg_running_type == 0 %}
TFE_DEVICE_DATA_INCOMING=tun_kni TFE_DEVICE_DATA_INCOMING=tun_kni
{% elif tsg_access_type == 4 %}
TFE_DEVICE_DATA_INCOMING={{ nic_data_incoming.vf2_name }}
{% else %} {% else %}
TFE_DEVICE_DATA_INCOMING={{ nic_data_incoming.name }} TFE_DEVICE_DATA_INCOMING={{ nic_data_incoming.name }}
{% endif %} {% endif %}

View File

@@ -6,6 +6,6 @@
- name: "install tsg_master from localhost" - name: "install tsg_master from localhost"
yum: yum:
name: name:
- /tmp/ansible_deploy/tsg_master-1.2.8.2aa222c-2.el7.x86_64.rpm - /tmp/ansible_deploy/tsg_master-1.3.3.65833d7-2.el7.x86_64.rpm
state: present state: present
skip_broken: yes skip_broken: yes