-
Notifications
You must be signed in to change notification settings - Fork 28
Is1304/add internal traefik instance for reverse proxy #1313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is1304/add internal traefik instance for reverse proxy #1313
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1313 +/- ##
=======================================
Coverage 60.66% 60.66%
=======================================
Files 241 241
Lines 9574 9574
Branches 1056 1056
=======================================
Hits 5808 5808
Misses 3489 3489
Partials 277 277
Continue to review full report at Codecov.
|
6e8b156
to
12da15f
Compare
d375d30
to
01e9ded
Compare
5191df6
to
d026505
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Frontend part looks good to me 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, if I understand it well, in devel mode:
- All calls to http://127.0.0.1:8080 are routed into the traefik dashboard
- All calls to http://127.0.0.1:8082 exposes promethous metrics of traefik
- All http traffik to 9081 is forwarded either to the webserver or any of the backend services spawned by the director with the appropriate labels.
I have the following questions:
- http://172.0.0.1:8080/ or http://172.0.0.1:8080/dashboard or http://172.0.0.1:8080/api returns 404 in devel-mode
- are rules for webserver (
hostregexp(`{host:.+}`)
) and services spawned by the director (PathPrefix(`/x/{node_Uuid}`)
) overlapping? e.g.http://172.0.0.1:9081/x/123
fulfill both rules? how is this resolved?
services/web/server/src/simcore_service_webserver/config/server-docker-dev.yaml
Show resolved
Hide resolved
So in general you got that right:
You need to add / after dashboard
Yes that is correct. Anyway I discovered some things while playing with the osparc-ops that I will try to add in here to make things clearer (especially with the dashboard and api). The problem is that the dashboard has issues with multiple traefik instances but I'll try to have a way to see both of them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Traefik logs in devel mode show some warnings and one error:
time="2020-04-16T18:00:51Z" level=info msg="Configuration loaded from flags.",
time="2020-04-16T18:00:51Z" level=warning msg="Could not initialize jaeger tracer: lookup jaeger on 127.0.0.11:53: no such host",
time="2020-04-16T18:00:51Z" level=warning msg="Unable to create tracer: lookup jaeger on 127.0.0.11:53: no such host",
time="2020-04-16T18:01:06Z" level=error msg="middleware \"gzip@docker\" does not exist" routerName=api_internal@docker entryPointName=traefik_dashboard,
~/devp/osparc-simcore$ wget http://127.0.0.1:8080/dashboard/
--2020-04-16 20:04:59-- http://127.0.0.1:8080/dashboard/
Connecting to 127.0.0.1:8080... connected.
HTTP request sent, awaiting response... 404 Not Found
2020-04-16 20:04:59 ERROR 404: Not Found. |
will check it out. |
changed default port to 80 set published port of traefik to 9081 set published port of webserver to random
so my guess is that you were actually using anyway this is fixed now by moving these labels in docker-compose.local.yml so it will now work in both cases. so now you will find the following:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent. Now it works fine !
@@ -40,7 +40,7 @@ services: | |||
environment: | |||
- SC_BOOT_MODE=${SC_BOOT_MODE:-default} | |||
ports: | |||
- ${SIMCORE_PORT:-9081}:8080 | |||
- "8080" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
much better
@@ -88,7 +104,7 @@ services: | |||
init: true | |||
deploy: | |||
mode: replicated | |||
replicas: 4 | |||
replicas: 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we have also replicas of traefik ?
What do these changes do?
Adds an internal Traefik instance in the simcore stack to replace the webserver failing reverse-proxy. All calls to /x/{node_uuid} are redirected through Traefik to the corresponding dynamic service.
This has the following consequences:
traefik:
director:
frontend:
additional configurations:
IMPORTANT: the 3D-viewer 3.x must be used from now on. version 2.x will fail.
IMPORTANT: a corresponding PR in osparc-ops shall be used to make the clusters compatible
Bonus:
Related issue number
closes #1304
How to test
Checklist
make openapi-specs
,git commit ...
and thenmake version-*
)