Browse Source

iotclient

master
zeus 4 years ago
parent
commit
9850dd1747
  1. 119
      docs/README.adoc
  2. 3
      start-iotclient.sh
  3. 4
      stop-iotclient.sh

119
docs/README.adoc

@ -51,7 +51,124 @@ image:./swarmlabn-1.png[alt="Swarm Gateway"]
== Prepare installation == Prepare installation
=== Install Docker
=== http://docs.swarmlab.io/SwarmLab-HowTos/labs/Howtos/docker/install.adoc.html[Install docker^]
[TIP]
====
*Docker* is a set of platform as a service (PaaS) products that use OS-level virtualization to deliver software in packages called containers.
Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels
====
=== Clone IoT swarm implementation example
[source.bash]
----
git clone https://git.swarmlab.io:3000/zeus/iot-swarm-example.git
cd iot-swarm-example
----
==== Webclient tree
.base dir Webclient
[source,bash]
----
src/browser-client/src/
├── App.vue // <1>
├── assets
│   ├── css
│   │   └── themify-icons.css
│   ├── fonts
│   │   ├── glyphicons-halflings-regular.448c34a.woff2
│   │   ├── glyphicons-halflings-regular.e18bbf6.ttf
│   │   ├── glyphicons-halflings-regular.f4769f9.eot
│   │   ├── glyphicons-halflings-regular.fa27723.woff
│   │   ├── themify.eot
│   │   ├── themify.svg
│   │   ├── themify.ttf
│   │   └── themify.woff
│   └── logo.png
├── components // <4>
│   ├── doclive
│   │   ├── AdhocView.vue
│   │   └── runLlo.vue
│   └── DocLive.vue
├── main.js // <2>
└── store
├── index.js
└── modules
└── create_pipelineLLO.js // <3>
----
<1> load App
<2> App config
<3> Vuex and Rest calls
<4> Components
==== IoT server tree
.base dir IoT server
[source,bash]
----
src/IoT/llo/
├── bclient.js
├── client.js
├── iotclient.js // <2>
└── iotserver.js // <1>
----
<1> IoT server
<2> IoT client
=== Control services
==== start IoT server
[source.bash]
----
cd iot-swarm-example
./start-iotserver.sh
----
==== stop IoT server
[source.bash]
----
cd iot-swarm-example
./stop-iotserver.sh
----
==== start IoT webclient
[source.bash]
----
cd iot-swarm-example
./start-iotwebclient.sh
----
==== stop IoT webclient
[source.bash]
----
cd iot-swarm-example
./stop-iotwebclient.sh
----
==== Use webclient
open in Browser: http://localhost:8080
and
open Web Developer with ctrl+shift+K
type text in _"Get iot Data"_ and klick on it
See in
- *Console* in browser
- and in Linux *Terminal*
== Technologies == Technologies

3
start-iotclient.sh

@ -0,0 +1,3 @@
#!/bin/bash
docker run --rm -it --name iotclient -p 3081:3081 -v $PWD/src:/home/node/iot-swarm-example/src hub.swarmlab.io:5443/iot-swarm-example:latest node /home/node/iot-swarm-example/src/IoT/llo/iotclient.js

4
stop-iotclient.sh

@ -0,0 +1,4 @@
#!/bin/bash
docker stop iotclient
docker rm iotclient
Loading…
Cancel
Save