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.
 
 

362 lines
12 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Source and config files :: Swarmlab faq</title>
<link rel="canonical" href="http://docs.swarmlab.io/SwarmLab-HowTos/swarmlab/docs/swarmlab_poc-datacollector/docs/index-src.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" 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 is-current-page" 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-src.html">src-files</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">Source and config files</h1>
<div id="preamble">
<div class="sectionbody">
<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="imageblock right">
<div class="content">
<img src="_images/types-of-mounts-bind.png" alt="types of mounts bind" width="250">
</div>
</div>
<div class="paragraph">
<p><strong>"Directory Maps"</strong> are the preferred mechanism for persisting data generated by 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 click on "Download" button. You should always <strong>take a full backup</strong> first (simple copy the directory tree)
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_webclient"><a class="anchor" href="#_webclient"></a>webclient</h2>
<div class="sectionbody">
<div class="paragraph">
<p><strong>Source code:</strong> playground-client/src</p>
</div>
<div class="paragraph">
<p><strong>environment variables</strong>: playground-client/.env</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_dummy_service"><a class="anchor" href="#_dummy_service"></a>dummy_service</h2>
<div class="sectionbody">
<div class="paragraph">
<p><strong>Source code:</strong> dummyservice/swarmlab-app/src/run</p>
</div>
<div class="paragraph">
<p><strong>config file</strong>: WriteToMongo/fluent/fluent.conf</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Unified data collector layer</p>
</li>
</ul>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_readmongo_service"><a class="anchor" href="#_readmongo_service"></a>readmongo_service</h2>
<div class="sectionbody">
<div class="paragraph">
<p><strong>Source code:</strong> readmongo/swarmlab-app/src/run</p>
</div>
<div class="paragraph">
<p><strong>environment variables</strong>: readmongo/swarmlab-app/src/.env</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_redisserver"><a class="anchor" href="#_redisserver"></a>redisserver</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Redis is <strong>automatically started</strong> for you. We use nodeJS to interact with Redis. Setup config etc, on the fly from dummy_service and readmongo_service services.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_mongo"><a class="anchor" href="#_mongo"></a>mongo</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Mongo is <strong>automatically started</strong> for you. We use nodeJS to interact with Mongo. Setup config etc, on the fly from dummy_service and readmongo_service services.</p>
</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-src.html"></script>
<script async src="../../_/../search-index.js"></script>
<script async src="../../_/js/vendor/highlight.js"></script>
</body>
</html>