1.增加tsg-env-mxn部署文件; 2.修改计算板的依赖条件, 增加mrenv.service.

This commit is contained in:
lijia
2019-09-23 15:54:27 +08:00
parent 02e36d0b9c
commit 44ed2666a8
12 changed files with 81 additions and 18 deletions

View File

@@ -16,8 +16,8 @@
ip link set ens1 vf 2 vlan 200
ifconfig ens1f3 192.168.200.1 netmask 255.255.255.0
ifconfig enp7s0 up
ifconfig enp8s0 up
ifconfig enp9s0 up
ifconfig ens1f1 up
ifconfig ens1f2 up
ifconfig ens1f3 up

View File

@@ -1,5 +1,5 @@
[Unit]
Description=tsg env init
Description=tsg sled-mcn0 env init
Requires=network.target
After=network.target
Before=mrenv.service

View File

@@ -9,16 +9,17 @@
echo 0 > /sys/class/net/ens1/device/sriov_numvfs
sleep 1
echo 3 > /sys/class/net/ens1/device/sriov_numvfs
echo 4 > /sys/class/net/ens1/device/sriov_numvfs
sleep 1
ifconfig ens1f3 up
ip link set ens1 vf 2 vlan 200
ifconfig ens1f3 192.168.200.2 netmask 255.255.255.0
ifconfig enp7s0 up
ifconfig enp8s0 up
ifconfig enp9s0 up
ifconfig ens1f1 up
ifconfig ens1f2 up
ifconfig ens1f3 up
ifconfig ens1f4 up

View File

@@ -1,8 +1,8 @@
[Unit]
Description=tsg env init
Description=tsg sled-mcn1 env init
Requires=network.target
After=network.target
Before=tfe-env.service
Before=tfe-env.service mrenv.service
[Service]
ExecStart=/opt/tsg/env/setup
@@ -12,4 +12,4 @@ RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
RequiredBy=tfe-env.service
RequiredBy=tfe-env.service mrenv.service

View File

@@ -8,15 +8,15 @@
echo 0 > /sys/class/net/ens8/device/sriov_numvfs
sleep 1
echo 3 > /sys/class/net/ens8/device/sriov_numvfs
echo 4 > /sys/class/net/ens8/device/sriov_numvfs
sleep 1
ifconfig ens8f3 up
ip link set ens8 vf 2 vlan 200
ifconfig ens8f3 192.168.200.3 netmask 255.255.255.0
ifconfig enp7s0 up
ifconfig enp8s0 up
ifconfig enp9s0 up
ifconfig ens8f1 up
ifconfig ens8f2 up
ifconfig ens8f3 up

View File

@@ -1,8 +1,8 @@
[Unit]
Description=tsg env init
Description=tsg sled-mcn2 env init
Requires=network.target
After=network.target
Before=tfe-env.service
Before=tfe-env.service mrenv.service
[Service]
ExecStart=/opt/tsg/env/setup
@@ -12,4 +12,4 @@ RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
RequiredBy=tfe-env.service
RequiredBy=tfe-env.service mrenv.service

View File

@@ -8,14 +8,16 @@
echo 0 > /sys/class/net/ens8/device/sriov_numvfs
sleep 1
echo 3 > /sys/class/net/ens8/device/sriov_numvfs
echo 4 > /sys/class/net/ens8/device/sriov_numvfs
sleep 1
ifconfig ens8f3 up
ip link set ens8 vf 2 vlan 200
ifconfig ens8f3 192.168.200.4 netmask 255.255.255.0
ifconfig enp7s0 up
ifconfig enp8s0 up
ifconfig enp9s0 up
ifconfig ens8f1 up
ifconfig ens8f2 up
ifconfig ens8f3 up
ifconfig ens8f4 up

View File

@@ -1,8 +1,8 @@
[Unit]
Description=tsg env init
Description=tsg sled-mcn3 env init
Requires=network.target
After=network.target
Before=tfe-env.service
Before=tfe-env.service mrenv.service
[Service]
ExecStart=/opt/tsg/env/setup
@@ -12,4 +12,4 @@ RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
RequiredBy=tfe-env.service
RequiredBy=tfe-env.service mrenv.service

View File

@@ -0,0 +1,17 @@
#!/bin/bash
/usr/local/bin/open_intf.inst
vconfig add ens1 100
vconfig set_flag ens1.100 1 1
ifconfig ens1.100 192.168.100.5 netmask 255.255.255.0 up
vconfig add ens1 200
vconfig set_flag ens1.200 1 1
ifconfig ens1.200 192.168.200.5 netmask 255.255.255.0 up
echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6
/usr/local/testpoint/testpoint.sh start full &
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6

View File

@@ -0,0 +1,5 @@
#!/bin/sh
echo 0 > /sys/class/net/ens1/device/sriov_numvfs
ifconfig ens1.100 down
vconfig rem ens1.100
ifconfig ens1 down

View File

@@ -0,0 +1,13 @@
[Unit]
Description=tsg sled-mxn env init
Requires=network.target
After=network.target
[Service]
ExecStart=/opt/tsg/env/setup
ExecStop=/opt/tsg/env/stop
Type=oneshot
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,25 @@
---
- name: "copy setup script"
copy:
src: "{{ role_path }}/files/setup"
dest: "/opt/tsg/env/"
mode: 0755
- name: "copy stop script"
copy:
src: "{{ role_path }}/files/stop"
dest: "/opt/tsg/env/"
mode: 0755
- name: "copy tsg-env.service"
copy:
src: "{{ role_path }}/files/tsg-env.service"
dest: "/usr/lib/systemd/system/"
mode: 0644
- name: "enable tsg-env"
systemd:
name: tsg-env
enabled: yes
daemon_reload: yes