[ project ] accomplish linux-agent boot up environment

This commit is contained in:
zeaslity
2022-12-11 14:10:19 +08:00
parent 644916c4c1
commit 9197301579
12 changed files with 741 additions and 119 deletions

View File

@@ -1,21 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="RunAgentToShanghai" type="docker-deploy" factoryName="dockerfile" server-name="Shanghai">
<deployment type="dockerfile">
<settings>
<option name="imageTag" value="shanghai-local" />
<option name="containerName" value="octopus-agentshanghai" />
<option name="portBindings">
<list>
<DockerPortBindingImpl>
<option name="containerPort" value="8000" />
<option name="hostPort" value="18000" />
</DockerPortBindingImpl>
</list>
</option>
<option name="commandLineOptions" value="" />
<option name="sourceFilePath" value="agent/Dockerfile-wsl2" />
</settings>
</deployment>
<method v="2" />
</configuration>
</component>

View File

@@ -0,0 +1,109 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="RunAgentUbuntuStation" type="docker-deploy" factoryName="dockerfile" server-name="UbuntuStation">
<deployment type="dockerfile">
<settings>
<option name="imageTag" value="octopus-agent-ubuntu" />
<option name="buildOnly" value="true" />
<option name="containerName" value="octopus-agent-ubuntu" />
<option name="envVars">
<list>
<DockerEnvVarImpl>
<option name="name" value="cpuBrand" />
<option name="value" value="i7 8700" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="cpuCore" />
<option name="value" value="12 @ 3.2GHz" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="diskTotal" />
<option name="value" value="1 TB" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="diskUsage" />
<option name="value" value="200GB" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="ioSpeed" />
<option name="value" value="1 GB/s" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="location" />
<option name="value" value="Chengdu" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="machineId" />
<option name="value" value="adasdasdas1q122131" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="managePort" />
<option name="value" value="3389" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="memoryTotal" />
<option name="value" value="64 GB" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="memoryUsage" />
<option name="value" value="12 GB" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="osInfo" />
<option name="value" value="Windwos 11" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="osKernelInfo" />
<option name="value" value="Window NT 10.0" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="provider" />
<option name="value" value="China Mobile" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="serverIpInV4" />
<option name="value" value="&quot;&quot;" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="serverIpInV6" />
<option name="value" value="&quot;&quot;" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="serverIpPbV4" />
<option name="value" value="&quot;&quot;" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="serverIpPbV6" />
<option name="value" value="&quot;&quot;" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="serverName" />
<option name="value" value="Chengdu-amd64-99" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="tcpControl" />
<option name="value" value="bbr" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="virtualization" />
<option name="value" value="dedicated" />
</DockerEnvVarImpl>
</list>
</option>
<option name="commandLineOptions" value="--privileged --net=host --ipc=host " />
<option name="showCommandPreview" value="true" />
<option name="sourceFilePath" value="agent/Dockerfile-wsl2" />
<option name="volumeBindings">
<list>
<DockerVolumeBindingImpl>
<option name="containerPath" value="/host" />
<option name="hostPath" value="/" />
</DockerVolumeBindingImpl>
</list>
</option>
</settings>
</deployment>
<method v="2">
<option name="RunConfigurationTask" enabled="true" run_configuration_name="ProjectOctopus [package]" run_configuration_type="MavenRunConfiguration" />
</method>
</configuration>
</component>

View File

@@ -3,7 +3,7 @@
FROM icederce/eclipse-temurin-11-jre-focal
# Set environment variables
ENV TZ=Asia/Shanghai serverName="" serverIpPbV4="" serverIpInV4="" serverIpPbV6="" serverIpInV6="" location="" provider="" managePort="" cpuBrand="" cpuCore="" memoryTotal="" diskTotal="" diskUsage="" osInfo="" osKernelInfo="" tcpControl="" virtualization="" ioSpeed=""
ENV TZ=Asia/Shanghai
ENV JAVA_OPTS="-Xms2028m -Xmx2048m"
# Set time zone
@@ -20,5 +20,8 @@ WORKDIR /wdd
# Copy the jar and rename it
COPY ./target/agent-*.jar /wdd/agent.jar
# copy docker-startup-entrypoint.sh
COPY agent-entrypoint.sh /wdd/agent-entrypoint.sh
# When the docker container starts, run the jar
ENTRYPOINT exec java ${JAVA_OPTS} -jar /wdd/agent.jar
ENTRYPOINT ["/wdd/agent-entrypoint.sh"]

381
agent/agent-entrypoint.sh Normal file
View File

