Skip to content

Commit

Permalink
Add a nerdctl Compatible yaml file
Browse files Browse the repository at this point in the history
Also introduced m1 macOS guide in FAQ

close #101
  • Loading branch information
wey-gu committed Nov 4, 2021
1 parent 61f8730 commit 98f0bb4
Show file tree
Hide file tree
Showing 3 changed files with 439 additions and 0 deletions.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,44 @@ Choose a nebula-docker-compose branch before you start. The following table list
| [`v2.5.0`](https://github.com/vesoft-inc/nebula-docker-compose/tree/v2.5.0) | `v2.5.0` of the nebula-graph repository | v.2.5.0 | [Deploy Nebula Graph with Docker Compose](https://github.com/vesoft-inc/nebula-docker-compose/blob/v2.5.0/README.md) |
| [`v2.0.0`](https://github.com/vesoft-inc/nebula-docker-compose/tree/v2.0.0) | `v2.0.0` of the nebula-graph repository | v.2.0.0-GA | [Deploy Nebula Graph with Docker Compose](https://github.com/vesoft-inc/nebula-docker-compose/blob/v2.0.0/README.md) |
| [`v1.0`](https://github.com/vesoft-inc/nebula-docker-compose/tree/v1.0) | `master` of the [nebula](https://github.com/vesoft-inc/nebula) repository | The latest development <br>version of v1.x | [Deploy Nebula Graph with Docker Compose](https://github.com/vesoft-inc/nebula-docker-compose/blob/v1.0/README.md) |

## FAQ

### Running in M1 macOS

If you are using Docker Desktop:

```bash
docker compose up -d
```

Alternatively, you could use [lima](https://github.com/lima-vm/lima):

- Install lima with `brew install lima`
- Start the lima VM with `limactl start`
- Then you could use shell inside the lima VM with `lima <command>` like `lima uname -a`

Then you could use `lima nerdctl` like `docker`:

```bash
rm -fr data logs
mkdir -p data/{meta,storage}{0..2}/nebula logs/{meta,storage,graph}{0..2} logs/graph
lima nerdctl --debug-full compose --file docker-compose-nerdctl.yaml up -d
```

To access the cluster from lima:

```bash
lima ./nebula-console-linux-arm64-v2.6.0 -addr host.lima.internal -port 9669 -user root -p password
```

### Running with nerdctl

If you are running this compose file via [nerdctl](https://github.com/containerd/nerdctl), please use `docker-compose-nerdctl.yaml` instead:

```bash
mkdir -p data/{meta,storage}{0..2}/nebula logs/{meta,storage,graph}{0..2} logs/graph

nerdctl compose --file docker-compose-nerdctl.yaml up -d
```

40 changes: 40 additions & 0 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,43 @@
| [`master`](https://github.com/vesoft-inc/nebula-docker-compose/tree/master) | [nebula-graph仓库](https://github.com/vesoft-inc/nebula-graph)`master`分支 | 最新的v2.x开发版本 | [Docker Compose部署Nebula Graph](https://docs.nebula-graph.com.cn/2.0/2.quick-start/2.deploy-nebula-graph-with-docker-compose/) |
| [`v2.0.0`](https://github.com/vesoft-inc/nebula-docker-compose/tree/v2.0.0)**推荐**| nebula-graph仓库的`v2.0.0`分支 | v.2.0.0-GA | [Docker Compose部署Nebula Graph](https://github.com/vesoft-inc/nebula-docker-compose/blob/v2.0.0/README_zh-CN.md) |
| [`v1.0`](https://github.com/vesoft-inc/nebula-docker-compose/tree/v1.0) | [nebula](https://github.com/vesoft-inc/nebula)仓库的`master`分支 | 最新的v1.x开发版本 | [Docker Compose部署Nebula Graph](https://github.com/vesoft-inc/nebula-docker-compose/blob/v1.0/README_zh-CN.md) |

## FAQ

### Running in M1 macOS

如果您使用 Docker Desktop,只需要执行:

```bash
docker compose up -d
```

或者,如果您想使用 [lima](https://github.com/lima-vm/lima)

- 安装 lima `brew install lima`
- 启动 lima VM `limactl start`
- 然后您可以在 lima VM 中执行指令: `lima <command>` ,比如 `lima uname -a`

- 在这之后,就可以用 `lima nerdctl` 替代 `docker` 这个命令行了,值得注意的是因为这里用的是 `nerdctl` 而不是 docker-compose,需要引用 `docker-compose-nerdctl.yaml`

```bash
rm -fr data logs
mkdir -p data/{meta,storage}{0..2}/nebula logs/{meta,storage,graph}{0..2} logs/graph
lima nerdctl compose --file docker-compose-nerdctl.yaml up -d
```

- 从 lima VM 里用 console 接入 nebula:

```bash
lima ./nebula-console-linux-arm64-v2.6.0 -addr host.lima.internal -port 9669 -user root -p password
```

### Running with nerdctl

如果您使用 [nerdctl](https://github.com/containerd/nerdctl),可以用下边的兼容的 yaml 文件,这个情况下需要先创建 data、logs 目录。

```bash
mkdir -p data/{meta,storage}{0..2}/nebula logs/{meta,storage,graph}{0..2} logs/graph

nerdctl compose --file docker-compose-nerdctl.yaml up -d
```
Loading

0 comments on commit 98f0bb4

Please sign in to comment.