It seemed by the docs that docker compose was the way to go to set up dgraph, however I ran into issues trying to load the data set. It seems the docker image has it’s own file system so I did:
docker compose -d
docker exec -it dgraph_server_1 bash
apt-get update
apt-get install wget
wget "https://github.com/dgraph-io/tutorial/blob/master/resources/1million.rdf.gz?raw=true" -O 1million.rdf.gz -q
.... ^D to exit docker image bash ....
docker exec -it dgraph_server_1 dgraph live -r 1million.rdf.gz --zero localhost:5080
Then I get:
Processing 1million.rdf.gz
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 2s, Aborts: 0
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 4s, Aborts: 0
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 6s, Aborts: 0
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 8s, Aborts: 0
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 10s, Aborts: 0
2018/01/11 07:08:15 zero.go:29: Could not dial zero at address "localhost:5080": context deadline exceeded
2018/01/11 07:08:15 xidmap.go:110: Error while getting lease: Failed to obtain zero leader after trying all connections
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 12s, Aborts: 0
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 14s, Aborts: 0
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 16s, Aborts: 0
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 18s, Aborts: 0
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 20s, Aborts: 0
2018/01/11 07:08:25 zero.go:29: Could not dial zero at address "localhost:5080": context deadline exceeded
2018/01/11 07:08:25 xidmap.go:110: Error while getting lease: Failed to obtain zero leader after trying all connections
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 22s, Aborts: 0
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 24s, Aborts: 0
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 26s, Aborts: 0
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 28s, Aborts: 0
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 30s, Aborts: 0
2018/01/11 07:08:35 zero.go:29: Could not dial zero at address "localhost:5080": context deadline exceeded
2018/01/11 07:08:35 xidmap.go:110: Error while getting lease: Failed to obtain zero leader after trying all connections
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 32s, Aborts: 0
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 34s, Aborts: 0
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 36s, Aborts: 0
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 38s, Aborts: 0
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 40s, Aborts: 0
2018/01/11 07:08:45 zero.go:29: Could not dial zero at address "localhost:5080": context deadline exceeded
2018/01/11 07:08:45 xidmap.go:110: Error while getting lease: Failed to obtain zero leader after trying all connections
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 42s, Aborts: 0
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 44s, Aborts: 0
Total Txns done: 0 RDFs per second: 0 Time Elapsed: 46s, Aborts: 0
It seems that something isn’t running, however, I can run queries in the UI just fine:
Sorry if this is a n00bish issue with docker unrelated to dgraph
Context: I’m on OSX.
my docker-compose.yml file looks like:
version: "3"
services:
zero:
image: dgraph/dgraph:latest
volumes:
- ~/sandbox/dgraph/data:/dgraph
ports:
- 5080:5080
- 6080:6080
restart: on-failure
command: dgraph zero --port_offset -2000 --my=zero:5080
server:
image: dgraph/dgraph:latest
volumes:
- ~/sandbox/dgraph/data:/dgraph
ports:
- 8080:8080
- 9080:9080
restart: on-failure
command: dgraph server --my=server:7080 --memory_mb=2048 --zero=zero:5080
ratel:
image: dgraph/dgraph:latest
volumes:
- ~/sandbox/dgraph/data:/dgraph
ports:
- 8081:8081
command: dgraph-ratel