This commit is contained in:
zhangzhihan
2020-09-21 18:33:10 +08:00
parent 27d3231a6e
commit 05b56cb4ec
73 changed files with 846 additions and 262 deletions

View File

@@ -0,0 +1,93 @@
####################
#marsio
mrzcpd: mrzcpd-4.3.25.d88306e-1.el7.x86_64
####################
#kernel
origin_kernel: CentOS Linux (3.10.0-693.el7.x86_64) 7 (Core)
#默认为CentOS 7.4内核如果系统版本变更请手动更改origin_kernel值
kernel_ml: kernel-ml-5.1.8-1.el7.elrepo.x86_64
kernel_ml_devel: kernel-ml-devel-5.1.8-1.el7.elrepo.x86_64
dkms: dkms-2.7.1-1.el7.noarch
elfutils_libelf_devel: elfutils-libelf-devel-0.168-8.el7.x86_64
pkgconfig: pkgconfig-0.27.1-4.el7.x86_64
zlib_devel: zlib-devel-1.2.7-17.el7.x86_64
####################
#framework
libcjson: libcjson-1.7.8.542ad7f-1.x86_64
libdocument: libdocumentanalyze-2.0.4.efdfc29-1.x86_64
libmaatframe: libmaatframe-3.0.7.34de556-1.x86_64
libMESA_field_stat: libMESA_field_stat-1.0.1.852c2df-1.x86_64
libMESA_field_stat2: libMESA_field_stat2-2.9.1.d80b5fb-1.x86_64
libMESA_handle_logger: libMESA_handle_logger-1.0.9.304259e-1.x86_64
libMESA_htable: libMESA_htable-3.10.11.6275308-1.x86_64
libMESA_prof_load: libMESA_prof_load-1.0.5.bf755de-1.x86_64
librdkafka: librdkafka-0.11.4-1.el7.x86_64
librulescan: librulescan-2.2.0.900d2b3-1.x86_64
libwiredcfg: libwiredcfg-2.0.2.7ce1eea-1.x86_64
libWiredLB: libWiredLB-2.0.3.c7d131b-1.x86_64
lz4: lz4-1.7.5-3.el7.x86_64
libtsglua: libtsglua-1.0.7.0864e4a-1.x86_64
####################
#sapp
sapp: sapp-4.1.7.4f2839a-1.x86_64
####################
#tsg_master
tsg_master: tsg_master-3.2.8.e57ad7f-1.x86_64
####################
#kni
kni: kni-20.09-1.el7.x86_64
####################
#firewall
capture_packet_plug: capture_packet_plug-3.0.2.09f193c-1.x86_64
dns: dns-2.0.8.beb1d09-1.x86_64
ftp: ftp-1.0.6.2710506-1.x86_64
http: http-2.0.3.9218b4b-1.x86_64
quic: quic-1.1.9.810857d-1.x86_64
ssl: ssl-1.0.8.0068bd9-1.x86_64
mail: mail-1.0.7.9e3be05-1.x86_64
fw_dns: fw_dns_plug-3.0.1.453c533-1.x86_64
fw_ftp: fw_ftp_plug-3.0.0.7a867ea-1.x86_64
fw_http: fw_http_plug-3.0.0.1ca1c65-1.x86_64
fw_quic: fw_quic_plug-3.0.0.b06d39c-1.x86_64
fw_ssl: fw_ssl_plug-3.0.1.7ea9976-1.x86_64
fw_mail: fw_mail_plug-3.0.0.3b4e481-1.x86_64
tsg_conn_record: tsg_conn_record-1.0.2.2afb19a-1.x86_64
tsg_conn_sketch: tsg_conn_sketch-2.0.v2.0_alpha.af621ca-1.x86_64
####################
#Tsg_app
app_sketch_local: app_sketch_local-1.0.2.fd63c68-1.x86_64
app_control_plug: app_control_plug-1.0.2.a724506-1.x86_64
app_master: app_master-1.0.4.d189dee-1.x86_64
####################
#tfe
tfe: tfe-4.3.10.fb02543-1.el7.x86_64
tfe_kmod: tfe-kmod-v1.0.5.20200408-1dkms.noarch
####################
#http_healthcheck
http_healthcheck: http_healthcheck-20.04-1.el7.x86_64
#####################
#clotho
clotho: clotho-debug-1.0.0.-1.el7.x86_64
#####################
#certstore
certstore: certstore-2.1.2.202009.87fcacf-1.el7.x86_64
#####################
#telegraf
telegraf_statistic: telegraf-1.13.0-1.x86_64
#####################
#tsg-diagnose
tsg-diagnose: tsg-diagnose-20.09-1.el7.x86_64

