You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "fantonangeli (via GitHub)" <gi...@apache.org> on 2024/11/18 17:32:52 UTC
[PR] kie-tools-issues#2695: [SonataFlow Management Console Image] Use mod_proxy to proxy request to the data-index [incubator-kie-tools]
fantonangeli opened a new pull request, #2750:
URL: https://github.com/apache/incubator-kie-tools/pull/2750
**Closes** https://github.com/apache/incubator-kie-tools/issues/2695
**Description:**
Currently, the SonataFlow Management Console attempts to trigger workflows using internal Endpoint URLs returned by the Data Index (DI). These URLs are not accessible from outside the cluster, leading to errors when users attempt to initiate workflows through the console.
Please configure Apache Httpd in the Image using mod_proxy to expose the Data-Index outside of the cluster, doing the communication on the server-side.
**Preview:**
[kie-tools-issues#2695.webm](https://github.com/user-attachments/assets/e690ae08-a8cd-4cbc-a95f-05a6bfb59991)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-tools#2695: [SonataFlow Management Console Image] Use mod_proxy to proxy request to the data-index [incubator-kie-tools]
Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento commented on PR #2750:
URL: https://github.com/apache/incubator-kie-tools/pull/2750#issuecomment-2652007664
Re-triggered the PR checks since it's been a while since they ran. Good to merge when green.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-tools#2695: [SonataFlow Management Console Image] Use mod_proxy to proxy request to the data-index [incubator-kie-tools]
Posted by "fantonangeli (via GitHub)" <gi...@apache.org>.
fantonangeli commented on code in PR #2750:
URL: https://github.com/apache/incubator-kie-tools/pull/2750#discussion_r1871899270
##########
packages/sonataflow-management-console-image/test-resources/tests/features/sonataflow-management-console.feature:
##########
@@ -0,0 +1,37 @@
+@docker.io/apache/incubator-kie-sonataflow-management-console
+Feature: Serverless Workflow Management Console images
+
+ Scenario: verify that the home page is served
+ When container is started with env
+ | variable | value |
+ Then container log should contain httpd -D FOREGROUND
+ Then check that page is served
+ | property | value |
+ | port | 8080 |
+ | path | / |
+ | request_method | GET |
+ | wait | 480 |
+ | expected_status_code | 200 |
+
+ Scenario: Verify that the rewrite rule for /graphql is in httpd.conf
+ When container is started with env
+ | variable | value |
+ Then container log should contain httpd -D FOREGROUND
+ Then file /etc/httpd/conf/httpd.conf should contain /graphql
+
+
+ Scenario: verify that the data-index is available from the container
+ When container is started with env
+ | variable | value |
+ | SONATAFLOW_MANAGEMENT_CONSOLE_DATA_INDEX_ENDPOINT | http://192.168.138.171:4000/graphql |
Review Comment:
@ricardozanini I'm trying to find a way not to use the IP here. Can you help me?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-tools#2695: [SonataFlow Management Console Image] Use mod_proxy to proxy request to the data-index [incubator-kie-tools]
Posted by "fantonangeli (via GitHub)" <gi...@apache.org>.
fantonangeli commented on PR #2750:
URL: https://github.com/apache/incubator-kie-tools/pull/2750#issuecomment-2532505578
@ricardozanini now I'm trying with `172.18.0.1` , which should be the docker bridge IP and should not change between environments
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-tools-issues#2695: [SonataFlow Management Console Image] Use mod_proxy to proxy request to the data-index [incubator-kie-tools]
Posted by "fantonangeli (via GitHub)" <gi...@apache.org>.
fantonangeli commented on PR #2750:
URL: https://github.com/apache/incubator-kie-tools/pull/2750#issuecomment-2485709910
Changed this PR to "DO NOT MERGE": Doing some extra tests I found a bug in the communication between MGMT deployment and DI deployment on OCP using SSL.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-tools#2695: [SonataFlow Management Console Image] Use mod_proxy to proxy request to the data-index [incubator-kie-tools]
Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini commented on code in PR #2750:
URL: https://github.com/apache/incubator-kie-tools/pull/2750#discussion_r1871906338
##########
.gitignore:
##########
@@ -324,6 +324,7 @@ packages/scesim-marshaller/**/ts-gen
!packages/sonataflow-image-common/test-resources/
!packages/sonataflow-builder-image/test-resources/
!packages/sonataflow-devmode-image/test-resources/
+!packages/sonataflow-management-console-image/test-resources/
Review Comment:
Can't we use the gitignore files within the package instead?
##########
packages/sonataflow-management-console-image/test-resources/tests/features/sonataflow-management-console.feature:
##########
@@ -0,0 +1,37 @@
+@docker.io/apache/incubator-kie-sonataflow-management-console
+Feature: Serverless Workflow Management Console images
+
+ Scenario: verify that the home page is served
+ When container is started with env
+ | variable | value |
+ Then container log should contain httpd -D FOREGROUND
+ Then check that page is served
+ | property | value |
+ | port | 8080 |
+ | path | / |
+ | request_method | GET |
+ | wait | 480 |
+ | expected_status_code | 200 |
+
+ Scenario: Verify that the rewrite rule for /graphql is in httpd.conf
+ When container is started with env
+ | variable | value |
+ Then container log should contain httpd -D FOREGROUND
+ Then file /etc/httpd/conf/httpd.conf should contain /graphql
+
+
+ Scenario: verify that the data-index is available from the container
+ When container is started with env
+ | variable | value |
+ | SONATAFLOW_MANAGEMENT_CONSOLE_DATA_INDEX_ENDPOINT | http://192.168.138.171:4000/graphql |
Review Comment:
The IP is required because you are using the internal Docker network to expose the service and have Cekit behave to query it.
We could set up a virtual DNS, but it would take too much effort; I don't think it's worth it. Can we predict the IP and hardcode it in this test? Or you could fetch for the IP and pass this variable during the test command line.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-tools#2695: [SonataFlow Management Console Image] Use mod_proxy to proxy request to the data-index [incubator-kie-tools]
Posted by "fantonangeli (via GitHub)" <gi...@apache.org>.
fantonangeli merged PR #2750:
URL: https://github.com/apache/incubator-kie-tools/pull/2750
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-tools#2695: [SonataFlow Management Console Image] Use mod_proxy to proxy request to the data-index [incubator-kie-tools]
Posted by "fantonangeli (via GitHub)" <gi...@apache.org>.
fantonangeli commented on PR #2750:
URL: https://github.com/apache/incubator-kie-tools/pull/2750#issuecomment-2589331899
Hi @domhanak, can you please review this PR?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-tools#2695: [SonataFlow Management Console Image] Use mod_proxy to proxy request to the data-index [incubator-kie-tools]
Posted by "domhanak (via GitHub)" <gi...@apache.org>.
domhanak commented on PR #2750:
URL: https://github.com/apache/incubator-kie-tools/pull/2750#issuecomment-2642376590
@fantonangeli apologies, will check first thing next week.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-tools-issues#2695: [SonataFlow Management Console Image] Use mod_proxy to proxy request to the data-index [incubator-kie-tools]
Posted by "fantonangeli (via GitHub)" <gi...@apache.org>.
fantonangeli commented on PR #2750:
URL: https://github.com/apache/incubator-kie-tools/pull/2750#issuecomment-2485936212
The fix is working on my OCP
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-tools#2695: [SonataFlow Management Console Image] Use mod_proxy to proxy request to the data-index [incubator-kie-tools]
Posted by "fantonangeli (via GitHub)" <gi...@apache.org>.
fantonangeli commented on code in PR #2750:
URL: https://github.com/apache/incubator-kie-tools/pull/2750#discussion_r1871901878
##########
packages/sonataflow-management-console-image/package.json:
##########
@@ -28,7 +30,10 @@
"image:cekit:build:linux": "pnpm image:cekit:copy && pnpm image:cekit:setup:env make -C ./dist-dev build",
"image:cekit:build:win32:darwin": "echo \"Build skipped on macOS and Windows\"",
"image:cekit:copy": "cp -R ./node_modules/@kie-tools/sonataflow-image-common/resources/* ./dist-dev/ && cp -R resources/* ./dist-dev/",
- "image:cekit:setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env sonataflowManagementConsoleImageEnv.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env sonataflowManagementConsoleImageEnv.account) KOGITO_IMAGE_NAME=$(build-env sonataflowManagementConsoleImageEnv.name) KOGITO_IMAGE_TAG=$(build-env sonataflowManagementConsoleImageEnv.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito) SONATAFLOW_MANAGEMENT_CONSOLE_PORT=$(build-env sonataflowManagementConsoleImageEnv.port)"
+ "image:cekit:setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env sonataflowManagementConsoleImageEnv.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env sonataflowManagementConsoleImageEnv.account) KOGITO_IMAGE_NAME=$(build-env sonataflowManagementConsoleImageEnv.name) KOGITO_IMAGE_TAG=$(build-env sonataflowManagementConsoleImageEnv.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito) SONATAFLOW_MANAGEMENT_CONSOLE_PORT=$(build-env sonataflowManagementConsoleImageEnv.port)",
+ "image:test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"mkdir -p dist-dev/target/test/results\" \"run-script-os\" --finally \"cp -R dist-dev/target/test/results dist-tests-e2e/\"",
+ "image:test:darwin:win32": "echo \"Tests skipped on macOS and Windows\"",
+ "image:test:linux": "pnpm copy:test-assets && pnpm image:cekit:setup:env SONATAFLOW_MANAGEMENT_CONSOLE_DATA_INDEX_ENDPOINT='http://$(hostname -I | awk '{print $1}'):4000/graphql' make -C ./dist-dev test-image"
Review Comment:
Maybe there is a better approach to communicating with the host machine?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-tools-issues#2695: [SonataFlow Management Console Image] Use mod_proxy to proxy request to the data-index [incubator-kie-tools]
Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento commented on PR #2750:
URL: https://github.com/apache/incubator-kie-tools/pull/2750#issuecomment-2489282795
Not blocking this PR, but this seems to fix a very specific problem on a very specific environment... Would it be possible to plan for some E2E tests that validate it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org