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.
 

114 KiB

2. Install swarmlab-sec (Home PC)

Μέσα σε έναν φάκελο που επιθυμούμε να έχουμε το project κάνουμε clone το swarmlab-sec

git clone https://git.swarmlab.io:3000/swarmlab/swarmlab-sec
cd swarmlab-sec

Μέσα σε αυτον τον φάκελο κάνουμε ακόμα ένα πχ "myproject" όπου εκεί θα αποθηκεύονται τα data του project μας

cd myproject

../install/usr/share/swarmlab.io/sec/swarmlab-sec

To output θα είναι :

create       create project      (swarmlab-sec create)
up           start swarmlab-sec  (swarmlab-sec up size=10)
scale        resize swarmlab-sec (swarmlab-sec scale size=30)
reload       rebuild image       (swarmlab-sec reload size=15)
login        login swarmlab-sec  (swarmlab-sec login)
exec         execute command     (swarmlab-sec exec [SHELL COMMAND])
down         stop swarmlab-sec   (swarmlab-sec down)
clean        clean project       (swarmlab-sec clean)
list         show instances      (swarmlab-sec swarmlab-sec list)
help         show help           (swarmlab-sec help)
../install/usr/share/swarmlab.io/sec/swarmlab-sec create

To output θα είναι :

Project
├── Dockerfile          # Image specification
├── project             # Sample program source code
│   └── hello_world.c
├── ssh                 # keys for accessing
│   ├── id_rsa          # (could generate your own)
│   └── id_rsa.pub
├── docker-compose.yml  # Container orchestration

Κάνουμε ένα reboot ή ένα logout και login

../install/usr/share/swarmlab.io/sec/swarmlab-sec create
../install/usr/share/swarmlab.io/sec/swarmlab-sec up size=5

We built a high-performing, scalable infrastructure

Swarmlab

## Login to the swarmlab cluster

../install/usr/share/swarmlab.io/sec/swarmlab-sec login

When you are inside a container

ssh docker@<IP>

User password: docker

sudo password: docker

If you don’t have the address - you can use the linux network scanning tools (nmap etc.).

## Scale cluster in real-time

As the cluster running, without having to close the session, open a different terminal and go back to the project directory.

../install/usr/share/swarmlab.io/sec/swarmlab-sec scale size=10

## shutdown swarmlab-sec cluster

../install/usr/share/swarmlab.io/sec/swarmlab-sec down

asciicast

asciicast