docker/

directory
v1.14.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2023 License: MIT

README

Experiments with docker

Running experiments from images on docker hub

Download and install docker
  • Download and install docker
  • Initialize docker swarm
docker swarm init
Run the experiment
  • Chose fibonacci place and sample size by changing the environment varibles inside the docker compose file of the desired stack (e.g., dc-fibomiddleware-ssl.yml)
  • From the base folder of the project deploy the desired stack, e.g.:
docker stack deploy -c evaluation/experiments/docker/dc-fibomiddleware-ssl.yml fibomiddleware-ssl 
  • Observe the results of the experiments in the service logs, e.g.:
docker service logs -f fibomiddleware-ssl_client

Running experiments from your own images

Download and install docker
  • Download and install docker
  • Initialize docker swarm
docker swarm init
Generate ssl keys (if experiment with the use of ssl)
  • Generate private key for the Certificate Authority
openssl genrsa -des3 -out myCA.key 2048
  • Generate root certificate for the Certificate Authority
openssl req -x509 -new -nodes -key myCA.key -sha256 -days 1825 -out myCA.pem
  • Generate the server private key for the certificate. Remember to change <your.domain.com> to the name of the server. These gMidArch experiments using docker currently uses two kinds of servers, "namingserver" and "server", therefore, "namingserver.key" and "server.key"
openssl genrsa -out <your.domain.com>.key 2048
  • Generate a Certificate Signing Request (CSR)
openssl req -new -key <your.domain.com>.key -out <your.domain.com>.csr
  • Create a configuration file for the certificate
cat > <your.domain.com>.ext << EOF
authorityKeyIdentifier=keyid,issuer
basicConstraints=CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
subjectAltName = @alt_names
[alt_names]
DNS.1 = <your.domain.com>
EOF
  • Create the certificate using the CSR, the CA private key, the CA certificate and the config file
openssl x509 -req -in <your.domain.com>.csr -CA myCA.pem -CAkey myCA.key -CAcreateserial \ 
  -out <your.domain.com>.crt -days 825 -sha256 -extfile <your.domain.com>.ext
Build your own images
  • Configure the madl file of the desired application
  • From the base folder of the project run the desired build scripts, e.g.:
./evaluation/experiments/docker/fibomiddleware-build.sh
Run the experiment
  • From the base folder of the project deploy the desired stack, e.g.:
docker stack deploy -c evaluation/experiments/docker/dc-fibomiddleware-ssl.yml fibomiddleware-ssl 
  • Observe the results of the experiments in the service logs, e.g.:
docker service logs -f fibomiddleware-ssl_client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL