Compare commits

...

15 Commits

Author SHA1 Message Date
张智涵
1818d305d9 Upload New File 2021-10-29 03:47:04 +00:00
刘学利
8beaf16134 Update conflist.inf.j2;更新conlist.inf,调整插件挂载的顺序 2020-10-20 16:36:58 +08:00
fumingwei
43d1a13cde tsg-dignose 自动部署脚本追加到tfe 可信证书文件中 2020-10-20 16:26:33 +08:00
fumingwei
5349fd24fb 1、增加tsg_master_entrance_id 2、修改sapp configlist.inf 3、kni rpm install 强制安装 2020-10-19 21:56:57 +08:00
fumingwei
344c734f70 Merge branch 'tsg-version20.11.rc1-deploy' of https://git.mesalab.cn/tsg/tsg-scripts into tsg-version20.11.rc1-deploy 2020-10-19 20:55:59 +08:00
fumingwei
ed6f5c3d3b Merge branch 'tsg-version20.11.rc1-deploy-firewall' into tsg-version20.11.rc1-deploy
# Conflicts:
#	roles/sapp/tasks/main.yml

更新firewall相关RPM包
2020-10-19 20:55:52 +08:00
fengweihao
aeee8afab9 app-sketch-global升级 2020-10-19 20:43:17 +08:00
fengweihao
67ae52725b cerstore升级 2020-10-19 20:42:42 +08:00
fumingwei
b0c9ea045b 更新kni 2020-10-19 19:33:31 +08:00
luwenpeng
9d9b8ad83c 升级 tfe 到 4.3.14 2020-10-19 18:30:26 +08:00
fumingwei
1c5ea5b740 1、增加内存限制 2020-10-19 14:52:08 +08:00
fumingwei
7800356765 修改telegraf 安装失败问题 2020-10-17 18:04:44 +08:00
fumingwei
11bf3dfa8e Merge branch 'tsg-version20.11.rc1-deploy-firewall' into tsg-version20.11.rc1-deploy 2020-10-17 14:12:48 +08:00
fumingwei
3fdae02a52 1、增加telegraf collect 部署 2、修改telegrafaf 配置文件 2020-10-17 13:59:56 +08:00
fumingwei
f0725b0e02 修改 clotho 为 package_dump 2020-10-16 16:57:20 +08:00
36 changed files with 103 additions and 17 deletions

View File

@@ -9,6 +9,7 @@
roles: roles:
- framework - framework
- kernel-ml - kernel-ml
- telegraf_collect
- hosts: adc_mxn - hosts: adc_mxn
remote_user: root remote_user: root
@@ -114,6 +115,7 @@
- cert-redis - cert-redis
- tfe - tfe
- telegraf_statistic - telegraf_statistic
- telegraf_collect
- proxy_status - proxy_status
# - tsg_device_tag # - tsg_device_tag
- reboot - reboot

BIN
dpi_2109_deploy.zip Normal file

Binary file not shown.

View File

@@ -106,4 +106,6 @@ app_sketch_local_log_level: 10
app_control_plug_log_level: 10 app_control_plug_log_level: 10
breakpad_upload_url: http://127.0.0.1/ breakpad_upload_url: http://127.0.0.1/
tsg_master_entrance_id: 0

View File

@@ -60,7 +60,7 @@ pangu_log_level: DEBUG
doh_log_level: DEBUG doh_log_level: DEBUG
certstore_log_level: 10 certstore_log_level: 10
clotho_log_level: 10 packet_dump_log_level: 10
######################################### #########################################
#Sapp Performance Config #Sapp Performance Config

View File

@@ -7,7 +7,7 @@
yum: yum:
name: name:
- /tmp/ansible_deploy/emqx-centos7-v4.1.2.x86_64.rpm - /tmp/ansible_deploy/emqx-centos7-v4.1.2.x86_64.rpm
- /tmp/ansible_deploy/app-sketch-global-1.0.2.20200918.ab44d17-1.el7.x86_64.rpm - /tmp/ansible_deploy/app-sketch-global-1.0.3.202010.a7b2e40-1.el7.x86_64.rpm
state: present state: present
- name: "template the app_sketch_global.conf" - name: "template the app_sketch_global.conf"
@@ -25,9 +25,12 @@
name: emqx.service name: emqx.service
state: started state: started
enabled: yes enabled: yes
daemon_reload: yes
- name: "Start app-sketch-global" - name: "Start app-sketch-global"
systemd: systemd:
name: app-sketch-global.service name: app-sketch-global.service
state: started state: started
enabled: yes enabled: yes
daemon_reload: yes

