diff --git a/ansible/roles/mrzcpd/tasks/main.yml b/ansible/roles/mrzcpd/tasks/main.yml index 7daeafa2..adbc348f 100644 --- a/ansible/roles/mrzcpd/tasks/main.yml +++ b/ansible/roles/mrzcpd/tasks/main.yml @@ -14,6 +14,22 @@ template: src: "{{ role_path }}/templates/tsg_9140/mrglobal.conf.tsg_9140.j2.j2" dest: /opt/tsg/tsg-os-provision/templates/mrglobal.conf.j2 + when: + - PROFILE_ID == '9000-NPB-P01R01' + +- name: "update mrglobal.conf - TSG7400 - mcn0" + template: + src: "{{ role_path }}/templates/tsg_7400/mcn0_with_firewall/mrglobal.conf.j2.j2" + dest: /opt/tsg/tsg-os-provision/templates/mrglobal.conf.j2 + when: + - PROFILE_ID == '7400-MCN0-P01R01' + +- name: "update mrglobal.conf - TSG7400 - mcn1 mcn2 mcn3" + template: + src: "{{ role_path }}/templates/tsg_7400/mcn123_with_proxy/mrglobal.conf.j2" + dest: /opt/mrzcpd/etc/mrglobal.conf + when: + - PROFILE_ID == '7400-MCN123-P01R01' ##################### mrzcpd ##################### - name: "enable mrenv" diff --git a/ansible/roles/mrzcpd/templates/tsg_7400/mcn0_with_firewall/mrglobal.conf.j2.j2 b/ansible/roles/mrzcpd/templates/tsg_7400/mcn0_with_firewall/mrglobal.conf.j2.j2 new file mode 100644 index 00000000..6d4dae96 --- /dev/null +++ b/ansible/roles/mrzcpd/templates/tsg_7400/mcn0_with_firewall/mrglobal.conf.j2.j2 @@ -0,0 +1,79 @@ +[device] +device=eth_raw,eth_mcn1,eth_mcn2,eth_mcn3,vxlan_user,vxlan_fwd +sz_tunnel=8192 +sz_buffer=0 + +[device:eth_raw] + +{% raw %} +{% if NPB_device == 'inline_device' %} +in_addr={{inline_device_config.keepalive_ip}} +in_mask={{inline_device_config.keepalive_mask}} +vlan-id-allow=1000,1001,4000,4001 +{% endif %} +{% if NPB_device == 'tera' %} +vlan-id-allow= {{ access_vlan_id_list | join(",") }},4000,4001 +{% endif %} +{% endraw %} +jumbo_frame=1 +max_rx_pkt_len=15360 +clear_tx_flags=1 +vlan-filter=1 +vlan-pvid=0 +vlan-pvid-mode=2 +promisc=1 + +[device:eth_mcn1] +jumbo_frame=1 +max_rx_pkt_len=15360 +clear_tx_flags=1 +promisc=1 + +[device:eth_mcn2] +jumbo_frame=1 +max_rx_pkt_len=15360 +clear_tx_flags=1 +promisc=1 + +[device:eth_mcn3] +jumbo_frame=1 +max_rx_pkt_len=15360 +clear_tx_flags=1 +promisc=1 + +[service] +# lcore id for i/o service, use comma to split +iocore=52,53,54,55 +distmode=2 +hashmode=0 + +[eal] +virtaddr=0x7f40c4a00000 +loglevel=7 + +[keepalive] +check_spinlock=0 + +[ctrlzone] +ctrlzone0=tunnat,64 + +[pool] +create_mode=3 +sz_direct_pktmbuf=4194304 +sz_indirect_pktmbuf=8192 +sz_cache=256 +sz_data=4096 + +[forward] +nr_forward_rule=10 +forward_rule_0=pv,eth_raw,eth_raw +forward_rule_1=vp,eth_raw,eth_raw +forward_rule_2=vv,vxlan_fwd,vxlan_user +forward_rule_3=vv,vxlan_user,vxlan_fwd +forward_rule_4=pv,eth_mcn1,eth_mcn1 +forward_rule_5=vp,eth_mcn1,eth_mcn1 +forward_rule_6=pv,eth_mcn2,eth_mcn2 +forward_rule_7=vp,eth_mcn2,eth_mcn2 +forward_rule_8=pv,eth_mcn3,eth_mcn3 +forward_rule_9=vp,eth_mcn3,eth_mcn3 + diff --git a/ansible/roles/mrzcpd/templates/tsg_7400/mcn123_with_proxy/mrglobal.conf.j2 b/ansible/roles/mrzcpd/templates/tsg_7400/mcn123_with_proxy/mrglobal.conf.j2 new file mode 100644 index 00000000..f35bbf01 --- /dev/null +++ b/ansible/roles/mrzcpd/templates/tsg_7400/mcn123_with_proxy/mrglobal.conf.j2 @@ -0,0 +1,27 @@ +[device] +device=eth_mirr_d +sz_tunnel=8192 +sz_buffer=0 + +[device:eth_mirr_d] +jumbo_frame=1 +max_rx_pkt_len=15360 +clear_tx_flags=1 +promisc=1 + +[service] +iocore=53,54 + +[eal] +virtaddr=0x7d0000000000 +loglevel=7 + +[keepalive] +check_spinlock=1 + +[pool] +create_mode=3 +sz_direct_pktmbuf=4194304 +sz_indirect_pktmbuf=8192 +sz_cache=256 +sz_data=4096 diff --git a/ansible/tsg_7400_deploy.yml b/ansible/tsg_7400_deploy.yml index 5abc3e38..65288f18 100644 --- a/ansible/tsg_7400_deploy.yml +++ b/ansible/tsg_7400_deploy.yml @@ -11,6 +11,7 @@ - {role: tsg_sn, tags: tsg_sn} - {role: docker, tags: docker} - {role: framework, tags: framework} + - {role: mrzcpd, tags: mrzcpd} - {role: tsg_master, tags: tsg_master} - {role: tsg_app, tags: tsg_app} - {role: redis, tags: redis} @@ -29,6 +30,7 @@ - {role: system-init, tags: system-init} - {role: system-init-7400-mcn123, tags: system-init-7400-mcn123} - {role: tsg_device_tag, tags: tsg_device_tag} + - {role: mrzcpd, tags: mrzcpd} - {role: exporter, tags: exporter} - {role: tsg_sn, tags: tsg_sn} - {role: tfe, tags: tfe} \ No newline at end of file