Skip to content

Commit ff28611

Browse files
committed
update readme
1 parent d3cf8fb commit ff28611

3 files changed

Lines changed: 82 additions & 35 deletions

File tree

publish.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Type: Application
2-
Name: cdn-backup-source
2+
Name: cdn-backup-origin
33
Provider:
44
- 阿里云
5-
Version: 0.0.3
6-
Description: 快速部署CDN备源信息同步项目到函数计算
7-
HomePage: https://github.com/devsapp/cdn-backup-source
5+
Version: 0.0.4
6+
Description: 快速部署CDN备份源站项目到函数计算
7+
HomePage: https://github.com/devsapp/cdn-backup-origin
88
Tags:
99
- CDN
1010
- Python
@@ -13,11 +13,14 @@ Service:
1313
函数计算:
1414
Authorities:
1515
- AliyunFCFullAccess
16+
对象存储:
17+
Authorities:
18+
- AliyunOSSFullAccess
1619
Parameters:
1720
type: object
1821
additionalProperties: false # 不允许增加其他属性
1922
required: # 必填项
20-
- role
23+
- roleArn
2124
- origin
2225
- backupOrigin
2326
- cronExpression

readme.md

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
1-
# cdn-backup-source 帮助文档
1+
# cdn-backup-origin 帮助文档
22

33
<p align="center" class="flex justify-center">
44
<a href="https://www.serverless-devs.com" class="ml-1">
5-
<img src="http://editor.devsapp.cn/icon?package=cdn-backup-source&type=packageType">
5+
<img src="http://editor.devsapp.cn/icon?package=cdn-backup-origin&type=packageType">
66
</a>
7-
<a href="http://www.devsapp.cn/details.html?name=cdn-backup-source" class="ml-1">
8-
<img src="http://editor.devsapp.cn/icon?package=cdn-backup-source&type=packageVersion">
7+
<a href="http://www.devsapp.cn/details.html?name=cdn-backup-origin" class="ml-1">
8+
<img src="http://editor.devsapp.cn/icon?package=cdn-backup-origin&type=packageVersion">
99
</a>
1010
<a href="http://www.devsapp.cn/details.html?name=cdn-backup-source" class="ml-1">
11-
<img src="http://editor.devsapp.cn/icon?package=cdn-backup-source&type=packageDownload">
11+
<img src="http://editor.devsapp.cn/icon?package=cdn-backup-origin&type=packageDownload">
1212
</a>
1313
</p>
1414

1515
<description>
1616

17-
> ***快速部署CDN备源信息同步项目到函数计算***
17+
通过函数计算来实现抓取 CDN 源站信息并备份到备源站点的任务
1818

1919
</description>
2020

2121
<table>
2222

23-
23+
## 前期准备
24+
| 服务/业务 | 函数计算 | OSS |
25+
| --------- | ------------------ | ------------------- |
26+
| 权限/策略 | AliyunFCFullAccess | AliyunOSSFullAccess |
2427

2528
</table>
2629

@@ -34,24 +37,43 @@
3437

3538
<appcenter>
3639