@@ -0,0 +1,381 @@
#!/bin/bash
RED="31m" ## 姨妈红
GREEN="32m" ## 水鸭青
YELLOW="33m" ## 鸭屎黄
PURPLE="35m" ## 基佬紫
BLUE="36m" ## 天依蓝
BlinkGreen="32;5m" ##闪烁的绿色
BlinkRed="31;5m" ##闪烁的红色
BackRed="41m" ## 背景红色
SplitLine="----------------------" #会被sys函数中的方法重写
hostArchVersion=""
hostArch=""
#### CollectSystemInfo ####
serverName=""
serverIpPbV4=""
serverIpInV4=""
serverIpPbV6=""
serverIpInV6=""
location=""
provider=""
managePort=""
cpuBrand=""
cpuCore=""
memoryTotal=""
diskTotal=""
diskUsage=""
osInfo=""
osKernelInfo=""
tcpControl=""
virtualization=""
ioSpeed=""
machineId=""
### tmp usage
ioavg=""
public_ipv4=""
country=""
region=""
city=""
org=""
#### CollectSystemInfo ####
######## 颜色函数方法很精妙 ############
colorEcho() {
# shellcheck disable=SC2145
echo -e "\033[${1}${@:2}\033[0m" 1>&2
}
# 判断命令是否存在
command_exists() {
local cmd="$1"
if eval type type >/dev/null 2>&1; then
eval type "$cmd" >/dev/null 2>&1
elif command >/dev/null 2>&1; then
command -v "$cmd" >/dev/null 2>&1
else
which "$cmd" >/dev/null 2>&1
fi
local rt=$?
return ${rt}
}
FunctionStart() {
colorEcho ${PURPLE} ${SplitLine}
colorEcho ${PURPLE} ${SplitLine}
echo ""
}
FunctionSuccess() {
colorEcho ${GREEN} ${SplitLine}
echo ""
}
FunctionEnd() {
echo ""
colorEcho ${BlinkGreen} ${SplitLine}
echo ""
echo ""
}
####### 获取系统版本及64位或32位信息
check_sys() {
# 获取当前终端的宽度,动态调整分割线的长度
shellwidth=$(stty size | awk '{print $2}')
if [[ $shellwidth -gt 1 ]]; then
SplitLine=$(yes "-" | sed ${shellwidth}'q' | tr -d '\n')
fi
sys_bit=$(uname -m)
case $sys_bit in
i[36]86)
os_bit="32"
hostArch="386"
;;
x86_64)
os_bit="64"
hostArch="amd64"
;;
*armv6*)
os_bit="arm"
hostArch="arm6"
;;
*armv7*)
os_bit="arm"
hostArch="arm7"
;;
*aarch64* | *armv8*)
os_bit="arm64"
hostArch="arm64"
;;
*)
colorEcho ${RED} "
哈哈……这个 辣鸡脚本 不支持你的系统。 (-_-) \n
备注: 仅支持 Ubuntu 16+ / Debian 8+ / CentOS 7+ 系统
" && exit 1
;;
esac
}
GoIOTest() {
(LANG=C dd if=/dev/zero of=benchtest_$$ bs=512k count=$1 conv=fdatasync && rm -f benchtest_$$) 2>&1 | awk -F, '{io=$NF} END { print io}' | sed 's/^[ \t]*//;s/[ \t]*$//'
}
calc_size() {
local raw=$1
local total_size=0
local num=1
local unit="KB"
if ! [[ ${raw} =~ ^[0-9]+$ ]]; then
echo ""
return
fi
if [ "${raw}" -ge 1073741824 ]; then
num=1073741824
unit="TB"
elif [ "${raw}" -ge 1048576 ]; then
num=1048576
unit="GB"
elif [ "${raw}" -ge 1024 ]; then
num=1024
unit="MB"
elif [ "${raw}" -eq 0 ]; then
echo "${total_size}"
return
fi
total_size=$(awk 'BEGIN{printf "%.1f", '$raw' / '$num'}')
echo "${total_size} ${unit}"
}
GethostArchINfo() {
[ -f /etc/redhat-release ] && awk '{print $0}' /etc/redhat-release && return
[ -f /etc/os-release ] && awk -F'[= "]' '/PRETTY_NAME/{print $3,$4,$5}' /etc/os-release && return
[ -f /etc/lsb-release ] && awk -F'[="]+' '/DESCRIPTION/{print $2}' /etc/lsb-release && return
}
StartIOTest() {
FunctionStart
colorEcho ${BLUE} "start IO speed test !"
freespace=$(df -m . | awk 'NR==2 {print $4}')
if [ -z "${freespace}" ]; then
freespace=$(df -m . | awk 'NR==3 {print $3}')
fi
if [ ${freespace} -gt 1024 ]; then
writemb=2048
io1=$(GoIOTest ${writemb})
colorEcho $YELLOW "I/O Speed(1st run) : $io1)"
io2=$(GoIOTest ${writemb})
colorEcho $YELLOW "I/O Speed(2st run) : $io2)"
io3=$(GoIOTest ${writemb})
colorEcho $YELLOW "I/O Speed(3st run) : $io3)"
ioraw1=$(echo $io1 | awk 'NR==1 {print $1}')
[ "$(echo $io1 | awk 'NR==1 {print $2}')" == "GB/s" ] && ioraw1=$(awk 'BEGIN{print '$ioraw1' * 1024}')
ioraw2=$(echo $io2 | awk 'NR==1 {print $1}')
[ "$(echo $io2 | awk 'NR==1 {print $2}')" == "GB/s" ] && ioraw2=$(awk 'BEGIN{print '$ioraw2' * 1024}')
ioraw3=$(echo $io3 | awk 'NR==1 {print $1}')
[ "$(echo $io3 | awk 'NR==1 {print $2}')" == "GB/s" ] && ioraw3=$(awk 'BEGIN{print '$ioraw3' * 1024}')
ioall=$(awk 'BEGIN{print '$ioraw1' + '$ioraw2' + '$ioraw3'}')
ioavg=$(awk 'BEGIN{printf "%.1f", '$ioall' / 3}')
colorEcho $YELLOW "I/O Speed(average) : $ioavg MB/s)"
else
echo " $(_red "Not enough space for I/O Speed test!")"
fi
FunctionSuccess
FunctionEnd
}
Check_Virtualization() {
FunctionStart
colorEcho ${BLUE} "start to check host virtualization !"
command_exists "dmesg" && virtualx="$(dmesg 2>/dev/null)"
if command_exists "dmidecode"; then
sys_manu="$(dmidecode -s system-manufacturer 2>/dev/null)"
sys_product="$(dmidecode -s system-product-name 2>/dev/null)"
sys_ver="$(dmidecode -s system-version 2>/dev/null)"
else
sys_manu=""
sys_product=""
sys_ver=""
fi
if grep -qa docker /proc/1/cgroup; then
virt="Docker"
elif grep -qa lxc /proc/1/cgroup; then
virt="LXC"
elif grep -qa container=lxc /proc/1/environ; then
virt="LXC"
elif [[ -f /proc/user_beancounters ]]; then
virt="OpenVZ"
elif [[ "${virtualx}" == *kvm-clock* ]]; then
virt="KVM"
elif [[ "${sys_product}" == *KVM* ]]; then
virt="KVM"
elif [[ "${cpuName}" == *KVM* ]]; then
virt="KVM"
elif [[ "${cpuName}" == *QEMU* ]]; then
virt="KVM"
elif [[ "${virtualx}" == *"VMware Virtual Platform"* ]]; then
virt="VMware"
elif [[ "${sys_product}" == *"VMware Virtual Platform"* ]]; then
virt="VMware"
elif [[ "${virtualx}" == *"Parallels Software International"* ]]; then
virt="Parallels"
elif [[ "${virtualx}" == *VirtualBox* ]]; then
virt="VirtualBox"
elif [[ -e /proc/xen ]]; then
if grep -q "control_d" "/proc/xen/capabilities" 2>/dev/null; then
virt="Xen-Dom0"
else
virt="Xen-DomU"
fi
elif [ -f "/sys/hypervisor/type" ] && grep -q "xen" "/sys/hypervisor/type"; then
virt="Xen"
elif [[ "${sys_manu}" == *"Microsoft Corporation"* ]]; then
if [[ "${sys_product}" == *"Virtual Machine"* ]]; then
if [[ "${sys_ver}" == *"7.0"* || "${sys_ver}" == *"Hyper-V" ]]; then
virt="Hyper-V"
else
virt="Microsoft Virtual Machine"
fi
fi
else
virt="Dedicated"
fi
FunctionSuccess
FunctionEnd
}
GetIpv4Info() {
FunctionStart
colorEcho ${BLUE} "start to get system public ip info !"
org="$(wget -q -T10 -O- ipinfo.io/org)"
city="$(wget -q -T10 -O- ipinfo.io/city)"
country="$(wget -q -T10 -O- ipinfo.io/country)"
region="$(wget -q -T10 -O- ipinfo.io/region)"
public_ipv4="$(wget -q -T10 -O- ipinfo.io/ip)"
FunctionSuccess
FunctionEnd
}
GenerateSystemInfo() {
FunctionStart
colorEcho $BLUE "start to collect system info !"
check_sys
cpuName=$(awk -F: '/model name/ {name=$2} END {print name}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')
cores=$(awk -F: '/processor/ {core++} END {print core}' /proc/cpuinfo)
freq=$(awk -F'[ :]' '/cpu MHz/ {print $4;exit}' /proc/cpuinfo)
ccache=$(awk -F: '/cache size/ {cache=$2} END {print cache}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')
cpu_aes=$(grep -i 'aes' /proc/cpuinfo)
cpu_virt=$(grep -Ei 'vmx|svm' /proc/cpuinfo)
tram=$(
LANG=C
free | awk '/Mem/ {print $2}'
)
tram=$(calc_size $tram)
uram=$(
LANG=C
free | awk '/Mem/ {print $3}'
)
uram=$(calc_size $uram)
swap=$(
LANG=C
free | awk '/Swap/ {print $2}'
)
swap=$(calc_size $swap)
uswap=$(
LANG=C
free | awk '/Swap/ {print $3}'
)
uswap=$(calc_size $uswap)
up=$(awk '{a=$1/86400;b=($1%86400)/3600;c=($1%3600)/60} {printf("%d days, %d hour %d min\n",a,b,c)}' /proc/uptime)
if command_exists "w"; then
load=$(
LANG=C
w | head -1 | awk -F'load average:' '{print $2}' | sed 's/^[ \t]*//;s/[ \t]*$//'
)
elif command_exists "uptime"; then
load=$(
LANG=C
uptime | head -1 | awk -F'load average:' '{print $2}' | sed 's/^[ \t]*//;s/[ \t]*$//'
)
fi
opsy=$(GethostArchINfo)
arch=$(uname -m)
if command_exists "getconf"; then
lbit=$(getconf LONG_BIT)
else
echo ${arch} | grep -q "64" && lbit="64" || lbit="32"
fi
kern=$(uname -r)
disk_total_size=$(
LANG=C
df -t simfs -t ext2 -t ext3 -t ext4 -t btrfs -t xfs -t vfat -t ntfs -t swap --total 2>/dev/null | grep total | awk '{ print $2 }'
)
disk_total_size=$(calc_size $disk_total_size)
disk_used_size=$(
LANG=C
df -t simfs -t ext2 -t ext3 -t ext4 -t btrfs -t xfs -t vfat -t ntfs -t swap --total 2>/dev/null | grep total | awk '{ print $3 }'
)
disk_used_size=$(calc_size $disk_used_size)
tcpctrl=$(sysctl net.ipv4.tcp_congestion_control | awk -F ' ' '{print $3}')
FunctionSuccess
# todo
# StartIOTest
GetIpv4Info
Check_Virtualization
local machineNumber=""
if [[ $(cat /etc/hostname | cut -d"-" -f 3 | grep -c '^[0-9][0-9]') -gt 0 ]]; then
machineNumber=$(cat /etc/hostname | cut -d"-" -f 3)
else
machineNumber=99
fi
export serverName="${city}-${hostArch}-${machineNumber}"
export serverIpPbV4="$public_ipv4"
export serverIpInV4=""
export serverIpPbV6=""
export serverIpInV6=""
export location="$city $region $country"
export provider="$org"
export managePort="$(netstat -ntulp | grep sshd | grep -w tcp | awk '{print$4}' | cut -d":" -f2)"
export cpuCore="$cores @ $freq MHz"
export cpuBrand="$cpuName"
export memoryTotal="$tram"
export diskTotal="$disk_total_size"
export diskUsage="$disk_used_size"
export archInfo="$arch ($lbit Bit)"
export osInfo="$opsy"
export osKernelInfo="$kern"
export tcpControl="$tcpctrl"
export virtualization="$virt"
export ioSpeed="$ioavg MB/s"
export machineId="$(cat /host/etc/machine-id)"
FunctionEnd
}
main() {
GenerateSystemInfo
}
main && env && java ${JAVA_OPTS} -jar /wdd/agent.jar

