docker
This commit is contained in:
@@ -38,7 +38,7 @@ type SSHConfig struct {
|
||||
Password string `yaml:"password"`
|
||||
KeyFile string `yaml:"key"`
|
||||
Port int `yaml:"port"`
|
||||
SudoPwd string `yaml:"sudo_password"` // 非 root 用户安装工具时使用的 sudo 密码
|
||||
SudoPwd string `yaml:"sudo_password"` // 非 root 用户执行特权命令时的 sudo 密码
|
||||
}
|
||||
|
||||
// StressConfig 压力测试
|
||||
@@ -51,8 +51,10 @@ type StressConfig struct {
|
||||
DiskDir string `yaml:"disk_dir"` // 磁盘压测目录,空=自动临时目录
|
||||
TempInterval time.Duration `yaml:"temp_interval"` // 温度采样间隔,0=默认10s
|
||||
TempLimit float64 `yaml:"temp_limit"` // 温度上限(°C),0=不判定
|
||||
AutoInstall bool `yaml:"auto_install"` // 缺工具时尝试在线安装(apt/dnf/yum 等)
|
||||
UseMirror bool `yaml:"use_mirror"` // 在线安装时切换国内镜像源(清华 TUNA),国内网络卡顿/超时再开启
|
||||
// 压测统一在 Docker 容器中执行(工具与脚本预装在镜像里)
|
||||
DockerImage string `yaml:"docker_image"` // 压测镜像名称,如 stress-test:latest
|
||||
DockerTar string `yaml:"docker_tar"` // 本地导出的镜像文件(docker save),目标机无镜像时上传并 load
|
||||
DockerArgs string `yaml:"docker_args"` // Docker 运行参数,如 "--network=host --privileged"
|
||||
}
|
||||
|
||||
// ReportConfig 报告
|
||||
@@ -97,8 +99,9 @@ func Default() *Config {
|
||||
DiskSizeMB: 1024,
|
||||
TempInterval: 10 * time.Second,
|
||||
TempLimit: 90,
|
||||
AutoInstall: true,
|
||||
UseMirror: false,
|
||||
DockerImage: "stress-test:latest",
|
||||
DockerTar: "docker/stress-test/stress-test.tar",
|
||||
DockerArgs: "--network=host --privileged",
|
||||
},
|
||||
Workflow: WorkflowConfig{
|
||||
Interval: 10 * time.Second,
|
||||
|
||||
Reference in New Issue
Block a user