cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Some docker network related updates for spring_boot_scan
Date Thu, 24 Aug 2017 12:57:09 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes cba9d4ecc -> 056806d5e


Some docker network related updates for spring_boot_scan


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/056806d5
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/056806d5
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/056806d5

Branch: refs/heads/3.1.x-fixes
Commit: 056806d5edf07fe02d988214a24777e2d44e9957
Parents: cba9d4e
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Thu Aug 24 13:54:45 2017 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Thu Aug 24 13:56:51 2017 +0100

----------------------------------------------------------------------
 .../main/release/samples/jax_rs/spring_boot_scan/README  | 10 +++++++++-
 .../samples/jax_rs/spring_boot_scan/application/README   | 11 +++++++++++
 .../application/src/main/resources/application.yml       |  3 ++-
 .../samples/jax_rs/spring_boot_scan/docker-compose.yml   |  7 ++++++-
 4 files changed, 28 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/056806d5/distribution/src/main/release/samples/jax_rs/spring_boot_scan/README
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/README b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/README
index e8b8960..7822817 100644
--- a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/README
+++ b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/README
@@ -7,7 +7,15 @@ Check eureka-registry/README on how to run Eureka Registry.
 
 Check application/README on how to run a server application.
 
-Note: you can have both the registry and the server application started by running "docker-compose
up" in this directory. 
+Note: 
+You can have both the registry and the server application started by running "docker-compose
up" in this directory.
+
+By default it is expected that EUREKA_SERVER_URI environment variable is exported and set
to 
+"http://{docker.host}" where you can find the value of {docker.host} by running 'ifconfig'
and checking 
+the IP address of the docker bridge 'docker0'.
+
+Alternatively you can edit docker-compose.yml and enable the 'host' network mode.
+ 
 
 Check client/README on how to run a command line client.
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/056806d5/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/README
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/README
b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/README
index d083b16..7faebf6 100644
--- a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/README
+++ b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/README
@@ -37,8 +37,19 @@ $ mvn dockerfile:push
 --
 
 Run the container:
+
+By default it is expected that EUREKA_SERVER_URI environment variable is passed and set to

+"http://{docker.host}" where you can find the value of {docker.host} by running 'ifconfig'
and checking 
+the IP address of the docker bridge 'docker0'.
+
+--
+docker run -p 8080:8080 -e EUREKA_SERVER_URI='http://{docker.host}' -t ${username}/apachecxf:spring-boot-sample-rs-scan-app

+--
+
+Alternatively you can run the docker in the 'host' network mode.
 --
 docker run -p 8080:8080 --network="host" -t ${username}/apachecxf:spring-boot-sample-rs-scan-app

+--
 
 = Testing the server =
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/056806d5/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/resources/application.yml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/resources/application.yml
b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/resources/application.yml
index d52b3f0..ddcb473 100644
--- a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/resources/application.yml
+++ b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/resources/application.yml
@@ -14,8 +14,9 @@ eureka:
   client:
     registerWithEureka: true
     serviceUrl:
-      defaultZone: ${EUREKA_SERVER_URI:http://${EUREKA_SERVER_USER:}:${EUREKA_SERVER_PASS:}@127.0.0.1:8761}/eureka/
+      defaultZone: ${EUREKA_SERVER_URI:http://127.0.0.1}:${EUREKA_SERVER_PORT:8761}/eureka/
   instance:
+    prefer-ip-address: true
     statusPageUrlPath: /services/helloservice/info
     healthCheckUrlPath: /system/health
     metadataMap:

http://git-wip-us.apache.org/repos/asf/cxf/blob/056806d5/distribution/src/main/release/samples/jax_rs/spring_boot_scan/docker-compose.yml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/docker-compose.yml
b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/docker-compose.yml
index c468450..f5b57d5 100644
--- a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/docker-compose.yml
+++ b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/docker-compose.yml
@@ -6,8 +6,13 @@ services:
       - "8761:8761"
   jaxrs:
     image: $USER/apachecxf:spring-boot-sample-rs-scan-app
+    environment:
+      - EUREKA_SERVER_URI
     ports:
       - "8080:8080"
-    network_mode: "host" 
+#   Use this mode only if you'd like Eureka client to use 127.0.0.1
+#   instead of exporting EUREKA_SERVER_URI env variable   
+# 
+#    network_mode: "host"
 
 


Mime
View raw message