mirror of
https://github.com/certd/certd.git
synced 2026-04-21 18:37:28 +08:00
chore: plugin元数据换成yaml格式
This commit is contained in:
@@ -0,0 +1,167 @@
|
||||
showRunStrategy: false
|
||||
default:
|
||||
strategy:
|
||||
runStrategy: 1
|
||||
name: CopyToLocal
|
||||
title: 主机-复制到本机
|
||||
icon: solar:copy-bold-duotone
|
||||
desc: 【仅管理员使用】实际上是复制证书到docker容器内的某个路径,需要做目录映射到宿主机
|
||||
group: host
|
||||
input:
|
||||
cert:
|
||||
title: 域名证书
|
||||
helper: 请选择前置任务输出的域名证书
|
||||
component:
|
||||
name: output-selector
|
||||
from:
|
||||
- CertApply
|
||||
- CertApplyLego
|
||||
- CertApplyUpload
|
||||
required: true
|
||||
order: 0
|
||||
certType:
|
||||
title: 证书类型
|
||||
helper: 要部署的证书格式,支持pem、pfx、der、jks格式
|
||||
component:
|
||||
name: a-select
|
||||
options:
|
||||
- value: pem
|
||||
label: pem(crt),用于Nginx等大部分应用
|
||||
- value: pfx
|
||||
label: pfx,一般用于IIS
|
||||
- value: der
|
||||
label: der,一般用于Apache
|
||||
- value: jks
|
||||
label: jks,一般用于JAVA应用
|
||||
required: true
|
||||
order: 0
|
||||
crtPath:
|
||||
title: 证书保存路径
|
||||
helper: |-
|
||||
全链证书,路径要包含文件名
|
||||
推荐使用相对路径,将写入与数据库同级目录,无需映射,例如:tmp/cert.pem
|
||||
component:
|
||||
placeholder: tmp/full_chain.pem
|
||||
mergeScript: |2-
|
||||
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
return form.certType === 'pem';
|
||||
})
|
||||
}
|
||||
|
||||
required: true
|
||||
rules:
|
||||
- type: filepath
|
||||
order: 0
|
||||
keyPath:
|
||||
title: 私钥保存路径
|
||||
helper: |-
|
||||
路径要包含文件名
|
||||
推荐使用相对路径,将写入与数据库同级目录,无需映射,例如:tmp/cert.key
|
||||
component:
|
||||
placeholder: tmp/cert.key
|
||||
mergeScript: |2-
|
||||
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
return form.certType === 'pem';
|
||||
})
|
||||
}
|
||||
|
||||
required: true
|
||||
rules:
|
||||
- type: filepath
|
||||
order: 0
|
||||
icPath:
|
||||
title: 中间证书保存路径
|
||||
helper: 路径要包含文件名,一般情况传上面两个文件就行了,极少数情况需要这个中间证书
|
||||
component:
|
||||
placeholder: /root/deploy/nginx/intermediate.pem
|
||||
mergeScript: |2-
|
||||
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
return form.certType === 'pem';
|
||||
})
|
||||
}
|
||||
|
||||
rules:
|
||||
- type: filepath
|
||||
order: 0
|
||||
pfxPath:
|
||||
title: PFX证书保存路径
|
||||
helper: |-
|
||||
用于IIS证书部署,路径要包含文件名
|
||||
推荐使用相对路径,将写入与数据库同级目录,无需映射,例如:tmp/cert.pfx
|
||||
component:
|
||||
placeholder: tmp/cert.pfx
|
||||
mergeScript: |2-
|
||||
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
return form.certType === 'pfx';
|
||||
})
|
||||
}
|
||||
|
||||
required: true
|
||||
rules:
|
||||
- type: filepath
|
||||
order: 0
|
||||
derPath:
|
||||
title: DER证书保存路径
|
||||
helper: |-
|
||||
用于Apache证书部署,路径要包含文件名
|
||||
推荐使用相对路径,将写入与数据库同级目录,无需映射,例如:tmp/cert.der
|
||||
.der和.cer是相同的东西,改个后缀名即可
|
||||
component:
|
||||
placeholder: tmp/cert.der 或 tmp/cert.cer
|
||||
mergeScript: |2-
|
||||
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
return form.certType === 'der';
|
||||
})
|
||||
}
|
||||
|
||||
required: true
|
||||
rules:
|
||||
- type: filepath
|
||||
order: 0
|
||||
jksPath:
|
||||
title: jks证书保存路径
|
||||
helper: 用于java,路径要包含文件名,例如:tmp/cert.jks
|
||||
component:
|
||||
placeholder: tmp/cert.jks
|
||||
mergeScript: |2-
|
||||
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
return form.certType === 'jks';
|
||||
})
|
||||
}
|
||||
|
||||
required: true
|
||||
rules:
|
||||
- type: filepath
|
||||
order: 0
|
||||
output:
|
||||
hostCrtPath:
|
||||
title: 证书保存路径
|
||||
type: HostCrtPath
|
||||
hostKeyPath:
|
||||
title: 私钥保存路径
|
||||
type: HostKeyPath
|
||||
hostIcPath:
|
||||
title: 中间证书保存路径
|
||||
type: HostKeyPath
|
||||
hostPfxPath:
|
||||
title: PFX保存路径
|
||||
type: HostPfxPath
|
||||
hostDerPath:
|
||||
title: DER保存路径
|
||||
type: HostDerPath
|
||||
hostJksPath:
|
||||
title: jks保存路径
|
||||
type: HostJksPath
|
||||
pluginType: deploy
|
||||
@@ -0,0 +1,30 @@
|
||||
showRunStrategy: false
|
||||
default:
|
||||
strategy:
|
||||
runStrategy: 1
|
||||
name: hostShellExecute
|
||||
title: 主机-执行远程主机脚本命令
|
||||
icon: tabler:brand-powershell
|
||||
group: host
|
||||
desc: 可以执行重启nginx等操作让证书生效
|
||||
input:
|
||||
accessId:
|
||||
title: 主机登录配置
|
||||
helper: 登录
|
||||
component:
|
||||
name: access-selector
|
||||
type: ssh
|
||||
required: true
|
||||
order: 0
|
||||
script:
|
||||
title: shell脚本命令
|
||||
component:
|
||||
name: a-textarea
|
||||
vModel: value
|
||||
rows: 6
|
||||
placeholder: systemctl restart nginx
|
||||
helper: 注意:如果目标主机是windows,且终端是cmd,系统会自动将多行命令通过“&&”连接成一行
|
||||
required: true
|
||||
order: 0
|
||||
output: {}
|
||||
pluginType: deploy
|
||||
@@ -0,0 +1,223 @@
|
||||
showRunStrategy: false
|
||||
default:
|
||||
strategy:
|
||||
runStrategy: 1
|
||||
name: uploadCertToHost
|
||||
title: 主机-部署证书到SSH主机
|
||||
icon: line-md:uploading-loop
|
||||
group: host
|
||||
desc: SFTP上传证书到主机,然后SSH执行部署脚本命令
|
||||
order: 1
|
||||
input:
|
||||
cert:
|
||||
title: 域名证书
|
||||
helper: 请选择前置任务输出的域名证书
|
||||
component:
|
||||
name: output-selector
|
||||
from:
|
||||
- CertApply
|
||||
- CertApplyLego
|
||||
- CertApplyUpload
|
||||
required: true
|
||||
order: 0
|
||||
certType:
|
||||
title: 证书格式
|
||||
helper: 要部署的证书格式,支持pem、pfx、der、jks
|
||||
component:
|
||||
name: a-select
|
||||
options:
|
||||
- value: pem
|
||||
label: pem(crt),Nginx等大部分应用
|
||||
- value: pfx
|
||||
label: pfx,一般用于IIS
|
||||
- value: der
|
||||
label: der,一般用于Apache
|
||||
- value: jks
|
||||
label: jks,一般用于JAVA应用
|
||||
- value: one
|
||||
label: 证书私钥一体,crt+key简单合并为一个pem文件
|
||||
required: true
|
||||
order: 0
|
||||
crtPath:
|
||||
title: 证书保存路径
|
||||
helper: 填写应用原本的证书保存路径,路径要包含证书文件名,例如:/tmp/cert.pem
|
||||
component:
|
||||
placeholder: /root/deploy/nginx/full_chain.pem
|
||||
mergeScript: |2-
|
||||
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
return form.certType === 'pem';
|
||||
})
|
||||
}
|
||||
|
||||
required: true
|
||||
rules:
|
||||
- type: filepath
|
||||
order: 0
|
||||
keyPath:
|
||||
title: 私钥保存路径
|
||||
helper: 需要有写入权限,路径要包含私钥文件名,例如:/tmp/cert.key
|
||||
component:
|
||||
placeholder: /root/deploy/nginx/cert.key
|
||||
mergeScript: |2-
|
||||
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
return form.certType === 'pem';
|
||||
})
|
||||
}
|
||||
|
||||
required: true
|
||||
rules:
|
||||
- type: filepath
|
||||
order: 0
|
||||
icPath:
|
||||
title: 中间证书保存路径
|
||||
helper: 路径要包含文件名,一般情况传上面两个文件即可,极少数情况需要这个中间证书
|
||||
component:
|
||||
placeholder: /root/deploy/nginx/intermediate.pem
|
||||
mergeScript: |2-
|
||||
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
return form.certType === 'pem';
|
||||
})
|
||||
}
|
||||
|
||||
rules:
|
||||
- type: filepath
|
||||
order: 0
|
||||
pfxPath:
|
||||
title: PFX证书保存路径
|
||||
helper: 填写应用原本的证书保存路径,路径要包含证书文件名,例如:D:\iis\cert.pfx
|
||||
component:
|
||||
placeholder: D:\iis\cert.pfx
|
||||
mergeScript: |2-
|
||||
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
return form.certType === 'pfx';
|
||||
})
|
||||
}
|
||||
|
||||
required: true
|
||||
rules:
|
||||
- type: filepath
|
||||
order: 0
|
||||
derPath:
|
||||
title: DER证书保存路径
|
||||
helper: 填写应用原本的证书保存路径,路径要包含证书文件名,例如:/tmp/cert.der
|
||||
component:
|
||||
placeholder: /root/deploy/apache/cert.der
|
||||
mergeScript: |2-
|
||||
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
return form.certType === 'der';
|
||||
})
|
||||
}
|
||||
|
||||
required: true
|
||||
rules:
|
||||
- type: filepath
|
||||
order: 0
|
||||
jksPath:
|
||||
title: jks证书保存路径
|
||||
helper: 填写应用原本的证书保存路径,路径要包含证书文件名,例如:/tmp/cert.jks
|
||||
component:
|
||||
placeholder: /root/deploy/java_app/cert.jks
|
||||
mergeScript: |2-
|
||||
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
return form.certType === 'jks';
|
||||
})
|
||||
}
|
||||
|
||||
required: true
|
||||
rules:
|
||||
- type: filepath
|
||||
order: 0
|
||||
onePath:
|
||||
title: 一体证书保存路径
|
||||
helper: 填写应用原本的证书保存路径,路径要包含证书文件名,例如:/tmp/crt_key.pem
|
||||
component:
|
||||
placeholder: /root/deploy/app/crt_key.pem
|
||||
mergeScript: |2-
|
||||
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
return form.certType === 'one';
|
||||
})
|
||||
}
|
||||
|
||||
required: true
|
||||
rules:
|
||||
- type: filepath
|
||||
order: 0
|
||||
accessId:
|
||||
title: 主机登录配置
|
||||
helper: access授权
|
||||
component:
|
||||
name: access-selector
|
||||
type: ssh
|
||||
required: true
|
||||
order: 0
|
||||
uploadType:
|
||||
title: 上传方式
|
||||
helper: 选择上传方式,sftp或者scp
|
||||
value: sftp
|
||||
component:
|
||||
name: a-select
|
||||
options:
|
||||
- value: sftp
|
||||
label: sftp
|
||||
- value: scp
|
||||
label: scp
|
||||
required: true
|
||||
order: 0
|
||||
mkdirs:
|
||||
title: 自动创建远程目录
|
||||
helper: 是否自动创建远程目录,如果关闭则你需要自己确保远程目录存在
|
||||
value: true
|
||||
component:
|
||||
name: a-switch
|
||||
vModel: checked
|
||||
order: 0
|
||||
script:
|
||||
title: shell脚本命令
|
||||
component:
|
||||
name: a-textarea
|
||||
vModel: value
|
||||
rows: 6
|
||||
helper: |-
|
||||
上传后执行脚本命令,不填则不执行
|
||||
注意:如果目标主机是windows,且终端是cmd,系统会自动将多行命令通过“&&”连接成一行
|
||||
required: false
|
||||
order: 0
|
||||
injectEnv:
|
||||
title: 注入环境变量
|
||||
value: false
|
||||
component:
|
||||
name: a-switch
|
||||
vModel: checked
|
||||
helper: 是否将证书域名、路径等信息注入脚本执行环境变量中,具体的变量名称,可以运行后从日志中查看
|
||||
required: false
|
||||
order: 0
|
||||
output:
|
||||
hostCrtPath:
|
||||
title: 证书保存路径
|
||||
hostKeyPath:
|
||||
title: 私钥保存路径
|
||||
hostIcPath:
|
||||
title: 中间证书保存路径
|
||||
hostPfxPath:
|
||||
title: PFX保存路径
|
||||
hostDerPath:
|
||||
title: DER保存路径
|
||||
hostJksPath:
|
||||
title: jks保存路径
|
||||
hostOnePath:
|
||||
title: 一体证书保存路径
|
||||
pluginType: deploy
|
||||
@@ -0,0 +1,223 @@
|
||||
showRunStrategy: false
|
||||
default:
|
||||
strategy:
|
||||
runStrategy: 1
|
||||
name: uploadCertToHost
|
||||
title: 主机-部署证书到SSH主机
|
||||
icon: line-md:uploading-loop
|
||||
group: host
|
||||
desc: SFTP上传证书到主机,然后SSH执行部署脚本命令
|
||||
order: 1
|
||||
input:
|
||||
cert:
|
||||
title: 域名证书
|
||||
helper: 请选择前置任务输出的域名证书
|
||||
component:
|
||||
name: output-selector
|
||||
from:
|
||||
- CertApply
|
||||
- CertApplyLego
|
||||
- CertApplyUpload
|
||||
required: true
|
||||
order: 0
|
||||
certType:
|
||||
title: 证书格式
|
||||
helper: 要部署的证书格式,支持pem、pfx、der、jks
|
||||
component:
|
||||
name: a-select
|
||||
options:
|
||||
- value: pem
|
||||
label: pem(crt),Nginx等大部分应用
|
||||
- value: pfx
|
||||
label: pfx,一般用于IIS
|
||||
- value: der
|
||||
label: der,一般用于Apache
|
||||
- value: jks
|
||||
label: jks,一般用于JAVA应用
|
||||
- value: one
|
||||
label: 证书私钥一体,crt+key简单合并为一个pem文件
|
||||
required: true
|
||||
order: 0
|
||||
crtPath:
|
||||
title: 证书保存路径
|
||||
helper: 填写应用原本的证书保存路径,路径要包含证书文件名,例如:/tmp/cert.pem
|
||||
component:
|
||||
placeholder: /root/deploy/nginx/full_chain.pem
|
||||
mergeScript: |2-
|
||||
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
return form.certType === 'pem';
|
||||
})
|
||||
}
|
||||
|
||||
required: true
|
||||
rules:
|
||||
- type: filepath
|
||||
order: 0
|
||||
keyPath:
|
||||
title: 私钥保存路径
|
||||
helper: 需要有写入权限,路径要包含私钥文件名,例如:/tmp/cert.key
|
||||
component:
|
||||
placeholder: /root/deploy/nginx/cert.key
|
||||
mergeScript: |2-
|
||||
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
return form.certType === 'pem';
|
||||
})
|
||||
}
|
||||
|
||||
required: true
|
||||
rules:
|
||||
- type: filepath
|
||||
order: 0
|
||||
icPath:
|
||||
title: 中间证书保存路径
|
||||
helper: 路径要包含文件名,一般情况传上面两个文件即可,极少数情况需要这个中间证书
|
||||
component:
|
||||
placeholder: /root/deploy/nginx/intermediate.pem
|
||||
mergeScript: |2-
|
||||
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
return form.certType === 'pem';
|
||||
})
|
||||
}
|
||||
|
||||
rules:
|
||||
- type: filepath
|
||||
order: 0
|
||||
pfxPath:
|
||||
title: PFX证书保存路径
|
||||
helper: 填写应用原本的证书保存路径,路径要包含证书文件名,例如:D:\iis\cert.pfx
|
||||
component:
|
||||
placeholder: D:\iis\cert.pfx
|
||||
mergeScript: |2-
|
||||
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
return form.certType === 'pfx';
|
||||
})
|
||||
}
|
||||
|
||||
required: true
|
||||
rules:
|
||||
- type: filepath
|
||||
order: 0
|
||||
derPath:
|
||||
title: DER证书保存路径
|
||||
helper: 填写应用原本的证书保存路径,路径要包含证书文件名,例如:/tmp/cert.der
|
||||
component:
|
||||
placeholder: /root/deploy/apache/cert.der
|
||||
mergeScript: |2-
|
||||
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
return form.certType === 'der';
|
||||
})
|
||||
}
|
||||
|
||||
required: true
|
||||
rules:
|
||||
- type: filepath
|
||||
order: 0
|
||||
jksPath:
|
||||
title: jks证书保存路径
|
||||
helper: 填写应用原本的证书保存路径,路径要包含证书文件名,例如:/tmp/cert.jks
|
||||
component:
|
||||
placeholder: /root/deploy/java_app/cert.jks
|
||||
mergeScript: |2-
|
||||
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
return form.certType === 'jks';
|
||||
})
|
||||
}
|
||||
|
||||
required: true
|
||||
rules:
|
||||
- type: filepath
|
||||
order: 0
|
||||
onePath:
|
||||
title: 一体证书保存路径
|
||||
helper: 填写应用原本的证书保存路径,路径要包含证书文件名,例如:/tmp/crt_key.pem
|
||||
component:
|
||||
placeholder: /root/deploy/app/crt_key.pem
|
||||
mergeScript: |2-
|
||||
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
return form.certType === 'one';
|
||||
})
|
||||
}
|
||||
|
||||
required: true
|
||||
rules:
|
||||
- type: filepath
|
||||
order: 0
|
||||
accessId:
|
||||
title: 主机登录配置
|
||||
helper: access授权
|
||||
component:
|
||||
name: access-selector
|
||||
type: ssh
|
||||
required: true
|
||||
order: 0
|
||||
uploadType:
|
||||
title: 上传方式
|
||||
helper: 选择上传方式,sftp或者scp
|
||||
value: sftp
|
||||
component:
|
||||
name: a-select
|
||||
options:
|
||||
- value: sftp
|
||||
label: sftp
|
||||
- value: scp
|
||||
label: scp
|
||||
required: true
|
||||
order: 0
|
||||
mkdirs:
|
||||
title: 自动创建远程目录
|
||||
helper: 是否自动创建远程目录,如果关闭则你需要自己确保远程目录存在
|
||||
value: true
|
||||
component:
|
||||
name: a-switch
|
||||
vModel: checked
|
||||
order: 0
|
||||
script:
|
||||
title: shell脚本命令
|
||||
component:
|
||||
name: a-textarea
|
||||
vModel: value
|
||||
rows: 6
|
||||
helper: |-
|
||||
上传后执行脚本命令,不填则不执行
|
||||
注意:如果目标主机是windows,且终端是cmd,系统会自动将多行命令通过“&&”连接成一行
|
||||
required: false
|
||||
order: 0
|
||||
injectEnv:
|
||||
title: 注入环境变量
|
||||
value: false
|
||||
component:
|
||||
name: a-switch
|
||||
vModel: checked
|
||||
helper: 是否将证书域名、路径等信息注入脚本执行环境变量中,具体的变量名称,可以运行后从日志中查看
|
||||
required: false
|
||||
order: 0
|
||||
output:
|
||||
hostCrtPath:
|
||||
title: 证书保存路径
|
||||
hostKeyPath:
|
||||
title: 私钥保存路径
|
||||
hostIcPath:
|
||||
title: 中间证书保存路径
|
||||
hostPfxPath:
|
||||
title: PFX保存路径
|
||||
hostDerPath:
|
||||
title: DER保存路径
|
||||
hostJksPath:
|
||||
title: jks保存路径
|
||||
hostOnePath:
|
||||
title: 一体证书保存路径
|
||||
pluginType: deploy
|
||||
Reference in New Issue
Block a user