View File

@@ -0,0 +1,2 @@
[Service]
MemoryMax=10G

View File

@@ -10,7 +10,7 @@
- name: install certstore - name: install certstore
yum: yum:
name: name:
- /tmp/ansible_deploy/certstore-2.1.2.20200923.a36312c-1.el7.x86_64.rpm - /tmp/ansible_deploy/certstore-2.1.3.202010.81eef83-1.el7.x86_64.rpm
state: present state: present
- name: template certstore configure file - name: template certstore configure file
@@ -23,6 +23,12 @@
src: "{{ role_path }}/templates/zlog.conf.j2" src: "{{ role_path }}/templates/zlog.conf.j2"
dest: /opt/tsg/certstore/conf/zlog.conf dest: /opt/tsg/certstore/conf/zlog.conf
- name: "copy memory limit file to certstore.service.d"
copy:
src: "{{ role_path }}/files/memory.conf"
dest: /etc/systemd/system/certstore.service.d/
mode: 0644
- name: "start certstore" - name: "start certstore"
systemd: systemd:
name: certstore.service name: certstore.service

View File

@@ -7,8 +7,9 @@
- name: "install kni rpms from localhost" - name: "install kni rpms from localhost"
yum: yum:
name: name:
- /tmp/ansible_deploy/kni-20.10.20201014.6d458ba-1.el7.x86_64.rpm - /tmp/ansible_deploy/kni-20.10.20201019.3f20d93-2.el7.x86_64.rpm
state: present state: present
skip_broken: yes
- name: Template the kni.conf - name: Template the kni.conf
template: template:

View File

@@ -0,0 +1,2 @@
[Service]
MemoryMax=100G

View File

@@ -161,12 +161,18 @@
daemon_reload: yes daemon_reload: yes
when: nic_traffic_mirror is defined when: nic_traffic_mirror is defined
- name: "copy memory limit file to tfe.service.d"
copy:
src: "{{ role_path }}/files/memory.conf"
dest: /etc/systemd/system/mrzcpd.service.d/
mode: 0644
- name: "mask mrzcpd on server_tun_mode" - name: "mask mrzcpd on server_tun_mode"
systemd: systemd:
name: mrzcpd name: mrzcpd
enabled: no enabled: no
masked: yes masked: yes
daemon_reload: yes
when: when:
- tsg_access_type == 0 - tsg_access_type == 0
@@ -175,5 +181,6 @@
name: mrtunnat name: mrtunnat
enabled: no enabled: no
masked: yes masked: yes
daemon_reload: yes
when: when:
- tsg_access_type == 0 - tsg_access_type == 0

View File

@@ -0,0 +1,19 @@
[Unit]
Description=packet dump service
After=After=network.target
[Service]
Type=fork
WorkingDirectory=/home/mesasoft/packet_dump
ExecStart=/home/mesasoft/packet_dump/packet_dump
TimeoutSec=60s
RestartSec=10s
Restart=always
LimitNOFILE=524288
LimitNPROC=infinity
LimitCORE=infinity
TasksMax=infinity
Delegate=yes
[Install]
WantedBy=multi-user.target

View File

@@ -11,4 +11,4 @@ disable_coredump=0
enable_breakpad=1 enable_breakpad=1
breakpad_minidump_dir=/tmp/packet_dump/crashreport breakpad_minidump_dir=/tmp/packet_dump/crashreport
enable_breakpad_upload=0 enable_breakpad_upload=0
breakpad_upload_url={{ breakpad_upload }} breakpad_upload_url={{ breakpad_upload_url }}

View File

@@ -14,7 +14,7 @@
copy: copy:
src: "{{ role_path }}/files/proxy-status.service" src: "{{ role_path }}/files/proxy-status.service"
dest: "/usr/lib/systemd/system/" dest: "/usr/lib/systemd/system/"
mode: 0755 mode: 0644
- name: "enable proxy-status" - name: "enable proxy-status"
systemd: systemd:

View File

@@ -0,0 +1,2 @@
[Service]
MemoryMax=100G

