1、增加内存限制

This commit is contained in:
fumingwei
2020-10-19 14:52:08 +08:00
parent 7800356765
commit 1c5ea5b740
12 changed files with 48 additions and 4 deletions

View File

@@ -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

@@ -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

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

View File

@@ -111,7 +111,7 @@
dest: /opt/mrzcpd/etc/mrtunnat.conf dest: /opt/mrzcpd/etc/mrtunnat.conf
when: when:
- nic_traffic_mirror is not defined - nic_traffic_mirror is not defined
- == 3 - tsg_access_type == 3
- name: "update mrtunnat.conf.ATCA_Vlan_Flipping" - name: "update mrtunnat.conf.ATCA_Vlan_Flipping"
template: template:
@@ -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

@@ -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

View File

@@ -51,7 +51,13 @@
template: template:
src: "{{ role_path }}/templates/sapp.service.j2" src: "{{ role_path }}/templates/sapp.service.j2"
dest: /usr/lib/systemd/system/sapp.service dest: /usr/lib/systemd/system/sapp.service
mode: 0755 mode: 0644
- name: "copy memory limit file to sapp.service.d"
copy:
src: "{{ role_path }}/files/memory.conf"
dest: /etc/systemd/system/sapp.service.d/
mode: 0644
- name: "enable sapp" - name: "enable sapp"
systemd: systemd:

View File

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

View File

@@ -8,7 +8,7 @@
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:
@@ -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