Closed BaerSy closed 5 years ago
Do i need replace ${host}:${port} with real value?
That's the idea, yes.
how do i know the correct ip address and port for -Ddocker.host?
If the Docker daemon is running on your local host, then you can simply omit the -Ddocker.host=tcp:...
argument to the mvn command.
Otherwise, simply use the output of
echo $DOCKER_HOST
as the value of the docker.host
parameter.
Thanks @sophokles73. All builds are successfully achieved. All container images have been created. How can I run them? Using docker run xxxx one by one? For evaluation purpose, I don't want to deploy them through minikube as too many issues with minikube. For my development/evaluation purpose, which way to better, beside minikube?
Thanks
@sophokles73 more clearly, I built hono successfully as below:
root@ecs-de1e-0004:~# docker images REPOSITORY TAG IMAGE ID CREATED SIZE eclipse/hono-service-device-registry 1.0.0-SNAPSHOT 36e0d153707c 2 days ago 226MB eclipse/hono-service-device-registry latest 36e0d153707c 2 days ago 226MB eclipse/hono-service-device-connection 1.0.0-SNAPSHOT 3b4058c08195 2 days ago 228MB eclipse/hono-service-device-connection latest 3b4058c08195 2 days ago 228MB eclipse/hono-service-auth 1.0.0-SNAPSHOT ab5848494954 2 days ago 226MB eclipse/hono-service-auth latest ab5848494954 2 days ago 226MB eclipse/hono-adapter-sigfox-vertx 1.0.0-SNAPSHOT 9ffb8614b84a 2 days ago 226MB eclipse/hono-adapter-sigfox-vertx latest 9ffb8614b84a 2 days ago 226MB eclipse/hono-adapter-mqtt-vertx 1.0.0-SNAPSHOT 5a79f73bf71d 2 days ago 226MB eclipse/hono-adapter-mqtt-vertx latest 5a79f73bf71d 2 days ago 226MB eclipse/hono-adapter-lora-vertx 1.0.0-SNAPSHOT 00a470b9a799 2 days ago 226MB eclipse/hono-adapter-lora-vertx latest 00a470b9a799 2 days ago 226MB eclipse/hono-adapter-kura 1.0.0-SNAPSHOT 34d873088449 2 days ago 226MB eclipse/hono-adapter-kura latest 34d873088449 2 days ago 226MB eclipse/hono-adapter-http-vertx 1.0.0-SNAPSHOT e5d0ddb2b029 2 days ago 226MB eclipse/hono-adapter-http-vertx latest e5d0ddb2b029 2 days ago 226MB eclipse/hono-adapter-coap-vertx 1.0.0-SNAPSHOT aba6afc68023 2 days ago 227MB eclipse/hono-adapter-coap-vertx latest aba6afc68023 2 days ago 227MB eclipse/hono-adapter-amqp-vertx 1.0.0-SNAPSHOT 383dde9ac135 2 days ago 226MB eclipse/hono-adapter-amqp-vertx latest 383dde9ac135 2 days ago 226MB openjdk 11-jre-slim 2f7748c6f4c6 2 weeks ago 204MB
How can I run them? I tried to run one by one, always got errors.
Many thanks
@BobOntario glad it worked out for you. However, believe me, the easiest way to run Hono locally is to deploy to minikube using Helm as described in Hono's Deployment Guide.
You can, of course, run each of the containers manually using plain Docker (Swarm) and this, in fact, was our initial deployment target when we started Hono. However, with kubernetes becoming the de-facto standard for running workloads in the cloud, we decided that we want to focus on supporting kubernetes deployment in the best way possible.
That said, our Sandbox server still runs on plain Docker Swarm and you should be able to adapt the deployment script that we use for that purpose to your needs. You can find it under deploy/src/main/sandbox
. Good luck!
@sophokles73 Thanks for advise. I am using Helm now. After I install everything required for helm, tried to execute "helm install --dep-up --name hono --namespace hono eclipse-hono/", got some errors: Error: validation failed: [unable to recognize "": no matches for kind "PodSecurityPolicy" in version "extensions/v1beta1", unable to recognize "": no matches for kind "Deployment" in version "apps/v1beta2", unable to recognize "": no matches for kind "Deployment" in version "extensions/v1beta1", unable to recognize "": no matches for kind "Deployment" in version "apps/v1beta1", unable to recognize "": no matches for kind "StatefulSet" in version "apps/v1beta1"]
I was told that it may be my kubernetes is too new (1.16.0) so that "extensions/v1beta1" not supported in 1.16.0. it should be "apps/v1". Not sure which version of kubernetes you used to created Chart of hono? Do you have any ideas how I can move forward?
Thanks
You could switch to 1.15.4 for example? minikube delete && minikube start --kubernetes-version v1.15.4
@BobOntario Kubernetes 1.16 has indeed removed support for several deprecated APIs. Sadly, the Prometheus chart which we are using is affected by this as it still uses these old APIs. We have created #1534 for tracking the progress there ... In the meantime, you should be able to deploy to Kubernetes < 1.16 as suggested by @ctron Can we close this issue, based on that workaround?
when I followed https://www.eclipse.org/hono/docs/dev-guide/building_hono/ to build hono, I got errors at
mvn clean install -Ddocker.host=tcp://${host}:${port} -Pbuild-docker-image,metrics-prometheus
Do i need replace ${host}:${port} with real value? like 127.0.0.1:2375. how do i know the correct ip address and port for -Ddocker.host?
Thanks