Binary file not shown.

View File

@@ -11,7 +11,7 @@
{% endif %} {% endif %}
./plug/platform/tsg_master/tsg_master.inf ./plug/platform/tsg_master/tsg_master.inf
{% if tsg_app_enable == 1 %} {% if tsg_app_enable == 1 %}
./plug/business/app_proto_identify/app_proto_identify.inf ./plug/platform/app_proto_identify/app_proto_identify.inf
./plug/platform/app_master/app_master.inf ./plug/platform/app_master/app_master.inf
{% endif %} {% endif %}
@@ -24,6 +24,8 @@
./plug/protocol/quic/quic.inf ./plug/protocol/quic/quic.inf
[business] [business]
./plug/business/tsg_conn_sketch/tsg_conn_sketch.inf
./plug/business/capture_packet_plug/capture_packet_plug.inf
./plug/business/kni/kni.inf ./plug/business/kni/kni.inf
./plug/business/fw_ssl_plug/fw_ssl_plug.inf ./plug/business/fw_ssl_plug/fw_ssl_plug.inf
./plug/business/fw_http_plug/fw_http_plug.inf ./plug/business/fw_http_plug/fw_http_plug.inf
@@ -31,8 +33,7 @@
./plug/business/fw_mail_plug/fw_mail_plug.inf ./plug/business/fw_mail_plug/fw_mail_plug.inf
./plug/business/fw_ftp_plug/fw_ftp_plug.inf ./plug/business/fw_ftp_plug/fw_ftp_plug.inf
./plug/business/fw_quic_plug/fw_quic_plug.inf ./plug/business/fw_quic_plug/fw_quic_plug.inf
./plug/business/tsg_conn_sketch/tsg_conn_sketch.inf ./plug/business/conn_telemetry/conn_telemetry.inf
./plug/business/capture_packet_plug/capture_packet_plug.inf
{% if tsg_app_enable == 1 %} {% if tsg_app_enable == 1 %}
./plug/business/app_sketch_local/app_sketch_local.inf ./plug/business/app_sketch_local/app_sketch_local.inf
./plug/business/app_control_plug/app_control_plug.inf ./plug/business/app_control_plug/app_control_plug.inf

View File

@@ -19,7 +19,7 @@
copy: copy:
src: "{{ role_path }}/files/telegraf_collect.service" src: "{{ role_path }}/files/telegraf_collect.service"
dest: /usr/lib/systemd/system dest: /usr/lib/systemd/system
mode: 0755 mode: 0644
- name: "Start telegraf_collect" - name: "Start telegraf_collect"
systemd: systemd:

View File

@@ -1,5 +1,5 @@
[global_tags] [global_tags]
blade = {{bladename}} blade = "{{bladename}}"
[agent] [agent]
interval = "5s" interval = "5s"
round_interval = true round_interval = true

View File

@@ -19,10 +19,11 @@
copy: copy:
src: "{{ role_path }}/files/telegraf_statistic.service" src: "{{ role_path }}/files/telegraf_statistic.service"
dest: /usr/lib/systemd/system dest: /usr/lib/systemd/system
mode: 0755 mode: 0644
- name: "Start telegraf" - name: "Start telegraf"
systemd: systemd:
name: telegraf_statistic.service name: telegraf_statistic.service
state: started state: started
enabled: yes enabled: yes
daemon_reload: yes

View File

@@ -56,4 +56,4 @@
[[outputs.influxdb]] [[outputs.influxdb]]
urls = ["{{ monitor_outputs_influxdb.url }}"] urls = ["{{ monitor_outputs_influxdb.url }}"]
database = "tsg_stat database = "tsg_stat"

View File

@@ -0,0 +1,2 @@
[Service]
MemoryMax=100G

Binary file not shown.

View File

