在 DC/OS 集群上运行 Arango Shell [英] Running Arango Shell on DC/OS cluster

查看:25
本文介绍了在 DC/OS 集群上运行 Arango Shell的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚通过 Microsoft Azure 设置了一个 DC/OS 集群,并使用 DC/OS 仪表板(通过 ssh 隧道)在集群上安装了 Arango 3.0.我能够通过 SSH 进入集群并与 Arango 集群通信:

I have just set up a DC/OS cluster via Microsoft Azure, and installed Arango 3.0 on the cluster using the DC/OS dashboard (via the ssh tunnel). I am able to SSH into the cluster and communicate with the Arango cluster:

$ curl --dump - http://localhost:8529/_api/gharial
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Server: ArangoDB
Connection: Keep-Alive
Content-Length: 38

{"error":false,"graphs":[],"code":200}

问题 #1:即使在我使用所请求的 POST 插入图表后,此处在文档中,Arango 仪表板(通过 ssh 隧道通过 DC/OS 仪表板访问)不显示图形.这是为什么?这是图 social 被创建的证据":

Question #1: Even after I insert a graph using the POST requested described here in the docs, the Arango Dashboard (accessed through the DC/OS Dashboard via the ssh tunnel) doesn't show the graph. Why is that? Here is "evidence" that the graph social was created:

$ curl -X POST --data-binary @- --dump - http://localhost:8529/_api/gharial/social/vertex/male <<EOF
> {
>     "name" : "social",
>     "edgeDefinitions" : [
>       {
>         "collection" : "relation",
>         "from" : [
>           "female",
>           "male"
>         ],
>         "to" : [
>           "female",
>           "male"
>         ]
>       }
>     ]
> }
> EOF
HTTP/1.1 202 Accepted
Etag: 129726
Content-Type: application/json; charset=utf-8
Server: ArangoDB
Connection: Keep-Alive
Content-Length: 89

$ curl --dump - http://localhost:8529/_api/gharial
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Server: ArangoDB
Connection: Keep-Alive
Content-Length: 226

{"error":false,"graphs":[{"_key":"social","_id":"_graphs/social","_rev":"125906","edgeDefinitions":[{"collection":"relation","from":["female","male"],"to":["female","male"]}],"orphanCollections":["otherVertices"]}],"code":200}

<小时>

我在使用 Arango shell 时也遇到了问题.即使 Arango 明确安装在他的服务器上(如上面的 curl 所示),Arango shell 仍然无法识别:


I'm also having trouble using the Arango shell. Even though Arango is clearly installed on he server (as shown by the above curl), the Arango shell still isn't recognized:

$ arangosh
arangosh: command not found

问题 #2:即使我已经通过 DC/OS 仪表板安装了 Arango,我是否还必须手动将 Arango 安装到这台机器上?如果是这样,我应该如何获得 Arango?(我尝试使用 apt-get 但存在不同版本的问题).或者是否有另一种与我缺少的集群通信的方式?

Question #2: Do I have to manually install Arango onto this machine even though I already installed Arango it through the DC/OS dashboard? If so, how should I get Arango? (I tried using apt-get but there were differing-version issue). Or is there another way of communicated with this cluster that I'm missing?

(基本上,我正在尝试将大图批量导入 Arango.我觉得应该有一种直接从文件导入的方法——即不通过 HTTP——因为这可能更快/更有效).

(Basically, I'm trying to bulk-import a large graph into Arango. I feel like there should be a way of importing directly from a file -- i.e. not over HTTP -- since that is probably faster / more efficient).

推荐答案

#1 Graph

如果我没看错,你只是创建了图形定义;您的图表中还没有数据.所以它会显示在图表列表中,但屏幕将是空白的.

#1 Graph

If I get that correctly, you only created the graph definition; there is no data inside your graph yet. So it will show up in the list of graphs, but the screen will be blank.

如果你想创建一个有内容的图表,你可以要么在运行后使用 arangosh 执行此操作,要么单击+ 添加图形",选择示例图形"选项卡,选择一个,然后按创建".请注意,其中一些图表可能会与您已创建的空图表发生冲突,因此您可能需要先将其删除.

If you want to create a graph with content, you may either do this using arangosh once you've got it running, or click on '+ Add Graph', Choose the 'Example Graphs' tab, Choose one, press 'Create'. Please note that some of these graphs may collide with the empty graph you've already created, so you may want to drop it first.

DC/OS 代理在 docker 容器内部署 ArangoDB.这些 docker 容器还将包含 arangosh(和 arangoimp).如果我猜对了,您是在通过 ssh-ing 连接到代理主机吗?当您尝试时,您可以在主机中安装 arangodb3-client 包 - 您需要添加首先是存储库 URL.

The DC/OS Agent deploys ArangoDB inside of docker containers. These docker containers will also contain arangosh (and arangoimp). If I get that correctly, you're ssh-ing into the agent host? As you tried, you could install the arangodb3-client package in the host - you need to add the repository URL first.

这可能是获得 arangosh 的最便捷方式;另一种可能性可能是附加 arango docker 容器并在其中运行它.您需要确保正确连接协调器主机;这就是为什么在代理主机中安装 arangosh 更方便的原因.

This is probably the most convenient way to get arangosh; Another possibility may be to attach the arango docker container and run it in there. You need to make shure you correctly connect the coordinator host; which is why installing arangosh in the agent host is more compfortable.

这篇关于在 DC/OS 集群上运行 Arango Shell的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