purpleworks / fleet-ui

Web based UI for fleet
http://fleetui.com/
MIT License
233 stars 39 forks source link

ETCD_PEER does not respect port #29

Closed deitch closed 9 years ago

deitch commented 9 years ago

I am running etcd 2.x, so the official IANA port of 2379 is in use. When I run fleet-ui, I pass it the -e ETCD_PEER=a.b.c.d:2379 option.

However, if I exec into the running container and stub /usr/local/bin/fleetctl, I see that it tries to send it fleetctl --endpoint http://172.30.20.160:2379:4001 (notice the appended :4001).

Ran purpleworks/fleet-ui:latest, image id is 165d50cf624b

xuwang commented 9 years ago

try ETCD_PEER=http://a.b.c.d:2379 format.

deitch commented 9 years ago

Thanks, I will try it now. Definitely should update the README.md under the "Getting Started" section

deitch commented 9 years ago

Nope. Then it adds the port and prepends http://

Debug output --endpoint http://http://127.0.0.1:2379:4001 list-units --full=true -l=true --fields=unit,load,active,sub,machine

My launch command:

docker run -p 8083:3000 -e ETCD_PEER=http://10.0.10.1:2379 -v ~/.ssh/id_rsa:/root/id_rsa purpleworks/fleet-ui

xuwang commented 9 years ago

The current source has fixed the bug but it is not in the current purpleworks/fleet-ui:latest image (165d50cf624b). You can either recompile fleet-ui and rebuild a new fleet-ui image with fix, or as a workround, run etcd2 with ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379,http://0.0.0.0:4001 to get the default port 4001 working.

deitch commented 9 years ago

That would explain it. I will use the workaround for now. Any plans to push the fix to latest?

xuwang commented 9 years ago

@deitch you can pull the new image with the port fixes here: https://hub.docker.com/r/dockerage/fleet-ui/ It uses a forked xuwang/fleet-ui.git repo which contains wss socket fix (PR waiting) and more importantly, newer openssh-client cannot run in busybox image b/c missing shared libs. I switched to use debian:jessie which matches the base image I use to build the fleet-ui, resolving library issues. I tested, it works like so:

$ docker run -p 3000:3000 \
    -e ETCD_PEER=http://$COREOS_PRIVATE_IPV4:2379 \
    -v /home/core/.ssh/id_rsa_fleetui:/root/id_rsa"
deitch commented 9 years ago

Excellent. I will use that.

Is that the new official image? Or just a temporary fork?

xuwang commented 9 years ago

It's a temp fork. I don't own the official one.

deitch commented 9 years ago

Got it. Thanks @xuwang . I will leave this open until @purpleworks updates the image.

subicura commented 9 years ago

Thanks a lot @xuwang @deitch. We are now little busy, sorry for late. We'll update image as soon as possible!

subicura commented 9 years ago

finally, update image. Thank you.

deitch commented 9 years ago

Thanks @subicura