zeus
4 years ago
4 changed files with 92 additions and 17 deletions
@ -1,27 +1,87 @@ |
|||||
SEC SwarmLab.io |
# hybrid-sec ! |
||||
==================== |
|
||||
|
|
||||
Orchestrate a Swarmlab SEC cluster: |
|
||||
|
|
||||
+ Using Docker Compose to replicate production environment on single Docker host |
## LabInstance sec |
||||
|
|
||||
|
|
||||
# Single-host with Docker Compose |
![alt text](images/swarmlab-network.png "") |
||||
|
|
||||
See INSTALL |
|
||||
|
|
||||
|
|
||||
Relevant files: |
## Quickstart |
||||
|
|
||||
|
This is a quickstart guide of howto use this *LabInstance to deploy Linux sec systems* |
||||
|
|
||||
|
### HowTo use it |
||||
|
|
||||
|
|
||||
|
### Default Configuration |
||||
|
|
||||
|
- Working Directory |
||||
|
|
||||
|
> /project |
||||
|
|
||||
|
- Default user |
||||
|
|
||||
|
> docker |
||||
|
|
||||
|
- Default password |
||||
|
|
||||
|
> docker |
||||
|
|
||||
|
- Default password4root |
||||
|
|
||||
|
> pass |
||||
|
|
||||
|
|
||||
|
#### Find lab workers |
||||
|
|
||||
|
|
||||
|
> ifconfig |
||||
|
> |
||||
|
> nmap -sP 172.130.0.0/24 |
||||
|
> |
||||
|
> or |
||||
|
> |
||||
|
> /project/bin/swarmlab-nmap |
||||
|
|
||||
|
|
||||
|
#### connect to workers |
||||
|
|
||||
|
```bash |
||||
|
ssh docker@[IP] |
||||
|
``` |
||||
|
|
||||
|
|
||||
|
#### Create hosts file |
||||
|
|
||||
|
|
||||
|
```bash |
||||
|
/project/bin/swarmlab-nmap > /project/hosts |
||||
``` |
``` |
||||
Project |
|
||||
├── Dockerfile # Image specification |
|
||||
├── project # Sample program source code |
--- |
||||
│ └── hello_world.c |
**NOTE:** copy files to all clients |
||||
├── ssh # keys for accessing |
|
||||
│ ├── id_rsa # (could generate your own) |
```bash |
||||
│ └── id_rsa.pub |
while read -r line; |
||||
├── .env # General configuration |
do |
||||
├── docker-compose.yml # Container orchestration |
scp /project/file docker@$line:/some_dir/file |
||||
└── swarmlab-mpi # Commands wrapper ultility |
done < /project/hosts |
||||
``` |
``` |
||||
|
--- |
||||
|
|
||||
|
|
||||
|
|
||||
|
--- |
||||
|
**MORE INFO** |
||||
|
|
||||
|
See |
||||
|
|
||||
|
- [sec1](http://docs.swarmlab.io/SwarmLab-HowTos/labs/sec/ex-1_iptables.adoc.html){:target="_blank"} |
||||
|
- http://docs.swarmlab.io/SwarmLab-HowTos/labs/sec/ex-2_iptables.adoc.html |
||||
|
- http://docs.swarmlab.io/SwarmLab-HowTos/labs/sec/ex-3_iptables.adoc.html |
||||
|
- http://docs.swarmlab.io/SwarmLab-HowTos/labs/sec/ex-3a_iptables-flow-chart.adoc.html |
||||
|
--- |
||||
|
|
||||
|
After Width: | Height: | Size: 80 KiB |
@ -0,0 +1,6 @@ |
|||||
|
#/bin/sh |
||||
|
|
||||
|
#ip=`nslookup hybrid-mpi_master_1.hybrid-mpi_hybrid-mpi | grep Addr | cut -d':' -f2 | grep -v 127.0.` |
||||
|
ip=`nslookup $NODENAME | grep Addr | cut -d':' -f2 | grep -v 127.0.` |
||||
|
nmap -sn -oG - $ip/24 | grep Up | grep $NODENETWORK | cut -d ' ' -f 2 |
||||
|
|
Loading…
Reference in new issue