From 9850dd1747432cf4d675fcc8c47933ab09a7dc46 Mon Sep 17 00:00:00 2001 From: zeus Date: Wed, 28 Oct 2020 18:11:43 +0200 Subject: [PATCH] iotclient --- docs/README.adoc | 119 ++++++++++++++++++++++++++++++++++++++++++++- start-iotclient.sh | 3 ++ stop-iotclient.sh | 4 ++ 3 files changed, 125 insertions(+), 1 deletion(-) create mode 100755 start-iotclient.sh create mode 100755 stop-iotclient.sh diff --git a/docs/README.adoc b/docs/README.adoc index d438960..8c07bad 100644 --- a/docs/README.adoc +++ b/docs/README.adoc @@ -51,7 +51,124 @@ image:./swarmlabn-1.png[alt="Swarm Gateway"] == 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 diff --git a/start-iotclient.sh b/start-iotclient.sh new file mode 100755 index 0000000..c5b5bfe --- /dev/null +++ b/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 diff --git a/stop-iotclient.sh b/stop-iotclient.sh new file mode 100755 index 0000000..3af1dcc --- /dev/null +++ b/stop-iotclient.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +docker stop iotclient +docker rm iotclient