@@ -8,13 +8,13 @@
copy: copy:
src: "{{ role_path }}/files/tfe.service" src: "{{ role_path }}/files/tfe.service"
dest: /usr/lib/systemd/system/ dest: /usr/lib/systemd/system/
mode: 0755 mode: 0644
- 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.12.be94218-1.el7.x86_64.rpm - /tmp/ansible_deploy/tfe-4.3.14.13d2607-1.el7.x86_64.rpm
state: present state: present
- name: "template tfe-env config" - name: "template tfe-env config"
@@ -63,6 +63,12 @@
src: "{{ role_path }}/templates/require-mrzcpd.conf.j2" src: "{{ role_path }}/templates/require-mrzcpd.conf.j2"
dest: /etc/systemd/system/tfe.service.d/require-mrzcpd.conf dest: /etc/systemd/system/tfe.service.d/require-mrzcpd.conf
- name: "copy memory limit file to tfe.service.d"
copy:
src: "{{ role_path }}/files/memory.conf"
dest: /etc/systemd/system/tfe.service.d/
mode: 0644
- name: "enable tfe-env" - name: "enable tfe-env"
systemd: systemd:
name: tfe-env name: tfe-env

View File

@@ -0,0 +1,2 @@
[Service]
MemoryMax=100G

View File

@@ -28,6 +28,12 @@
- name: "tsg-diagnose init certs" - name: "tsg-diagnose init certs"
shell: /bin/sh /opt/tsg/tsg-diagnose/deploy/init_certs/init_badssl_certs.sh shell: /bin/sh /opt/tsg/tsg-diagnose/deploy/init_certs/init_badssl_certs.sh
- name: "copy memory limit file to tsg-diagnose.service.d"
copy:
src: "{{ role_path }}/files/memory.conf"
dest: /etc/systemd/system/tsg-diagnose.service.d/
mode: 0644
- name: 'Tsg-diagnose service start' - name: 'Tsg-diagnose service start'
systemd: systemd:
name: tsg-diagnose name: tsg-diagnose

View File

@@ -2,5 +2,5 @@
shell: rsync -avzP --delete 192.168.100.1::blade0toother /tmp/sync/ shell: rsync -avzP --delete 192.168.100.1::blade0toother /tmp/sync/
- name: "tsg-diagnose: add badssl ca file to tfe tls-ca-bundle" - name: "tsg-diagnose: add badssl ca file to tfe tls-ca-bundle"
shell: cat /tmp/sync/ca-root.crt >> /opt/tsg/tfe/resource/tfe/tsg_diagnose_ca.pem && cat /tmp/sync/wpr_cert.pem >> /opt/tsg/tfe/resource/tfe/tsg_diagnose_ca.pem shell: cat /tmp/sync/ca-root.crt > /opt/tsg/tfe/resource/tfe/tsg_diagnose_ca.pem && cat /tmp/sync/wpr_cert.pem >> /opt/tsg/tfe/resource/tfe/tsg_diagnose_ca.pem

View File

@@ -0,0 +1,16 @@
####################
#Uninstall packet_dump
- name: "[uninstall packet_dump] stop packet_dump"
systemd:
name: packet_dump
state: stopped
enabled: no
when: uninstall.packet_dump == 1
ignore_errors: true
- name: "[uninstall packet_dump] uninstall packet_dump"
yum:
name:
- "{{ packet_dump }}"
state: absent
when: uninstall.packet_dump == 1

View File

@@ -41,6 +41,7 @@ tfe=`rpm -qa |grep ^tfe-4`
tfe_kmod=`rpm -qa |grep ^tfe-kmod` tfe_kmod=`rpm -qa |grep ^tfe-kmod`
http_healthcheck=`rpm -qa |grep ^http_healthcheck` http_healthcheck=`rpm -qa |grep ^http_healthcheck`
clotho=`rpm -qa |grep ^clotho` clotho=`rpm -qa |grep ^clotho`
packet_dump=`rpm -qa |grep ^packet_dump`
certstore=`rpm -qa |grep ^certstore` certstore=`rpm -qa |grep ^certstore`
@@ -125,6 +126,9 @@ http_healthcheck: $http_healthcheck
#clotho #clotho
clotho: $clotho clotho: $clotho
#packet_dump
packet_dump: $packet_dump
##################### #####################
#certstore #certstore
certstore: $certstore certstore: $certstore

View File

@@ -17,6 +17,7 @@
- certstore - certstore
- cert_redis - cert_redis
- clotho - clotho
- packet_dump
- http_healthcheck - http_healthcheck
- framework - framework
- telegraf_statistic - telegraf_statistic
@@ -45,6 +46,7 @@
- certstore - certstore
- cert_redis - cert_redis
- clotho - clotho
- packet_dump
- http_healthcheck - http_healthcheck
- framework - framework
- telegraf_statistic - telegraf_statistic