blob: cde95399c3cf8ebcb14a9e6aece86b424ff111ca [file] [log] [blame]
<!DOCTYPE html>
<html lang="stable" class="js csstransforms3d">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Hugo 0.54.0" />
<meta name="description" content="A set of micro-services for connecting millions of devices.">
<meta name="author" content="The Eclipse Hono Project">
<link rel="apple-touch-icon" sizes="180x180" href="/hono/docs/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="48x48" href="/hono/docs/favicon/favicon-48x48.png">
<link rel="icon" type="image/png" sizes="32x32" href="/hono/docs/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/hono/docs/favicon/favicon-16x16.png">
<link rel="manifest" href="/hono/docs/favicon/site.webmanifest">
<link rel="mask-icon" href="/hono/docs/favicon/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="/hono/docs/favicon/favicon.ico">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="/hono/docs/favicon/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<title>Helm based Deployment :: Eclipse Hono&trade;</title>
<link href="/hono/docs/css/nucleus.css?1566264212" rel="stylesheet">
<link href="/hono/docs/css/fontawesome-all.min.css?1566264212" rel="stylesheet">
<link href="/hono/docs/css/hybrid.css?1566264212" rel="stylesheet">
<link href="/hono/docs/css/featherlight.min.css?1566264212" rel="stylesheet">
<link href="/hono/docs/css/perfect-scrollbar.min.css?1566264212" rel="stylesheet">
<link href="/hono/docs/css/auto-complete.css?1566264212" rel="stylesheet">
<link href="/hono/docs/css/theme.css?1566264212" rel="stylesheet">
<link href="/hono/docs/css/hugo-theme.css?1566264212" rel="stylesheet">
<link href="/hono/docs/css/theme-hono.css?1566264212" rel="stylesheet">
<script src="/hono/docs/js/jquery-2.x.min.js?1566264212"></script>
<style type="text/css">
:root #header + #content > #left > #rlblock_left{
display:none !important;
}
:not(pre) > code + span.copy-to-clipboard {
display: none;
}
</style>
<link rel="stylesheet" href="https://www.eclipse.org/eclipse.org-common/themes/solstice/public/stylesheets/vendor/cookieconsent/cookieconsent.min.css">
<link rel="stylesheet" href='/hono/docs/css/hono.css'>
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@EclipseHono">
<meta name="twitter:title" content="Helm based Deployment :: Eclipse Hono&amp;trade;">
<meta name="twitter:image" content="https://www.eclipse.org/hono/docs/images/twitter_image.png">
<meta name="twitter:description" content="A set of micro-services for connecting millions of devices.">
<meta property="og:title" content="Helm based Deployment :: Eclipse Hono&amp;trade;" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://www.eclipse.org/hono/docs/deployment/helm-based-deployment//" />
<meta property="og:image" content="https://www.eclipse.org/hono/docs/images/twitter_image.png" />
</head>
<body class="" data-url="/hono/docs/deployment/helm-based-deployment/">
<nav id="sidebar" class="">
<div id="header-wrapper">
<div id="header">
<a href="https://www.eclipse.org/hono">
<img src="/hono/docs/images/HONO-Logo_Bild-Wort_quer-w-310x120px.svg" alt="Hono logo" class="logo-img">
</a>
</div>
<div class="searchbox">
<label for="search-by"><i class="fas fa-search"></i></label>
<input data-search-input id="search-by" type="search" placeholder="Search...">
<span data-search-clear=""><i class="fas fa-times"></i></span>
</div>
<script type="text/javascript" src="/hono/docs/js/lunr.min.js?1566264212"></script>
<script type="text/javascript" src="/hono/docs/js/auto-complete.js?1566264212"></script>
<script type="text/javascript">
var baseurl = "https:\/\/www.eclipse.org\/hono\/docs\/";
</script>
<script type="text/javascript" src="/hono/docs/js/search.js?1566264212"></script>
</div>
<div class="highlightable">
<ul class="topics">
<li data-nav-id="/hono/docs/concepts/" title="Concepts" class="dd-item
">
<a href="/hono/docs/concepts/">
<i class="far fa-lightbulb"></i> Concepts
</a>
<ul>
<li data-nav-id="/hono/docs/concepts/device-identity/" title="Device Identity" class="dd-item ">
<a href="/hono/docs/concepts/device-identity/">
Device Identity
</a>
</li>
<li data-nav-id="/hono/docs/concepts/tenancy/" title="Multi-Tenancy" class="dd-item ">
<a href="/hono/docs/concepts/tenancy/">
Multi-Tenancy
</a>
</li>
<li data-nav-id="/hono/docs/concepts/device-notifications/" title="Device Notifications" class="dd-item ">
<a href="/hono/docs/concepts/device-notifications/">
Device Notifications
</a>
</li>
<li data-nav-id="/hono/docs/concepts/command-and-control/" title="Command &amp; Control" class="dd-item ">
<a href="/hono/docs/concepts/command-and-control/">
Command &amp; Control
</a>
</li>
<li data-nav-id="/hono/docs/concepts/resource-limits/" title="Resource limits" class="dd-item ">
<a href="/hono/docs/concepts/resource-limits/">
Resource limits
</a>
</li>
<li data-nav-id="/hono/docs/concepts/connection-events/" title="Connection Events" class="dd-item ">
<a href="/hono/docs/concepts/connection-events/">
Connection Events
</a>
</li>
</ul>
</li>
<li data-nav-id="/hono/docs/user-guide/" title="User Guide" class="dd-item
">
<a href="/hono/docs/user-guide/">
<i class="fas fa-book-reader"></i> User Guide
</a>
<ul>
<li data-nav-id="/hono/docs/user-guide/device-registry/" title="Device Registry" class="dd-item ">
<a href="/hono/docs/user-guide/device-registry/">
Device Registry
</a>
</li>
<li data-nav-id="/hono/docs/user-guide/http-adapter/" title="HTTP Adapter" class="dd-item ">
<a href="/hono/docs/user-guide/http-adapter/">
HTTP Adapter
</a>
</li>
<li data-nav-id="/hono/docs/user-guide/mqtt-adapter/" title="MQTT Adapter" class="dd-item ">
<a href="/hono/docs/user-guide/mqtt-adapter/">
MQTT Adapter
</a>
</li>
<li data-nav-id="/hono/docs/user-guide/amqp-adapter/" title="AMQP Adapter" class="dd-item ">
<a href="/hono/docs/user-guide/amqp-adapter/">
AMQP Adapter
</a>
</li>
<li data-nav-id="/hono/docs/user-guide/kura-adapter/" title="Kura Adapter" class="dd-item ">
<a href="/hono/docs/user-guide/kura-adapter/">
Kura Adapter
</a>
</li>
<li data-nav-id="/hono/docs/user-guide/sigfox-adapter/" title="Sigfox Adapter" class="dd-item ">
<a href="/hono/docs/user-guide/sigfox-adapter/">
Sigfox Adapter
</a>
</li>
<li data-nav-id="/hono/docs/user-guide/jmeter_load_tests/" title="Load Tests with JMeter" class="dd-item ">
<a href="/hono/docs/user-guide/jmeter_load_tests/">
Load Tests with JMeter
</a>
</li>
</ul>
</li>
<li data-nav-id="/hono/docs/admin-guide/" title="Admin Guide" class="dd-item
">
<a href="/hono/docs/admin-guide/">
<i class="fas fa-sliders-h"></i> Admin Guide
</a>
<ul>
<li data-nav-id="/hono/docs/admin-guide/common-config/" title="Common Configuration" class="dd-item ">
<a href="/hono/docs/admin-guide/common-config/">
Common Configuration
</a>
</li>
<li data-nav-id="/hono/docs/admin-guide/auth-server-config/" title="Auth Server Configuration" class="dd-item ">
<a href="/hono/docs/admin-guide/auth-server-config/">
Auth Server Configuration
</a>
</li>
<li data-nav-id="/hono/docs/admin-guide/device-registry-config/" title="Device Registry Configuration" class="dd-item ">
<a href="/hono/docs/admin-guide/device-registry-config/">
Device Registry Configuration
</a>
</li>
<li data-nav-id="/hono/docs/admin-guide/http-adapter-config/" title="HTTP Adapter Configuration" class="dd-item ">
<a href="/hono/docs/admin-guide/http-adapter-config/">
HTTP Adapter Configuration
</a>
</li>
<li data-nav-id="/hono/docs/admin-guide/amqp-adapter-config/" title="AMQP Adapter Configuration" class="dd-item ">
<a href="/hono/docs/admin-guide/amqp-adapter-config/">
AMQP Adapter Configuration
</a>
</li>
<li data-nav-id="/hono/docs/admin-guide/mqtt-adapter-config/" title="MQTT Adapter Configuration" class="dd-item ">
<a href="/hono/docs/admin-guide/mqtt-adapter-config/">
MQTT Adapter Configuration
</a>
</li>
<li data-nav-id="/hono/docs/admin-guide/kura-adapter-config/" title="Kura Adapter Configuration" class="dd-item ">
<a href="/hono/docs/admin-guide/kura-adapter-config/">
Kura Adapter Configuration
</a>
</li>
<li data-nav-id="/hono/docs/admin-guide/hono-client-configuration/" title="Hono Client Configuration" class="dd-item ">
<a href="/hono/docs/admin-guide/hono-client-configuration/">
Hono Client Configuration
</a>
</li>
<li data-nav-id="/hono/docs/admin-guide/amqp-network-config/" title="AMQP 1.0 Messaging Network Configuration" class="dd-item ">
<a href="/hono/docs/admin-guide/amqp-network-config/">
AMQP 1.0 Messaging Network Configuration
</a>
</li>
<li data-nav-id="/hono/docs/admin-guide/secure_communication/" title="Secure Communication" class="dd-item ">
<a href="/hono/docs/admin-guide/secure_communication/">
Secure Communication
</a>
</li>
<li data-nav-id="/hono/docs/admin-guide/monitoring-tracing-config/" title="Monitoring &amp; Tracing" class="dd-item ">
<a href="/hono/docs/admin-guide/monitoring-tracing-config/">
Monitoring &amp; Tracing
</a>
</li>
</ul>
</li>
<li data-nav-id="/hono/docs/dev-guide/" title="Developer Guide" class="dd-item
">
<a href="/hono/docs/dev-guide/">
<i class="fas fa-tools"></i> Developer Guide
</a>
<ul>
<li data-nav-id="/hono/docs/dev-guide/building_hono/" title="Building from Source" class="dd-item ">
<a href="/hono/docs/dev-guide/building_hono/">
Building from Source
</a>
</li>
<li data-nav-id="/hono/docs/dev-guide/java_client_consumer/" title="Consuming Messages from Java" class="dd-item ">
<a href="/hono/docs/dev-guide/java_client_consumer/">
Consuming Messages from Java
</a>
</li>
<li data-nav-id="/hono/docs/dev-guide/custom_http_adapter/" title="Implement a Custom Hono HTTP Protocol Adapter" class="dd-item ">
<a href="/hono/docs/dev-guide/custom_http_adapter/">
Implement a Custom Hono HTTP Protocol Adapter
</a>
</li>
</ul>
</li>
<li data-nav-id="/hono/docs/api/" title="API" class="dd-item
">
<a href="/hono/docs/api/">
&nbsp;<i class='fas fa-plug'></i>&nbsp;API
</a>
<ul>
<li data-nav-id="/hono/docs/api/telemetry-api/" title="Telemetry API Specification" class="dd-item ">
<a href="/hono/docs/api/telemetry-api/">
Telemetry API
</a>
</li>
<li data-nav-id="/hono/docs/api/event-api/" title="Event API Specification" class="dd-item ">
<a href="/hono/docs/api/event-api/">
Event API
</a>
</li>
<li data-nav-id="/hono/docs/api/command-and-control-api/" title="Command &amp; Control API Specification" class="dd-item ">
<a href="/hono/docs/api/command-and-control-api/">
Command &amp; Control API
</a>
</li>
<li data-nav-id="/hono/docs/api/tenant-api/" title="Tenant API Specification" class="dd-item ">
<a href="/hono/docs/api/tenant-api/">
Tenant API
</a>
</li>
<li data-nav-id="/hono/docs/api/device-connection-api/" title="Device Connection API Specification" class="dd-item ">
<a href="/hono/docs/api/device-connection-api/">
Device Connection API
</a>
</li>
<li data-nav-id="/hono/docs/api/device-registration-api/" title="Device Registration API Specification" class="dd-item ">
<a href="/hono/docs/api/device-registration-api/">
Device Registration API
</a>
</li>
<li data-nav-id="/hono/docs/api/credentials-api/" title="Credentials API Specification" class="dd-item ">
<a href="/hono/docs/api/credentials-api/">
Credentials API
</a>
</li>
<li data-nav-id="/hono/docs/api/authentication-api/" title="Authentication API Specification" class="dd-item ">
<a href="/hono/docs/api/authentication-api/">
Authentication API
</a>
</li>
<li data-nav-id="/hono/docs/api/metrics/" title="Metrics" class="dd-item ">
<a href="/hono/docs/api/metrics/">
Metrics
</a>
</li>
</ul>
</li>
<li data-nav-id="/hono/docs/deployment/" title="Deployment" class="dd-item
parent
">
<a href="/hono/docs/deployment/">
<i class="fas fa-shipping-fast"></i> Deployment
</a>
<ul>
<li data-nav-id="/hono/docs/deployment/helm-based-deployment/" title="Helm based Deployment" class="dd-item active">
<a href="/hono/docs/deployment/helm-based-deployment/">
Helm based Deployment
</a>
</li>
<li data-nav-id="/hono/docs/deployment/openshift/" title="OpenShift / OKD" class="dd-item ">
<a href="/hono/docs/deployment/openshift/">
OpenShift / OKD
</a>
</li>
<li data-nav-id="/hono/docs/deployment/create-kubernetes-cluster/" title="Setting up a Kubernetes Cluster" class="dd-item ">
<a href="/hono/docs/deployment/create-kubernetes-cluster/">
Setting up a Kubernetes Cluster
</a>
</li>
<li data-nav-id="/hono/docs/deployment/resource-limitation/" title="Limiting Resource Usage" class="dd-item ">
<a href="/hono/docs/deployment/resource-limitation/">
Limiting Resource Usage
</a>
</li>
</ul>
</li>
<li data-nav-id="/hono/docs/architecture/" title="Architecture" class="dd-item
">
<a href="/hono/docs/architecture/">
<i class="fas fa-landmark"></i> Architecture
</a>
<ul>
<li data-nav-id="/hono/docs/architecture/component-view/component-view/" title="Component View" class="dd-item ">
<a href="/hono/docs/architecture/component-view/component-view/">
Component View
</a>
</li>
<li data-nav-id="/hono/docs/architecture/auth/auth/" title="Authentication/Authorization" class="dd-item ">
<a href="/hono/docs/architecture/auth/auth/">
Authentication/Authorization
</a>
</li>
</ul>
</li>
</ul>
<section id="prefooter">
<hr/>
<ul>
<li>
<div id="select-box-wrapper">
<div id="select-box">
<a class="padding">
Version:&nbsp;
<div class="select-style">
<select id="select-language" onchange="location = this.value;">
<option id="stable" value="/hono/docs/deployment/helm-based-deployment/" selected>stable (1.0-M6)</option>
<option id="dev" value="/hono/docs/dev/deployment/helm-based-deployment/">dev</option>
</select>
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="255px" height="255px" viewBox="0 0 255 255" style="enable-background:new 0 0 255 255;" xml:space="preserve">
<g>
<g id="arrow-drop-down">
<polygon points="0,63.75 127.5,191.25 255,63.75 " />
</g>
</g>
</svg>
</div>
</a>
</div>
</div>
</li>
</ul>
</section>
<section id="footer">
<p>&copy; 2019 <a href="https://www.eclipse.org/hono">The Eclipse Hono Project</a></p>
<p>
Documentation built with
<a href="https://www.gohugo.io" target="_blank">Hugo</a>
using the
<a href="https://github.com/matcornic/hugo-theme-learn" target="_blank">Learn</a> theme.
</p>
<div class="eclipse-logo">
<a href="https://www.eclipse.org" target="_blank">
<img src="https://www.eclipse.org/hono/docs/images/eclipse_foundation_logo.svg"/>
</a>
</div>
</section>
</div>
</nav>
<section id="body">
<div id="overlay"></div>
<div class="padding highlightable">
<div>
<div id="top-bar">
<div id="top-github-link">
<a class="github-link" title='Edit this page' href="https://github.com/eclipse/hono/edit/master/site/documentation/content/deployment/helm-based-deployment.md" target="blank">
<i class="fas fa-code-branch"></i>
<span id="top-github-link-text">Edit this page</span>
</a>
</div>
<div id="breadcrumbs" itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb">
<span id="sidebar-toggle-span">
<a href="#" id="sidebar-toggle" data-sidebar-toggle="">
<i class="fas fa-bars"></i>
</a>
</span>
<span id="toc-menu"><i class="fas fa-list-alt"></i></span>
<span class="links">
<a href='/hono/docs/'>Documentation</a> > <a href='/hono/docs/deployment/'>Deployment</a> > Helm based Deployment
</span>
</div>
<div class="progress">
<div class="wrapper">
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#prerequisites">Prerequisites</a>
<ul>
<li>
<ul>
<li><a href="#kubernetes-cluster">Kubernetes Cluster</a></li>
<li><a href="#helm">Helm</a></li>
<li><a href="#kubectl">Kubectl</a></li>
<li><a href="#hono-helm-chart">Hono Helm Chart</a></li>
<li><a href="#hono-command-line-client">Hono Command Line Client</a></li>
</ul></li>
</ul></li>
<li><a href="#deploying-hono">Deploying Hono</a>
<ul>
<li><a href="#deploying-hono-using-kubectl">Deploying Hono using kubectl</a></li>
</ul></li>
<li><a href="#verifying-the-installation">Verifying the Installation</a></li>
<li><a href="#accessing-the-grafana-dashboard">Accessing the Grafana Dashboard</a></li>
<li><a href="#undeploying-hono">Undeploying Hono</a></li>
<li><a href="#deploying-custom-container-images">Deploying custom Container Images</a>
<ul>
<li><a href="#deploying-via-a-private-registry">Deploying via a private Registry</a></li>
<li><a href="#deploying-to-minikube">Deploying to Minikube</a></li>
</ul></li>
<li><a href="#deploying-jaeger">Deploying Jaeger</a></li>
</ul></li>
</ul>
</nav>
</div>
</div>
</div>
</div>
<div id="body-inner">
<h1>Helm based Deployment</h1>
<p>Eclipse Hono&trade;&rsquo;s components are provided as container images which can be run on arbitrary container orchestration platforms.
This page describes the steps necessary to deploy Hono to a <a href="https://kubernetes.io">Kubernetes</a> cluster using the <a href="https://helm.sh">Helm package manager</a>.</p>
<div class="alert alert-notice">
<h4 class="alert-heading"><i class="fas fa-info-circle"></i> Note</h4>
<div>The example configuration that comes with Hono and which is used in this guide is supposed to be used for evaluation and development purposes only.</div>
</div>
<h2 id="prerequisites">Prerequisites</h2>
<h4 id="kubernetes-cluster">Kubernetes Cluster</h4>
<p>The most basic requirement is, of course, a Kubernetes cluster to deploy to.
The <a href="/hono/docs/deployment/create-kubernetes-cluster/">Kubernetes setup guide</a> describes options available for setting up a cluster.</p>
<h4 id="helm">Helm</h4>
<p>Helm is a tool for managing (complex) Kubernetes applications. In this guide it is used to deploy Hono to the cluster.
<a href="https://docs.helm.sh/install/">Helm&rsquo;s installation instructions</a> provide more details.</p>
<h4 id="kubectl">Kubectl</h4>
<p>The kubectl tool is used to manage a Kubernetes cluster from the command line. In this guide it is used to retrieve information about Hono&rsquo;s service endpoints from the cluster.
The <a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/">installation guide</a> provides instructions for setting up <code>kubectl</code> locally.</p>
<h4 id="hono-helm-chart">Hono Helm Chart</h4>
<p>The Helm chart is contained in the Hono archive that is available from <a href="https://www.eclipse.org/hono/downloads/
">Hono&rsquo;s download page</a>.
After the archive has been extracted, the chart can be found in the <code>eclipse-hono-$VERSION/deploy/helm</code> folder.</p>
<h4 id="hono-command-line-client">Hono Command Line Client</h4>
<p>The Hono command line client is available from the <a href="https://www.eclipse.org/hono/downloads/
">download page</a>.
The command line client requires a Java 11 runtime environment to run.</p>
<h2 id="deploying-hono">Deploying Hono</h2>
<p>The recommended way of deploying Hono is by means of using Helm&rsquo;s <em>Tiller</em> service running on the Kubernetes cluster:</p>
<pre><code class="language-sh"># in directory: eclipse-hono-$VERSION/deploy/
helm install --dep-up --name eclipse-hono --namespace hono helm/
</code></pre>
<p>This will create namespace <code>hono</code> in the cluster and install all the components to that namespace. The name of the Helm release will be <code>eclipse-hono</code>.</p>
<p>The status of the deployment can be checked using any of the following commands:</p>
<pre><code class="language-sh">helm list
helm status eclipse-hono
helm get eclipse-hono
</code></pre>
<h3 id="deploying-hono-using-kubectl">Deploying Hono using kubectl</h3>
<p>In cases where installation of Helm&rsquo;s Tiller service into the cluster is not an option, the Kubernetes resource descriptors created by Helm can be deployed manually using the <code>kubectl</code> command line tool.</p>
<p>The following commands generate the resource descriptors:</p>
<pre><code class="language-sh"># in directory: eclipse-hono-$VERSION/deploy/
helm dep update helm/
helm template --name eclipse-hono --namespace hono --output-dir . helm/
</code></pre>
<p>This will create an <code>eclipse-hono</code> folder containing all the resource descriptors which can then be deployed to the cluster using <code>kubectl</code>:</p>
<pre><code class="language-sh"># in directory: eclipse-hono-$VERSION/deploy/
kubectl create namespace hono
kubectl config set-context $(kubectl config current-context) --namespace=hono
find . -path &quot;./eclipse-hono/*&quot; -name crd*.yaml -exec kubectl apply -f {} \;
kubectl apply -f ./eclipse-hono -R
</code></pre>
<h2 id="verifying-the-installation">Verifying the Installation</h2>
<p>Once deployment has completed, Hono&rsquo;s external API endpoints are exposed via corresponding Kubernetes <em>Services</em>.
The following command lists all services and their endpoints (replace <code>hono</code> with the namespace that you have deployed to):</p>
<pre><code class="language-sh">kubectl get service -n hono
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
eclipse-hono-grafana ClusterIP 10.98.116.21 &lt;none&gt; 3000/TCP
eclipse-hono-kube-state-metrics ClusterIP 10.111.143.45 &lt;none&gt; 8080/TCP
eclipse-hono-prometheus-node-exporter ClusterIP 10.99.123.105 &lt;none&gt; 9100/TCP
eclipse-hono-prometheus-op-operator ClusterIP 10.107.136.47 &lt;none&gt; 8080/TCP
hono-adapter-amqp-vertx LoadBalancer 10.97.243.98 10.97.243.98 5672:32672/TCP,5671:32671/TCP
hono-adapter-http-vertx LoadBalancer 10.104.162.33 10.104.162.33 8080:30080/TCP,8443:30443/TCP
hono-adapter-kura LoadBalancer 10.110.31.68 10.110.31.68 1883:31884/TCP,8883:30884/TCP
hono-adapter-mqtt-vertx LoadBalancer 10.103.97.233 10.103.97.233 1883:31883/TCP,8883:30883/TCP
hono-artemis ClusterIP 10.105.129.3 &lt;none&gt; 5671/TCP
hono-dispatch-router ClusterIP 10.107.34.77 &lt;none&gt; 5673/TCP
hono-dispatch-router-ext LoadBalancer 10.109.64.70 10.109.64.70 15671:30671/TCP,15672:30672/TCP
hono-service-auth ClusterIP 10.103.101.106 &lt;none&gt; 5671/TCP
hono-service-device-registry ClusterIP 10.107.138.95 &lt;none&gt; 5671/TCP
hono-service-device-registry-ext LoadBalancer 10.107.214.87 10.107.214.87 28080:31080/TCP,28443:31443/TCP
prometheus-operated ClusterIP None &lt;none&gt; 9090/TCP
</code></pre>
<p>The listing above has been retrieved from a Minikube cluster that emulates a load balancer via the <code>minikube tunnel</code> command (refer to the <a href="https://github.com/kubernetes/minikube/blob/master/docs/networking.md#loadbalancer-emulation-minikube-tunnel">Minikube Networking docs</a> for details).
The service endpoints can be accessed at the <em>EXTERNAL-IP</em> addresses and corresponding <em>PORT(S)</em>, e.g. 8080 for the HTTP adapter (<em>hono-adapter-http-vertx</em>) and 28080 for the device registry (<em>hono-service-device-registry</em>).</p>
<p>The following command assigns the IP address of the device registry service to the <code>REGISTRY_IP</code> environment variable so that they can easily be used from the command line:</p>
<pre><code class="language-sh">export REGISTRY_IP=$(kubectl get service hono-service-device-registry-ext --output='jsonpath={.status.loadBalancer.ingress[0].ip}' -n hono)
</code></pre>
<p>The following command can then be used to check for the existence of the <em>DEFAULT_TENANT</em> which is created as part of the installation:</p>
<pre><code class="language-sh">curl -sIX GET http://$REGISTRY_IP:28080/v1/tenants/DEFAULT_TENANT
HTTP/1.1 200 OK
etag: 89d40d26-5956-4cc6-b978-b15fda5d1823
content-type: application/json; charset=utf-8
content-length: 260
</code></pre>
<p><a name="dashboard"></a></p>
<h2 id="accessing-the-grafana-dashboard">Accessing the Grafana Dashboard</h2>
<p>Hono comes with an example Grafana dashboard which provides some insight into the messages flowing through the protocol adapters.
The following command needs to be run first in order to forward the Grafana service&rsquo;s endpoint to the local host:</p>
<pre><code class="language-sh">kubectl port-forward service/eclipse-hono-grafana 3000 -n hono
</code></pre>
<p>Then the dashboard can be opened by pointing a browser to <a href="http://localhost:3000">http://localhost:3000</a> using credentials <code>admin:admin</code>.</p>
<h2 id="undeploying-hono">Undeploying Hono</h2>
<p>A Hono instance that has been deployed using Helm&rsquo;s Tiller service can be undeployed by running</p>
<pre><code class="language-sh">helm delete --purge eclipse-hono
kubectl delete crd prometheuses.monitoring.coreos.com prometheusrules.monitoring.coreos.com servicemonitors.monitoring.coreos.com alertmanagers.monitoring.coreos.com
</code></pre>
<p>The additional <code>kubectl delete</code> command is necessary to remove <a href="https://github.com/helm/charts/tree/master/stable/prometheus-operator#uninstalling-the-chart">Prometheus operator CRDs</a>.</p>
<p>If the Jaeger tracing component has been deployed, additional resources have to be deleted manually:</p>
<pre><code class="language-sh">kubectl delete crd jaegers.jaegertracing.io
kubectl delete svc -n hono eclipse-hono-jaeger-operator
</code></pre>
<p>A Hono instance that has been deployed manually using the resource files can be undeployed by running</p>
<pre><code class="language-sh"># in directory: eclipse-hono-$VERSION/deploy/
kubectl delete -f ./eclipse-hono -R
</code></pre>
<h2 id="deploying-custom-container-images">Deploying custom Container Images</h2>
<p>The sections above describe how Hono&rsquo;s pre-built container images can be deployed using Helm. In some cases it might be desirable to build Hono from source, e.g. in order to use a different metrics back end or to <a href="#deploying-jaeger">enable Jaeger tracing</a>. In these cases, the Helm templates contained in the source tree can be used instead of the Helm chart from the download page.</p>
<p>The container images created as part of the build process need to be made available to the Kubernetes cluster that Hono should be deployed to. This usually requires the images to be pushed to a (private) container registry that the cluster has pull access to. Please refer to the documentation of the employed Kubernetes service provider for details regarding the setup and configuration of a private container registry.</p>
<h3 id="deploying-via-a-private-registry">Deploying via a private Registry</h3>
<p>The first step is getting the source code of Hono. Please refer to <a href="/hono/docs/dev-guide/building_hono/">Building from Source</a> for details.
Once the source code has been retrieved, the build process can be started using the following command:</p>
<pre><code class="language-sh"># in base directory of Hono working tree:
mvn clean install -Pbuild-docker-image,metrics-prometheus
</code></pre>
<p>After the build process has finished, the custom container images need to be pushed to the registry so that the Kubernetes cluster can pull them from there during deployment.
Assuming that the images should be tagged with <code>1.0-CUSTOM</code> and the container registry name is <code>my.registry.io</code>, the following command can be used to tag the locally built images and push them to the registry:</p>
<pre><code class="language-sh"># in base directory of Hono working tree:
./push_hono_images.sh 1.0-CUSTOM my.registry.io
</code></pre>
<div class="alert alert-notice">
<h4 class="alert-heading"><i class="fas fa-info-circle"></i> Note</h4>
<div>You may need to log in to the (private) container registry before pushing the images.</div>
</div>
<p>Once the images have been pushed, the deployment can be done using Helm:</p>
<pre><code class="language-sh"># in Hono working tree directory: hono/deploy
helm install --dep-up --name eclipse-hono --namespace hono --set honoContainerRegistry=my.registry.io target/deploy/helm/
</code></pre>
<h3 id="deploying-to-minikube">Deploying to Minikube</h3>
<p>When using Minikube as the deployment target, things are a little easier. Minikube comes with an embedded Docker daemon which can be used to build the container images instead of using a local Docker daemon, thus eliminating the need to push the images to a registry altogether.
In order to use Minikube&rsquo;s Docker daemon, the following command needs to be run:</p>
<pre><code class="language-sh">eval $(minikube docker-env)
</code></pre>
<p>This will set the Docker environment variables to point to Minikube&rsquo;s Docker daemon which can then be used for building the container images and storing them locally in the Minikube VM.</p>
<p>In any case the build process can be started using the following command:</p>
<pre><code class="language-sh"># in base directory of Hono working tree:
mvn clean install -Pbuild-docker-image,metrics-prometheus
</code></pre>
<p>The newly built images can then be deployed using Helm:</p>
<pre><code class="language-sh"># in Hono working tree directory: hono/deploy
helm install --dep-up --name eclipse-hono --namespace hono target/deploy/helm/
</code></pre>
<h2 id="deploying-jaeger">Deploying Jaeger</h2>
<p>In order to deploy the Jaeger tracing component along with Hono, first make sure that the Hono container images have been built with the Jaeger client included.
This is done by activating the <code>jaeger</code> Maven profile, see <a href="/hono/docs/admin-guide/monitoring-tracing-config/#configuring-usage-of-jaeger-tracing-included-in-docker-images">Monitoring &amp; Tracing</a>.
The deployment can then be done using the <code>jaeger.enabled=true</code> option when running Helm:</p>
<pre><code class="language-sh"># in Hono working tree directory: hono/deploy
helm install --dep-up --name eclipse-hono --set jaeger.enabled=true --namespace hono target/deploy/helm/
</code></pre>
<p>For more information on how to access the Jaeger UI, see the <a href="https://github.com/jaegertracing/jaeger-operator#accessing-the-ui">Jaeger Operator documentation</a>.</p>
<footer class=" footline" >
</footer>
</div>
</div>
<div id="navigation">
</div>
</section>
<div style="left: -1000px; overflow: scroll; position: absolute; top: -1000px; border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;">
<div style="border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"></div>
</div>
<script src="/hono/docs/js/clipboard.min.js?1566264212"></script>
<script src="/hono/docs/js/perfect-scrollbar.min.js?1566264212"></script>
<script src="/hono/docs/js/perfect-scrollbar.jquery.min.js?1566264212"></script>
<script src="/hono/docs/js/jquery.sticky.js?1566264212"></script>
<script src="/hono/docs/js/featherlight.min.js?1566264212"></script>
<script src="/hono/docs/js/html5shiv-printshiv.min.js?1566264212"></script>
<script src="/hono/docs/js/highlight.pack.js?1566264212"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script src="/hono/docs/js/modernizr.custom.71422.js?1566264212"></script>
<script src="/hono/docs/js/learn.js?1566264212"></script>
<script src="/hono/docs/js/hugo-learn.js?1566264212"></script>
<link href="/hono/docs/mermaid/mermaid.css?1566264212" type="text/css" rel="stylesheet" />
<script src="/hono/docs/mermaid/mermaid.js?1566264212"></script>
<script>
mermaid.initialize({ startOnLoad: true });
</script>
<script>
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-5WLCZXC');
</script>
<script src="https://www.eclipse.org/eclipse.org-common/themes/solstice/public/javascript/vendor/cookieconsent/default.min.js"></script>
</body>
</html>