37-
- :fire: 通过 [Serverless 应用中心](https://fcnext.console.aliyun.com/applications/create?template=cdn-backup-source)
38-
[![Deploy with Severless Devs](https://img.alicdn.com/imgextra/i1/O1CN01w5RFbX1v45s8TIXPz_!!6000000006118-55-tps-95-28.svg)](https://fcnext.console.aliyun.com/applications/create?template=cdn-backup-source) 该应用。
40+
- :fire: 通过 [Serverless 应用中心](https://fcnext.console.aliyun.com/applications/create?template=cdn-backup-origin)
41+
[![Deploy with Severless Devs](https://img.alicdn.com/imgextra/i1/O1CN01w5RFbX1v45s8TIXPz_!!6000000006118-55-tps-95-28.svg)](https://fcnext.console.aliyun.com/applications/create?template=cdn-backup-origin) 该应用。
3942

4043
</appcenter>
4144

4245
- 通过 [Serverless Devs Cli](https://www.serverless-devs.com/serverless-devs/install) 进行部署:
4346
- [安装 Serverless Devs Cli 开发者工具](https://www.serverless-devs.com/serverless-devs/install) ,并进行[授权信息配置](https://www.serverless-devs.com/fc/config)
44-
- 初始化项目:`s init cdn-backup-source -d cdn-backup-source`
45-
- 进入项目,并进行项目部署:`cd cdn-backup-source && s deploy -y`
47+
- 初始化项目:`s init cdn-backup-origin -d cdn-backup-origin`
48+
- 进入项目,并进行项目部署:`cd cdn-backup-origin && s deploy -y`
4649

4750
</deploy>
4851

4952
<appdetail id="flushContent">
5053

5154
# 应用详情
5255

53-
通过该项目,可以快速实现 CDN 备源相关的功能。
54-
56+
通过该项目,可以抓取 CDN 源站信息并存储到备份站点上,还可以设置 CDN 加速节点进行预热
57+
![alt](https://img.alicdn.com/imgextra/i1/O1CN01copy2j1n5uX8UVRGh_!!6000000005039-2-tps-1474-938.png)
58+
59+
## 初始化参数
60+
| 参数名称 | 参数类型 | 是否必填 | 例子 | 参数含义 |
61+
| -------------- | -------- | -------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
62+
| serviceName | String | 选填 | cdn-backup-origin | 函数服务名称名 |
63+
| functionName | String | 选填 | cdn-backup-origin | 函数名称 |
64+
| roleArn | String | 必填 | acs:ram::123456:role/aliyuncdnserverlessdevsrole | 函数执行角色 |
65+
| origin | String | 必填 | http://www.peersafe.cn/index.html | 源站地址 |
66+
| backupOrigin | String | 必填 | cdn-backup-bucket.oss-cn-beijing.aliyuncs.com | 备源地址,仅支持OSS Bucket域名 |
67+
| warmupDomain | String | 选填 | cdn-backup-bucket.oss-cn-beijing.aliyuncs.com | 预热 CDN 域名 |
68+
| cronExpression | String | 必填 | '@every 60m' | 定时触发时间,参考 [函数计算](https://help.aliyun.com/document_detail/171746.html#section-gbz-k3r-vum) |
69+
| warmupDomain | String | 选填 | warmup.com | [CDN 预热域名](https://help.aliyun.com/document_detail/91161.html) |
70+
| enable | Boolean | 选填 | true | 是否启用任务,默认值true。关闭后函数不再定时执行,不会再产生费用 |
71+
72+
## 执行效果
73+
函数计算控制台查看任务历史
74+
![alt](https://img.alicdn.com/imgextra/i3/O1CN01wGP6U61tHG2QPbp79_!!6000000005876-0-tps-3328-1442.jpg)
75+
OSS控制台查看文件目录
76+
![alt](https://img.alicdn.com/imgextra/i1/O1CN01a7rmwh1X7FqP5a1Qi_!!6000000002876-0-tps-3286-1602.jpg)
5577
</appdetail>
5678

5779
<devgroup>
@@ -63,8 +85,8 @@
6385
<p align="center">
6486

6587
| <img src="https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1635407298906_20211028074819117230.png" width="130px" > | <img src="https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1635407044136_20211028074404326599.png" width="130px" > | <img src="https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1635407252200_20211028074732517533.png" width="130px" > |
66-
|--- | --- | --- |
67-
| <center>微信公众号:`serverless`</center> | <center>微信小助手:`xiaojiangwh`</center> | <center>钉钉交流群:`33947367`</center> |
88+
| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
89+
| <center>微信公众号:`serverless`</center> | <center>微信小助手:`xiaojiangwh`</center> | <center>钉钉交流群:`33947367`</center> |
6890

6991
</p>
7092

src/readme.md

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
1-
# cdn-backup-source 帮助文档
1+
# cdn-backup-origin 帮助文档
22

33
<p align="center" class="flex justify-center">
44
<a href="https://www.serverless-devs.com" class="ml-1">
5-
<img src="http://editor.devsapp.cn/icon?package=cdn-backup-source&type=packageType">
5+
<img src="http://editor.devsapp.cn/icon?package=cdn-backup-origin&type=packageType">
66
</a>
7-
<a href="http://www.devsapp.cn/details.html?name=cdn-backup-source" class="ml-1">
8-
<img src="http://editor.devsapp.cn/icon?package=cdn-backup-source&type=packageVersion">
7+
<a href="http://www.devsapp.cn/details.html?name=cdn-backup-origin" class="ml-1">
8+
<img src="http://editor.devsapp.cn/icon?package=cdn-backup-origin&type=packageVersion">
99
</a>
1010
<a href="http://www.devsapp.cn/details.html?name=cdn-backup-source" class="ml-1">
11-
<img src="http://editor.devsapp.cn/icon?package=cdn-backup-source&type=packageDownload">
11+
<img src="http://editor.devsapp.cn/icon?package=cdn-backup-origin&type=packageDownload">
1212
</a>
1313
</p>
1414

1515
<description>
1616

17-
> ***快速部署CDN备源信息同步项目到函数计算***
17+
通过函数计算来实现抓取 CDN 源站信息并备份到备源站点的任务
1818

1919
</description>
2020

2121
<table>
2222

23-
23+
## 前期准备
24+
| 服务/业务 | 函数计算 | OSS |
25+
| --------- | ------------------ | ------------------- |
26+
| 权限/策略 | AliyunFCFullAccess | AliyunOSSFullAccess |
2427

2528
</table>
2629

@@ -34,24 +37,43 @@
3437

3538
<appcenter>
3639

37-
- :fire: 通过 [Serverless 应用中心](https://fcnext.console.aliyun.com/applications/create?template=cdn-backup-source)
38-
[![Deploy with Severless Devs](https://img.alicdn.com/imgextra/i1/O1CN01w5RFbX1v45s8TIXPz_!!6000000006118-55-tps-95-28.svg)](https://fcnext.console.aliyun.com/applications/create?template=cdn-backup-source) 该应用。
40+
- :fire: 通过 [Serverless 应用中心](https://fcnext.console.aliyun.com/applications/create?template=cdn-backup-origin)
41+
[![Deploy with Severless Devs](https://img.alicdn.com/imgextra/i1/O1CN01w5RFbX1v45s8TIXPz_!!6000000006118-55-tps-95-28.svg)](https://fcnext.console.aliyun.com/applications/create?template=cdn-backup-origin) 该应用。
3942

4043
</appcenter>
4144

4245
- 通过 [Serverless Devs Cli](https://www.serverless-devs.com/serverless-devs/install) 进行部署:
4346
- [安装 Serverless Devs Cli 开发者工具](https://www.serverless-devs.com/serverless-devs/install) ,并进行[授权信息配置](https://www.serverless-devs.com/fc/config)
44-
- 初始化项目:`s init cdn-backup-source -d cdn-backup-source`
45-
- 进入项目,并进行项目部署:`cd cdn-backup-source && s deploy -y`
47+
- 初始化项目:`s init cdn-backup-origin -d cdn-backup-origin`
48+
- 进入项目,并进行项目部署:`cd cdn-backup-origin && s deploy -y`
4649

4750
</deploy>
4851

4952
<appdetail id="flushContent">
5053

5154
# 应用详情
5255

53-
通过该项目,可以快速实现 CDN 备源相关的功能。
54-
56+
通过该项目,可以抓取 CDN 源站信息并存储到备份站点上,还可以设置 CDN 加速节点进行预热
57+
![alt](https://img.alicdn.com/imgextra/i1/O1CN01copy2j1n5uX8UVRGh_!!6000000005039-2-tps-1474-938.png)
58+
59+
## 初始化参数
60+
| 参数名称 | 参数类型 | 是否必填 | 例子 | 参数含义 |
61+
| -------------- | -------- | -------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
62+
| serviceName | String | 选填 | cdn-backup-origin | 函数服务名称名 |
63+
| functionName | String | 选填 | cdn-backup-origin | 函数名称 |
64+
| roleArn | String | 必填 | acs:ram::123456:role/aliyuncdnserverlessdevsrole | 函数执行角色 |
65+
| origin | String | 必填 | http://www.peersafe.cn/index.html | 源站地址 |
66+
| backupOrigin | String | 必填 | cdn-backup-bucket.oss-cn-beijing.aliyuncs.com | 备源地址,仅支持OSS Bucket域名 |
67+
| warmupDomain | String | 选填 | cdn-backup-bucket.oss-cn-beijing.aliyuncs.com | 预热 CDN 域名 |
68+
| cronExpression | String | 必填 | '@every 60m' | 定时触发时间,参考 [函数计算](https://help.aliyun.com/document_detail/171746.html#section-gbz-k3r-vum) |
69+
| warmupDomain | String | 选填 | warmup.com | [CDN 预热域名](https://help.aliyun.com/document_detail/91161.html) |
70+
| enable | Boolean | 选填 | true | 是否启用任务,默认值true。关闭后函数不再定时执行,不会再产生费用 |
71+
72+
## 执行效果
73+
函数计算控制台查看任务历史
74+
![alt](https://img.alicdn.com/imgextra/i3/O1CN01wGP6U61tHG2QPbp79_!!6000000005876-0-tps-3328-1442.jpg)
75+
OSS控制台查看文件目录
76+
![alt](https://img.alicdn.com/imgextra/i1/O1CN01a7rmwh1X7FqP5a1Qi_!!6000000002876-0-tps-3286-1602.jpg)
5577
</appdetail>
5678

5779
<devgroup>
@@ -63,8 +85,8 @@
6385
<p align="center">
6486

6587
| <img src="https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1635407298906_20211028074819117230.png" width="130px" > | <img src="https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1635407044136_20211028074404326599.png" width="130px" > | <img src="https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1635407252200_20211028074732517533.png" width="130px" > |
66-
|--- | --- | --- |
67-
| <center>微信公众号:`serverless`</center> | <center>微信小助手:`xiaojiangwh`</center> | <center>钉钉交流群:`33947367`</center> |
88+
| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
89+
| <center>微信公众号:`serverless`</center> | <center>微信小助手:`xiaojiangwh`</center> | <center>钉钉交流群:`33947367`</center> |
6890

6991
</p>
7092

0 commit comments

Comments
 (0)