Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a nerdctl Compatible yaml file #102

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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