Closed davidaparicio closed 7 years ago
You can find the code in my repository: https://github.com/davidaparicio/vertx-microservices-examples
Hi, yes, I think I have an idea.
The service are exposed on localhost:808x, which in your environment may be an issue because they are not deployed on the same machine.
So true, I have not even seen this ineptitude -_-'
Now, I have a question about the same system under Kubernetes.. I think this system of Discover is the best way to communicate between containers/hosts on the cloud (like Google Compute Engine). It is the same like Openshift ? (:
Because, my last step will be to use Kubernetes Cluster Federation ^^
We provide an extension to the discovery service to use Kubernetes services and import them "automatically" - check http://vertx.io/docs/vertx-service-discovery-bridge-kubernetes/java/
With this bridge, you don't have to publish your services as you need to declare them into Kubernetes. The bridge will then retrieve the services from Kubernetes.
Hi @cescoffier !
I followed the "Run the demos in Openshift Origin (v3)" chapter
Instead of
docker rm origin
sudo docker run -d --name "origin" \
--privileged --pid=host --net=host \
-v /:/rootfs:ro -v /var/run:/var/run:rw -v /sys:/sys -v /var/lib/docker:/var/lib/docker:rw \
-v /var/lib/origin/openshift.local.volumes:/var/lib/origin/openshift.local.volumes \
openshift/origin start
docker logs -f origin
I used jimmidyson/minishift
I run mvn clean package docker:build fabric8:json fabric8:apply -Popenshift
without problem.
The dashboard is in the same as yours (I grouped A and B only for the screenshot)
But the discovery isn't working (bug with Kubernetes)
Oct 10, 2016 2:13:13 PM io.vertx.servicediscovery.kubernetes.KubernetesServiceImporter
INFO: Kubernetes discovery configured for namespace: vertx-microservice-example-aggregation-http
Oct 10, 2016 2:13:13 PM io.vertx.servicediscovery.kubernetes.KubernetesServiceImporter
INFO: Kubernetes url: https://172.30.0.1:443
Oct 10, 2016 2:13:13 PM io.vertx.servicediscovery.kubernetes.KubernetesServiceImporter
INFO: Kubernetes discovery: Bearer Token { eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJ2ZXJ0eC1taWNyb3NlcnZpY2UtZXhhbXBsZS1hZ2dyZWdhdGlvbi1odHRwIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZWNyZXQubmFtZSI6ImRlZmF1bHQtdG9rZW4tejNsam4iLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC5uYW1lIjoiZGVmYXVsdCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6IjkyNDYxMDdjLThlZjMtMTFlNi04MWJiLTYyZDM5MWNkMTNkZSIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDp2ZXJ0eC1taWNyb3NlcnZpY2UtZXhhbXBsZS1hZ2dyZWdhdGlvbi1odHRwOmRlZmF1bHQifQ.M-oLdMaBNKxvPpdzDOov5l-0ob49FajvEFnuzXhmFe3Tlv59qnN8bDPjfIUNDvmvQlbVMHGsRx9HwHj9RrFswe-gjGpIy1uRaynQgYOyH1OJXc8uKvAgEgrZ6dRfVJ2o9qevat0J8M3Pfu_bClBmmEpoFOBfSyXgH9_z7Iuw6YeGsvh2JVP-obwyT1JwJq-n6n0zCD43oUvrMRlaEmS3R9lG5kaGZN2azcHwAHNrkn3SOzX32KOqYsmlosZDRvip4MBbGDg8dkqxYSHEVWQkKgnHOMfyoZXHkbqF_qvlyYveL5XnifRKGj7oUaUw4wDXRaYQNs-ZAkvll27Mf6hQZA }
Oct 10, 2016 2:13:13 PM io.vertx.servicediscovery.kubernetes.KubernetesServiceImporter
SEVERE: Error while interacting with kubernetes
What I have to do to resolve this?
Annexe: I tested the service (like, http://c-vertx-microservice-example-aggregation-http.192.168.99.102.xip.io/?name=test it's working).
You need to add slf4j-api as a dependency to all projects.
Okay, thanks a lot @cescoffier !!
Hi @cescoffier !
The example is working well in my local machine. Before to test to Kubernetes (Google Compute Engine), I made containers and I launched, locally, them with docker-compose. The logs and the discovery page seem everything is working well but the main application doesn't work.... Do you have a idea, why is it not working ? Because unfortunately, I have any clue..
The discovery page:
The docker-compose log, and Hazelcast discovery:
Finally the circuit-breaker:
Best regards, David