52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
ref: ssh_cmd
|
||
version: 0.0.1
|
||
description: 支持跳板机运行连接远程服务器,并支持执行脚本,须设置免密登录
|
||
inputParameters:
|
||
- ref: ssh_private_key
|
||
name: ssh私钥
|
||
type: SECRET
|
||
required: true
|
||
description: "可以免密登陆目标主机的ssh私钥,必填"
|
||
- ref: remote_host
|
||
name: 远程服务器IP
|
||
type: STRING
|
||
required: true
|
||
description: "ssh登陆的远程服务器的ip"
|
||
- ref: remote_port
|
||
name: 远程服务器端口
|
||
type: STRING
|
||
value: "22"
|
||
description: "ssh登陆所用端口,默认为22"
|
||
- ref: remote_user
|
||
name: 远程服务器连接用户
|
||
type: STRING
|
||
value: root
|
||
description: "ssh登陆时的用户,默认为root"
|
||
- ref: gateway_host
|
||
name: 跳板机服务器IP
|
||
type: STRING
|
||
required: true
|
||
description: "ssh登陆的跳板机服务器的ip"
|
||
- ref: gateway_port
|
||
name: 跳板机端口
|
||
type: STRING
|
||
value: "22"
|
||
description: "ssh登陆跳板机所用端口,默认为22"
|
||
- ref: gateway_user
|
||
name: 跳板机连接用户
|
||
type: STRING
|
||
value: root
|
||
description: "ssh登陆跳板机时的用户,默认为root"
|
||
- ref: ssh_cmd
|
||
name: 执行命令
|
||
type: STRING
|
||
required: true
|
||
description: "需要在远程执行的命令"
|
||
spec:
|
||
image: 'docker.jianmuhub.com/yystopf/runner_ssh:0.0.1'
|
||
entrypoint:
|
||
- "/bin/sh"
|
||
- "-c"
|
||
cmd:
|
||
- "/usr/local/bin/execute_ssh"
|