blob: 72dc2e655070b819307eeea17b6e23b57b09fdb8 [file] [log] [blame]
<!DOCTYPE html>
<html lang="dev" 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; Vers.: dev</title>
<link href="/hono/docs/css/nucleus.css?1569029011" rel="stylesheet">
<link href="/hono/docs/css/fontawesome-all.min.css?1569029011" rel="stylesheet">
<link href="/hono/docs/css/hybrid.css?1569029011" rel="stylesheet">
<link href="/hono/docs/css/featherlight.min.css?1569029011" rel="stylesheet">
<link href="/hono/docs/css/perfect-scrollbar.min.css?1569029011" rel="stylesheet">
<link href="/hono/docs/css/auto-complete.css?1569029011" rel="stylesheet">
<link href="/hono/docs/css/theme.css?1569029011" rel="stylesheet">
<link href="/hono/docs/css/hugo-theme.css?1569029011" rel="stylesheet">
<link href="/hono/docs/css/theme-hono.css?1569029011" rel="stylesheet">
<script src="/hono/docs/js/jquery-2.x.min.js?1569029011"></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; Vers.: dev">
<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; Vers.: dev" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://www.eclipse.org/hono/docs/dev/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/dev/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?1569029011"></script>
<script type="text/javascript" src="/hono/docs/js/auto-complete.js?1569029011"></script>
<script type="text/javascript">
var baseurl = "https:\/\/www.eclipse.org\/hono\/docs\/\/dev";
</script>
<script type="text/javascript" src="/hono/docs/js/search.js?1569029011"></script>
</div>
<div class="highlightable">
<ul class="topics">
<li data-nav-id="/hono/docs/dev/concepts/" title="Concepts" class="dd-item
">
<a href="/hono/docs/dev/concepts/">
<i class="far fa-lightbulb"></i> Concepts
</a>
<ul>
<li data-nav-id="/hono/docs/dev/concepts/device-identity/" title="Device Identity" class="dd-item ">
<a href="/hono/docs/dev/concepts/device-identity/">
Device Identity
</a>
</li>
<li data-nav-id="/hono/docs/dev/concepts/tenancy/" title="Multi-Tenancy" class="dd-item ">
<a href="/hono/docs/dev/concepts/tenancy/">
Multi-Tenancy
</a>
</li>
<li data-nav-id="/hono/docs/dev/concepts/device-notifications/" title="Device Notifications" class="dd-item ">
<a href="/hono/docs/dev/concepts/device-notifications/">
Device Notifications
</a>
</li>
<li data-nav-id="/hono/docs/dev/concepts/command-and-control/" title="Command &amp; Control" class="dd-item ">
<a href="/hono/docs/dev/concepts/command-and-control/">
Command &amp; Control
</a>
</li>
<li data-nav-id="/hono/docs/dev/concepts/resource-limits/" title="Resource limits" class="dd-item ">
<a href="/hono/docs/dev/concepts/resource-limits/">
Resource limits
</a>
</li>
<li data-nav-id="/hono/docs/dev/concepts/connection-events/" title="Connection Events" class="dd-item ">
<a href="/hono/docs/dev/concepts/connection-events/">
Connection Events
</a>
</li>
</ul>
</li>
<li data-nav-id="/hono/docs/dev/user-guide/" title="User Guide" class="dd-item
">
<a href="/hono/docs/dev/user-guide/">
<i class="fas fa-book-reader"></i> User Guide
</a>
<ul>
<li data-nav-id="/hono/docs/dev/user-guide/device-registry/" title="Device Registry" class="dd-item ">
<a href="/hono/docs/dev/user-guide/device-registry/">
Device Registry
</a>
</li>
<li data-nav-id="/hono/docs/dev/user-guide/http-adapter/" title="HTTP Adapter" class="dd-item ">
<a href="/hono/docs/dev/user-guide/http-adapter/">
HTTP Adapter
</a>
</li>
<li data-nav-id="/hono/docs/dev/user-guide/mqtt-adapter/" title="MQTT Adapter" class="dd-item ">
<a href="/hono/docs/dev/user-guide/mqtt-adapter/">
MQTT Adapter
</a>
</li>
<li data-nav-id="/hono/docs/dev/user-guide/amqp-adapter/" title="AMQP Adapter" class="dd-item ">
<a href="/hono/docs/dev/user-guide/amqp-adapter/">
AMQP Adapter
</a>
</li>
<li data-nav-id="/hono/docs/dev/user-guide/kura-adapter/" title="Kura Adapter" class="dd-item ">
<a href="/hono/docs/dev/user-guide/kura-adapter/">
Kura Adapter
</a>
</li>
<li data-nav-id="/hono/docs/dev/user-guide/sigfox-adapter/" title="Sigfox Adapter" class="dd-item ">
<a href="/hono/docs/dev/user-guide/sigfox-adapter/">
Sigfox Adapter
</a>
</li>
<li data-nav-id="/hono/docs/dev/user-guide/jmeter_load_tests/" title="Load Tests with JMeter" class="dd-item ">
<a href="/hono/docs/dev/user-guide/jmeter_load_tests/">
Load Tests with JMeter
</a>
</li>
</ul>
</li>
<li data-nav-id="/hono/docs/dev/admin-guide/" title="Admin Guide" class="dd-item
">
<a href="/hono/docs/dev/admin-guide/">
<i class="fas fa-sliders-h"></i> Admin Guide
</a>
<ul>
<li data-nav-id="/hono/docs/dev/admin-guide/common-config/" title="Common Configuration" class="dd-item ">
<a href="/hono/docs/dev/admin-guide/common-config/">
Common Configuration
</a>
</li>
<li data-nav-id="/hono/docs/dev/admin-guide/auth-server-config/" title="Auth Server Configuration" class="dd-item ">
<a href="/hono/docs/dev/admin-guide/auth-server-config/">
Auth Server Configuration
</a>
</li>
<li data-nav-id="/hono/docs/dev/admin-guide/device-registry-config/" title="Device Registry Configuration" class="dd-item ">
<a href="/hono/docs/dev/admin-guide/device-registry-config/">
Device Registry Configuration
</a>
</li>
<li data-nav-id="/hono/docs/dev/admin-guide/device-connection-config/" title="Configuring the Device Connection Service" class="dd-item ">
<a href="/hono/docs/dev/admin-guide/device-connection-config/">
Device Connection Service Configuration
</a>
</li>
<li data-nav-id="/hono/docs/dev/admin-guide/http-adapter-config/" title="HTTP Adapter Configuration" class="dd-item ">
<a href="/hono/docs/dev/admin-guide/http-adapter-config/">
HTTP Adapter Configuration
</a>
</li>
<li data-nav-id="/hono/docs/dev/admin-guide/amqp-adapter-config/" title="AMQP Adapter Configuration" class="dd-item ">
<a href="/hono/docs/dev/admin-guide/amqp-adapter-config/">
AMQP Adapter Configuration
</a>
</li>
<li data-nav-id="/hono/docs/dev/admin-guide/mqtt-adapter-config/" title="MQTT Adapter Configuration" class="dd-item ">
<a href="/hono/docs/dev/admin-guide/mqtt-adapter-config/">
MQTT Adapter Configuration
</a>
</li>
<li data-nav-id="/hono/docs/dev/admin-guide/kura-adapter-config/" title="Kura Adapter Configuration" class="dd-item ">
<a href="/hono/docs/dev/admin-guide/kura-adapter-config/">
Kura Adapter Configuration
</a>
</li>
<li data-nav-id="/hono/docs/dev/admin-guide/hono-client-configuration/" title="Hono Client Configuration" class="dd-item ">
<a href="/hono/docs/dev/admin-guide/hono-client-configuration/">
Hono Client Configuration
</a>
</li>
<li data-nav-id="/hono/docs/dev/admin-guide/amqp-network-config/" title="AMQP 1.0 Messaging Network Configuration" class="dd-item ">
<a href="/hono/docs/dev/admin-guide/amqp-network-config/">
AMQP 1.0 Messaging Network Configuration
</a>
</li>
<li data-nav-id="/hono/docs/dev/admin-guide/secure_communication/" title="Secure Communication" class="dd-item ">
<a href="/hono/docs/dev/admin-guide/secure_communication/">
Secure Communication
</a>
</li>
<li data-nav-id="/hono/docs/dev/admin-guide/monitoring-tracing-config/" title="Monitoring &amp; Tracing" class="dd-item ">
<a href="/hono/docs/dev/admin-guide/monitoring-tracing-config/">
Monitoring &amp; Tracing
</a>
</li>
</ul>
</li>
<li data-nav-id="/hono/docs/dev/dev-guide/" title="Developer Guide" class="dd-item
">
<a href="/hono/docs/dev/dev-guide/">
<i class="fas fa-tools"></i> Developer Guide
</a>
<ul>
<li data-nav-id="/hono/docs/dev/dev-guide/building_hono/" title="Building from Source" class="dd-item ">
<a href="/hono/docs/dev/dev-guide/building_hono/">
Building from Source
</a>
</li>
<li data-nav-id="/hono/docs/dev/dev-guide/java_client_consumer/" title="Consuming Messages from Java" class="dd-item ">
<a href="/hono/docs/dev/dev-guide/java_client_consumer/">
Consuming Messages from Java
</a>
</li>
<li data-nav-id="/hono/docs/dev/dev-guide/custom_http_adapter/" title="Implement a Custom Hono HTTP Protocol Adapter" class="dd-item ">
<a href="/hono/docs/dev/dev-guide/custom_http_adapter/">
Implement a Custom Hono HTTP Protocol Adapter
</a>
</li>
</ul>
</li>
<li data-nav-id="/hono/docs/dev/api/" title="API" class="dd-item
">
<a href="/hono/docs/dev/api/">
&nbsp;<i class='fas fa-plug'></i>&nbsp;API
</a>
<ul>
<li data-nav-id="/hono/docs/dev/api/telemetry/" title="Telemetry API Specification" class="dd-item ">
<a href="/hono/docs/dev/api/telemetry/">
Telemetry API
</a>
</li>
<li data-nav-id="/hono/docs/dev/api/event/" title="Event API Specification" class="dd-item ">
<a href="/hono/docs/dev/api/event/">
Event API
</a>
</li>
<li data-nav-id="/hono/docs/dev/api/command-and-control/" title="Command &amp; Control API Specification" class="dd-item ">
<a href="/hono/docs/dev/api/command-and-control/">
Command &amp; Control API
</a>
</li>
<li data-nav-id="/hono/docs/dev/api/tenant/" title="Tenant API Specification" class="dd-item ">
<a href="/hono/docs/dev/api/tenant/">
Tenant API
</a>
</li>
<li data-nav-id="/hono/docs/dev/api/device-connection/" title="Device Connection API Specification" class="dd-item ">
<a href="/hono/docs/dev/api/device-connection/">
Device Connection API
</a>
</li>
<li data-nav-id="/hono/docs/dev/api/device-registration/" title="Device Registration API Specification" class="dd-item ">
<a href="/hono/docs/dev/api/device-registration/">
Device Registration API
</a>
</li>
<li data-nav-id="/hono/docs/dev/api/credentials/" title="Credentials API Specification" class="dd-item ">
<a href="/hono/docs/dev/api/credentials/">
Credentials API
</a>
</li>
<li data-nav-id="/hono/docs/dev/api/authentication/" title="Authentication API Specification" class="dd-item ">
<a href="/hono/docs/dev/api/authentication/">
Authentication API
</a>
</li>
<li data-nav-id="/hono/docs/dev/api/management/" title="Device Registry Management API Specification" class="dd-item ">
<a href="/hono/docs/dev/api/management/">
Device Registry Management API
</a>
</li>
<li data-nav-id="/hono/docs/dev/api/metrics/" title="Metrics" class="dd-item ">
<a href="/hono/docs/dev/api/metrics/">
Metrics
</a>
</li>
</ul>
</li>
<li data-nav-id="/hono/docs/dev/deployment/" title="Deployment" class="dd-item
parent
">
<a href="/hono/docs/dev/deployment/">
<i class="fas fa-shipping-fast"></i> Deployment
</a>
<ul>
<li data-nav-id="/hono/docs/dev/deployment/helm-based-deployment/" title="Helm based Deployment" class="dd-item active">
<a href="/hono/docs/dev/deployment/helm-based-deployment/">
Helm based Deployment
</a>
</li>
<li data-nav-id="/hono/docs/dev/deployment/openshift/" title="OpenShift / OKD" class="dd-item ">
<a href="/hono/docs/dev/deployment/openshift/">
OpenShift / OKD
</a>
</li>
<li data-nav-id="/hono/docs/dev/deployment/create-kubernetes-cluster/" title="Setting up a Kubernetes Cluster" class="dd-item ">
<a href="/hono/docs/dev/deployment/create-kubernetes-cluster/">
Setting up a Kubernetes Cluster
</a>
</li>
<li data-nav-id="/hono/docs/dev/deployment/resource-limitation/" title="Limiting Resource Usage" class="dd-item ">
<a href="/hono/docs/dev/deployment/resource-limitation/">
Limiting Resource Usage
</a>
</li>
</ul>
</li>
<li data-nav-id="/hono/docs/dev/architecture/" title="Architecture" class="dd-item
">
<a href="/hono/docs/dev/architecture/">
<i class="fas fa-landmark"></i> Architecture
</a>
<ul>
<li data-nav-id="/hono/docs/dev/architecture/component-view/" title="Component View" class="dd-item ">
<a href="/hono/docs/dev/architecture/component-view/">
Component View
</a>
</li>
<li data-nav-id="/hono/docs/dev/architecture/auth/" title="Authentication/Authorization" class="dd-item ">
<a href="/hono/docs/dev/architecture/auth/">
Authentication/Authorization
</a>
</li>
</ul>
</li>
</ul>
<section id="shortcuts">
<h3></h3>
<ul>
<li>
<a class="padding" href="https://www.eclipse.org/hono" title="Hono&#39;s Homepage"><i class='fas fa-home'></i> Hono Home</a>
</li>
<li>
<a class="padding" href="https://www.eclipse.org/hono/getting-started" title=""><i class='fas fa-plane-departure'></i> Getting Started</a>
</li>
</ul>
</section>
<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/">stable (1.0-M7)</option>
<option id="dev" value="/hono/docs/dev/deployment/helm-based-deployment/" selected>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="old-version-hint">
<p>This page refers to version <em>dev</em>.
You might want to use the <a href="https://www.eclipse.org/hono/docs/">current stable</a> version.
</p>
</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/dev/'>Documentation</a> > <a href='/hono/docs/dev/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="#using-the-device-connection-service">Using the Device Connection Service</a></li>
<li><a href="#deploying-optional-adapters">Deploying optional Adapters</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>
<li><a href="#using-jaeger-tracing">Using Jaeger Tracing</a></li>
</ul></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/dev/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/eclipse-hono</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
helm install --dep-up --name hono --namespace hono eclipse-hono/
</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>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 hono
helm get 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
mkdir resources
helm dep update eclipse-hono/
helm template --name hono --namespace hono --output-dir resources eclipse-hono/
</code></pre>
<p>This will create a <code>resources/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
kubectl create namespace hono
kubectl config set-context $(kubectl config current-context) --namespace=hono
kubectl apply -f ./resources -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)
hono-adapter-amqp-vertx LoadBalancer 10.109.123.153 10.109.123.153 5672:32672/TCP,5671:32671/TCP
hono-adapter-amqp-vertx-headless ClusterIP None &lt;none&gt; &lt;none&gt;
hono-adapter-http-vertx LoadBalancer 10.99.180.137 10.99.180.137 8080:30080/TCP,8443:30443/TCP
hono-adapter-http-vertx-headless ClusterIP None &lt;none&gt; &lt;none&gt;
hono-adapter-mqtt-vertx LoadBalancer 10.102.204.69 10.102.204.69 1883:31883/TCP,8883:30883/TCP
hono-adapter-mqtt-vertx-headless ClusterIP None &lt;none&gt; &lt;none&gt;
hono-artemis ClusterIP 10.97.31.154 &lt;none&gt; 5671/TCP
hono-dispatch-router ClusterIP 10.98.111.236 &lt;none&gt; 5673/TCP
hono-dispatch-router-ext LoadBalancer 10.109.220.100 10.109.220.100 15671:30671/TCP,15672:30672/TCP
hono-grafana ClusterIP 10.110.61.181 &lt;none&gt; 3000/TCP
hono-prometheus-server ClusterIP 10.96.70.135 &lt;none&gt; 9090/TCP
hono-service-auth ClusterIP 10.109.97.44 &lt;none&gt; 5671/TCP
hono-service-auth-headless ClusterIP None &lt;none&gt; &lt;none&gt;
hono-service-device-registry ClusterIP 10.105.190.233 &lt;none&gt; 5671/TCP
hono-service-device-registry-ext LoadBalancer 10.101.42.99 10.101.42.99 28080:31080/TCP,28443:31443/TCP
hono-service-device-registry-headless ClusterIP None &lt;none&gt; &lt;none&gt;
</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/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 hono
</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
kubectl delete -f ./resources -R
</code></pre>
<h2 id="using-the-device-connection-service">Using the Device Connection Service</h2>
<p>Hono&rsquo;s example Device Registry component contains a simple in-memory implementation of the <a href="/hono/docs/dev/api/device-connection/">Device Connection API</a>.
This example implementation is used by default when the example registry is deployed.</p>
<p>Hono also contains a production ready, data grid based implementation of the Device Connection API which can be deployed and used instead of
the example implementation. The component can be deployed by means of setting the <em>deviceConnectionService.enabled</em> property to <code>true</code> when
running Helm:</p>
<pre><code class="language-sh"># in directory: eclipse-hono-$VERSION
helm install --dep-up --name hono --namespace hono --set deviceConnectionService.enabled=true eclipse-hono/
</code></pre>
<p>This will deploy the Device Connection service and configure all protocol adapters to use it instead of the example Device Registry implementation.
However, the service requires a connection to a data grid in order to store the device connection data.
The Helm chart supports deployment of a simple data grid which can be used for experimenting by means of setting the
<em>dataGridDeployExample</em> property to <code>true</code> when running Helm:</p>
<pre><code class="language-sh"># in directory: eclipse-hono-$VERSION
helm install --dep-up --name hono --namespace hono --set deviceConnectionService.enabled=true --set dataGridDeployExample=true eclipse-hono/
</code></pre>
<p>This will deploy the data grid and configure the Device Connection service to use it for storing the connection data.</p>
<p>The Device Connection service can also be configured to connect to an already existing data grid. Please refer to the
<a href="/hono/docs/dev/admin-guide/device-connection-config/">admin guide</a> for details regarding the corresponding configuration properties.</p>
<h2 id="deploying-optional-adapters">Deploying optional Adapters</h2>
<p>The Helm chart supports deployment of additional protocol adapters which are still considered experimental or have been deprecated.
The following table provides an overview of the corresponding configuration properties that need to be set on deployment.</p>
<table>
<thead>
<tr>
<th align="left">Property</th>
<th align="left">Default</th>
<th align="left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left"><em>adapters.lora.enabled</em></td>
<td align="left"><code>false</code></td>
<td align="left">Indicates if the (experimental) LoRa WAN protocol adapter should be deployed.</td>
</tr>
<tr>
<td align="left"><em>adapters.kura.enabled</em></td>
<td align="left"><code>false</code></td>
<td align="left">Indicates if the deprecated Kura protocol adapter should be deployed.</td>
</tr>
</tbody>
</table>
<p>The following command will deploy the LoRa adapter along with Hono&rsquo;s standard adapters:</p>
<pre><code class="language-sh"># in directory: eclipse-hono-$VERSION
helm install --dep-up --name hono --namespace hono --set adapters.lora.enabled=true eclipse-hono/
</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="#using-jaeger-tracing">use 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/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 hono --namespace hono --set deviceRegistry.imageName=my.registry.io/eclipse/hono-service-device-registry:1.0-CUSTOM,authServer.imageName=my.registry.io/eclipse/hono-service-auth:1.0-CUSTOM,deviceConnectionService.imageName=my.registry.io/eclipse/hono-service-device-connection:1.0-CUSTOM,adapters.amqp.imageName=my.registry.io/eclipse/hono-adapter-amqp-vertx:1.0-CUSTOM,adapters.mqtt.imageName=my.registry.io/eclipse/hono-adapter-mqtt-vertx:1.0-CUSTOM,adapters.http.imageName=my.registry.io/eclipse/hono-adapter-http-vertx:1.0-CUSTOM target/deploy/helm/eclipse-hono/
</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 hono --namespace hono target/deploy/helm/eclipse-hono/
</code></pre>
<h3 id="using-jaeger-tracing">Using Jaeger Tracing</h3>
<p>Hono&rsquo;s components are instrumented using OpenTracing to allow tracking of the distributed processing of messages flowing through the system.
The Hono chart can be configured to report tracing information to the <a href="https://jaegertracing.io">Jaeger tracing system</a>. The <em>Spans</em> reported
by the components can then be viewed in a web browser.</p>
<p>In order for Hono&rsquo;s components to use the Jaeger client for reporting tracing information, the container images need to be built
with the <code>jaeger</code> Maven profile. Please refer to <a href="/hono/docs/dev/admin-guide/monitoring-tracing-config/#configuring-usage-of-jaeger-tracing-included-in-docker-images">Monitoring &amp; Tracing</a> for details.
The newly built images also need to be made available to the target Kubernetes cluster as described in the two previous sections.</p>
<p>The chart can be configured to deploy and use an example Jaeger back end by means of setting the <em>jaegerBackendDeployExample</em> property
to <code>true</code> when running Helm:</p>
<pre><code class="language-sh"># in Hono working tree directory: hono/deploy
helm install --dep-up --name hono --namespace hono --set jaegerBackendDeployExample=true target/deploy/helm/eclipse-hono/
</code></pre>
<p>This will create a Jaeger back end instance suitable for testing purposes and will configure all deployed Hono components to use the
Jaeger back end.</p>
<p>The following command can then be used to return the IP address with which the Jaeger UI can be accessed in a browser (ensure <code>minikube tunnel</code> is running when using minikube):</p>
<pre><code class="language-sh">kubectl get service hono-jaeger-query --output='jsonpath={.status.loadBalancer.ingress[0].ip}' -n hono
</code></pre>
<p>If no example Jaeger back end should be deployed but instead an existing Jaeger installation should be used,
the chart&rsquo;s <em>jaegerAgentConf</em> property can be set to environment variables which are passed in to
the Jaeger Agent that is deployed with each of Hono&rsquo;s components.</p>
<pre><code class="language-sh"># in Hono working tree directory: hono/deploy
helm install --dep-up --name hono --namespace hono --set jaegerAgentConf.REPORTER_TYPE=tchannel --set jaegerAgentConf.REPORTER_TCHANNEL_HOST_PORT=my-jaeger-collector:14267 target/deploy/helm/eclipse-hono/
</code></pre>
<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?1569029011"></script>
<script src="/hono/docs/js/perfect-scrollbar.min.js?1569029011"></script>
<script src="/hono/docs/js/perfect-scrollbar.jquery.min.js?1569029011"></script>
<script src="/hono/docs/js/jquery.sticky.js?1569029011"></script>
<script src="/hono/docs/js/featherlight.min.js?1569029011"></script>
<script src="/hono/docs/js/html5shiv-printshiv.min.js?1569029011"></script>
<script src="/hono/docs/js/highlight.pack.js?1569029011"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script src="/hono/docs/js/modernizr.custom.71422.js?1569029011"></script>
<script src="/hono/docs/js/learn.js?1569029011"></script>
<script src="/hono/docs/js/hugo-learn.js?1569029011"></script>
<link href="/hono/docs/mermaid/mermaid.css?1569029011" type="text/css" rel="stylesheet" />
<script src="/hono/docs/mermaid/mermaid.js?1569029011"></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>