how to deploy lb and ui
Arvinzhu opened this issue · 0 comments
Arvinzhu commented
Description
- I had read the content of this webpage(https://github.com/fnproject/docs/blob/master/fn/operate/runner_pools.md) and deployed fn-lb.
result:
[root@localhost fn]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d26e8649bd13 fnproject/flow:ui "/tini -- node ./ser…" 24 hours ago Up 24 hours 0.0.0.0:3002->3000/tcp flowui
3649d80b6c4b tteggel/bristol "npm start" 24 hours ago Up 24 hours 0.0.0.0:3000-3001->3000-3001/tcp bristol
0e974bf9572d fnproject/flow:latest "/fnproject/flow-ser…" 24 hours ago Up 24 hours 0.0.0.0:8081->8081/tcp flowserver
dd3508ce24fb fnproject/fnserver:latest "preentry.sh ./fnser…" 30 hours ago Up 30 hours 2375/tcp, 0.0.0.0:8181->8080/tcp fn-runner-lb
f616fb7e4c5f fnproject/fnserver:latest "preentry.sh ./fnser…" 30 hours ago Up 25 hours 2375/tcp, 8080/tcp fn-runner-3
2c680a55e6e1 fnproject/fnserver:latest "preentry.sh ./fnser…" 30 hours ago Up 25 hours 2375/tcp, 8080/tcp fn-runner-2
0727863c3c72 fnproject/fnserver:latest "preentry.sh ./fnser…" 30 hours ago Up 25 hours 2375/tcp, 8080/tcp fn-runner-1
48ef004eca20 fnproject/fnserver:latest "preentry.sh ./fnser…" 30 hours ago Up 25 hours 2375/tcp, 0.0.0.0:8080->8080/tcp fn-api
98f86734ef46 mysql:5.7.22 "docker-entrypoint.s…" 30 hours ago Up 30 hours 0.0.0.0:3306->3306/tcp fn-mysql
- test invoke result
[root@localhost fn]# curl -X POST http://lb.fn.local:8181/t/testapp/pyfn
{"message": "Hello World"}
- Then I want to run
fn/ui
as development pattern with this webpage(https://github.com/fnproject/ui)
this command is:
[root@localhost ui]# PORT=6200 FN_API_URL=http://lb.fn.local:8181 npm start
> FunctionsUI@0.0.39 start /root/fn/ui
> node server
info: Using API url: lb.fn.local:8181
info: Server running on port 6200
error: [ERR] 404 | Path not found: GET /v2/apps
error: Error. Api responded with 404 Path not found: GET /v2/apps
Something wrong occured! I opened http://localhost:6200
in browser.but can not load fn apps Info.
Describe the results you received:
Then I stop ui and run other command. change the port as API SERVER port.
[root@localhost ui]# PORT=6200 FN_API_URL=http://lb.fn.local:8080 npm start
> FunctionsUI@0.0.39 start /root/fn/ui
> node server
info: Using API url: lb.fn.local:8080
info: Server running on port 6200
this page(http://localhost:6200) can load apps info.
but when I test invoke the function ,something is not right.
so I try to run the command on the command line ,the result returned right!!!
[root@localhost fn]# curl -X POST -d '{"name":"Pony"}' http://lb.fn.local:8181/invoke/01DNM3Z752NG8G00RZJ000000K
Hello, {"name":"Pony"}!
Describe the results you expected:
I hope someone could tell me how to deploy lb and ui properly.
Thanks!
Additional environment details (OSX, Linux, flags, etc.):
ENV:
[root@localhost fn]# docker version
Client:
Version: 18.09.0
API version: 1.39
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:48:22 2018
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.0
API version: 1.39 (minimum version 1.12)
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:19:08 2018
OS/Arch: linux/amd64
Experimental: false