View File

@@ -0,0 +1,13 @@
- name: stop cert-redis
systemd:
name: cert-redis
state: stopped
enabled: no
when: uninstall.certredis == 1
ignore_errors: true
- name: remove cert-redis files
file:
path: /opt/tsg/cert-redis
state: absent
when: remove.certredis == 1

View File

@@ -0,0 +1,13 @@
- name: stop cert-redis
systemd:
name: cert-redis
state: stopped
enabled: no
when: uninstall.certredis == 1
ignore_errors: true
- name: remove cert-redis files
file:
path: /home/tsg/cert-redis
state: absent
when: remove.certredis == 1

View File

@@ -0,0 +1,42 @@
- name: stop certstore
systemd:
name: certstore
state: stopped
enabled: no
when:
- backup.certstore == 1
- uninstall.certstore == 1
ignore_errors: true
- name: create backup_dest_path
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.certstore == 1
- name: backup /opt/tsg/certstore to destination path
archive:
path: /opt/tsg/certstore
dest: "{{ backup_dest_path }}/certstore_{{ uninstall_version }}_{{ date }}.zip"
format: zip
when: backup.certstore == 1
- name: uninstall certstore
yum:
name:
- "{{ certstore }}"
state: absent
when: uninstall.certstore == 1
- name: remove certstore files
file:
path: /opt/tsg/certstore
state: absent
when: remove.certstore == 1
- name: remove certstore.service
file:
path: /usr/lib/systemd/system/certstore.service
state: absent
when: remove.certstore == 1

View File

@@ -0,0 +1,42 @@
- name: stop certstore
systemd:
name: certstore
state: stopped
enabled: no
when:
- backup.certstore == 1
- uninstall.certstore == 1
ignore_errors: true
- name: create backup_dest_path
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.certstore == 1
- name: backup /home/tsg/certstore to destination path
archive:
path: /home/tsg/certstore
dest: "{{ backup_dest_path }}/certstore_{{ uninstall_version }}_{{ date }}.zip"
format: zip
when: backup.certstore == 1
- name: uninstall certstore
yum:
name:
- "{{ certstore }}"
state: absent
when: uninstall.certstore == 1
- name: remove certstore files
file:
path: /home/tsg/certstore
state: absent
when: remove.certstore == 1
- name: remove certstore.service
file:
path: /usr/lib/systemd/system/certstore.service
state: absent
when: remove.certstore == 1

View File

@@ -0,0 +1,38 @@
- name: create backup_dest_path
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.framework == 1
- name: backup /home/tsg/certstore to destination path
archive:
path: /opt/MESA
dest: "{{ backup_dest_path }}/opt_MESA_{{ uninstall_version }}_{{ date }}.zip"
format: zip
when: backup.framework == 1
- name: uninstall framework
yum:
name:
- "{{ libcjson }}"
- "{{ libdocument }}"
- "{{ libmaatframe }}"
- "{{ libMESA_field_stat }}"
- "{{ libMESA_field_stat2 }}"
- "{{ libMESA_handle_logger }}"
- "{{ libMESA_htable }}"
- "{{ libMESA_prof_load }}"
- "{{ librdkafka }}"
- "{{ librulescan }}"
- "{{ libwiredcfg }}"
- "{{ libWiredLB }}"
- "{{ lz4 }}"
- "{{ libtsglua }}"
state: absent
when: uninstall.framework == 1
- name: remove framework files
file:
path: /opt/MESA
state: absent
when: remove.framework == 1

View File

@@ -0,0 +1,37 @@
- name: create backup_dest_path
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.framework == 1
- name: backup /home/tsg/certstore to destination path
archive:
path: /opt/MESA
dest: "{{ backup_dest_path }}/opt_MESA_{{ uninstall_version }}_{{ date }}.zip"
format: zip
when: backup.framework == 1
- name: uninstall framework
yum:
name:
- "{{ libcjson }}"
- "{{ libdocument }}"
- "{{ libmaatframe }}"
- "{{ libMESA_field_stat }}"
- "{{ libMESA_field_stat2 }}"
- "{{ libMESA_handle_logger }}"
- "{{ libMESA_htable }}"
- "{{ libMESA_prof_load }}"
- "{{ librdkafka }}"
- "{{ librulescan }}"
- "{{ libwiredcfg }}"
- "{{ libWiredLB }}"
- "{{ lz4 }}"
state: absent
when: uninstall.framework == 1
- name: remove framework files
file:
path: /opt/MESA
state: absent
when: remove.framework == 1

View File

