问题
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}
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}
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
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?
(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.
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.
#2 - Arangosh
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.
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.
来源:https://stackoverflow.com/questions/38363315/running-arango-shell-on-dc-os-cluster