Encrypts the image using DES algorithm using parallel and distributed computation with the help of Docker Swarm.
- 2 machines running Ubuntu 18.04/16.04 OS
- Docker CE
- Build the docker image -
./setup-docker.sh
- Change SERVER_IP in
.env
file to your system's IP (can find viaifconfig
) - Change hostname in line 17 and 41 of system to that of two machine's hostnames
- Initialize docker swarm and create the network -
./create-network.sh
- Deploy the server using the command -
docker stack deploy -c docker-compose.yaml test
- See the logs of both services by using
docker logs -f <SERVICE_NAME>
command. Replace the service name with the container id found by runningdocker ps
- Run the following command in the host PC -
curl 0.0.0.0:3000/encrypt
- You will be able to see the logs on the console, the encrypted image will be output to
/tmp/output.jpeg
path. - If you want to change the input image, simply replace
original.jpeg
with another image but with the same name, and repeat from step 1.