@@ -131,6 +131,29 @@
state: absent
when: remove.kni == 1
####################
#Tsg-app
- name: stop sapp
systemd:
name: sapp
state: stopped
enabled: no
when:
- uninstall_version >= 20.09
- uninstall.tsg_app == 1
ignore_errors: true
- name: uninstall tsg_app
yum:
name:
- "{{ app_sketch_local }}"
- "{{ app_control_plug }}"
- "{{ app_master }}"
state: absent
when:
- uninstall_version >= 20.09
- uninstall.tsg_app == 1
####################
#Uninstall tsg_master
- name: stop sapp
@@ -303,63 +326,24 @@
####################
#Uninstall Certstore
- name: stop certstore
systemd:
name: certstore
state: stopped
enabled: no
when:
- backup.certstore == 1
- uninstall.certstore == 1
ignore_errors: true
- name: uninstall certstore before 20.09
include: certstore_before_20.09.yml
when: uninstall_version < 20.09
- name: create backup_dest_path
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.certstore == 1
- name: backup /home/tsg/certstore to destination path
archive:
path: /home/tsg/certstore
dest: "{{ backup_dest_path }}/certstore_{{ uninstall_version }}_{{ date }}.zip"
format: zip
when: backup.certstore == 1
- name: uninstall certstore
yum:
name:
- "{{ certstore }}"
state: absent
when: uninstall.certstore == 1
- name: remove certstore files
file:
path: /home/tsg/certstore
state: absent
when: remove.certstore == 1
- name: remove certstore.service
file:
path: /usr/lib/systemd/system/certstore.service
state: absent
when: remove.certstore == 1
- name: uninstall certstore after 20.09
include: certstore_after_20.09.yml
when: uninstall_version >= 20.09
####################
#Uninstall cert-redis
- name: stop cert-redis
systemd:
name: cert-redis
state: stopped
enabled: no
when: uninstall.certredis == 1
ignore_errors: true
- name: uninstall certredis before 20.09
include: certredis_before_20.09.yml
when: uninstall_version < 20.09
- name: uninstall certredis after 20.09
include: certredis_after_20.09.yml
when: uninstall_version >= 20.09
- name: remove cert-redis files
file:
path: /home/tsg/cert-redis
state: absent
when: remove.certredis == 1
####################
#Uninstall clotho
@@ -407,43 +391,13 @@
####################
#Uninstall framework
- name: create backup_dest_path
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.framework == 1
- name: uninstall framework before 20.09
include: framework_before_20.09.yml
when: uninstall_version < 20.09
- name: backup /home/tsg/certstore to destination path
archive:
path: /opt/MESA
dest: "{{ backup_dest_path }}/opt_MESA_{{ uninstall_version }}_{{ date }}.zip"
format: zip
when: backup.framework == 1
- name: uninstall framework
yum:
name:
- "{{ libcjson }}"
- "{{ libdocument }}"
- "{{ libmaatframe }}"
- "{{ libMESA_field_stat }}"
- "{{ libMESA_field_stat2 }}"
- "{{ libMESA_handle_logger }}"
- "{{ libMESA_htable }}"
- "{{ libMESA_prof_load }}"
- "{{ librdkafka }}"
- "{{ librulescan }}"
- "{{ libwiredcfg }}"
- "{{ libWiredLB }}"
- "{{ lz4 }}"
state: absent
when: uninstall.framework == 1
- name: remove framework files
file:
path: /opt/MESA
state: absent
when: remove.framework == 1
- name: uninstall framework after 20.09
include: framework_after_20.09.yml
when: uninstall_version >= 20.09
####################
#Uninstall telegraf_statistic
@@ -474,6 +428,27 @@
state: absent
when: remove.telegraf_statistic == 1
####################
#Tsg-diagnose
- name: stop docker
systemd:
name: docker
state: stopped
enabled: no
when:
- uninstall.tsg_diagnose == 1
- uninstall_version >= 20.09
ignore_errors: true
- name: uninstall tsg_diagnose
yum:
name:
- "{{ tsg_diagnose }}"
state: absent
when:
- uninstall.tsg_diagnose == 1
- uninstall_version >= 20.09
####################
#Remove other tsg files
- name: remove /home/mesasoft

View File

@@ -0,0 +1,13 @@
- name: stop cert-redis
systemd:
name: cert-redis
state: stopped
enabled: no
when: uninstall.certredis == 1
ignore_errors: true
- name: remove cert-redis files
file:
path: /opt/tsg/cert-redis
state: absent
when: remove.certredis == 1

View File

