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.
162 lines
5.2 KiB
162 lines
5.2 KiB
4 years ago
|
|
||
|
<img align="right" width="300" height="300" src="https://git.swarmlab.io:3000/zeus/swarmlab-hybrid/raw/branch/master/docs/images/hybrid-1.png">
|
||
|
|
||
|
# Swarmlab Hybrid
|
||
|
|
||
|
### Table of contents
|
||
|
|
||
|
1. [Features](#introduction)
|
||
|
2. [System requirements ](#systemrequirements)
|
||
|
3. [Prerequisites](#prerequisites)
|
||
|
4. [Installation](#installation)
|
||
|
5. [More info](#moreinfo)
|
||
|
|
||
|
|
||
|
### <a name="introduction"></a>
|
||
|
## <b>Swarmlab Hybrid</b> is the Swarmlabs younger, more tech savvy brother.
|
||
|
|
||
|
Swarmlab hybrid provides the user with the unique abillity to create and share project images and even full-blown systems. An all of that <b>using onlly the browser and the command line</b> of their system.
|
||
|
|
||
|
## Why?
|
||
|
Ever created a service that you would like to test on a real-world network?
|
||
|
Ever designed an application you would like to distribute to your friends/students?
|
||
|
Swarmlab Hybrid comes to fill in the gap between the coder/developer of a service and the and user and at the same time meet the needs for a real-world testing environment.
|
||
|
With Hybrid we can now as part of the cloud work <b>independantly</b> but also stay <b>connected</b>.
|
||
|
The hybrid format allows us to utilize the power of Swarmlab itself but also combine it with the practiaclly unlimited computing of our own machines.
|
||
|
|
||
|
## How?
|
||
|
How does Swarmlab Hybrid differ from Swarmlab? Well...its Swarmlab...just....HYBRID!
|
||
|
Easy enough right? But what does that mean in practice?
|
||
|
Well for us it means a couple million more lines of code. For you it means a few more installation steps and the newfound access to YOUR OWN RESOURCES!
|
||
|
|
||
|
You will be connected to the Swarmlab Cloud (hence HYBRID) but you will be able to use your own storage(move files around, delete/copy etc),your own networking and computational power(cpu/graphics etc) and create a system exactly the way you need it.
|
||
|
|
||
|
This way you will be able to :
|
||
|
- <b>create</b> images for testing.
|
||
|
- <b>Run</b> them using docker.
|
||
|
- <b>Share</b> them for others to use and develop.
|
||
|
- Finally <b>browse a the cloud</b> for shared images to <b>integrate</b> into your project and make it even better.
|
||
|
|
||
|
#
|
||
|
|
||
|
|
||
|
|
||
|
## Swarmlab vs Swarmlab Hybrid in a nutshell
|
||
|
|
||
|
### Swarmlab
|
||
|
|
||
|
- Ready to use virtual labs
|
||
|
- Optimized for both Students and Tutors
|
||
|
- Tutors bootstrap their labrooms using our tools
|
||
|
- Students can join the created labrooms according to their interrests
|
||
|
|
||
|
|
||
|
### Hybrid
|
||
|
- Run and manage applications
|
||
|
- Scale up or down without rebuilding
|
||
|
- Connect multiple computers through a network.
|
||
|
- Move Labs between environments
|
||
|
- Create your own labs
|
||
|
|
||
|
|
||
|
|
||
|
### System requirements<a name="systemrequirements"></a>
|
||
|
|
||
|
|
||
|
**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.
|
||
|
|
||
|
|
||
|
- A Linux Server (Virtual or Physical)
|
||
|
- You must have super user privileges (root/sudo)
|
||
|
- 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
|
||
|
- CPU
|
||
|
- Minimum: 2
|
||
|
- Recommended 4+
|
||
|
- Disk Space
|
||
|
- 10 GB for internal requirements.
|
||
|
- The amount of additional disk space soloemnly depends on you intended use.
|
||
|
|
||
|
:warning: Since Doecker uses hyupervisor the host NEEDS TO HAVE VIRTUALIZATION ENABLED!
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
#### Prerequisites<a name="prerequisites"></a>
|
||
|
|
||
|
* node version >15
|
||
|
|
||
|
```sh
|
||
|
curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -
|
||
|
sudo apt-get install -y nodejs
|
||
|
```
|
||
|
* docker
|
||
|
|
||
|
```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
|
||
|
sudo usermod -aG docker [USERNAME]
|
||
|
```
|
||
|
* docker-compose
|
||
|
|
||
|
```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
|
||
|
|
||
|
```sh
|
||
|
sudo npm install -g pm2
|
||
|
```
|
||
|
* wireguard
|
||
|
|
||
|
```sh
|
||
|
sudo apt install wireguard jq
|
||
|
```
|
||
|
|
||
|
### Installation<a name="installation"></a>
|
||
|
|
||
|
<br />
|
||
|
<p align="center">
|
||
|
<p align="center">
|
||
|
- Clone the repo
|
||
|
|
||
|
```sh
|
||
|
git clone --recurse-submodules https://git.swarmlab.io:3000/zeus/swarmlab-hybrid.git
|
||
|
```
|
||
|
- Install it!
|
||
|
|
||
|
```sh
|
||
|
cd swarmlab-hybrid
|
||
|
./install.sh
|
||
|
```
|
||
|
- Open URL __http://localhost:3088__ in browser
|
||
|
- Get a Swarmlab account.
|
||
|
- Get a free API Key at **Settings->Enable the Swarmlab hybrid** Menu
|
||
|
</p>
|
||
|
</p>
|
||
|
|
||
|
|
||
|
### More Info<a name="moreinfo"></a>
|
||
|
|
||
|
You can find our docs in **docs** Directory
|
||
|
|
||
|
The Swarmlab docs are in **AsciiDoc** (similar to markdown), **PDF** and **html** format
|
||
|
|
||
|
|
||
|
For real-time rendering in browser Asciidoc an add-on can be found here:
|
||
|
|
||
|
http://docs.swarmlab.io/SwarmLab-HowTos/labs/Howtos/doclive/asciidoc.adoc.html#_setup_live_preview_using_a_web_browser
|
||
|
|
||
|
|
||
|
|