You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

489 lines
15 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Data collector! :: Swarmlab faq</title>
<link rel="canonical" href="http://docs.swarmlab.io/SwarmLab-HowTos/swarmlab/docs/swarmlab_poc-datacollector/docs/index.html">
<meta name="generator" content="Antora 2.3.4">
<link rel="stylesheet" href="../../_/css/site.css">
<link rel="stylesheet" href="../../_/css/search.css">
<script>var uiRootPath = '../../_'</script>
</head>
<body class="article">
<header class="header">
<nav class="navbar">
<div class="navbar-brand">
<a class="navbar-item" href="http://docs.swarmlab.io/SwarmLab-HowTos/swarmlab/docs">Swarmlab faq</a>
<button class="navbar-burger" data-target="topbar-nav">
<span></span>
<span></span>
<span></span>
</button>
</div>
<div id="topbar-nav" class="navbar-menu">
<div class="navbar-end">
<a class="navbar-item" href="#">Home</a>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link" href="#">Products</a>
<div class="navbar-dropdown">
<a class="navbar-item" target ="hybridgit" href="https://git.swarmlab.io:3000/zeus/swarmlab-hybrid">Hybrid</a>
<a class="navbar-item" target ="venusgit" href="https://git.swarmlab.io:3000/swarmlab/venus-client">Venus</a>
</div>
</div>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link" href="#">Services</a>
<div class="navbar-dropdown">
<a class="navbar-item" target ="hybrid" href="https://api-client.swarmlab.io:8088/">Hybrid</a>
<a class="navbar-item" target ="venus" href="https://api-client.swarmlab.io:8088/">Venus</a>
</div>
</div>
<div class="navbar-item">
<input id="search-input" type="text" placeholder="Search docs">
</div>
</div>
</div>
</nav>
</header>
<div class="body">
<div class="nav-container" data-component="swarmlab_poc-datacollector" data-version="docs">
<aside class="nav">
<div class="panels">
<div class="nav-panel-menu is-active" data-panel="menu">
<nav class="nav-menu">
<h3 class="title"><a href="index.html">swarmlab_poc-datacollector</a></h3>
<ul class="nav-list">
<li class="nav-item" data-depth="0">
<ul class="nav-list">
<li class="nav-item is-current-page" data-depth="1">
<a class="nav-link" href="index.html">datacollector</a>
</li>
<li class="nav-item" data-depth="1">
<button class="nav-item-toggle"></button>
<a class="nav-link" href="index-structure.html">project structure</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="index-vuejs.html">Vue.JS</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="index-nodejs.html">Node JS</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="index-mongo.html">Mongo</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="index-redis.html">Redis</a>
</li>
</ul>
</li>
<li class="nav-item" data-depth="1">
<button class="nav-item-toggle"></button>
<a class="nav-link" href="index-src.html">src-files</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="doc-dummy_service.html">dummy_service</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="doc-readmongo_service.html">readmongo_service</a>
</li>
</ul>
</li>
<li class="nav-item" data-depth="1">
<button class="nav-item-toggle"></button>
<a class="nav-link" href="index-usage.html">Usage</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="index-dummy_service.html">dummy_service</a>
</li>
</ul>
</li>
<li class="nav-item" data-depth="1">
<a class="nav-link" href="index-microservice.html">Add Microservice</a>
</li>
</ul>
</li>
</ul>
</nav>
</div>
<div class="nav-panel-explore" data-panel="explore">
<div class="context">
<span class="title">swarmlab_poc-datacollector</span>
<span class="version">docs</span>
</div>
<ul class="components">
<li class="component">
<a class="title" href="../../CloudComputing_Lab/docs/index.html">CloudComputing_Lab</a>
<ul class="versions">
<li class="version is-latest">
<a href="../../CloudComputing_Lab/docs/index.html">docs</a>
</li>
</ul>
</li>
<li class="component">
<a class="title" href="../../swarmlab_faq/docs/index.html">swarmlab_faq</a>
<ul class="versions">
<li class="version is-latest">
<a href="../../swarmlab_faq/docs/index.html">docs</a>
</li>
</ul>
</li>
<li class="component">
<a class="title" href="../../swarmlab_how-to-build-a-Swarmlab-service/docs/index.html">swarmlab_how-to-build-a-Swarmlab-service</a>
<ul class="versions">
<li class="version is-latest">
<a href="../../swarmlab_how-to-build-a-Swarmlab-service/docs/index.html">docs</a>
</li>
</ul>
</li>
<li class="component">
<a class="title" href="../../swarmlab_infrastructure-as-code/docs/index.html">swarmlab_infrastructure-as-code</a>
<ul class="versions">
<li class="version is-latest">
<a href="../../swarmlab_infrastructure-as-code/docs/index.html">docs</a>
</li>
</ul>
</li>
<li class="component">
<a class="title" href="../../swarmlab_iot-sensor-node/docs/index.html">swarmlab_iot-sensor-node</a>
<ul class="versions">
<li class="version is-latest">
<a href="../../swarmlab_iot-sensor-node/docs/index.html">docs</a>
</li>
</ul>
</li>
<li class="component">
<a class="title" href="../../swarmlab_network-adhoc/docs/index.html">swarmlab_network-adhoc</a>
<ul class="versions">
<li class="version is-latest">
<a href="../../swarmlab_network-adhoc/docs/index.html">docs</a>
</li>
</ul>
</li>
<li class="component is-current">
<a class="title" href="index.html">swarmlab_poc-datacollector</a>
<ul class="versions">
<li class="version is-current is-latest">
<a href="index.html">docs</a>
</li>
</ul>
</li>
<li class="component">
<a class="title" href="../../swarmlab_raspi-docker/docs/index.html">swarmlab_raspi-docker</a>
<ul class="versions">
<li class="version is-latest">
<a href="../../swarmlab_raspi-docker/docs/index.html">docs</a>
</li>
</ul>
</li>
<li class="component">
<a class="title" href="../../swarmlab_sec-intro/docs/index.html">swarmlab_sec-intro</a>
<ul class="versions">
<li class="version is-latest">
<a href="../../swarmlab_sec-intro/docs/index.html">docs</a>
</li>
</ul>
</li>
<li class="component">
<a class="title" href="../../swarmlab_sec-iptables/docs/index.html">swarmlab_sec-iptables</a>
<ul class="versions">
<li class="version is-latest">
<a href="../../swarmlab_sec-iptables/docs/index.html">docs</a>
</li>
</ul>
</li>
<li class="component">
<a class="title" href="../../swarmlab_sec-ssh-tunneling/docs/index.html">swarmlab_sec-ssh-tunneling</a>
<ul class="versions">
<li class="version is-latest">
<a href="../../swarmlab_sec-ssh-tunneling/docs/index.html">docs</a>
</li>
</ul>
</li>
<li class="component">
<a class="title" href="../../swarmlab_sidecar-firefox/docs/index.html">swarmlab_sidecar-firefox</a>
<ul class="versions">
<li class="version is-latest">
<a href="../../swarmlab_sidecar-firefox/docs/index.html">docs</a>
</li>
</ul>
</li>
<li class="component">
<a class="title" href="../../swarmlab_tech-list/docs/index.html">swarmlab_tech-list</a>
<ul class="versions">
<li class="version is-latest">
<a href="../../swarmlab_tech-list/docs/index.html">docs</a>
</li>
</ul>
</li>
<li class="component">
<a class="title" href="../../swarmlab_xelatex-thesis/docs/index.html">swarmlab_xelatex-thesis</a>
<ul class="versions">
<li class="version is-latest">
<a href="../../swarmlab_xelatex-thesis/docs/index.html">docs</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</aside>
</div>
<main class="article">
<div class="toolbar" role="navigation">
<button class="nav-toggle"></button>
<a href="../../swarmlab_faq/docs/index.html" class="home-link"></a>
<nav class="breadcrumbs" aria-label="breadcrumbs">
<ul>
<li><a href="index.html">swarmlab_poc-datacollector</a></li>
<li><a href="index.html">datacollector</a></li>
</ul>
</nav>
</div>
<div class="content">
<aside class="toc sidebar" data-title="Contents" data-levels="2">
<div class="toc-menu"></div>
</aside>
<article class="doc">
<h1 class="page">Data collector!</h1>
<div id="preamble">
<div class="sectionbody">
<div class="imageblock right">
<div class="content">
<img src="_images/swarmlab.png" alt="swarmlab" width="150">
</div>
</div>
<div class="paragraph">
<p>The "data collector" is a lightweight microservice application that collect and sends metadata, collected from a system, such as an IoT network, distributed system, data center, etc to a storage system.</p>
</div>
<div class="ulist">
<ul>
<li>
<p>The data are transmitted, stored, and can be retrieved at any time.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p><strong>"data collector"</strong> are developed with a platform agnostic"container-based application strategy</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
<div class="paragraph">
<p>A platform-agnostic approach offers many choices</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Can be seamlessly moved from local development machine to production deployments</p>
</li>
<li>
<p>Flexibility, Reliability</p>
<div class="ulist">
<ul>
<li>
<p>Avoiding Vendor Lock-In</p>
</li>
</ul>
</div>
</li>
<li>
<p>From Code to full-blown systems</p>
<div class="ulist">
<ul>
<li>
<p>from a single container on your local machine</p>
</li>
<li>
<p>to a running cloud native - container-based environment</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_start"><a class="anchor" href="#_start"></a>Start</h2>
<div class="sectionbody">
<div class="paragraph">
<p>You can start it in the same way as you start any other application.</p>
</div>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<i class="fa icon-tip" title="Tip"></i>
</td>
<td class="content">
You can find more information <a href="http://docs.swarmlab.io/SwarmLab-HowTos/swarmlab/docs/swarmlab/docs/hybrid/start-microservices.html" target="_blank" rel="noopener">here</a>
</td>
</tr>
</table>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
You may have to <strong>wait</strong> (couple of minutes) for the system to fully provision resources. You may have to <strong>refresh</strong> the web interface a couple of times!
</td>
</tr>
</table>
</div>
<div class="sect2">
<h3 id="_on_error"><a class="anchor" href="#_on_error"></a>on Error:</h3>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
<div class="paragraph">
<p><strong>on Error:</strong></p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)</code></pre>
</div>
</div>
<div class="paragraph">
<p>Run:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">export DOCKER_CLIENT_TIMEOUT=120
export COMPOSE_HTTP_TIMEOUT=120</code></pre>
</div>
</div>
<div class="paragraph">
<p><strong>onError:</strong></p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network</code></pre>
</div>
</div>
<div class="paragraph">
<p><strong>Do you have a VPN connected?</strong></p>
</div>
<div class="ulist">
<ul>
<li>
<p>Turn off VPN</p>
</li>
<li>
<p>Start POC</p>
</li>
<li>
<p>After that, you can enable VPN again</p>
</li>
</ul>
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_open_web_interface"><a class="anchor" href="#_open_web_interface"></a>Open web interface</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Find "webclient" Instance from menou:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><strong>Instances</strong> - &gt; click <strong>more</strong></p>
</li>
<li>
<p><strong>connect</strong> &#8594; "Click here to open the Web_App"</p>
</li>
</ul>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_open_console"><a class="anchor" href="#_open_console"></a>Open console</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Find "webclient" Instance and <strong>run</strong></p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-c hljs" data-lang="c">docker exec ... Command</code></pre>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_source_directory"><a class="anchor" href="#_source_directory"></a>Source directory</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The directory that contains the source is in "Directory Maps &#8594; Local" column.</p>
</div>
<div class="imageblock right">
<div class="content">
<img src="_images/swarmlab-connect.png" alt="swarmlab connect">
</div>
</div>
<div class="ulist">
<ul>
<li>
<p>(1) Opens the info menu</p>
</li>
<li>
<p>(2) Run a shell in a running container</p>
</li>
<li>
<p>(3) Opens web interface</p>
</li>
<li>
<p>(4),(5) Source directory - Directory Maps</p>
</li>
</ul>
</div>
<div class="paragraph">
<p><strong>"Directory Maps"</strong> are the preferred mechanism for persisting data generated and used by Docker containers. We use here "bind mounts" and they are dependent on the directory structure and OS of the host machine.</p>
</div>
<div class="admonitionblock warning">
<table>
<tr>
<td class="icon">
<i class="fa icon-warning" title="Warning"></i>
</td>
<td class="content">
Your local changes to the files will be overwritten by clicking the "Download" button. You should always <strong>take a full backup</strong> first (simple copy the directory tree)
</td>
</tr>
</table>
</div>
</div>
</div>
</article>
</div>
</main>
</div>
<footer class="footer">
<p>This page was built using the Antora <a href="https://gitlab.com/antora/antora-ui-default" target="antora">default UI</a> </p>
</footer>
<script src="../../_/js/site.js"></script>
<script src="../../_/js/vendor/lunr.js"></script>
<script src="../../_/js/vendor/search.js" id="search-script" data-base-path="../.." data-page-path="/swarmlab_poc-datacollector/docs/index.html"></script>
<script async src="../../_/../search-index.js"></script>
<script async src="../../_/js/vendor/highlight.js"></script>
</body>
</html>