Skip to content

Commit

Permalink
docs: Improve S3 administration guide for SeaweedFS
Browse files Browse the repository at this point in the history
- Add words "chrislusf", "readwrite", "recordermoe", and "seaweedfs" to the cSpell.words list in VS Code settings.
- Add a new section called "MinIO" in the S3 administration guide.
- Enhance S3 administration guide with a detailed guide on setting up and using SeaweedFS using Docker.
- Include instructions on setting up "mc client".
- Add an instruction on creating buckets for "livestream-recorder-public" and "livestream-recorder".

Signed-off-by: 陳鈞 <[email protected]>
  • Loading branch information
jim60105 committed Jun 3, 2024
1 parent f029a55 commit 26882de
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
"[markdown]": {
},
"cSpell.words": [
"chrislusf",
"dockerfiles",
"envatomarket",
"jauderho",
"Kethsar",
"Livestream",
"prinsss",
"rayou",
"readwrite",
"recordermoe",
"seaweedfs",
"streamlink",
"subprojects",
"themeforest",
Expand Down
119 changes: 119 additions & 0 deletions docs/2_administrator-guide/5_Storage/1_s3.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ type: default

# S3

## MinIO

![1](./1.png)
![2](./2.png)
![3](./3.png)
Expand All @@ -36,3 +38,120 @@ type: default
]
}
```

## SeaweedFS

[https://github.com/seaweedfs/seaweedfs](https://github.com/seaweedfs/seaweedfs)

你可以使用任何喜歡的方法部署 SeaweedFS,這裡提供一個使用 Docker 的範例。
關鍵是在於正確的設定權限,請參考這一份[官方文件](https://github.com/seaweedfs/seaweedfs/wiki/Amazon-S3-API#dynamic-configuration)

docker-compose.yml

```yaml
services:
master:
image: chrislusf/seaweedfs # use a remote image
ports:
- 9333:9333
- 19333:19333
- 9324:9324
command: "master -ip=master -ip.bind=0.0.0.0 -metricsPort=9324"
volume:
image: chrislusf/seaweedfs # use a remote image
ports:
- 8080:8080
- 18080:18080
- 9325:9325
command: 'volume -mserver="master:9333" -ip.bind=0.0.0.0 -port=8080 -metricsPort=9325'
volumes:
- data:/data
depends_on:
- master
filer:
image: chrislusf/seaweedfs # use a remote image
ports:
- 8888:8888
- 18888:18888
- 9326:9326
command: 'filer -master="master:9333" -ip.bind=0.0.0.0 -metricsPort=9326'
tty: true
stdin_open: true
volumes:
- data:/data
depends_on:
- master
- volume
s3:
image: chrislusf/seaweedfs # use a remote image
ports:
- 8333:8333
- 9327:9327
command: 's3 -filer="filer:8888" -ip.bind=0.0.0.0 -metricsPort=9327 -config=/etc/seaweedfs/s3.json'
volumes:
- data:/data
- ./s3.json:/etc/seaweedfs/s3.json
depends_on:
- master
- volume
- filer
volumes:
data:
```
s3.json
```json
{
"identities": [
{
"name": "anonymous",
"actions": ["Read:livestream-recorder-public"]
},
{
"name": "MyCoolAdmin",
"credentials": [
{
"accessKey": "MyCoolAdmin",
"secretKey": "ChangeThisAdminPassword"
}
],
"actions": [
"Admin",
"Read",
"ReadAcp",
"List",
"Tagging",
"Write",
"WriteAcp"
]
},
{
"name": "recordermoe",
"credentials": [
{
"accessKey": "recordermoe",
"secretKey": "ChangeThisRecorderMoePassword"
}
],
"actions": ["Read", "List", "Tagging", "Write"]
}
]
}
```

### Setup mc client

我們使用 MinIO Client 來操作 SeaweedFS。
MinIO Client 是一個很棒的 S3 客戶端,你可以在[這裡](https://min.io/docs/minio/linux/reference/minio-mc.html)找到更多的資訊。

```bash
mc alias set seaweedfs http://localhost:8333 MyCoolAdmin ChangeThisAdminPassword
```

### Make bucket

```bash
mc mb seaweedfs/livestream-recorder-public
mc mb seaweedfs/livestream-recorder
```

0 comments on commit 26882de

Please sign in to comment.