Is there documentation on how to setup the UI with Docker Swarm / HA
Creating network dgraph_dgraph
Creating service dgraph_zero
Creating service dgraph_alpha1
Creating service dgraph_alpha2
Creating service dgraph_alpha3
bmcclelland@:/data$ sudo docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
igdu6ivpr6rs dgraph_alpha1 replicated 0/1 dgraph/dgraph:latest *:8080->8080/tcp, *:9080->9080/tcp
jly1hy5wni9q dgraph_alpha2 replicated 0/1 dgraph/dgraph:latest *:8081->8081/tcp, *:9081->9081/tcp
2tdcjhsoagdf dgraph_alpha3 replicated 0/1 dgraph/dgraph:latest *:8082->8082/tcp, *:9082->9082/tcp
nkw6kiu2p2jb dgraph_zero replicated 0/1 dgraph/dgraph:latest *:5080->5080/tcp, *:6080->6080/tcp
It says the service created a network, but no Service Name was listed??
This instance of Dgraph will send anonymous reports of panics back to Dgraph Labs via Sentry. No confidential information is sent. These reports help improve Dgraph. To opt-out, restart your instance with the --telemetry “sentry=false;” flag. For more info, see How To Guides - Howto.
I0707 21:26:27.692344 57 init.go:110]
Dgraph version : v21.03.0
Dgraph codename : rocket
Dgraph SHA-256 : b4e4c77011e2938e9da197395dbce91d0c6ebb83d383b190f5b70201836a773f
Commit SHA-1 : a77bbe8ae
Commit timestamp : 2021-04-07 21:36:38 +0530
Branch : HEAD
Go version : go1.16.2
jemalloc enabled : true
For Dgraph official documentation, visit Get started with Dgraph
For discussions about Dgraph , visit
For fully-managed Dgraph Cloud ,
Licensed variously under the Apache Public License 2.0 and Dgraph Community License.
Copyright 2015-2021 Dgraph Labs, Inc.
Hey Michel!!! Thanks for the reply, do I need to remove or stop services that were created from the other setups — will this break that Docker Pull ?
REPOSITORY TAG IMAGE ID CREATED SIZE
dgraph/dgraph <none> 1043ca38d68e 2 weeks ago 155MB
dgraph/ratel latest 98e9777f3b57 7 weeks ago 26.7MB
dgraph/dgraph v21.03.0 740c1f56163c 3 months ago 154MB
hello-world latest d1165f221234 4 months ago 13.3kB
wget https://github.com/dgraph-io/dgraph/raw/master/contrib/config/docker/docker-compose-multi.yml
# This file can be used to setup a Dgraph cluster with 3 Dgraph Alphas and 1 Dgraph Zero node on a
# Docker Swarm with replication.
# It expects three virtual machines with hostnames aws01, aws02, and aws03 to be part of the swarm.
# There is a constraint to make sure that each Dgraph Alpha runs on a particular host.
# Data would be persisted to a Docker volume called data-volume on the virtual machines which are
# part of the swarm.
# Run `docker stack deploy -c docker-compose-multi.yml` on the Swarm leader to start the cluster.
version: "3.2"
networks:
dgraph:
services:
zero:
image: dgraph/dgraph:latest
volumes:
- data-volume:/dgraph
ports:
- 5080:5080
- 6080:6080
networks:
- dgraph
deploy:
placement:
constraints:
- node.hostname == aws01
command: dgraph zero --my=zero:5080 --replicas 3
alpha1:
image: dgraph/dgraph:latest
hostname: "alpha1"
volumes:
- data-volume:/dgraph
ports:
- 8080:8080
- 9080:9080
networks:
- dgraph
deploy:
placement:
constraints:
- node.hostname == aws01
command: dgraph alpha --my=alpha1:7080 --zero=zero:5080
alpha2:
image: dgraph/dgraph:latest
hostname: "alpha2"
volumes:
- data-volume:/dgraph
ports:
- 8081:8081
- 9081:9081
networks:
- dgraph
deploy:
replicas: 1
placement:
constraints:
- node.hostname == aws02
command: dgraph alpha --my=alpha2:7081 --zero=zero:5080 -o 1
alpha3:
image: dgraph/dgraph:latest
hostname: "alpha3"
volumes:
- data-volume:/dgraph
ports:
- 8082:8082
- 9082:9082
networks:
- dgraph
deploy:
replicas: 1
placement:
constraints:
- node.hostname == aws03
command: dgraph alpha --my=alpha3:7082 --zero=zero:5080 -o 2
volumes:
data-volume:
I just changed the aws hostnames to my own; as we do not do Cloud Deployments. This will be on Prem
Also @MichelDiz — Can we do this Without Docker?? That would be preferred
Do you mean you can’t connect to the cluster? check the IP. Docker Swarm works differently. Maybe you need to hit the host IP, or the virtual machine. The address alpha1:8080 won’t work outside of Docker context. As it is an internal services. And Ratel UI is running in your Browser, besides its service is in the container.
Just adding on to this in case this is not obvious. You will have to expose an endpoint of Dgraph Alpha HTTP(S) service. On a production scenario, this should never be accessible, so you would then need to go through an SSH jump host or a VPN to access a private internal-facing LB that hits the Dgraph Alpha service.
The Ratel is only a client, so it can run on a laptop, or if desired, from the private network as well. If
you can run curl https://alpha.example.com:8080/health (replace FQDN to IP or hostname you are using) works fine, then the same address will work with Ratel’s connection configuration.
Gotta wait 5 Hours for my next reply, wompp womppp
@MichelDiz correct, I am sure it is some type of Docker / Network Issue
I’m kind of getting thrown into the fire but that’s alright, I don’t really know much about connecting to containers outside of the container, if that makes sense
I got " Why are they using Docker Swarm for this!!! See if you can get it working with Docker, if not, find a way to not use Docker Swarm"
It seems like I have it deployed, just networking /docker dependencies that I am not familiar with
I assume it has nothing to do with yalls YAML/Apps (I’m gonna add the Ratel YAML and remove the deploy constraints since its not aws)
Classic case of, its not you its me (but this time its actually just me)
thanks for popping in Joaquin, I agree with this statement fully. I will just need to do some more research on configuring endpoints for docker/https so I am able to connect to Ratel UI