pls ignore this email, thanks.
On Wed, Dec 02, 2020 at 03:58:45PM +0800, Zhang Yale wrote:
Signed-off-by: Zhang Yale ylzhangah@qq.com
...03\346\265\213\344\273\273\345\212\241.md" | 91 +++++++++++++------ 1 file changed, 65 insertions(+), 26 deletions(-) rename doc/manual/how-to-log-in-the-machine.md => "doc/manual/\345\246\202\344\275\225\347\231\273\345\275\225\346\265\213\350\257\225\346\234\272\350\260\203\346\265\213\344\273\273\345\212\241.md" (56%)
diff --git a/doc/manual/how-to-log-in-the-machine.md "b/doc/manual/\345\246\202\344\275\225\347\231\273\345\275\225\346\265\213\350\257\225\346\234\272\350\260\203\346\265\213\344\273\273\345\212\241.md" similarity index 56% rename from doc/manual/how-to-log-in-the-machine.md rename to "doc/manual/\345\246\202\344\275\225\347\231\273\345\275\225\346\265\213\350\257\225\346\234\272\350\260\203\346\265\213\344\273\273\345\212\241.md" index fefd718..22da3c5 100644 --- a/doc/manual/how-to-log-in-the-machine.md +++ "b/doc/manual/\345\246\202\344\275\225\347\231\273\345\275\225\346\265\213\350\257\225\346\234\272\350\260\203\346\265\213\344\273\273\345\212\241.md" @@ -1,17 +1,22 @@ -这篇文档将告诉你如何登陆测试环境 +这篇文档将告诉你如何登陆测试环境去调测任务
-# 1. 前提条件 -请先学习: +# 1. 前提条件: +## 请先学习:
- [apply-account.md](https://gitee.com/wu_fengguang/compass-ci/blob/master/doc/manual/apply-accou...), 配置个人邮箱
- [如何申请测试机.md](https://gitee.com/wu_fengguang/compass-ci/blob/master/doc/manual/%E5%A6%82%E...), 并在本地生成RSA公私钥对
- [submit命令详解.md](https://gitee.com/wu_fengguang/compass-ci/blob/master/doc/manual/submit%E5%9...), submit 命令详解
# 2. 操作方法 -## 2.1 在job.yaml里加上sshd和sleep字段, 以host-info.yaml任务为例:
-```shell +## 2.1 如何修改yaml? +### 在测试机运行script之前进入测试机调测任务
- 可以在job.yaml里加上sshd和sleep字段,测试机在运行脚本之前sleep,
- 并免密登录进去,手动输入命令或脚本进行调试,以host-info.yaml为例:
+```yaml suite: host-info category: functional
- pub_key: <%= begin File.read("#{ENV['HOME']}/.ssh/id_rsa.pub").chomp
@@ -19,6 +24,7 @@ nil end %>
- sshd: # sleep at the bottom sleep: 1h
@@ -26,31 +32,42 @@ host-info:
-## 2.2 以下有2种方式可以登录到测试机: -### 第一种:使用submit -m -c的方式: - 这种方式提交的任务会在指定的位置sleep并直接登陆到测试机中,适用于登陆测试环境后手动调试 - 命令:submit -m -c host-info.yaml - 任务提交完成后,当测试执行到sshd后会自动登陆到测试机器上: - 效果如下: +### 在测试任务运行失败时进入测试机调测任务 + 可以在job.yaml里加上pub_key和on_fail字段,并在on_fail下加上sshd和sleep字段, + 测试任务失败后,测试机保留并免密登录进去,以方便手动调试,以iperf.yaml为例: -```shell - hi6325@account-vm ~% submit -m -c atomic.yaml - submit atomic.yaml, got job_id=crystal.146528 - query=>{"job_id":["crystal.146528"]} - connect to ws://localhost:11310/filter - {"job_id": "crystal.146528", "result_root": "/srv/result/atomic/2020-12-01/vm-2p8g/openeuler-20.03-aarch64/1-1000/crystal.146528", "job_state": "set result root" - {"job_id": "crystal.146528", "job_state": "boot"} - {"job_id": "crystal.146528", "job_state": "download"} - "time":"2020-12-01 10:12:33","mac":"0a-2d-7b-d9-f8-b1","ip":"172.18.252.12","job_id":"crystal.146528","state":"running","testbox":"vm-2p8g.zhyl-453231"} - {"job_state":"running","job_id":"crystal.146528"} - {"job_id": "crystal.146528", "state": "set ssh port", "ssh_port": "51750", "tbox_name": "vm-2p8g.zhyl-453231"} +```yaml + suite: iperf + category: benchmark - root@vm-2p8g ~# + runtime: 300s + + cluster: cs-localhost + + pub_key: <%= + begin + File.read("#{ENV['HOME']}/.ssh/id_rsa.pub").chomp + rescue + nil + end + %> + + if role server: + iperf-server: + + if role client: + iperf: + protocol: + - tcp + - udp
-### 第二种:根据邮件信息使用ssh方式登录测试机:
- 这种是使用submit方式提交的任务完成后,系统自动发送一封邮件提醒您可以在指定时间内登陆到测试环境
- 命令: submit host-info.yaml
+## 2.2 如何免密登录执行机? +### 直接submit job.yaml或者submit加-m参数
- 可在收到的邮件里,按照邮件提示手动免密登录到执行机调测
- 命令:submit iperf.yaml或者submit -m iperf.yaml
- 任务执行完成后,系统发送邮件内容如下:
@@ -84,3 +101,25 @@ root@vm-2p8g ~#
+### submit job.yaml时加上-m -c
- 该方法不用查看邮件,可自动免密登录到测试机:
- 命令:submit -m -c iperf.yaml
- 效果如下:
+```shell
- hi6325@account-vm ~% submit -m -c iperf.yaml
- submit iperf.yaml, got job_id=crystal.146528
- query=>{"job_id":["crystal.146528"]}
- connect to ws://localhost:11310/filter
- {"job_id": "crystal.146528", "result_root": "/srv/result/iperf/2020-12-01/vm-2p8g/openeuler-20.03-aarch64/1-1000/crystal.146528", "job_state": "set result root"
- {"job_id": "crystal.146528", "job_state": "boot"}
- {"job_id": "crystal.146528", "job_state": "download"}
- "time":"2020-12-01 10:12:33","mac":"0a-2d-7b-d9-f8-b1","ip":"172.18.252.12","job_id":"crystal.146528","state":"running","testbox":"vm-2p8g.zhyl-453231"}
- {"job_state":"running","job_id":"crystal.146528"}
- {"job_id": "crystal.146528", "state": "set ssh port", "ssh_port": "51750", "tbox_name": "vm-2p8g.zhyl-453231"}
- root@vm-2p8g ~#
+```
2.23.0