1、增加mrzcpd 对device list的支持
2、增加sapp 的internal 和external interface 的网卡list的支持 3、增加卸载部署脚本 4、增加查询指定rpm安装情况部署脚本
This commit is contained in:
@@ -36,8 +36,10 @@ sapp:
|
|||||||
#########################################
|
#########################################
|
||||||
#Sapp Double-Arm Config
|
#Sapp Double-Arm Config
|
||||||
packet_io:
|
packet_io:
|
||||||
internal_interface: eth2
|
internal_interface:
|
||||||
external_interface: eth3
|
- eth2
|
||||||
|
external_interface:
|
||||||
|
- eth3
|
||||||
|
|
||||||
|
|
||||||
#########################################
|
#########################################
|
||||||
@@ -49,11 +51,20 @@ mrtunnat:
|
|||||||
lcore_id: 38
|
lcore_id: 38
|
||||||
|
|
||||||
#########################################
|
#########################################
|
||||||
#Inline Device Config
|
#Inline Device Config list
|
||||||
inline_device_config:
|
inline_device_config_list:
|
||||||
keepalive_ip: 192.168.1.30
|
- keepalive_ip: 192.168.1.30
|
||||||
keepalive_mask: 255.255.255.252
|
keepalive_mask: 255.255.255.252
|
||||||
data_incoming: eth5
|
data_incoming: eth5
|
||||||
|
|
||||||
|
####for example:
|
||||||
|
#inline_device_config_list:
|
||||||
|
# - keepalive_ip: 192.168.1.30
|
||||||
|
# keepalive_mask: 255.255.255.252
|
||||||
|
# data_incoming: eth5
|
||||||
|
# - keepalive_ip: 192.168.1.30
|
||||||
|
# keepalive_mask: 255.255.255.252
|
||||||
|
# data_incoming: eth6
|
||||||
|
|
||||||
#########################################
|
#########################################
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,22 @@
|
|||||||
|
{% set data_incoming_list = [] %}
|
||||||
|
{% for device_config in inline_device_config_list %}
|
||||||
|
{% set tmp = data_incoming_list.append(device_config.data_incoming) %}
|
||||||
|
{% endfor %}
|
||||||
[device]
|
[device]
|
||||||
device={{inline_device_config.data_incoming}},vxlan_user,vxlan_fwd
|
device={{ data_incoming_list | join(",") }},vxlan_user,vxlan_fwd
|
||||||
sz_tunnel=8192
|
sz_tunnel=8192
|
||||||
sz_buffer=0
|
sz_buffer=0
|
||||||
|
|
||||||
[device:{{inline_device_config.data_incoming}}]
|
{% for device_config in inline_device_config_list %}
|
||||||
|
[device:{{device_config.data_incoming}}]
|
||||||
{% if traffic_attr_type == 0 %}
|
{% if traffic_attr_type == 0 %}
|
||||||
in_addr={{inline_device_config.keepalive_ip}}
|
in_addr={{device_config.keepalive_ip}}
|
||||||
in_mask={{inline_device_config.keepalive_mask}}
|
in_mask={{device_config.keepalive_mask}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
jumbo_frame=1
|
jumbo_frame=1
|
||||||
max_rx_pkt_len=15360
|
max_rx_pkt_len=15360
|
||||||
clear_tx_flags=1
|
clear_tx_flags=1
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
#[device:]
|
#[device:]
|
||||||
#jumbo_frame=1
|
#jumbo_frame=1
|
||||||
@@ -42,8 +48,8 @@ sz_cache=256
|
|||||||
sz_data=4096
|
sz_data=4096
|
||||||
|
|
||||||
[forward]
|
[forward]
|
||||||
nr_forward_rule=4
|
#nr_forward_rule=4
|
||||||
forward_rule_0=pv,{{inline_device_config.data_incoming}},{{inline_device_config.data_incoming}}
|
#forward_rule_0=pv,{{inline_device_config.data_incoming}},{{inline_device_config.data_incoming}}
|
||||||
forward_rule_1=vp,{{inline_device_config.data_incoming}},{{inline_device_config.data_incoming}}
|
#forward_rule_1=vp,{{inline_device_config.data_incoming}},{{inline_device_config.data_incoming}}
|
||||||
forward_rule_2=vv,vxlan_fwd,vxlan_user
|
#forward_rule_2=vv,vxlan_fwd,vxlan_user
|
||||||
forward_rule_3=vv,vxlan_user,vxlan_fwd
|
#forward_rule_3=vv,vxlan_user,vxlan_fwd
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ dictator_enable=0
|
|||||||
[packet_io.internal.interface]
|
[packet_io.internal.interface]
|
||||||
{% if capture_packet_type == 0 %}
|
{% if capture_packet_type == 0 %}
|
||||||
type=pcap
|
type=pcap
|
||||||
name={{packet_io.internal_interface}}
|
name={{packet_io.internal_interface | join(",")}}
|
||||||
{% else %}
|
{% else %}
|
||||||
type=marsio
|
type=marsio
|
||||||
name={{nic_data_incoming.name}}
|
name={{nic_data_incoming.name}}
|
||||||
@@ -90,7 +90,7 @@ dictator_enable=0
|
|||||||
[packet_io.external.interface]
|
[packet_io.external.interface]
|
||||||
{% if capture_packet_type == 0 %}
|
{% if capture_packet_type == 0 %}
|
||||||
type=pcap
|
type=pcap
|
||||||
name={{packet_io.external_interface}}
|
name={{packet_io.external_interface | join(",")}}
|
||||||
{% else %}
|
{% else %}
|
||||||
type=pcap
|
type=pcap
|
||||||
name=lo
|
name=lo
|
||||||
|
|||||||
41
tasks/collect/collect_rpm_info.yml
Normal file
41
tasks/collect/collect_rpm_info.yml
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
- hosts: platform
|
||||||
|
remote_user: root
|
||||||
|
tasks:
|
||||||
|
- name: "collect rpm info: excute shell to get rpm install info"
|
||||||
|
shell: rpm -q {{item}}
|
||||||
|
with_items:
|
||||||
|
- libcjson
|
||||||
|
- libdocumentanalyze
|
||||||
|
- libmaatframe
|
||||||
|
- libMESA_field_stat
|
||||||
|
- libMESA_field_stat2
|
||||||
|
- libMESA_handle_logger
|
||||||
|
- libMESA_htable
|
||||||
|
- libMESA_prof_load
|
||||||
|
- librdkafka
|
||||||
|
- librulescan
|
||||||
|
- libtsglua
|
||||||
|
- libwiredcfg
|
||||||
|
- libWiredLB
|
||||||
|
- lz4
|
||||||
|
- libbreakpad_mini
|
||||||
|
- dns
|
||||||
|
- ftp
|
||||||
|
- http
|
||||||
|
- mail
|
||||||
|
- quic
|
||||||
|
- ssl
|
||||||
|
- mrzcpd
|
||||||
|
- sapp
|
||||||
|
register: rpm_results
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
|
- name: "collect rpm info: combine list format for output rpm install infomation"
|
||||||
|
set_fact:
|
||||||
|
install_info: '{{ install_info | default([]) + [{"name": item.item, "uninstall": item.failed, "version": item.stdout}] | list }}'
|
||||||
|
with_items: "{{ rpm_results.results }}"
|
||||||
|
|
||||||
|
|
||||||
|
- name: "collect rpm info: output rpm install infomation"
|
||||||
|
debug:
|
||||||
|
var: install_info
|
||||||
14
tasks/unistall/uninstall_firewall.yml
Normal file
14
tasks/unistall/uninstall_firewall.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
- hosts: platform
|
||||||
|
remote_user: root
|
||||||
|
tasks:
|
||||||
|
- name: "uninstall firewall: absent firewall rpm packages"
|
||||||
|
yum:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: absent
|
||||||
|
with_items:
|
||||||
|
- dns
|
||||||
|
- ftp
|
||||||
|
- http
|
||||||
|
- mail
|
||||||
|
- quic
|
||||||
|
- ssl
|
||||||
24
tasks/unistall/uninstall_framework.yml
Normal file
24
tasks/unistall/uninstall_framework.yml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
- hosts: paltform
|
||||||
|
remote_user: root
|
||||||
|
tasks:
|
||||||
|
- name: "uninstall framework: absent framework rpm packages"
|
||||||
|
yum:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: absent
|
||||||
|
#skip_broken: yes
|
||||||
|
with_items:
|
||||||
|
- libcjson
|
||||||
|
- libdocumentanalyze
|
||||||
|
- libmaatframe
|
||||||
|
- libMESA_field_stat
|
||||||
|
- libMESA_field_stat2
|
||||||
|
- libMESA_handle_logger
|
||||||
|
- libMESA_htable
|
||||||
|
- libMESA_prof_load
|
||||||
|
- librdkafka
|
||||||
|
- librulescan
|
||||||
|
- libtsglua
|
||||||
|
- libwiredcfg
|
||||||
|
- libWiredLB
|
||||||
|
- lz4
|
||||||
|
- libbreakpad_mini
|
||||||
14
tasks/unistall/uninstall_mrzcpd.yml
Normal file
14
tasks/unistall/uninstall_mrzcpd.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
- hosts: platform
|
||||||
|
remote_user: root
|
||||||
|
tasks:
|
||||||
|
- name: "uninstall mrzcpd: stop mrzcpd.service"
|
||||||
|
systemd:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: stopped
|
||||||
|
with_items:
|
||||||
|
- mrzcpd.service
|
||||||
|
|
||||||
|
- name: "uninstall mrzcpd:absent mrzcpd rpm package"
|
||||||
|
yum:
|
||||||
|
name: mrzcpd
|
||||||
|
state: absent
|
||||||
5
tasks/unistall/uninstall_platform.yml
Normal file
5
tasks/unistall/uninstall_platform.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- include: uninstall_firewall.yml
|
||||||
|
- include: uninstall_sapp.yml
|
||||||
|
- include: uninstall_mrzcpd.yml
|
||||||
|
- include: uninstall_framework.yml
|
||||||
14
tasks/unistall/uninstall_sapp.yml
Normal file
14
tasks/unistall/uninstall_sapp.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
- hosts: platform
|
||||||
|
remote_user: root
|
||||||
|
tasks:
|
||||||
|
- name: "uninstall sapp: stop sapp.service"
|
||||||
|
systemd:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: stopped
|
||||||
|
with_items:
|
||||||
|
- sapp.service
|
||||||
|
|
||||||
|
- name: "uninstall sapp:absent sapp rpm package"
|
||||||
|
yum:
|
||||||
|
name: sapp
|
||||||
|
state: absent
|
||||||
Reference in New Issue
Block a user