@@ -0,0 +1,13 @@
- name: stop cert-redis
systemd:
name: cert-redis
state: stopped
enabled: no
when: uninstall.certredis == 1
ignore_errors: true
- name: remove cert-redis files
file:
path: /home/tsg/cert-redis
state: absent
when: remove.certredis == 1

View File

@@ -0,0 +1,42 @@
- name: stop certstore
systemd:
name: certstore
state: stopped
enabled: no
when:
- backup.certstore == 1
- uninstall.certstore == 1
ignore_errors: true
- name: create backup_dest_path
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.certstore == 1
- name: backup /opt/tsg/certstore to destination path
archive:
path: /opt/tsg/certstore
dest: "{{ backup_dest_path }}/certstore_{{ uninstall_version }}_{{ date }}.zip"
format: zip
when: backup.certstore == 1
- name: uninstall certstore
yum:
name:
- "{{ certstore }}"
state: absent
when: uninstall.certstore == 1
- name: remove certstore files
file:
path: /opt/tsg/certstore
state: absent
when: remove.certstore == 1
- name: remove certstore.service
file:
path: /usr/lib/systemd/system/certstore.service
state: absent
when: remove.certstore == 1

View File

@@ -0,0 +1,42 @@
- name: stop certstore
systemd:
name: certstore
state: stopped
enabled: no
when:
- backup.certstore == 1
- uninstall.certstore == 1
ignore_errors: true
- name: create backup_dest_path
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.certstore == 1
- name: backup /home/tsg/certstore to destination path
archive:
path: /home/tsg/certstore
dest: "{{ backup_dest_path }}/certstore_{{ uninstall_version }}_{{ date }}.zip"
format: zip
when: backup.certstore == 1
- name: uninstall certstore
yum:
name:
- "{{ certstore }}"
state: absent
when: uninstall.certstore == 1
- name: remove certstore files
file:
path: /home/tsg/certstore
state: absent
when: remove.certstore == 1
- name: remove certstore.service
file:
path: /usr/lib/systemd/system/certstore.service
state: absent
when: remove.certstore == 1

View File

@@ -0,0 +1,38 @@
- name: create backup_dest_path
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.framework == 1
- name: backup /home/tsg/certstore to destination path
archive:
path: /opt/MESA
dest: "{{ backup_dest_path }}/opt_MESA_{{ uninstall_version }}_{{ date }}.zip"
format: zip
when: backup.framework == 1
- name: uninstall framework
yum:
name:
- "{{ libcjson }}"
- "{{ libdocument }}"
- "{{ libmaatframe }}"
- "{{ libMESA_field_stat }}"
- "{{ libMESA_field_stat2 }}"
- "{{ libMESA_handle_logger }}"
- "{{ libMESA_htable }}"
- "{{ libMESA_prof_load }}"
- "{{ librdkafka }}"
- "{{ librulescan }}"
- "{{ libwiredcfg }}"
- "{{ libWiredLB }}"
- "{{ lz4 }}"
- "{{ libtsglua }}"
state: absent
when: uninstall.framework == 1
- name: remove framework files
file:
path: /opt/MESA
state: absent
when: remove.framework == 1

View File

@@ -0,0 +1,37 @@
- name: create backup_dest_path
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.framework == 1
- name: backup /opt/MESA to destination path
archive:
path: /opt/MESA
dest: "{{ backup_dest_path }}/opt_MESA_{{ uninstall_version }}_{{ date }}.zip"
format: zip
when: backup.framework == 1
- name: uninstall framework
yum:
name:
- "{{ libcjson }}"
- "{{ libdocument }}"
- "{{ libmaatframe }}"
- "{{ libMESA_field_stat }}"
- "{{ libMESA_field_stat2 }}"
- "{{ libMESA_handle_logger }}"
- "{{ libMESA_htable }}"
- "{{ libMESA_prof_load }}"
- "{{ librdkafka }}"
- "{{ librulescan }}"
- "{{ libwiredcfg }}"
- "{{ libWiredLB }}"
- "{{ lz4 }}"
state: absent
when: uninstall.framework == 1
- name: remove framework files
file:
path: /opt/MESA
state: absent
when: remove.framework == 1

View File

