camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: Polished example
Date Tue, 18 Apr 2017 11:38:19 GMT
Repository: camel
Updated Branches:
  refs/heads/master 4f01b7861 -> bef5ab7ec


Polished example


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

Branch: refs/heads/master
Commit: bef5ab7ec52a55394ea516dd9836fb62d7cac571
Parents: 4f01b78
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Tue Apr 18 13:38:05 2017 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Tue Apr 18 13:38:12 2017 +0200

----------------------------------------------------------------------
 .../README.adoc                                 | 12 ++++-
 .../services/src/main/bash/consul-run-linux.sh  | 43 ++++++++++++++++++
 .../services/src/main/bash/consul-run-osx.sh    | 46 ++++++++++++++++++++
 .../services/src/main/bash/consul-run.sh        | 42 ------------------
 .../README.adoc                                 |  8 ++++
 .../service/src/main/bash/consul-run-linux.sh   |  3 +-
 .../service/src/main/bash/consul-run-osx.sh     |  3 +-
 7 files changed, 112 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/bef5ab7e/examples/camel-example-spring-boot-servicecall/README.adoc
----------------------------------------------------------------------
diff --git a/examples/camel-example-spring-boot-servicecall/README.adoc b/examples/camel-example-spring-boot-servicecall/README.adoc
index 2a0d097..e02ce31 100644
--- a/examples/camel-example-spring-boot-servicecall/README.adoc
+++ b/examples/camel-example-spring-boot-servicecall/README.adoc
@@ -31,7 +31,8 @@ Using multiple shells:
  - start consul:
 
   $ cd services
-  $ src/main/bash/consul-run.sh
+  $ src/main/bash/consul-run-linx.sh       (for linux)
+  $ src/main/bash/consul-run-osx.sh        (for mac osx)
 
  - start the service-1 service group:
 
@@ -59,6 +60,15 @@ In a new shell:
 
 If you keep calling the http endpoint you'll notice they are consumed using a round robin
policy and that one of the services registered in consul is not taken into account according
to the blacklist.
 
+## Web console
+
+You can open the Consul web console
+
+     http://localhost:8500/ui
+
+Where you can find information about the services and its state.
+     
+
 ## More information
 
 You can find more information about Apache Camel at the website: http://camel.apache.org/

