diff --git a/README.md b/README.md index 8538eeb1..82db3267 100644 --- a/README.md +++ b/README.md @@ -26,84 +26,15 @@ CertD 是一个帮助你全自动申请和部署SSL证书的工具。 ## 快速开始 本案例演示,如何配置自动申请证书,并部署到阿里云CDN,然后快要到期前自动更新证书并重新部署 + 1. 环境准备 安装[nodejs](https://nodejs.org/zh-cn/) -2. 创建任务项目 -``` -mkdir certd-run # 项目名称可以任意命名 -cd certd-run -y -npm install @certd/executor -s --production -``` -3. 创建index.js +2. 生成node项目 -参数配置分几个部分 -args: 运行时参数 -accessProviders: 授权提供者,提供dns验证与部署任务的授权 -cert: 证书申请的配置 -deploy: 证书部署流程 - -```js -import { Executor } from '@certd/executor' -const options = { - args: { // 运行时参数 - forceDeploy: true, - }, - accessProviders: { //授权提供者 - aliyun: { // 阿里云accessKey,用于dns验证和上传证书到阿里云,并部署到cdn - providerType: 'aliyun', - accessKeyId: 'Your accessKeyId', - accessKeySecret: 'Your accessKeySecret' - }, - }, - cert: { //免费证书申请配置 - domains: [ //可以在一张证书上绑定多个域名(前提是他们的验证方式要一样,目前仅支持dns验证) - '*.yourdomain.com', - '*.test.yourdomain.com', - 'yourdomain.com' - ], - email: 'Your email', - dnsProvider: 'aliyun', //上方accessProviders里面配置的 - csrInfo: { //证书csr信息 - country: 'CN', - state: 'GuangDong', - locality: 'ShengZhen', - organization: 'Your company Org.', - organizationUnit: 'IT Department', - emailAddress: 'Your email' - } - }, - deploy: [ //部署流程配置,数组,可以配置多条流程 - { - deployName: '流程1-部署到阿里云CDN', - tasks: [ //流程任务,一个流程下可以包含多个部署任务,并且将按顺序执行 - { //任务1 - taskName: '上传到阿里云', //任务名称 - type: 'uploadCertToAliyun', //任务插件名称 - props: { //任务插件参数 - accessProvider: 'aliyun' - } - }, - { // 任务2 - taskName: '部署证书到CDN', - type: 'deployCertToAliyunCDN', //任务插件名称 - props:{ - domainName: 'your cdn domain 全称', //cdn域名全称 - certName: 'certd自动部署',//证书名称前缀 - accessProvider: 'aliyun' - } - } - - ] - } - ] - -} - -const executor = new Executor() -await executor.run(options) -``` + 通过ui生成: https://certd.docmirror.cn/ + 4. 运行 ``` diff --git a/doc/step1.png b/doc/step1.png new file mode 100644 index 00000000..294de109 Binary files /dev/null and b/doc/step1.png differ diff --git a/doc/step2.png b/doc/step2.png new file mode 100644 index 00000000..214746df Binary files /dev/null and b/doc/step2.png differ diff --git a/packages/ui/certd-ui/package.json b/packages/ui/certd-ui/package.json index 16b68ed0..947be088 100644 --- a/packages/ui/certd-ui/package.json +++ b/packages/ui/certd-ui/package.json @@ -9,6 +9,7 @@ "lint": "vue-cli-service lint" }, "dependencies": { + "@ant-design/icons-vue": "^6.0.1", "ant-design-vue": "^2.0.0", "axios": "^0.21.1", "core-js": "^3.8.1", diff --git a/packages/ui/certd-ui/vue.config.js b/packages/ui/certd-ui/vue.config.js index 8d52b8af..f20c98a6 100644 --- a/packages/ui/certd-ui/vue.config.js +++ b/packages/ui/certd-ui/vue.config.js @@ -1,4 +1,10 @@ module.exports = { + pages: { + index: { + // template 中的 title 标签需要是