1.增加tsg-env-mxn部署文件; 2.修改计算板的依赖条件, 增加mrenv.service.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[Unit]
|
||||
Description=tsg env init
|
||||
Description=tsg sled-mcn0 env init
|
||||
Requires=network.target
|
||||
After=network.target
|
||||
Before=mrenv.service
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ens8f3 up
|
||||
ifconfig ens8f4 up
|
||||
@@ -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
|
||||
|
||||
17
roles/tsg-env-mxn/files/setup
Normal file
17
roles/tsg-env-mxn/files/setup
Normal 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
|
||||
5
roles/tsg-env-mxn/files/stop
Normal file
5
roles/tsg-env-mxn/files/stop
Normal 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
|
||||
13
roles/tsg-env-mxn/files/tsg-env.service
Normal file
13
roles/tsg-env-mxn/files/tsg-env.service
Normal 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
|
||||
25
roles/tsg-env-mxn/tasks/main.yml
Normal file
25
roles/tsg-env-mxn/tasks/main.yml
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user