http://git-wip-us.apache.org/repos/asf/camel/blob/bef5ab7e/examples/camel-example-spring-boot-servicecall/services/src/main/bash/consul-run-linux.sh
----------------------------------------------------------------------
diff --git a/examples/camel-example-spring-boot-servicecall/services/src/main/bash/consul-run-linux.sh
b/examples/camel-example-spring-boot-servicecall/services/src/main/bash/consul-run-linux.sh
new file mode 100755
index 0000000..aa5dd3f
--- /dev/null
+++ b/examples/camel-example-spring-boot-servicecall/services/src/main/bash/consul-run-linux.sh
@@ -0,0 +1,43 @@
+#!/usr/bin/env bash
+
+CONSUL_VER="0.8.1"
+CONSUL_ZIP="consul_${CONSUL_VER}_linux_amd64.zip"
+
+# cleanup
+rm -rf "target/consul-data"
+rm -rf "target/consul-config"
+rm -rf "target/consul"
+
+mkdir -p target/
+mkdir -p target/consul-data
+mkdir -p target/consul-config
+
+if [ ! -f target/${CONSUL_ZIP} ]; then
+    wget "https://releases.hashicorp.com/consul/${CONSUL_VER}/${CONSUL_ZIP}" -O target/${CONSUL_ZIP}
+fi
+
+cat > target/consul-config/services.json <<EOF
+{
+  "services": [{
+    "id": "s1i1", "name": "service-1", "tags": ["camel", "service-call"], "address": "localhost",
"port": 9011
+  }, {
+    "id": "s1i2", "name": "service-1", "tags": ["camel", "service-call"], "address": "localhost",
"port": 9012
+  }, {
+    "id": "s1i3", "name": "service-1", "tags": ["camel", "service-call"], "address": "localhost",
"port": 9013
+  }]
+}
+EOF
+
+unzip -d target target/${CONSUL_ZIP}
+
+target/consul \
+    agent \
+    -server \
+    -bootstrap \
+    -datacenter camel \
+    -advertise 127.0.0.1 \
+    -bind 0.0.0.0 \
+    -log-level trace \
+    -data-dir target/consul-data \
+    -config-dir target/consul-config \
+    -ui
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/bef5ab7e/examples/camel-example-spring-boot-servicecall/services/src/main/bash/consul-run-osx.sh
----------------------------------------------------------------------
diff --git a/examples/camel-example-spring-boot-servicecall/services/src/main/bash/consul-run-osx.sh
b/examples/camel-example-spring-boot-servicecall/services/src/main/bash/consul-run-osx.sh
new file mode 100755
index 0000000..b3be9e1
--- /dev/null
+++ b/examples/camel-example-spring-boot-servicecall/services/src/main/bash/consul-run-osx.sh
@@ -0,0 +1,46 @@
+#!/usr/bin/env bash
+
+CONSUL_VER="0.8.1"
+CONSUL_ZIP="consul_${CONSUL_VER}_darwin_amd64.zip"
+
+# cleanup
+rm -rf "target/consul-data"
+rm -rf "target/consul-config"
+rm -rf "target/consul"
+
+mkdir -p target/
+mkdir -p target/consul-data
+mkdir -p target/consul-config
+
+
+if [ ! -f target/$CONSUL_ZIP ]; then
+    echo Downloading: https://releases.hashicorp.com/consul/$CONSUL_VER/$CONSUL_ZIP 
+    curl -o target/$CONSUL_ZIP "https://releases.hashicorp.com/consul/$CONSUL_VER/$CONSUL_ZIP"
+fi
+
+cat > target/consul-config/services.json <<EOF
+{
+  "services": [{
+    "id": "s1i1", "name": "service-1", "tags": ["camel", "service-call"], "address": "localhost",
"port": 9011
+  }, {
+    "id": "s1i2", "name": "service-1", "tags": ["camel", "service-call"], "address": "localhost",
"port": 9012
+  }, {
+    "id": "s1i3", "name": "service-1", "tags": ["camel", "service-call"], "address": "localhost",
"port": 9013
+  }]
+}
+EOF
+
+unzip -d target target/$CONSUL_ZIP
+chmod +x target/consul
+
+target/consul \
+    agent \
+    -server \
+    -bootstrap \
+    -datacenter camel \
+    -advertise 127.0.0.1 \
+    -bind 0.0.0.0 \
+    -log-level trace \
+    -data-dir target/consul-data \
+    -config-dir target/consul-config \
+    -ui
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/bef5ab7e/examples/camel-example-spring-boot-servicecall/services/src/main/bash/consul-run.sh
----------------------------------------------------------------------
diff --git a/examples/camel-example-spring-boot-servicecall/services/src/main/bash/consul-run.sh
b/examples/camel-example-spring-boot-servicecall/services/src/main/bash/consul-run.sh
deleted file mode 100755
index bb74d96..0000000
--- a/examples/camel-example-spring-boot-servicecall/services/src/main/bash/consul-run.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/env bash
-
-CONSUL_VER="0.7.5"
-CONSUL_ZIP="consul_${CONSUL_VER}_linux_amd64.zip"
-
-# cleanup
-rm -rf "target/consul-data"
-rm -rf "target/consul-config"
-rm -rf "target/consul"
-
-mkdir -p target/
-mkdir -p target/consul-data
-mkdir -p target/consul-config
-
-if [ ! -f target/${CONSUL_ZIP} ]; then
-    wget "https://releases.hashicorp.com/consul/${CONSUL_VER}/${CONSUL_ZIP}" -O target/${CONSUL_ZIP}
-fi
-
-cat > target/consul-config/services.json <<EOF
-{
-  "services": [{
-    "id": "s1i1", "name": "service-1", "tags": ["camel", "service-call"], "address": "localhost",
"port": 9011
-  }, {
-    "id": "s1i2", "name": "service-1", "tags": ["camel", "service-call"], "address": "localhost",
"port": 9012
-  }, {
-    "id": "s1i3", "name": "service-1", "tags": ["camel", "service-call"], "address": "localhost",
"port": 9013
-  }]
-}
-EOF
-
-unzip -d target target/${CONSUL_ZIP}
-
-target/consul \
-    agent \
-    -server \
-    -bootstrap \
-    -datacenter camel \
-    -advertise 127.0.0.1 \
-    -bind 0.0.0.0 \
-    -log-level trace \
-    -data-dir target/consul-data \
-    -config-dir target/consul-config
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/bef5ab7e/examples/camel-example-spring-cloud-servicecall/README.adoc
----------------------------------------------------------------------
diff --git a/examples/camel-example-spring-cloud-servicecall/README.adoc b/examples/camel-example-spring-cloud-servicecall/README.adoc
index 0d0fbce..3e66d3b 100644
--- a/examples/camel-example-spring-cloud-servicecall/README.adoc
+++ b/examples/camel-example-spring-cloud-servicecall/README.adoc
@@ -48,6 +48,14 @@ In a new shell:
 
 If you keep calling the http endpoint you'll notice they are consumed using a round robin
policy and that only the services matching specific tags are consumed.
 
+## Web console
+
+You can open the Consul web console
+
+     http://localhost:8500/ui
+
+Where you can find information about the services and its state.
+
 ## More information
 
 You can find more information about Apache Camel at the website: http://camel.apache.org/

http://git-wip-us.apache.org/repos/asf/camel/blob/bef5ab7e/examples/camel-example-spring-cloud-servicecall/service/src/main/bash/consul-run-linux.sh
----------------------------------------------------------------------
diff --git a/examples/camel-example-spring-cloud-servicecall/service/src/main/bash/consul-run-linux.sh
b/examples/camel-example-spring-cloud-servicecall/service/src/main/bash/consul-run-linux.sh
index 14afcfe..c170c04 100755
--- a/examples/camel-example-spring-cloud-servicecall/service/src/main/bash/consul-run-linux.sh
+++ b/examples/camel-example-spring-cloud-servicecall/service/src/main/bash/consul-run-linux.sh
@@ -49,4 +49,5 @@ target/consul \
     -bind 0.0.0.0 \
     -log-level trace \
     -data-dir target/consul-data \
-    -config-dir target/consul-config
\ No newline at end of file
+    -config-dir target/consul-config \
+    -ui
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/bef5ab7e/examples/camel-example-spring-cloud-servicecall/service/src/main/bash/consul-run-osx.sh
----------------------------------------------------------------------
diff --git a/examples/camel-example-spring-cloud-servicecall/service/src/main/bash/consul-run-osx.sh
b/examples/camel-example-spring-cloud-servicecall/service/src/main/bash/consul-run-osx.sh
index 4b62282..ff314cc 100755
--- a/examples/camel-example-spring-cloud-servicecall/service/src/main/bash/consul-run-osx.sh
+++ b/examples/camel-example-spring-cloud-servicecall/service/src/main/bash/consul-run-osx.sh
@@ -52,4 +52,5 @@ target/consul \
     -bind 0.0.0.0 \
     -log-level trace \
     -data-dir target/consul-data \
-    -config-dir target/consul-config
\ No newline at end of file
+    -config-dir target/consul-config \
+    -ui
\ No newline at end of file


Mime
View raw message