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

Loading…
Cancel
Save