siwei-io / siwei-io.github.io

siwei.io static content, rendered by hugo and hugo-doit.
https://siwei.io
2 stars 2 forks source link

[bug] Nebula-Up,一键拉起一个 Nebula 测试环境 #23

Open hashc opened 1 year ago

hashc commented 1 year ago
Field Value
Title Nebula-Up,一键拉起一个 Nebula 测试环境
Url https://siwei.io/nebula-up/
Filename posts/nebula-up/index.md
Error response from daemon: image with reference vesoft/nebula-http-gateway:v2.2.0 was found but does not match the specified platform: wanted darwin/amd64, actual: linux/amd64

 ❌   Failed in Step: install nebula graph dashboard
      Exiting, Stack Trace: install_nebula_graph_dashboard

m1 运行 all-in-one.sh 遇到问题。

另一个问题,安装好all-in-one之后在关闭所有容器后,如何重新启用?现在的方式是重新运行一遍all-in-one.sh

wey-gu commented 1 year ago

看起来 platform: amd64 在新版本的 docker desktop macOS 下会有问题,我把 platform 去掉吧,m1 的话现在有 rosetta 还是不错的。

hashc commented 1 year ago

function get_platform { case $(uname -ms) in "Darwin x86_64") platform="x86_64-darwin" ;; "Darwin arm64") platform="aarch64-darwin" ;; "Linux x86_64") platform="x86_64-linux" ;; "Linux aarch64") platform="aarch64-linux" ;; *) platform="unknown-platform" ;; esac echo $platform }

这样说来,是不是直接把platform="aarch64-darwin” 改成 x86_64-darwin就可以了?

On Feb 1, 2023, at 8:27 PM, Wey Gu @.***> wrote:

看起来 platform: amd64 在新版本的 docker desktop macOS 下会有问题,我把 platform 去掉吧,m1 的话现在有 rosetta 还是不错的。

— Reply to this email directly, view it on GitHub https://github.com/siwei-io/siwei-io.github.io/issues/23#issuecomment-1413061732, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIEOTLMGTUQBTMEJU72H2LWVMLSNANCNFSM6AAAAAAUOOQHQA. You are receiving this because you authored the thread.

wey-gu commented 1 year ago
function get_platform {
case $(uname -ms) in
"Darwin x86_64") platform="x86_64-darwin" ;;
"Darwin arm64")  platform="aarch64-darwin" ;;
"Linux x86_64")  platform="x86_64-linux" ;;
"Linux aarch64") platform="aarch64-linux" ;;
*)               platform="unknown-platform" ;;
esac
echo $platform
}

这样说来,是不是直接把platform="aarch64-darwin” 改成 x86_64-darwin就可以了?

👍🏻,不过这个报错好像就是我 compose 里给的 platform: amd64 搞的,我改掉了哈。

另外,确实 Nebula-up 还没有方便的 down 的 utils,见 https://github.com/wey-gu/nebula-up/issues/39 我还没找时间糊一个,如果在 mac docker desktop 上,可以在 GUI 里的 containers 上把所有的 compose 都手动停掉,下次,再打开。

wey-gu commented 1 year ago

现在估计好了,麻烦有时间帮我测试一下哈?可以手动改一下 compose yaml 参考 https://github.com/wey-gu/nebula-up/pull/50 试试哈?

hashc commented 1 year ago

好的

On Feb 1, 2023, at 8:39 PM, Wey Gu @.***> wrote:

现在估计好了,麻烦有时间帮我测试一下哈?可以手动改一下 compose yaml 参考 wey-gu/nebula-up#50 https://github.com/wey-gu/nebula-up/pull/50 试试哈?

— Reply to this email directly, view it on GitHub https://github.com/siwei-io/siwei-io.github.io/issues/23#issuecomment-1413069383, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIEOTP3VHILFWM2V4GGNOLWVMM7PANCNFSM6AAAAAAUOOQHQA. You are receiving this because you authored the thread.

wey-gu commented 1 year ago

对了,推荐一下我最近做的 NebulaGraph for docker desktop (extension) 哈

https://github.com/nebula-contrib/nebulagraph-docker-ext

正在申请上架官方商店,docker desktop 一键就能装好内核和 studio,比 all-in-one 少,但是更方便桌面测试了。

视频 demo https://www.bilibili.com/video/BV1934y1f7JJ

hashc commented 1 year ago

好方便!mark

On Feb 1, 2023, at 8:46 PM, Wey Gu @.***> wrote:

