
#!/bin/bash

#
#Sends docker image from bastion to swarm nodes. Removes image after sending.
#
# 

#Usage: ./distribute-local-docker-image.sh <image-file>

IMAGE="$1"


for node in $(cat $HOME/address_nodes) 
do
    echo "FuzzVM: $node"
    cat $IMAGE | bzip2 | ssh $node "bunzip2 | docker load;";
done

echo "Removing image from bastion."
rm $IMAGE;

#!/bin/bash

#
#Sends docker image from bastion to swarm nodes. Removes image after sending.
#
# 

#Usage: ./distribute-local-docker-image.sh <image-file>

IMAGE="$1"


for node in $(cat $HOME/address_nodes) 
do
    echo "FuzzVM: $node"
    cat $IMAGE | ssh $node "gunzip | docker load;";
done

echo "Removing image from bastion."
rm $IMAGE;
Switch to gzip compressed docker-image from raw tar
Switch to gzip compressed docker-image from raw tar

Sending gzip compressed image to bastion, saves initial
setup time. Previous implementatio did bzip2 compression
on bastion, for each fuzzvm, which creates a bottleneck
with low CPU bastion VM.
