Browse Source

docs

master
zeus 4 years ago
parent
commit
65074c16ed
  1. 6
      install/usr/share/swarmlab.io/sec/project/bin/swarmlab-nmap
  2. 9
      install/usr/share/swarmlab.io/sec/swarmlab-sec

6
install/usr/share/swarmlab.io/sec/project/bin/swarmlab-nmap

@ -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

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

@ -77,6 +77,8 @@ IMAGE_origin="ubuntu:18.04"
bootstrap="sec_bootstrap"
hostnames="auto_update_hosts"
hostnames_get="get_hosts"
NODENAME=${HYBRID_NETWORK}_master_1.${HYBRID_NETWORK}_${HYBRID_NETWORK}
NODENETWORK=${HYBRID_NETWORK}
# shellcheck disable=SC1091
#. ./.env
@ -343,6 +345,7 @@ fi
/bin/mkdir -p $Wdir/project
/bin/cp -rf $DIR/project/bin $Wdir/project
/bin/cp -f $DIR/project/hello_world.sh $Wdir/project
/bin/cp -f $DIR/$bootstrap $Wdir/$bootstrap
/bin/cp -f $DIR/$hostnames $Wdir/$hostnames
@ -364,6 +367,9 @@ services:
master:
image: $REGISTRY_ADDR:$REGISTRY_PORT/$IMAGE_NAME
privileged: true
environment:
- NODENAME=${NODENAME}
- NODENETWORK=${NODENETWORK}
cap_add:
- NET_ADMIN
user: root
@ -379,6 +385,9 @@ services:
worker:
image: $REGISTRY_ADDR:$REGISTRY_PORT/$IMAGE_NAME
privileged: true
environment:
- NODENAME=${NODENAME}
- NODENETWORK=${NODENETWORK}
cap_add:
- NET_ADMIN
user: root

Loading…
Cancel
Save