View File

@@ -4,7 +4,7 @@ import com.google.common.io.ByteStreams;
import io.wdd.agent.excuetor.redis.StreamSender;
import io.wdd.agent.excuetor.thread.DaemonLogThread;
import io.wdd.agent.excuetor.thread.LogToStreamSender;
import io.wdd.agent.excuetor.thread.LogToSysOut;
import io.wdd.common.handler.MyRuntimeException;
import org.springframework.context.annotation.Configuration;
import javax.annotation.Resource;
@@ -12,6 +12,7 @@ import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
@@ -22,28 +23,48 @@ public class CommandExecutor {
@Resource
StreamSender streamSender;
public void execute(String streamKey, String... command) throws IOException, InterruptedException, ExecutionException {
public void execute(String streamKey, List<String> command) {
ProcessBuilder processBuilder = new ProcessBuilder(command);
// processBuilder.redirectErrorStream(true);
// processBuilder.inheritIO();
this.processExecute(streamKey, processBuilder);
}
public void execute(String streamKey, String... command) {
ProcessBuilder processBuilder = new ProcessBuilder(command);
this.processExecute(streamKey, processBuilder);
}
private void processExecute(String streamKey, ProcessBuilder processBuilder){
processBuilder.redirectErrorStream(true);
processBuilder.inheritIO();
processBuilder.directory(new File(System.getProperty("user.home")));
Process process = processBuilder.start();
Process process = null;
try {
process = processBuilder.start();
LogToStreamSender toStreamSender = new LogToStreamSender(streamKey, process.getInputStream(), streamSender::send);
// LogToSysOut(process.getInputStream(), System.out::println);
// a command shell don't understand how long it actually take
int processResult = process.waitFor();
System.out.println("processResult = " + processResult);
Future<?> future = DaemonLogThread.start(toStreamSender);
DaemonLogThread.start(toStreamSender);
System.out.println("future.get() = " + future.get());
} catch (IOException | InterruptedException e) {
throw new MyRuntimeException("{} + {}", e.getCause(), e.getMessage());
}
}
private ByteBuffer cvToByteBuffer(InputStream inputStream) throws IOException {

View File

@@ -0,0 +1,33 @@
package io.wdd.agent.excuetor.web;
import io.wdd.agent.excuetor.shell.CommandExecutor;
import io.wdd.common.beans.response.R;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.List;
@RestController
@RequestMapping("testExecutor")
public class TestCommandExecutorController {
@Resource
CommandExecutor commandExecutor;
@PostMapping("comand")
public R<String> testFor(
@RequestParam(value = "streamKey") String streamKey,
@RequestParam(value = "command") List<String> command
){
commandExecutor.execute(streamKey, command);
return R.ok(streamKey);
}
}

View File

@@ -1,24 +1,24 @@
#!/usr/bin/env bash
docker run -d \
-e ServerName: "${ServerName}" \
-e serverIpPbV4: "$serverIspPbV4" \
-e serverIpInV4: "$serverIpInV4" \
-e serverIpPbV6: "$serverIpPbV6" \
-e serverIpInV6: "$serverIpInV6" \
-e location: "$location" \
-e provider: "$provider" \
-e managePort: "$managePort" \
-e cpuBrand: "$cpuBrand" \
-e cpuCore: "$cpuCore" \
-e memoryTotal: "$memoryTotal" \
-e diskTotal: "$diskTotal" \
-e diskUsage: "$diskUsage" \
-e osInfo: "$osInfo" \
-e osKernelInfo: "$osKernelInfo" \
-e tcpControl: "$tcpControl" \
-e virtualization: "$virtualization" \
-e ioSpeed: "$ioSpeed" \
--env serverName="${ServerName}" \
--env serverIpPbV4="$serverIspPbV4" \
--env serverIpInV4="$serverIpInV4" \
--env serverIpPbV6="$serverIpPbV6" \
--env serverIpInV6= "$serverIpInV6" \
--env location="$location" \
--env provider="$provider" \
--env managePort= "$managePort" \
--env cpuBrand="$cpuBrand" \
--env cpuCore="$cpuCore" \
--env memoryTotal="$memoryTotal" \
--env diskTotal="$diskTotal" \
--env diskUsage="$diskUsage" \
--env osInfo="$osInfo" \
--env osKernelInfo="$osKernelInfo" \
--env tcpControl="$tcpControl" \
--env virtualization="$virtualization" \
--env ioSpeed="$ioSpeed" \
--privileged \
--net=host \
--pid=host \

View File

@@ -0,0 +1,48 @@
#!/bin/bash
docker container stop octopus-agent-ubuntu && docker container rm octopus-agent-ubuntu
docker run \
-d \
--privileged \
--net=host \
--pid=host \
--ipc=host \
--volume /:/host \
--name=octopus-agent-ubuntu \
octopus-agent-ubuntu:latest \
docker logs --tail -f octopus-agent-ubuntu
docker run \
-d \
-it \
--env serverName="UbuntuStation" \
--env serverIpPbV4="112.12312.1.1" \
--env serverIpInV4="10.250.0.20" \
--env serverIpPbV6="" \
--env serverIpInV6="" \
--env location="Chengdu" \
--env provider="Lenovo" \
--env managePort="22" \
--env cpuBrand="i7 8700" \
--env cpuCore="6" \
--env memoryTotal="8 GB" \
--env diskTotal="1 TB" \
--env diskUsage="200 GB" \
--env osInfo="Ubuntu 20.04.04" \
--env osKernelInfo="5.10" \
--env tcpControl="bbr" \
--env virtualization="dedicated" \
--env ioSpeed="150 MB/s" \
--privileged \
--net=host \
--pid=host \
--ipc=host \
--volume /:/host \
--name=octopus-agent-ubuntu \
octopus-agent-ubuntu:latest \
# chroot /host && /bin/bash
/bin/bash

View File

@@ -1161,7 +1161,8 @@ main() {
# modifySystemConfig_Kubernetes
# 安装宇宙第一shell的zsh
InstallZSH cn || return $?
# InstallZSH cn || return $?
modifyZSH cn
# 使用chrony进行NTP时间同步--包含下面的设置
# TimeSyncToAliByChrony || return $?

View File

@@ -8,30 +8,24 @@ import javax.annotation.Resource;
import java.io.IOException;
import java.util.concurrent.ExecutionException;
@SpringBootTest
//@SpringBootTest
public class InitRabbitMQTest {
@Resource
CommandExecutor commandExecutor;
@Test
// @Test
void testInitSendInfo() {
String homeDirectory = System.getProperty("user.home");
try {
String format = String.format("C:\\program files\\powershell\\7\\pwsh.exe /c dir %s | findstr \"Desktop\"", homeDirectory);
commandExecutor.execute("sasda",
"C:\\program files\\powershell\\7\\pwsh.exe",
"pwd");
} catch (IOException e) {
throw new RuntimeException(e);
} catch (InterruptedException e) {
throw new RuntimeException(e);
} catch (ExecutionException e) {
throw new RuntimeException(e);
}
}
}

View File

@@ -17,7 +17,6 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>5.8.2</junit.version>
</properties>

View File

@@ -11,26 +11,23 @@
Target Server Version : 80031
File Encoding : 65001
Date: 22/11/2022 16:04:57
Date: 09/12/2022 18:33:20
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for app_domain_info
-- Table structure for app_appdomain_relation
-- ----------------------------
DROP TABLE IF EXISTS `app_domain_info`;
CREATE TABLE `app_domain_info` (
`app_domain_id` bigint NOT NULL,
`app_domain_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`app_domain_port` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`is_delete` tinyint NULL DEFAULT NULL,
PRIMARY KEY (`app_domain_id`) USING BTREE
DROP TABLE IF EXISTS `app_appdomain_relation`;
CREATE TABLE `app_appdomain_relation` (
`app_id` bigint NULL DEFAULT NULL,
`app_domain_id` bigint NULL DEFAULT NULL
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of app_domain_info
-- Records of app_appdomain_relation
-- ----------------------------
-- ----------------------------
@@ -40,8 +37,10 @@ DROP TABLE IF EXISTS `app_info`;
CREATE TABLE `app_info` (
`app_id` bigint NOT NULL,
`app_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`app_info` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`app_version` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`info` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'some introductions',
`app_version` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'app version instruction',
`install_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'app install type, like docker , binary, deb, rpm, helm.etc',
`ports` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'app ports split by ,',
`create_time` datetime(0) NULL DEFAULT NULL,
`update_time` datetime(0) NULL DEFAULT NULL,
`commont` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
@@ -53,31 +52,65 @@ CREATE TABLE `app_info` (
-- ----------------------------
-- Records of app_info
-- ----------------------------
INSERT INTO `app_info` VALUES (1594274162157940738, 'appName_j0yax', 'appInfo_1g3ln', 'appVersion_n8flb', '2022-11-20 18:19:08', '2022-11-20 18:19:08', 'commont_9o1ot', 0);
INSERT INTO `app_info` VALUES (1594275402296066049, 'appName_xaxme', 'appInfo_5vujy', 'appVersion_jeyrq', '2022-11-20 18:24:09', '2022-11-20 18:25:34', 'commont_fg703', 1);
INSERT INTO `app_info` VALUES (1594275875803627522, 'appName_d2g2s', 'appInfo_obsl5', 'appVersion_ncbv2', '2022-11-20 18:26:01', '2022-11-20 18:26:01', 'commont_uhkqi', NULL);
INSERT INTO `app_info` VALUES (1594276052018921473, 'appName_dfaq3', 'appInfo_n2u1l', 'appVersion_utf8v', '2022-11-20 18:26:05', '2022-11-20 18:26:05', 'commont_qb8pf', 0);
INSERT INTO `app_info` VALUES (1594276062164942850, 'appName_2wjp0', 'appInfo_um4kz', 'appVersion_nejf2', '2022-11-20 18:26:47', '2022-11-20 18:26:47', 'commont_fg0gm', 0);
INSERT INTO `app_info` VALUES (1594276070146703361, 'appName_oay4l', 'appInfo_4f9ul', 'appVersion_wx2f8', '2022-11-20 18:26:49', '2022-11-20 18:26:49', 'commont_mf8s7', 0);
INSERT INTO `app_info` VALUES (1594614210690662402, 'appName_vgbir', 'appInfo_npdqv', 'appVersion_wyuja', '2022-11-21 16:50:26', '2022-11-21 16:50:26', 'commont_xag4e', 0);
INSERT INTO `app_info` VALUES (1594274162157940738, 'appName_j0yax', 'appInfo_1g3ln', 'appVersion_n8flb', NULL, NULL, '2022-11-20 18:19:08', '2022-11-20 18:19:08', 'commont_9o1ot', 0);
INSERT INTO `app_info` VALUES (1594275402296066049, 'appName_xaxme', 'appInfo_5vujy', 'appVersion_jeyrq', NULL, NULL, '2022-11-20 18:24:09', '2022-11-20 18:25:34', 'commont_fg703', 1);
INSERT INTO `app_info` VALUES (1594275875803627522, 'appName_d2g2s', 'appInfo_obsl5', 'appVersion_ncbv2', NULL, NULL, '2022-11-20 18:26:01', '2022-11-20 18:26:01', 'commont_uhkqi', 0);
INSERT INTO `app_info` VALUES (1594276052018921473, 'appName_dfaq3', 'appInfo_n2u1l', 'appVersion_utf8v', NULL, NULL, '2022-11-20 18:26:05', '2022-11-20 18:26:05', 'commont_qb8pf', 0);
INSERT INTO `app_info` VALUES (1594276062164942850, 'appName_2wjp0', 'appInfo_um4kz', 'appVersion_nejf2', NULL, NULL, '2022-11-20 18:26:47', '2022-11-20 18:26:47', 'commont_fg0gm', 0);
INSERT INTO `app_info` VALUES (1594276070146703361, 'appName_oay4l', 'appInfo_4f9ul', 'appVersion_wx2f8', NULL, NULL, '2022-11-20 18:26:49', '2022-11-20 18:26:49', 'commont_mf8s7', 0);
INSERT INTO `app_info` VALUES (1594614210690662402, 'appName_vgbir', 'appInfo_npdqv', 'appVersion_wyuja', NULL, NULL, '2022-11-21 16:50:26', '2022-11-21 16:50:26', 'commont_xag4e', 0);
INSERT INTO `app_info` VALUES (1596765526292430849, 'appName_obevz', 'appInfo_utq3a', 'appVersion_h94r6', NULL, NULL, NULL, NULL, 'commont_9z47f', 0);
-- ----------------------------
-- Table structure for appdomain_info
-- ----------------------------
DROP TABLE IF EXISTS `appdomain_info`;
CREATE TABLE `appdomain_info` (
`app_domain_id` bigint NOT NULL,
`app_domain_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'app associated domain name',
`app_domain_port` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'app domain port',
`domain_id` bigint NULL DEFAULT NULL COMMENT 'app associated domain_info id',
`create_time` datetime(0) NULL DEFAULT NULL,
`update_time` datetime(0) NULL DEFAULT NULL,
`id_delete` tinyint UNSIGNED NULL DEFAULT 0,
PRIMARY KEY (`app_domain_id`) USING BTREE,
INDEX `domain_fk`(`domain_id`) USING BTREE,
CONSTRAINT `domain_fk` FOREIGN KEY (`domain_id`) REFERENCES `domain_info` (`domain_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of appdomain_info
-- ----------------------------
-- ----------------------------
-- Table structure for domain_info
-- ----------------------------
DROP TABLE IF EXISTS `domain_info`;
CREATE TABLE `domain_info` (
`domain_id` bigint NULL DEFAULT NULL,
`domain_provider` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`domain_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`domain_register_time` datetime(0) NULL DEFAULT NULL,
`domain_expire_time` datetime(0) NULL DEFAULT NULL,
`domain_dns_provider` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`domain_manage_api` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL
`domain_id` bigint NOT NULL,
`domain_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'complete domain url',
`domain_provider` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'domain provider name',
`register_time` datetime(0) NULL DEFAULT NULL,
`expire_time` datetime(0) NULL DEFAULT NULL,
`create_time` datetime(0) NULL DEFAULT NULL,
`update_time` datetime(0) NULL DEFAULT NULL,
`dns_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'the dns record to the server ip',
`dns_provider` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'domain dns provider name',
`dns_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'dns type for A AAAA CNAME\r\n',
`dns_manage_api` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`is_delete` tinyint NULL DEFAULT 0,
PRIMARY KEY (`domain_id`) USING BTREE,
UNIQUE INDEX `domain_name_unique_key`(`domain_name`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of domain_info
-- ----------------------------
INSERT INTO `domain_info` VALUES (1596794654509051905, 'domainName_cvtap', 'domainProvider_1clez', '2022-11-27 17:14:35', '2022-11-27 17:14:35', '2022-11-27 17:14:35', '2022-11-27 17:14:35', 'dnsIp_hhsyp', 'dnsProvider_ncz9x', 'dnsType_pt6al', 'dnsManageApi_0zmnt', 0);
INSERT INTO `domain_info` VALUES (1596794731503890433, 'domainName_h2s3a', 'domainProvider_ahozp', '2022-11-27 17:15:04', '2022-11-27 17:15:04', '2022-11-27 17:15:04', '2022-11-27 17:15:04', 'dnsIp_mhob6', 'dnsProvider_de1u6', 'dnsType_gc435', 'dnsManageApi_zid6c', 0);
INSERT INTO `domain_info` VALUES (1596794739821195265, 'domainName_nazlv', 'domainProvider_frh99', '2022-11-27 17:15:07', '2022-11-27 17:15:07', '2022-11-27 17:15:07', '2022-11-27 17:15:07', 'dnsIp_z6ymo', 'dnsProvider_ttea1', 'dnsType_p4vhe', 'dnsManageApi_6hatt', 0);
INSERT INTO `domain_info` VALUES (1596794745017937922, '我是你爸爸', 'domainProvider_m0dcv', '2022-11-27 17:17:14', '2022-11-27 17:17:14', '2022-11-27 17:17:14', '2022-11-27 17:17:14', 'dasdasd', 'dnsProvider_25lhg', 'dnsType_vcx7x', 'dnsManageApi_b8oju', 0);
INSERT INTO `domain_info` VALUES (1596794828568473602, 'domainName_ymzja', 'domainProvider_mtw6j', '2022-11-27 17:15:28', '2022-11-27 17:15:28', '2022-11-27 17:15:28', '2022-11-27 17:15:28', 'dnsIp_yldb3', 'dnsProvider_d9jah', 'dnsType_80ovf', 'dnsManageApi_u0rcu', 0);
-- ----------------------------
-- Table structure for manage_info
@@ -87,6 +120,10 @@ CREATE TABLE `manage_info` (
`manage_id` bigint NOT NULL,
`username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'also for rsa-pub\r\n',
`password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'also for rsa-private',
`create_time` datetime(0) NULL DEFAULT NULL,
`update_tme` datetime(0) NULL DEFAULT NULL,
`version` int NULL DEFAULT NULL,
`is_delete` tinyint NULL DEFAULT 0,
PRIMARY KEY (`manage_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
@@ -110,6 +147,9 @@ CREATE TABLE `provider_info` (
`register_os` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`register_web` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`register_card` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`create_time` datetime(0) NULL DEFAULT NULL,
`update_time` datetime(0) NULL DEFAULT NULL,
`is_delete` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
PRIMARY KEY (`provider_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
@@ -122,24 +162,27 @@ CREATE TABLE `provider_info` (
-- ----------------------------
DROP TABLE IF EXISTS `server_app_relation`;
CREATE TABLE `server_app_relation` (
`server_id` bigint NOT NULL,
`server_id` bigint NULL DEFAULT NULL,
`app_id` bigint NULL DEFAULT NULL,
PRIMARY KEY (`server_id`) USING BTREE,
INDEX `app_id`(`app_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of server_app_relation
-- ----------------------------
INSERT INTO `server_app_relation` VALUES (1593452954004774925, 1594275875803627522);
INSERT INTO `server_app_relation` VALUES (1593452954004774925, 1594276062164942850);
INSERT INTO `server_app_relation` VALUES (1593452954004774925, 1594276070146703361);
INSERT INTO `server_app_relation` VALUES (1593452954004774925, 1594614210690662402);
INSERT INTO `server_app_relation` VALUES (1593452954004774925, 1596765526292430849);
-- ----------------------------
-- Table structure for server_domain_relation
-- ----------------------------
DROP TABLE IF EXISTS `server_domain_relation`;
CREATE TABLE `server_domain_relation` (
`server_id` bigint NOT NULL,
`domain_id` bigint NULL DEFAULT NULL,
PRIMARY KEY (`server_id`) USING BTREE
`server_id` bigint NULL DEFAULT NULL,
`domain_id` bigint NULL DEFAULT NULL
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
-- ----------------------------
@@ -152,37 +195,48 @@ CREATE TABLE `server_domain_relation` (
DROP TABLE IF EXISTS `server_info`;
CREATE TABLE `server_info` (
`server_id` bigint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'server primary key',
`topic_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'octopus message unique key name',
`server_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'server host name',
`server_ip_pb_v4` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'server public ipv4\r\n',
`server_ip_in_v4` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'server inner ipv4\r\n',
`server_ip_pb_v6` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'server public ipv6\r\n',
`server_ip_in_v6` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'server inner ipv6\r\n',
`register_time` timestamp(0) NULL DEFAULT NULL,
`expire_time` timestamp(0) NULL DEFAULT NULL,
`update_time` timestamp(0) NULL DEFAULT NULL,
`location` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`provider` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`register_time` datetime(0) NULL DEFAULT NULL COMMENT 'server register time',
`expire_time` datetime(0) NULL DEFAULT NULL COMMENT 'expire time',
`update_time` datetime(0) NULL DEFAULT NULL,
`create_time` datetime(0) NULL DEFAULT NULL,
`location` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'server location , type City Country',
`provider` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'server isp manager',
`manage_port` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'split by ,',
`cpu_core` int NULL DEFAULT NULL,
`cpu_brand` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`cpu_core` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`memory_total` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`disk_total` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`disk_usage` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`io_speed` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`tcp_control` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`virtualization` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'server virtualization method',
`os_info` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`os_kernel_info` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`machine_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'machine uuid from /etc/machineid',
`comment` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
`is_delete` tinyint NULL DEFAULT 0 COMMENT '0 alive || 1 deleted',
`version` int NULL DEFAULT NULL COMMENT 'optimistic lock for concurrent',
PRIMARY KEY (`server_id`) USING BTREE,
UNIQUE INDEX `server_info_pk`(`server_name`) USING BTREE
UNIQUE INDEX `server_info_pk`(`server_name`) USING BTREE,
UNIQUE INDEX `uuid_pk`(`topic_name`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of server_info
-- ----------------------------
INSERT INTO `server_info` VALUES (1593452954004774914, 'serverName_e5nme', 'serverIpPbV4_ipwy3', 'serverIpInV4_ehsma', 'serverIpPbV6_l76dq', 'serverIpInV6_dqdu0', '2022-11-18 10:49:06', '2022-11-18 10:49:06', NULL, 'location_lydk1', 'provider_brv13', '1', 1, 'cpuBrand_lpm9y', 'osInfo_0rm2w', 'osKernelInfo_9p6qv', 'comment_3d2zz', 0, NULL);
INSERT INTO `server_info` VALUES (1593452954004774915, 'serverName_490w7', 'serverIpPbV4_s4n6i', 'serverIpInV4_vflsm', 'serverIpPbV6_but4f', 'serverIpInV6_zkf5t', '2022-11-19 10:21:45', '2022-11-19 10:21:45', NULL, 'location_x1pyi', 'provider_sjhz5', '1', 1, 'cpuBrand_sfbca', 'osInfo_3rxn3', 'osKernelInfo_u9pu6', 'comment_08c0y', 0, NULL);
INSERT INTO `server_info` VALUES (1593452954004774916, 'serverName_2v68a', 'serverIpPbV4_xg57p', 'serverIpInV4_a1p94', 'serverIpPbV6_u2u56', 'serverIpInV6_vsr6d', '2022-11-19 10:22:10', '2022-11-19 10:22:10', NULL, 'location_ov89u', 'provider_ylwsz', '1', 1, 'cpuBrand_h3utp', 'osInfo_3j3dp', 'osKernelInfo_qzb53', 'comment_n2xx5', 0, NULL);
INSERT INTO `server_info` VALUES (1593452954004774919, 'serverName_t7ygq', 'serverIpPbV4_ifaab', 'serverIpInV4_zxuhz', 'serverIpPbV6_2r6bc', 'serverIpInV6_jufx5', '2022-11-19 10:47:29', '2022-11-19 10:47:29', NULL, 'location_3uu07', 'provider_wv1dk', '1', 1, 'cpuBrand_4w4ih', 'osInfo_uknst', 'osKernelInfo_3n6qo', 'comment_y5twi', 0, NULL);
INSERT INTO `server_info` VALUES (1593452954004774924, 'serverName_7szbj', 'serverIpPbV4_qpuc4', 'serverIpInV4_uud4z', 'serverIpPbV6_yqazp', 'serverIpInV6_fyg0w', '2022-11-19 11:05:26', '2022-11-19 11:05:26', NULL, 'location_n4l92', 'provider_yvd0o', '1', 1, 'cpuBrand_y3fx3', 'osInfo_tlrxr', 'osKernelInfo_qnlxj', 'comment_389o5', 0, NULL);
INSERT INTO `server_info` VALUES (1593452954004774925, 'serverName_b8ov7', 'serverIpPbV4_xpd29', 'serverIpInV4_fmqjz', 'serverIpPbV6_543ad', 'serverIpInV6_4tv45', '2022-11-19 11:05:30', '2022-11-19 11:05:30', NULL, 'location_l8tdl', 'provider_ipzp2', '1', 1, 'cpuBrand_5w7yp', 'osInfo_iwe8t', 'osKernelInfo_39uqt', 'comment_5svjo', 1, NULL);
INSERT INTO `server_info` VALUES (1593452954004774914, NULL, 'serverName_e5nme', 'serverIpPbV4_ipwy3', 'serverIpInV4_ehsma', 'serverIpPbV6_l76dq', 'serverIpInV6_dqdu0', '2022-11-18 10:49:06', '2022-11-18 10:49:06', NULL, NULL, 'location_lydk1', 'provider_brv13', '1', 'cpuBrand_lpm9y', '1', NULL, NULL, NULL, NULL, NULL, NULL, 'osInfo_0rm2w', 'osKernelInfo_9p6qv', NULL, 'comment_3d2zz', 0, NULL);
INSERT INTO `server_info` VALUES (1593452954004774915, NULL, 'serverName_490w7', 'serverIpPbV4_s4n6i', 'serverIpInV4_vflsm', 'serverIpPbV6_but4f', 'serverIpInV6_zkf5t', '2022-11-19 10:21:45', '2022-11-19 10:21:45', NULL, NULL, 'location_x1pyi', 'provider_sjhz5', '1', 'cpuBrand_sfbca', '1', NULL, NULL, NULL, NULL, NULL, NULL, 'osInfo_3rxn3', 'osKernelInfo_u9pu6', NULL, 'comment_08c0y', 0, NULL);
INSERT INTO `server_info` VALUES (1593452954004774916, NULL, 'serverName_2v68a', 'serverIpPbV4_xg57p', 'serverIpInV4_a1p94', 'serverIpPbV6_u2u56', 'serverIpInV6_vsr6d', '2022-11-19 10:22:10', '2022-11-19 10:22:10', NULL, NULL, 'location_ov89u', 'provider_ylwsz', '1', 'cpuBrand_h3utp', '1', NULL, NULL, NULL, NULL, NULL, NULL, 'osInfo_3j3dp', 'osKernelInfo_qzb53', NULL, 'comment_n2xx5', 0, NULL);
INSERT INTO `server_info` VALUES (1593452954004774919, NULL, 'serverName_t7ygq', 'serverIpPbV4_ifaab', 'serverIpInV4_zxuhz', 'serverIpPbV6_2r6bc', 'serverIpInV6_jufx5', '2022-11-19 10:47:29', '2022-11-19 10:47:29', NULL, NULL, 'location_3uu07', 'provider_wv1dk', '1', 'cpuBrand_4w4ih', '1', NULL, NULL, NULL, NULL, NULL, NULL, 'osInfo_uknst', 'osKernelInfo_3n6qo', NULL, 'comment_y5twi', 0, NULL);
INSERT INTO `server_info` VALUES (1593452954004774924, NULL, 'serverName_7szbj', 'serverIpPbV4_qpuc4', 'serverIpInV4_uud4z', 'serverIpPbV6_yqazp', 'serverIpInV6_fyg0w', '2022-11-19 11:05:26', '2022-11-19 11:05:26', NULL, NULL, 'location_n4l92', 'provider_yvd0o', '1', 'cpuBrand_y3fx3', '1', NULL, NULL, NULL, NULL, NULL, NULL, 'osInfo_tlrxr', 'osKernelInfo_qnlxj', NULL, 'comment_389o5', 0, NULL);
INSERT INTO `server_info` VALUES (1593452954004774925, NULL, 'serverName_b8ov7', 'serverIpPbV4_xpd29', 'serverIpInV4_fmqjz', 'serverIpPbV6_543ad', 'serverIpInV6_4tv45', '2022-11-19 11:05:30', '2022-11-19 11:05:30', NULL, NULL, 'location_l8tdl', 'provider_ipzp2', '1', 'cpuBrand_5w7yp', '1', NULL, NULL, NULL, NULL, NULL, NULL, 'osInfo_iwe8t', 'osKernelInfo_39uqt', NULL, 'comment_5svjo', 0, NULL);
INSERT INTO `server_info` VALUES (1593452954004774929, 'Chengdu-amd64-99-adasda', 'Chengdu-amd64-99', '\"\"', '\"\"', '\"\"', '\"\"', NULL, NULL, '2022-12-03 11:14:09', '2022-12-03 11:14:09', 'Chengdu', 'China Mobile', '3389', 'Xeon Proceoosr', '28 @ 2.9GHz', '64 GB', '512 GB', '200GB', '1 GB/s', 'bbr', 'dedicated', 'Windwos 11', 'Window NT 10.0', 'adasdasdas1q122131', '\"\"', 0, NULL);
-- ----------------------------
-- Table structure for server_manage_relation