@@ -130,6 +130,28 @@
path: /home/mesasoft/sapp_run/etc/kni/
state: absent
when: remove.kni == 1
####################
#Tsg-app
- name: stop sapp
systemd:
name: sapp
state: stopped
enabled: no
when:
- uninstall_version >= 20.09
- uninstall.tsg_app == 1
ignore_errors: true
- name: uninstall tsg_app
yum:
name:
- "{{ app_sketch_local }}"
- "{{ app_control_plug }}"
- "{{ app_master }}"
state: absent
when:
- uninstall_version >= 20.09
- uninstall.tsg_app == 1
####################
#Uninstall tsg_master
@@ -369,63 +391,23 @@
####################
#Uninstall Certstore
- name: stop certstore
systemd:
name: certstore
state: stopped
enabled: no
when:
- backup.certstore == 1
- uninstall.certstore == 1
ignore_errors: true
- name: uninstall certstore before 20.09
include: certstore_before_20.09.yml
when: uninstall_version < 20.09
- name: create backup_dest_path
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.certstore == 1
- name: backup /home/tsg/certstore to destination path
archive:
path: /home/tsg/certstore
dest: "{{ backup_dest_path }}/certstore_{{ uninstall_version }}_{{ date }}.zip"
format: zip
when: backup.certstore == 1
- name: uninstall certstore
yum:
name:
- "{{ certstore }}"
state: absent
when: uninstall.certstore == 1
- name: remove certstore files
file:
path: /home/tsg/certstore
state: absent
when: remove.certstore == 1
- name: remove certstore.service
file:
path: /usr/lib/systemd/system/certstore.service
state: absent
when: remove.certstore == 1
- name: uninstall certstore after 20.09
include: certstore_after_20.09.yml
when: uninstall_version >= 20.09
####################
#Uninstall cert-redis
- name: stop cert-redis
systemd:
name: cert-redis
state: stopped
enabled: no
when: uninstall.certredis == 1
ignore_errors: true
- name: uninstall certredis before 20.09
include: certredis_before_20.09.yml
when: uninstall_version < 20.09
- name: remove cert-redis files
file:
path: /home/tsg/cert-redis
state: absent
when: remove.certredis == 1
- name: uninstall certredis after 20.09
include: certredis_after_20.09.yml
when: uninstall_version >= 20.09
####################
#Uninstall clotho
@@ -473,43 +455,13 @@
####################
#Uninstall framework
- name: create backup_dest_path
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.framework == 1
- name: uninstall framework before 20.09
include: framework_before_20.09.yml
when: uninstall_version < 20.09
- name: backup /home/tsg/certstore to destination path
archive:
path: /opt/MESA
dest: "{{ backup_dest_path }}/opt_MESA_{{ uninstall_version }}_{{ date }}.zip"
format: zip
when: backup.framework == 1
- name: uninstall framework
yum:
name:
- "{{ libcjson }}"
- "{{ libdocument }}"
- "{{ libmaatframe }}"
- "{{ libMESA_field_stat }}"
- "{{ libMESA_field_stat2 }}"
- "{{ libMESA_handle_logger }}"
- "{{ libMESA_htable }}"
- "{{ libMESA_prof_load }}"
- "{{ librdkafka }}"
- "{{ librulescan }}"
- "{{ libwiredcfg }}"
- "{{ libWiredLB }}"
- "{{ lz4 }}"
state: absent
when: uninstall.framework == 1
- name: remove framework files
file:
path: /opt/MESA
state: absent
when: remove.framework == 1
- name: uninstall framework after 20.09
include: framework_after_20.09.yml
when: uninstall_version >= 20.09
####################
#Uninstall telegraf_statistic

View File

@@ -1,12 +1,12 @@
####################
#Uninstall the target TSG version
#Support 20.08 / 20.07 / 20.07.rc1 / 20.06.1
uninstall_version: 20.08
#Support 20.09 / 20.08 / 20.07 / 20.07.rc1 / 20.06.1
uninstall_version: 20.09
####################
#Backup
backup_dest_path: /root/backup_data
date: 20200914
date: 20200921
backup:
marsio: 1
tfe: 1
@@ -35,6 +35,8 @@ uninstall:
http_healthcheck: 1
telegraf_statistic: 1
tsg_env_tun_mode: 0
tsg_app: 1
tsg_diagnose: 1
####################
#Remove list

View File

@@ -4,7 +4,7 @@
- uninstall_server
vars_files:
- uninstall_config/group_vars/uninstall_vars.yml
- roles/package_list/20.08.yml
- roles/package_list/20.09.yml
- hosts: uninstall_adc_mcn0
remote_user: root
@@ -12,7 +12,7 @@
- uninstall_adc_mcn0
vars_files:
- uninstall_config/group_vars/uninstall_vars.yml
- roles/package_list/20.08.yml
- roles/package_list/20.09.yml
- hosts: uninstall_adc_mcn123
remote_user: root
@@ -20,4 +20,4 @@
- uninstall_adc_mcn123
vars_files:
- uninstall_config/group_vars/uninstall_vars.yml
- roles/package_list/20.08.yml
- roles/package_list/20.09.yml