Skip to content

Commit

Permalink
docs: update doc for Blocklet Meta Spec (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
linchen1987 authored Aug 4, 2022
1 parent 162ea2f commit ad5cb88
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.6.5 (August 04, 2022)

- docs: update doc for Blocklet Meta Spec

## 0.6.4 (July 29, 2022)

- docs: update doc for Blocklet Meta Spec
Expand Down
2 changes: 1 addition & 1 deletion blocklet.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: '@arcblock/abtnode-docs'
version: 0.6.4
version: 0.6.5
description: >-
Blocklet Server Documentation, a help documentation for quickly get started
with Blocklet Server.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@arcblock/abtnode-docs",
"version": "0.6.4",
"version": "0.6.5",
"description": "Blocklet Server Documentation, a help documentation for quickly get started with Blocklet Server.",
"main": "index.js",
"publishConfig": {
Expand Down
20 changes: 20 additions & 0 deletions src/developer/blocklet-spec/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,23 @@ children:
- <primary url>
- <redundant url>
```
## Configure required resources and operating environment restrictions
#### Specify the minimum Blocklet Server version
````
requirements:
server: '>=1.8.0' # server version must be greater than or equal to 1.8.0
````
#### Specify the fuel needed before starting (token)
````
requirements:
fuels:
endpoint: xxx # The endpoint of the chain
address: xxx # token address
value: xxx # price
reason: xxx # The reason for the need (for example, because the NFT Factory needs to be created before the first boot)
````
22 changes: 21 additions & 1 deletion src/developer/blocklet-spec/index.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,4 +237,24 @@ Blocklet Server 提供了 hook 功能用来在执行生命周期的过程中做

比如,某个 Blocklet 对于运行的机器有硬件要求:内存不能低于 1G,可用磁盘容量不能低于 500 MB。这个时候就可以利用 pre-install hook 来检测目标机器是否已满足需求,如果满足,正常安装,否则抛出错误消息,并终止安装。

hook 其实是一些 Shell 脚本,而这些脚本可能会引用 Blocklet 中的文件,而在打包 Blocklet 的过程中,Blocklet Server 打包工具(Blocklet Server CLI)会将 hook 用到的文件单独打包,所以,开发者需要在 `hookFiles` 中声明哪些文件被 hooks 引用了。
hook 其实是一些 Shell 脚本,而这些脚本可能会引用 Blocklet 中的文件,而在打包 Blocklet 的过程中,Blocklet Server 打包工具(Blocklet Server CLI)会将 hook 用到的文件单独打包,所以,开发者需要在 `hookFiles` 中声明哪些文件被 hooks 引用了。

## 配置所需资源和运行环境限制

#### 指定最低的 Blocklet Server 版本号

```
requirements:
server: '>=1.8.0' # server 版本必须大于等于 1.8.0
```
#### 指定启动前所需燃料 (token)
```
requirements:
fuels:
endpoint: xxx # 链的地址
adress: xxx # token address
value: xxx # 价格
reason: xxx # 需要的原因 ( 比如因为首次启动前需要创建 NFT Factory )
```
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.4
0.6.5

0 comments on commit ad5cb88

Please sign in to comment.