You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2017/11/23 14:17:57 UTC
[camel] 02/02: Added instructions for Minishift too on the
Hazelcast example
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 85e034b36d0c32eab1d4ea37cab08799f9d79f32
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Nov 23 15:17:14 2017 +0100
Added instructions for Minishift too on the Hazelcast example
---
.../camel-example-hazelcast-kubernetes/ReadMe.md | 72 ++++++++++++++++++++--
1 file changed, 67 insertions(+), 5 deletions(-)
diff --git a/examples/camel-example-hazelcast-kubernetes/ReadMe.md b/examples/camel-example-hazelcast-kubernetes/ReadMe.md
index 7a432fd..c4384ed 100644
--- a/examples/camel-example-hazelcast-kubernetes/ReadMe.md
+++ b/examples/camel-example-hazelcast-kubernetes/ReadMe.md
@@ -6,7 +6,7 @@ This quickstart is based on the Kubernetes example here: https://github.com/kube
This example is based on:
-- Minikube (Kubernetes version >= 1.5)
+- Minikube (Kubernetes version >= 1.5) or Minishift (Openshift >= 3.5)
- Fabric8 Maven Plugin (version >= 3.2)
First thing you'll need to do is preparing the environment.
@@ -19,6 +19,13 @@ $ kubectl create -f src/main/resources/fabric8/hazelcast-service.yaml
$ kubectl create -f src/main/resources/fabric8/hazelcast-deployment.yaml
```
+or once your Minishift cluster is up and running:
+
+```
+$ oc create -f src/main/resources/fabric8/hazelcast-service.yaml
+$ oc create -f src/main/resources/fabric8/hazelcast-deployment.yaml
+```
+
To check the correct startup of the Hazelcast instance run the following command:
```
@@ -27,6 +34,14 @@ NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
hazelcast 1 1 1 1 1m
```
+or on Minishift
+
+```
+$ oc get deployment
+NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
+hazelcast 1 1 1 1 1m
+```
+
and check the status of the pod
```
@@ -35,12 +50,26 @@ NAME READY STATUS RESTARTS AGE
hazelcast-1638707704-n64tk 1/1 Running 0 1m
```
+on Minishift:
+
+```
+$ oc get pods
+NAME READY STATUS RESTARTS AGE
+hazelcast-1638707704-n64tk 1/1 Running 0 1m
+```
+
Now you can decide to scale-up your Hazelcast cluster
```
$ kubectl scale deployment hazelcast --replicas 4
```
+on Minishift
+
+```
+$ oc scale deployment hazelcast --replicas=4
+```
+
and again check the status of your pods
```
@@ -53,7 +82,19 @@ hazelcast-1638707704-z1g6r 1/1 Running 0 1m
```
-You can also take a look at the logs from the pods:
+on Minishift
+
+```
+$ oc get pods
+NAME READY STATUS RESTARTS AGE
+hazelcast-1638707704-g8qwh 1/1 Running 0 1m
+hazelcast-1638707704-n64tk 1/1 Running 0 3m
+hazelcast-1638707704-wwwff 1/1 Running 0 1m
+hazelcast-1638707704-z1g6r 1/1 Running 0 1m
+
+```
+
+You can also take a look at the logs from the pods with kubectl or oc
```
kubectl logs hazelcast-414548760-fb5bh
@@ -103,11 +144,19 @@ Navigate to the project folder and the example can be built with
When the example runs in fabric8, you can use the Kubectl command tool to inspect the status
-To list all the running pods:
+To list all the running pods on Minikube:
$ kubectl get pods
-Then find the name of the pod that runs this quickstart, and output the logs from the running pods with:
+Then find the name on Minikube of the pod that runs this quickstart, and output the logs from the running pods with:
+
+ $ kubectl logs <name of pod>
+
+To list all the running pods on Minishift:
+
+ $ oc get pods
+
+Then find the name on Minishift of the pod that runs this quickstart, and output the logs from the running pods with:
$ kubectl logs <name of pod>
@@ -155,7 +204,7 @@ INFO: hz.client_0 [someGroup] [3.9] Authenticated with server [172.17.0.9]:5701,
### Cleanup
-Run following to undeploy
+Run following to undeploy on Minikube
```
$ mvn -Pkubernetes-install fabric8:undeploy
@@ -163,8 +212,21 @@ $ kubectl delete -f src/main/resources/fabric8/hazelcast-deployment.yaml
$ kubectl delete -f src/main/resources/fabric8/hazelcast-service.yaml
```
+Run following to undeploy on Minishift
+
+```
+$ mvn -Pkubernetes-install fabric8:undeploy
+$ oc delete -f src/main/resources/fabric8/hazelcast-deployment.yaml
+$ oc delete -f src/main/resources/fabric8/hazelcast-service.yaml
+```
+
Make sure no pod is running
```
$ kubectl get pods
No resources found.
```
+
+```
+$ oc get pods
+No resources found.
+```
--
To stop receiving notification emails like this one, please contact
"commits@camel.apache.org" <co...@camel.apache.org>.