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.

233 lines
6.2 KiB

4 years ago
3 years ago
<img align="right" width="300" height="300" src="https://git.swarmlab.io:3000/zeus/swarmlab-hybrid/raw/branch/master/docs/images/swarmlab.png">
4 years ago
4 years ago
# Swarmlab Hybrid
4 years ago
4 years ago
4 years ago
#### **Welcome to Swarmlab.io**
4 years ago
4 years ago
##### **On demand Labrooms**
##### **Ready-to-Use Virtual Labs one click away.**
4 years ago
4 years ago
4 years ago
### Table of contents
4 years ago
1. [Features](#introduction)
4 years ago
2. [System requirements ](#systemrequirements)
4 years ago
3. [Prerequisites](#prerequisites)
4 years ago
4. [Installation](#installation)
4 years ago
5. [More info](#moreinfo)
4 years ago
4 years ago
4 years ago
### <a name="introduction"></a>
3 years ago
**An open source work/study-from-home application.**
3 years ago
Swarmlab provides you with all the required tools, tools to teach work or try out demos in a completely virtual environment.
Swarmlab is a collection of services that aims to:
3 years ago
- provide **teachers** and professors with online remote tools to do their lessons
3 years ago
3 years ago
- give **students** the opportunity to study real life examples in their chosen area of expertise
3 years ago
3 years ago
- allow **developers** to fully test and debug their applications and provide POC’s
3 years ago
Swarmlab, up and running since 2020, is already used for teaching purposes in a university and has proven itself as a powerful tool in the post covid remote-based situation.
Source code is available at https://git.swarmlab.io:3000 under the AGPL licence.
### Ready to run out-of-the-box
As of now the services provided by swarmlab are:
4 years ago
3 years ago
- Labrooms(virtual classrooms in the form of model applications to be tweaked at will)
4 years ago
3 years ago
- linux → base linux system – designed for use as a base to further develop your app
4 years ago
3 years ago
- MPI → Instances of Ubuntu Linux with MPICH — portable implementation of Message Passing Interface (MPI) standard. Designed for MPI program development and deployment.
4 years ago
3 years ago
- Node.js
4 years ago
3 years ago
- sec → a basic linux-based os with security tools – designed as a template for apps
4 years ago
3 years ago
- Storage to automatically create a cluster of databases.
4 years ago
3 years ago
- Proof Of Concept (POC) options
4 years ago
3 years ago
- datacollector → using provided services a fully developed application may collect data from a swarm and use it for further analysis
4 years ago
3 years ago
- Microservices
4 years ago
3 years ago
- Jupyter
- numpy
- scipy
- nodejs
- nginx
- haproxy
- gns3
- wireshark
- snmpsim
- xelatexthesis
- ansible
- etherpad
- codeserver (vscode)
- redisserver
- mongoserver
- mongoclient (GUI)
4 years ago
3 years ago
to be continued…
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
## System requirements<a name="systemrequirements"></a>
4 years ago
**Before** you create and configure a hybrid deployment using the swarmlab-agent client, your Local Machines need to meet certain requirements.
> If you don't meet those requirements, you won't be able to complete the steps within the swarmlab-agent client and you won't be able to configure a hybrid deployment between your Local Enviroment and Swarmlab Online Enviroment.
4 years ago
- A Linux Server (Virtual or Physical)
4 years ago
- You must have super user privileges (root/sudo)
4 years ago
- Docker Engine- Community version 18 or later is required.
- Docker Engine is supported on x86_64 (or amd64), armhf, and arm64 architectures.
- RAM
- Absolute minimum to run the daemon and some very light containers - 512MB
- Minimum for “comfortable” usage – 2GB
4 years ago
- CPU
4 years ago
- Minimum: 2
- Recommended 4+
4 years ago
- Disk Space
4 years ago
- 10 GB for internal requirements.
4 years ago
- The amount of additional disk space soloemnly depends on you intended use.
4 years ago
4 years ago
:warning: Since Docker uses hypervisor the host NEEDS TO HAVE VIRTUALIZATION ENABLED!
4 years ago
4 years ago
4 years ago
4 years ago
## Prerequisites<a name="prerequisites"></a>
4 years ago
4 years ago
* node version >15
4 years ago
4 years ago
```sh
curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -
sudo apt-get install -y nodejs
```
* docker
4 years ago
4 years ago
```sh
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install -y docker-ce
4 years ago
sudo usermod -aG docker [USERNAME] # Please replace [USERNAME] with the user you want to run docker on
4 years ago
```
4 years ago
4 years ago
:information_source: for kali specifically please visit the following link to install docker.
4 years ago
https://linuxhint.com/install_docker_kali_linux/
4 years ago
* docker-compose
4 years ago
4 years ago
```sh
sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
```
* pm2
4 years ago
4 years ago
```sh
sudo npm install -g pm2
```
* wireguard
4 years ago
4 years ago
```sh
sudo apt install wireguard jq
```
4 years ago
## Installation<a name="installation"></a>
4 years ago
### for *nix
4 years ago
4 years ago
- Clone the repo
4 years ago
4 years ago
```sh
4 years ago
git clone --recurse-submodules https://git.swarmlab.io:3000/zeus/swarmlab-hybrid.git
4 years ago
```
4 years ago
4 years ago
- Install it!
4 years ago
4 years ago
```sh
cd swarmlab-hybrid
4 years ago
./install.sh <-- run it without root privileges
4 years ago
```
4 years ago
4 years ago
- Open URL __http://localhost:3088__ in browser
4 years ago
3 years ago
### Windows
4 years ago
3 years ago
http://docs.swarmlab.io/SwarmLab-HowTos/swarmlab/docs/swarmlab/docs/install/install-docker.html#windows-10-with-wsl-version2-enabled
4 years ago
3 years ago
### if you wish to keep the environment contained
4 years ago
4 years ago
And instructions on how to use them <a href="https://git.swarmlab.io:3000/zeus/swarmlab-hybrid/src/branch/master/docs/windows_use_vm.md">here</a>.
:information_source: Default password: swarmlab
4 years ago
4 years ago
PLEASE CHANGE PASSWORD IMEDIATELLY AFTER FIRST LAUNCH!!!
3 years ago
4 years ago
## First Run
:exclamation: No matter your distribution, upon installing you will HAVE to load settings before the first run!!
This will <b>initialize the configuration</b> using the <b>system defaults</b>.
4 years ago
4 years ago
Afterwards you can <b>add custom settings</b>, or keep using the defaults.
This action does <b>NOT</b> need to be repeated unless you wish to <b>reset the application</b>.
4 years ago
>
> Please navigate to the "Profile->Settings" menu and click on the "Load settings" button.
>
4 years ago
4 years ago
After doing this the application <b>MUST</b> be reastarted! To do that please run the restart script.
4 years ago
4 years ago
inside the root directory of the project run
4 years ago
4 years ago
```sh
4 years ago
./restart.sh
4 years ago
```
4 years ago
### More Info<a name="moreinfo"></a>
4 years ago
3 years ago
You can find our docs in
4 years ago
3 years ago
http://docs.swarmlab.io/SwarmLab-HowTos/swarmlab/docs/swarmlab/docs/index.html
4 years ago
4 years ago