You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2021/10/11 07:53:56 UTC
[incubator-hop] branch master updated: HOP-3376: add hostname and
some cleanup
This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hop.git
The following commit(s) were added to refs/heads/master by this push:
new 4505f95 HOP-3376: add hostname and some cleanup
new bedb8c1 Merge pull request #1130 from hansva/master
4505f95 is described below
commit 4505f9571fe4cc94470b953cbf8047c5d13b8bc9
Author: Hans Van Akelyen <ha...@gmail.com>
AuthorDate: Mon Oct 11 09:53:08 2021 +0200
HOP-3376: add hostname and some cleanup
HOP-3376
---
docker/integration-tests/integration-tests-hop_server.yaml | 4 +++-
docker/resources/load-and-execute.sh | 3 ++-
docs/hop-tech-manual/modules/ROOT/pages/docker-container.adoc | 5 +++++
integration-tests/hop_server/main-0001-test-server-available.hwf | 2 +-
integration-tests/hop_server/metadata/server/testserver.json | 2 +-
5 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/docker/integration-tests/integration-tests-hop_server.yaml b/docker/integration-tests/integration-tests-hop_server.yaml
index 139ae52..35caa86 100644
--- a/docker/integration-tests/integration-tests-hop_server.yaml
+++ b/docker/integration-tests/integration-tests-hop_server.yaml
@@ -29,12 +29,14 @@ services:
hop_server:
image: apache/incubator-hop:1.1.0-SNAPSHOT
+ hostname: hop-server
ports:
- "8181"
environment:
- HOP_SERVER_PORT=8181
+ - HOP_SERVER_HOSTNAME=hop-server
healthcheck:
- test: curl -u cluster:cluster --fail http://localhost:8181 || exit 1
+ test: curl -u cluster:cluster --fail http://hop-server:8181 || exit 1
interval: 20s
timeout: 10s
retries: 6
diff --git a/docker/resources/load-and-execute.sh b/docker/resources/load-and-execute.sh
index 9fde160..7c318e2 100755
--- a/docker/resources/load-and-execute.sh
+++ b/docker/resources/load-and-execute.sh
@@ -35,6 +35,7 @@ write_server_config() {
HOP_SERVER_USER=${HOP_SERVER_USER:-cluster}
HOP_SERVER_PASS=${HOP_SERVER_PASS:-cluster}
HOP_SERVER_MASTER=${HOP_SERVER_MASTER:-Y}
+ HOP_SERVER_HOSTNAME=${HOP_SERVER_HOSTNAME:-0.0.0.0}
HOP_SERVER_XML=/tmp/hop-server.xml
@@ -43,7 +44,7 @@ write_server_config() {
echo "<hop-server-config>" > ${HOP_SERVER_XML}
echo " <hop-server>" >> ${HOP_SERVER_XML}
echo " <name>Hop Server</name>" >> ${HOP_SERVER_XML}
- echo " <hostname>0.0.0.0</hostname>" >> ${HOP_SERVER_XML}
+ echo " <hostname>${HOP_SERVER_HOSTNAME}</hostname>" >> ${HOP_SERVER_XML}
echo " <port>${HOP_SERVER_PORT}</port>" >> ${HOP_SERVER_XML}
echo " <username>${HOP_SERVER_USER}</username>" >> ${HOP_SERVER_XML}
echo " <password>${HOP_SERVER_PASS}</password>" >> ${HOP_SERVER_XML}
diff --git a/docs/hop-tech-manual/modules/ROOT/pages/docker-container.adoc b/docs/hop-tech-manual/modules/ROOT/pages/docker-container.adoc
index 7e169a8..c7ca4c9 100644
--- a/docs/hop-tech-manual/modules/ROOT/pages/docker-container.adoc
+++ b/docs/hop-tech-manual/modules/ROOT/pages/docker-container.adoc
@@ -112,6 +112,10 @@ For **long-lived** containers (Hop Server):
|===
|Environment Variable | Description
+|```HOP_SERVER_HOSTNAME```
+| The Hostname the server will have.
+The Hop default is ```localhost```
+
|```HOP_SERVER_PORT```
| The port for hop-server.
Pick a value like ```8080``` or ```8181```
@@ -159,6 +163,7 @@ docker run -it --rm \
--env HOP_SERVER_USER=admin \
--env HOP_SERVER_PASS=admin \
--env HOP_SERVER_PORT=8181 \
+ --env HOP_SERVER_HOSTNAME=localhost \
-p 8181:8181 \
--name my-hop-server-container \
apache/incubator-hop:<tag>
diff --git a/integration-tests/hop_server/main-0001-test-server-available.hwf b/integration-tests/hop_server/main-0001-test-server-available.hwf
index fd6bf15..678b930 100644
--- a/integration-tests/hop_server/main-0001-test-server-available.hwf
+++ b/integration-tests/hop_server/main-0001-test-server-available.hwf
@@ -64,7 +64,7 @@ limitations under the License.
<add_date>N</add_date>
<add_time>N</add_time>
<insertScript>Y</insertScript>
- <script>curl -u cluster:cluster --fail http://localhost:8181</script>
+ <script>curl -u cluster:cluster --fail http://hop-server:8181</script>
<loglevel>Basic</loglevel>
<parallel>N</parallel>
<xloc>192</xloc>
diff --git a/integration-tests/hop_server/metadata/server/testserver.json b/integration-tests/hop_server/metadata/server/testserver.json
index 7439ad7..107f1e1 100644
--- a/integration-tests/hop_server/metadata/server/testserver.json
+++ b/integration-tests/hop_server/metadata/server/testserver.json
@@ -2,7 +2,7 @@
"webAppName": "",
"sslMode": false,
"proxyPort": "",
- "hostname": "localhost",
+ "hostname": "hop-server",
"password": "Encrypted 2be98afc86aa7f2e4cb1aa265cd86aac8",
"nonProxyHosts": "",
"overrideExistingProperties": false,