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.

263 lines
7.0 KiB

5 years ago
= SwarmLab.io !
5 years ago
Apostolos rootApostolos@swarmlab.io
// Metadata:
:description: Εισαγωγή στο SwarmLab
:keywords: iot, swarm
:data-uri:
:toc: right
:toc-title: Πίνακας περιεχομένων
:toclevels: 4
:source-highlighter: highlight
:icons: font
:sectnums:
include::header.adoc[]
{empty} +
5 years ago
The followin HowTo shows how services are used in swarmlab.io!
5 years ago
== What is swarmlab.io?
4 years ago
A Lab management and orchestration tool that provides On Demand Lab Instances.
Lab Instances are services that run your project in a particular programming enviroment.
The swarmlab.io consists of a main **Git Service** and a **Web-based interactive Lab environment.**
5 years ago
=== Git service.
5 years ago
**git.swarmlab.io is a painless self-hosted Git service. **
5 years ago
5 years ago
It is similar to GitHub, Bitbucket, and GitLab.
5 years ago
https://git.swarmlab.io:3000 - uses **Gitea**.
5 years ago
4 years ago
=== Web-based interactive Lab environment
https://api-client.swarmlab.io:8088 - **api-client.swarmlab.io is a web-based interactive development environment for On Demand Lab Instances**
5 years ago
=== Purpose
5 years ago
The goal of this project is to provide the easiest, fastest, and most painless way of using a LAB and its services and technologies.
== Docs
=== http://docs.swarmlab.io/SwarmLab-HowTos/HowTo-register.adoc.html[HowTo-register]
=== http://docs.swarmlab.io/SwarmLab-HowTos/HowTo-gitea.adoc.html[HowTo-create Repo]
5 years ago
==== Repo Directory_Structure_4_Lab_Instance Service
5 years ago
5 years ago
Lab_Instance service first clone your Repo and then automatically loads certain files based on a known file
5 years ago
structure.
.Directory_Structure
[source,bash]
----
swarmlab/
4 years ago
├── Makefile
├── ..
└── ..
5 years ago
----
4 years ago
You need a file called a **Makefile** to tell make what to do.
The makefile tells make how to compile and link a program, it can also tell make how to run miscellaneous commands when explicitly asked (for example, to remove certain files as a clean-up operation)
5 years ago
4 years ago
**Makefile** is executed with the make command, e.g.
5 years ago
4 years ago
.make all
[source,bash]
----
if [ -d swarmlab ]; then
cd swarmlab
make all
fi
----
5 years ago
4 years ago
===== Makefile
5 years ago
4 years ago
Lab_Instance dependencies. **"Makefile"** allows you to automatically pull-in other dependencies when using a Lab_Instance service.
5 years ago
4 years ago
This file should contain a list of tasks and parameters to insert before the specified repos are executed on Lab_Instance and a list of tasks to be executed by the Lab_Instance service.
5 years ago
4 years ago
.example
5 years ago
[source,bash]
----
4 years ago
all: hello_world generate clean
hello_world:
@echo "Hello World"
5 years ago
4 years ago
generate:
@echo "Creating empty text files..."
touch file-{1..10}.txt
5 years ago
4 years ago
clean:
@echo "Cleaning up..."
rm *.txt
5 years ago
----
4 years ago
more info https://www.gnu.org/software/make/manual/html_node/index.html#toc-Overview-of-make[Gnu make]
5 years ago
4 years ago
[NOTE]
====
A simple example can be found https://git.swarmlab.io:3000/swarmlab/examples-mpi[here]
5 years ago
====
=== http://docs.swarmlab.io/SwarmLab-HowTos/HowTo-create-lab.adoc.html[HowTo-create_and_Run Lab_Instance]
5 years ago
5 years ago
4 years ago
== The Lab Instance Interface
=== Main Interface
5 years ago
4 years ago
.Main Interface
image::./main1.png[Main Interface]
5 years ago
=== Main Lab Intance Interface
.Lab Instance Interface
image::./main3.png[Lab Instance Interface]
The default menus are:
- **a)** Run your project in particular Lab
- **b)** Terminal provides full support for system shells (bash, tsch, etc.). You can run anything in your system shell, including languages such as php, perl, python etc. The terminal runs on the Lab Instance with sudo rights.
- **c)** Opens a collaborative text editor. The text editor includes syntax highlighting, key maps and basic theming. It can also be used as a terminal with **console output**. It includes a basic **chat** room enviroment.
- **d)** Link to invite users. The "Invite users" function is not available yet, you will have to e-mail it by your self! :-)
[NOTE]
====
**b, c, d** only appear after you click on a Lab Instance
====
5 years ago
4 years ago
=== Editor Interface
==== Open Editor
.Open Editor
image::./editor-open.png[Open Editor]
The default choisses are:
- **a)** Create a new file and chat session.
- **b)** Open text editor interface.
- **c)** Inivite users
- **d)** File tabs
[NOTE]
====
** Run code on Lab Instance** is only available on Lab Instance creator - When you click on "Open File" button not in URL
====
==== Basic Editor Interface
4 years ago
.Basic Editor Interface
image::./editor-1.png[Main Interface]
4 years ago
.Editor Interface
image::./editor-2.png[Editor Interface]
4 years ago
The default menus are:
- **a)** Run your code in particular Lab Instance. You can run anything, including languages such as php, perl, python etc. The code runs on the Lab Instance with sudo rights.
- **b)** The text editor includes syntax highlighting, key maps and basic theming. It can also be used as a terminal with **console output**.
- **c)** Lab Instance Console
- **d)** A basic **chat** room session.
[NOTE]
====
**a,** only available on Lab Instance creator
====
==== Language Menou
.Language Menou
image::./editor-lang.png[Language Menou]
==== Theme Menou
4 years ago
.Theme Menou
image::./editor-theme.png[Theme Menou]
4 years ago
==== Find Menou
4 years ago
.Find Menou
image::./editor-find.png[Find Menou]
4 years ago
==== Edit Menou
4 years ago
.Edit Menou
image::./editor-edit.png[Edit Menou]
4 years ago
==== Key-binding Menou
4 years ago
.Key-binding Menou
image::./editor-key.png[Key-binding Menou]
4 years ago
4 years ago
== http://docs.swarmlab.io/SwarmLab-HowTos/HowTo-novnc.adoc.html[HowTo-Use our Labs with noVNC]
5 years ago
== Terms
https://api-client.swarmlab.io:8088/#/terms[Terms of Service]
== Legal Disclaimer and Notices
.Legal Disclaimer and Notices
[source,bash]
----
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of Swarmlab.io nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----
**before you continue.**
[NOTE]
====
Using swarmlab.io confirms that you agree to both documents.
====
4 years ago
== Feature request
4 years ago
4 years ago
Have a new idea for us?
Please contact us.
apostolos swarmlab.io
5 years ago