1. Install swarmlab-sec (Home PC)
INSTALL
See INSTALL.md for Installation Instruction |
lab
In Lab’s everything is ready! Goto "create" |
2. Usage (swarmlab-sec)
-
Open a console
-
Create a directory
cd dir
swarmlab-sec <tab><tab>
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)
Using the tab key to automatically complete unambiguous commands and paths in Bash |
3. Create swarmlab project
mkdir myproject
cd myproject
swarmlab-sec create
Relevant files:
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
4. Spin up the swarmlab cluster
cd myproject
swarmlab-sec up size=5
We built a high-performing, scalable infrastructure
5. Login to the swarmlab cluster
cd myproject
swarmlab-sec login
6. 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.
cd myproject
swarmlab-sec scale size=10
7. shutdown swarmlab-sec cluster
cd myproject
swarmlab-sec down
Reminder
Caminante, no hay camino, Wanderer, there is no path, Antonio Machado Campos de Castilla |