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

查看:118
本文介绍了在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图

如果我正确地理解了这一点,那么您仅创建了图形定义.您的图形中还没有数据.因此它将显示在图形列表中,但屏幕将为空白.

#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 ). 如果我没错,那您是要进入代理主机吗? 在尝试过程中,您可以在主机中安装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天全站免登陆