对了,推荐一下我最近做的 NebulaGraph for docker desktop (extension) 哈

https://github.com/nebula-contrib/nebulagraph-docker-ext

正在申请上架官方商店,docker desktop 一键就能装好内核和 studio,比 all-in-one 少,但是更方便桌面测试了。

视频 demo https://www.bilibili.com/video/BV1934y1f7JJ

— Reply to this email directly, view it on GitHub https://github.com/siwei-io/siwei-io.github.io/issues/23#issuecomment-1413073247, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIEOTJDUHRWQM4EZFI7KJTWVMNXFANCNFSM6AAAAAAUOOQHQA. You are receiving this because you authored the thread.

hashc commented 1 year ago

你好,

如果我想在容器外 利用python api来访问数据库,我使用graphd会报错,RuntimeError: The services status exception: [services: ('23.202.231.169', 9669), status: BAD]

请问这种情况下我应该设置graphd改成什么呢?

config = Config() config.max_connection_pool_size = 10

init connection pool

connection_pool = ConnectionPool()

if the given servers are ok, return true, else return false

ok = connection_pool.init([(‘graphd', 9669)], config)

option 2 with session_context, session will be released automatically

with connection_pool.session_context('root', 'nebula') as session: session.execute('USE nba') result = session.execute('SHOW TAGS') print(result)

close the pool

connection_pool.close()

On Feb 1, 2023, at 8:46 PM, Wey Gu @.***> wrote:

对了,推荐一下我最近做的 NebulaGraph for docker desktop (extension) 哈

https://github.com/nebula-contrib/nebulagraph-docker-ext

正在申请上架官方商店,docker desktop 一键就能装好内核和 studio,比 all-in-one 少,但是更方便桌面测试了。

视频 demo https://www.bilibili.com/video/BV1934y1f7JJ

— Reply to this email directly, view it on GitHub https://github.com/siwei-io/siwei-io.github.io/issues/23#issuecomment-1413073247, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIEOTJDUHRWQM4EZFI7KJTWVMNXFANCNFSM6AAAAAAUOOQHQA. You are receiving this because you authored the thread.

hashc commented 1 year ago

解决了! 'localhost', 51460 用这个就可以

On Feb 1, 2023, at 10:37 PM, Cocos Orange @.***> wrote:

你好,

如果我想在容器外 利用python api来访问数据库,我使用graphd会报错,RuntimeError: The services status exception: [services: ('23.202.231.169', 9669), status: BAD]

请问这种情况下我应该设置graphd改成什么呢?

config = Config() config.max_connection_pool_size = 10

init connection pool

connection_pool = ConnectionPool()

if the given servers are ok, return true, else return false

ok = connection_pool.init([(‘graphd', 9669)], config)

option 2 with session_context, session will be released automatically

with connection_pool.session_context('root', 'nebula') as session: session.execute('USE nba') result = session.execute('SHOW TAGS') print(result)

close the pool

connection_pool.close()

On Feb 1, 2023, at 8:46 PM, Wey Gu @.***> wrote:

对了,推荐一下我最近做的 NebulaGraph for docker desktop (extension) 哈

https://github.com/nebula-contrib/nebulagraph-docker-ext

正在申请上架官方商店,docker desktop 一键就能装好内核和 studio,比 all-in-one 少,但是更方便桌面测试了。

视频 demo https://www.bilibili.com/video/BV1934y1f7JJ

— Reply to this email directly, view it on GitHub https://github.com/siwei-io/siwei-io.github.io/issues/23#issuecomment-1413073247, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIEOTJDUHRWQM4EZFI7KJTWVMNXFANCNFSM6AAAAAAUOOQHQA. You are receiving this because you authored the thread.

wey-gu commented 1 year ago

@hashc 不需要用 51460(这个应该是浮动的),用 localhost:9669 应该是可以的,默认 9669 是暴露给 host 的

hashc commented 1 year ago

9669这个也可以用! 另外遇到了一个问题,就是启动studio之后,发现explorer不见了。

 仔细检查了一下在安装过程中出现如下问题:  

On Feb 1, 2023, at 11:11 PM, Wey Gu @.***> wrote:

@hashc https://github.com/hashc 不需要用 51460(这个应该是浮动的),用 localhost:9669 应该是可以的,默认 9669 是暴露给 host 的

— Reply to this email directly, view it on GitHub https://github.com/siwei-io/siwei-io.github.io/issues/23#issuecomment-1413160147, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIEOTJOB72PTG2ANIRWFDTWVM6WPANCNFSM6AAAAAAUOOQHQA. You are receiving this because you were mentioned.

wey-gu commented 1 year ago

@hashc 你的截图在邮件里无法被 github 上看到。

你指的 explorer 不见了是没有探索功能了吧?那个在 lagacy studio 里有,在 127.0.0.1:7002 上

Screenshot 2023-02-02 at 13 57 23
hashc commented 1 year ago

另外一个问题,当我关闭docker之后,请问我要如何重启这些all-in-one中使用的所有容器呢?我发现.sh的文件只有pyspark,br,没有启动全部容器的.sh

On Feb 1, 2023, at 11:11 PM, Wey Gu @.***> wrote:

@hashc https://github.com/hashc 不需要用 51460(这个应该是浮动的),用 localhost:9669 应该是可以的,默认 9669 是暴露给 host 的

— Reply to this email directly, view it on GitHub https://github.com/siwei-io/siwei-io.github.io/issues/23#issuecomment-1413160147, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIEOTJOB72PTG2ANIRWFDTWVM6WPANCNFSM6AAAAAAUOOQHQA. You are receiving this because you were mentioned.

hashc commented 1 year ago

我直接在服务器上利用的all-in-one部署

On Feb 1, 2023, at 11:59 PM, Cocos Orange @.***> wrote:

另外一个问题,当我关闭docker之后,请问我要如何重启这些all-in-one中使用的所有容器呢?我发现.sh的文件只有pyspark,br,没有启动全部容器的.sh

On Feb 1, 2023, at 11:11 PM, Wey Gu @.***> wrote:

@hashc https://github.com/hashc 不需要用 51460(这个应该是浮动的),用 localhost:9669 应该是可以的,默认 9669 是暴露给 host 的

— Reply to this email directly, view it on GitHub https://github.com/siwei-io/siwei-io.github.io/issues/23#issuecomment-1413160147, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIEOTJOB72PTG2ANIRWFDTWVM6WPANCNFSM6AAAAAAUOOQHQA. You are receiving this because you were mentioned.

wey-gu commented 1 year ago

另外,确实 Nebula-up 还没有方便的 down 的 utils,见 wey-gu/nebula-up#39 我还没找时间糊一个,如果在 mac docker desktop 上,可以在 GUI 里的 containers 上把所有的 compose 都手动停掉,下次,再打开。

嗯嗯,抱歉,我还没做方便的启停脚本 utils (/ω\),前边我回答你了,不过是编辑的消息,你在邮件里收不到,在 issue 里能看到。

hashc commented 1 year ago

所以按照这个意思,在Linux上面,我只要写个脚本把所有相关的容器打开就行了

On Feb 2, 2023, at 12:05 AM, Wey Gu @.***> wrote:

另外,确实 Nebula-up 还没有方便的 down 的 utils,见 wey-gu/nebula-up#39 https://github.com/wey-gu/nebula-up/issues/39 我还没找时间糊一个,如果在 mac docker desktop 上,可以在 GUI 里的 containers 上把所有的 compose 都手动停掉,下次,再打开。

嗯嗯,抱歉,我还没做方便的启停脚本 utils (/ω\),前边我回答你了,不过是编辑的消息,你在邮件里收不到,在 issue 里能看到。

— Reply to this email directly, view it on GitHub https://github.com/siwei-io/siwei-io.github.io/issues/23#issuecomment-1413200457, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIEOTMWGBO3L2ST4DMOPPTWVNFCDANCNFSM6AAAAAAUOOQHQA. You are receiving this because you were mentioned.

hashc commented 1 year ago

所以这个只能在ext版本里有?我在all-in-one版本里面没有这个,也打不开7002这个端口的网页

On Feb 1, 2023, at 11:58 PM, Wey Gu @.***> wrote:

@hashc https://github.com/hashc 你的截图在邮件里无法被 github 上看到。

你指的 explorer 不见了是没有探索功能了吧?那个在 lagacy studio 里有,在 127.0.0.1:7002 上

https://user-images.githubusercontent.com/1651790/216243802-5c5d033b-19c2-4ac2-a29e-3ef6994daf6f.png — Reply to this email directly, view it on GitHub https://github.com/siwei-io/siwei-io.github.io/issues/23#issuecomment-1413194782, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIEOTMHJYXIISF2GA7CVWTWVNEJBANCNFSM6AAAAAAUOOQHQA. You are receiving this because you were mentioned.

wey-gu commented 1 year ago

所以这个只能在ext版本里有?我在all-in-one版本里面没有这个,也打不开7002这个端口的网页

对,nebula-up 还没有,我回头会加一下进去哈

wey-gu commented 1 year ago

所以按照这个意思,在Linux上面,我只要写个脚本把所有相关的容器打开就行了

https://github.com/wey-gu/nebula-up/pull/51 ,我增加了 nebula-start.sh, nebula-stop.sh,你可以重新执行 nebula-up 之后就有这两个脚本了,帮我测测看有没有问题哈,我这边测试是ok的。

hashc commented 1 year ago

好的! 另外,我还遇到一个问题,我希望把nebula-up 放在我指定的文件路径,我修改了原来的. WOKRING_PATH=/home/project/nebula-up/nebula-docker-compose/data,把他放到一个8T的硬盘的空间上。可当我安装完之后,打开dashbord,查看磁盘,发现它挂在在/dev/nvme0n1p2 这个目录里面 ,并且磁盘已经已经使用96%。我又检查了数据确实在我指定的WOKRING_PATH下。很是奇怪

On Feb 2, 2023, at 1:05 AM, Wey Gu @.***> wrote:

nebula-up

hashc commented 1 year ago

另外 all-in-one这个文件里面 WOKRING_PATH 拼错了 WORKING_PATH

On Feb 2, 2023, at 1:16 AM, Cocos Orange @.***> wrote:

好的! 另外,我还遇到一个问题,我希望把nebula-up 放在我指定的文件路径,我修改了原来的. WOKRING_PATH=/home/project/nebula-up/nebula-docker-compose/data,把他放到一个8T的硬盘的空间上。可当我安装完之后,打开dashbord,查看磁盘,发现它挂在在/dev/nvme0n1p2 这个目录里面 ,并且磁盘已经已经使用96%。我又检查了数据确实在我指定的WOKRING_PATH下。很是奇怪

On Feb 2, 2023, at 1:05 AM, Wey Gu @.***> wrote:

nebula-up

wey-gu commented 1 year ago

哇,感谢,欢迎 PR fix typo 哈。

nebula-up 是非生产级别的,主要是体验来用,硬盘这个我还没有时间研究一下,有可能是 dashboard 的 bug(node exporter 是看整个机器的磁盘,和路径无关),我 nebula-up 里放的 dashboard 版本比较老,回头要更新一下看看。

建议你手动创建 ~/.nebula-up 软链接到你的大磁盘,感觉会更方便一点。

hashc commented 1 year ago

我发现所有新添加nebula-start 和nebula-stop的中使用的路径有误

比如 $WOKRING_PATH/nebula-docker-compose && docker-compose down

应该改成$WOKRING_PATH/nebula-up/nebula-docker-compose && docker-compose down

On Feb 2, 2023, at 1:05 AM, Wey Gu @.***> wrote:

所以按照这个意思,在Linux上面,我只要写个脚本把所有相关的容器打开就行了 … <x-msg://19/#> On Feb 2, 2023, at 12:05 AM, Wey Gu @.***> wrote: 另外,确实 Nebula-up 还没有方便的 down 的 utils,见 wey-gu/nebula-up#39 https://github.com/wey-gu/nebula-up/issues/39 <wey-gu/nebula-up#39 https://github.com/wey-gu/nebula-up/issues/39> 我还没找时间糊一个,如果在 mac docker desktop 上,可以在 GUI 里的 containers 上把所有的 compose 都手动停掉,下次,再打开。 嗯嗯,抱歉,我还没做方便的启停脚本 utils (/ω\),前边我回答你了,不过是编辑的消息,你在邮件里收不到,在 issue 里能看到。 — Reply to this email directly, view it on GitHub <#23 (comment) https://github.com/siwei-io/siwei-io.github.io/issues/23#issuecomment-1413200457>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIEOTMWGBO3L2ST4DMOPPTWVNFCDANCNFSM6AAAAAAUOOQHQA. You are receiving this because you were mentioned.

见 wey-gu/nebula-up#51 https://github.com/wey-gu/nebula-up/pull/51 ,我增加了 nebula-start.sh, nebula-stop.sh,你可以重新执行 nebula-up 之后就有这两个脚本了,帮我测测看有没有问题哈,我这边测试是ok的。

— Reply to this email directly, view it on GitHub https://github.com/siwei-io/siwei-io.github.io/issues/23#issuecomment-1413246859, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIEOTOZZJQ62WV4ID6SOWTWVNMEDANCNFSM6AAAAAAUOOQHQA. You are receiving this because you were mentioned.