dockermv

module
v0.0.0-...-06c03df Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2020 License: GPL-3.0

README

DockerMV

DockerMv is an extended version of Docker which supports software multi-versioning in services. By using DockerMV, we can create Docker services with more than one image.

How to use?

In order to run this program, follow these steps:

  1. Install the go programming language as following:

    1.1) Run the following commands:

    wget https://dl.google.com/go/go1.13.6.linux-amd64.tar.gz
    tar -xvf go1.13.6.linux-amd64.tar.gz
    sudo mv go /usr/local
    

    1.2) Now set the GOPATH variable, which tells GO where to look for its files:

    sudo nano ~/.profile
    

    At the end of the file add this line:

    export GOPATH=$HOME/DockerMV/go
    export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
    

    Now save and close the file, and refresh your profile.

    source ~/.profile
    
  2. Install docker as follows:

    2.1) Run the following commands:

    sudo apt install apt-transport-https ca-certificates curl software-properties-common
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
    apt-cache policy docker-ce
    

    At the end you should see output similar to this:

    Installed: (none)
    Candidate: 5:19.03.5~3-0~ubuntu-bionic
    Version table:
        5:19.03.5~3-0~ubuntu-bionic 500
            500 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages
    

    2.2) Finally install docker

    sudo apt install docker-ce
    
  3. Clone this project and put in you $HOME directory.

  4. Run the following command from your $HOME directory.

chmod -R 777 DockerMV
  1. Move to $HOME/DockerMV/go/src/github.com/docker/cli directory and run the following command to build the project.
make binary

You will see a similar message when the program is successfuly compiled:

WARNING: you are not in a container.
Use "make -f docker.Makefile binary" or set
DISABLE_WARN_OUTSIDE_CONTAINER=1 to disable this warning.

Press Ctrl+C now to abort.

WARNING: binary creates a Linux executable. Use cross for macOS or Windows.
./scripts/build/binary
Building statically linked build/docker-linux-amd64
  1. To run services with DockerMV, you need to create a Docker Swarm. Check the public IP address of your machine on your network. Notice that the IP address must be accessible from outside.
hostname -I | awk '{print $1}'

Then, you need to create an overlay network by running the following command:

sudo docker swarm init --advertise-addr HOST_IP
sudo docker network create -d overlay --attachable my-net
  1. To run a command using DockerMV, first move to $HOME/DockerMV/go/src/github.com/docker/cli directory, and your command needs to start with ./build/docker

Experiments

TeaStore

The TeaStore application is a reference application for testing and benchmarking. You can find two version of its Recommender service on our Docker Hub page. Also, we used the teastore.jmx to create a load on the system for our testing purposes.

Znn

The Znn application is used for testing and benchmarking of self-adaptive applications. We created two version of its content-providing component which are available on our Docker Hub page. Also, we used the znn.jmx to create a load on the system for our testing purposes.

How to Run the Znn with DockerMV

You can setup the Znn application with the following commands. Notice to replace the HOST_IP with your host IP address.

sudo docker run --network="my-net" -d -p 3306:3306 alirezagoli/znn-mysql:v1

./build/docker service create HOST_IP my-net my_znn 1081 $HOME/DockerMV/znn_sample_rule.txt alirezagoli/znn-text:v1 1 1g 1g 0.2 alirezagoli/znn-multimedia:v1 1 1g 1g 0.2

By running th following command you can see four containers are running.

sudo docker ps -a

Now, you can see the service working by running the following command. Notice that the NGINX port is randomly assigned and you can find it by the above command.

curl http://HOST_IP:NGINX_PORT/news.php

How to remove containers?

In order to remove the containers you need to first stop them.

sudo docker stop CONTAINER_ID

Afterward, you can remove the containers

sudo docker rm CONTAINER_ID

Cite Us

The DockerMV was first published in Proceedings of the 2020 ACM/SPEC International Conference on Performance Engineering (ICPE '20). You can find the paper on the ASGAARD lab website.

Directories

Path Synopsis
go
src/github.com/docker/cli/cli/winresources
Package winresources is used to embed Windows resources into docker.exe.
Package winresources is used to embed Windows resources into docker.exe.
src/github.com/docker/cli/internal/test
Package test is a test-only package that can be used by other cli package to write unit test.
Package test is a test-only package that can be used by other cli package to write unit test.
src/github.com/docker/cli/internal/test/builders
Package builders helps you create struct for your unit test while keeping them expressive.
Package builders helps you create struct for your unit test while keeping them expressive.
src/github.com/docker/cli/kubernetes/compose
Package compose is the internal version of the API.
Package compose is the internal version of the API.
src/github.com/docker/cli/kubernetes/compose/v1beta1
Package v1beta1 is the first version of the Stack spec, containing only a compose file
Package v1beta1 is the first version of the Stack spec, containing only a compose file
src/github.com/docker/cli/kubernetes/compose/v1beta2
Package v1beta2 is the second version of the stack, containing a structured spec
Package v1beta2 is the second version of the stack, containing a structured spec
src/github.com/docker/cli/service/logs
Package logs contains tools for parsing docker log lines.
Package logs contains tools for parsing docker log lines.
src/github.com/docker/docker/api/types
Package types is used for API stability in the types and response to the consumers of the API stats endpoint.
Package types is used for API stability in the types and response to the consumers of the API stats endpoint.
src/github.com/docker/docker/api/types/backend
Package backend includes types to send information to server backends.
Package backend includes types to send information to server backends.
src/github.com/docker/docker/api/types/filters
Package filters provides tools for encoding a mapping of keys to a set of multiple values.
Package filters provides tools for encoding a mapping of keys to a set of multiple values.
src/github.com/docker/docker/api/types/plugins/logdriver
Package logdriver is a generated protocol buffer package.
Package logdriver is a generated protocol buffer package.
src/github.com/docker/docker/api/types/swarm/runtime
Package runtime is a generated protocol buffer package.
Package runtime is a generated protocol buffer package.
src/github.com/docker/docker/api/types/versions/v1p19
Package v1p19 provides specific API types for the API version 1, patch 19.
Package v1p19 provides specific API types for the API version 1, patch 19.
src/github.com/docker/docker/api/types/versions/v1p20
Package v1p20 provides specific API types for the API version 1, patch 20.
Package v1p20 provides specific API types for the API version 1, patch 20.
src/github.com/docker/docker/builder
Package builder defines interfaces for any Docker builder to implement.
Package builder defines interfaces for any Docker builder to implement.
src/github.com/docker/docker/builder/dockerfile
Package dockerfile is the evaluation step in the Dockerfile parse/evaluate pipeline.
Package dockerfile is the evaluation step in the Dockerfile parse/evaluate pipeline.
src/github.com/docker/docker/builder/remotecontext
Package remotecontext is a generated protocol buffer package.
Package remotecontext is a generated protocol buffer package.
src/github.com/docker/docker/client
Package client is a Go client for the Docker Engine API.
Package client is a Go client for the Docker Engine API.
src/github.com/docker/docker/daemon
Package daemon exposes the functions that occur on the host server that the Docker daemon is running.
Package daemon exposes the functions that occur on the host server that the Docker daemon is running.
src/github.com/docker/docker/daemon/logger
Package logger defines interfaces that logger drivers implement to log messages.
Package logger defines interfaces that logger drivers implement to log messages.
src/github.com/docker/docker/daemon/logger/awslogs
Package awslogs provides the logdriver for forwarding container logs to Amazon CloudWatch Logs
Package awslogs provides the logdriver for forwarding container logs to Amazon CloudWatch Logs
src/github.com/docker/docker/daemon/logger/etwlogs
Package etwlogs provides a log driver for forwarding container logs as ETW events.(ETW stands for Event Tracing for Windows) A client can then create an ETW listener to listen for events that are sent by the ETW provider that we register, using the provider's GUID "a3693192-9ed6-46d2-a981-f8226c8363bd".
Package etwlogs provides a log driver for forwarding container logs as ETW events.(ETW stands for Event Tracing for Windows) A client can then create an ETW listener to listen for events that are sent by the ETW provider that we register, using the provider's GUID "a3693192-9ed6-46d2-a981-f8226c8363bd".
src/github.com/docker/docker/daemon/logger/fluentd
Package fluentd provides the log driver for forwarding server logs to fluentd endpoints.
Package fluentd provides the log driver for forwarding server logs to fluentd endpoints.
src/github.com/docker/docker/daemon/logger/gelf
Package gelf provides the log driver for forwarding server logs to endpoints that support the Graylog Extended Log Format.
Package gelf provides the log driver for forwarding server logs to endpoints that support the Graylog Extended Log Format.
src/github.com/docker/docker/daemon/logger/journald
Package journald provides the log driver for forwarding server logs to endpoints that receive the systemd format.
Package journald provides the log driver for forwarding server logs to endpoints that receive the systemd format.
src/github.com/docker/docker/daemon/logger/jsonfilelog
Package jsonfilelog provides the default Logger implementation for Docker logging.
Package jsonfilelog provides the default Logger implementation for Docker logging.
src/github.com/docker/docker/daemon/logger/logentries
Package logentries provides the log driver for forwarding server logs to logentries endpoints.
Package logentries provides the log driver for forwarding server logs to logentries endpoints.
src/github.com/docker/docker/daemon/logger/splunk
Package splunk provides the log driver for forwarding server logs to Splunk HTTP Event Collector endpoint.
Package splunk provides the log driver for forwarding server logs to Splunk HTTP Event Collector endpoint.
src/github.com/docker/docker/daemon/logger/syslog
Package syslog provides the logdriver for forwarding server logs to syslog endpoints.
Package syslog provides the logdriver for forwarding server logs to syslog endpoints.
src/github.com/docker/docker/dockerversion
Package dockerversion is auto-generated at build-time
Package dockerversion is auto-generated at build-time
src/github.com/docker/docker/errdefs
Package errdefs defines a set of error interfaces that packages should use for communicating classes of errors.
Package errdefs defines a set of error interfaces that packages should use for communicating classes of errors.
src/github.com/docker/docker/integration
Package integration provides integrations tests for Moby (API).
Package integration provides integrations tests for Moby (API).
src/github.com/docker/docker/integration-cli/checker
Package checker provides Docker specific implementations of the go-check.Checker interface.
Package checker provides Docker specific implementations of the go-check.Checker interface.
src/github.com/docker/docker/layer
Package layer is package for managing read-only and read-write mounts on the union file system driver.
Package layer is package for managing read-only and read-write mounts on the union file system driver.
src/github.com/docker/docker/pkg/aaparser
Package aaparser is a convenience package interacting with `apparmor_parser`.
Package aaparser is a convenience package interacting with `apparmor_parser`.
src/github.com/docker/docker/pkg/filenotify
Package filenotify provides a mechanism for watching file(s) for changes.
Package filenotify provides a mechanism for watching file(s) for changes.
src/github.com/docker/docker/pkg/locker
Package locker provides a mechanism for creating finer-grained locking to help free up more global locks to handle other tasks.
Package locker provides a mechanism for creating finer-grained locking to help free up more global locks to handle other tasks.
src/github.com/docker/docker/pkg/parsers
Package parsers provides helper functions to parse and validate different type of string.
Package parsers provides helper functions to parse and validate different type of string.
src/github.com/docker/docker/pkg/parsers/kernel
Package kernel provides helper function to get, parse and compare kernel versions for different platforms.
Package kernel provides helper function to get, parse and compare kernel versions for different platforms.
src/github.com/docker/docker/pkg/parsers/operatingsystem
Package operatingsystem provides helper function to get the operating system name for different platforms.
Package operatingsystem provides helper function to get the operating system name for different platforms.
src/github.com/docker/docker/pkg/pidfile
Package pidfile provides structure and helper functions to create and remove PID file.
Package pidfile provides structure and helper functions to create and remove PID file.
src/github.com/docker/docker/pkg/platform
Package platform provides helper function to get the runtime architecture for different platforms.
Package platform provides helper function to get the runtime architecture for different platforms.
src/github.com/docker/docker/pkg/plugins
Package plugins provides structures and helper functions to manage Docker plugins.
Package plugins provides structures and helper functions to manage Docker plugins.
src/github.com/docker/docker/pkg/pools
Package pools provides a collection of pools which provide various data types with buffers.
Package pools provides a collection of pools which provide various data types with buffers.
src/github.com/docker/docker/pkg/signal
Package signal provides helper functions for dealing with signals across various operating systems.
Package signal provides helper functions for dealing with signals across various operating systems.
src/github.com/docker/docker/pkg/streamformatter
Package streamformatter provides helper functions to format a stream.
Package streamformatter provides helper functions to format a stream.
src/github.com/docker/docker/pkg/stringid
Package stringid provides helper functions for dealing with string identifiers
Package stringid provides helper functions for dealing with string identifiers
src/github.com/docker/docker/pkg/tailfile
Package tailfile provides helper functions to read the nth lines of any ReadSeeker.
Package tailfile provides helper functions to read the nth lines of any ReadSeeker.
src/github.com/docker/docker/pkg/tarsum
Package tarsum provides algorithms to perform checksum calculation on filesystem layers.
Package tarsum provides algorithms to perform checksum calculation on filesystem layers.
src/github.com/docker/docker/pkg/term
Package term provides structures and helper functions to work with terminal (state, sizes).
Package term provides structures and helper functions to work with terminal (state, sizes).
src/github.com/docker/docker/pkg/truncindex
Package truncindex provides a general 'index tree', used by Docker in order to be able to reference containers by only a few unambiguous characters of their id.
Package truncindex provides a general 'index tree', used by Docker in order to be able to reference containers by only a few unambiguous characters of their id.
src/github.com/docker/docker/pkg/urlutil
Package urlutil provides helper function to check urls kind.
Package urlutil provides helper function to check urls kind.
src/github.com/docker/docker/pkg/useragent
Package useragent provides helper functions to pack version information into a single User-Agent header.
Package useragent provides helper functions to pack version information into a single User-Agent header.
src/github.com/docker/docker/registry
Package registry contains client primitives to interact with a remote Docker registry.
Package registry contains client primitives to interact with a remote Docker registry.
src/github.com/docker/docker/volume/local
Package local provides the default implementation for volumes.
Package local provides the default implementation for volumes.
src/github.com/docker/machine
Package machine defines interfaces to manage a variety of docker instances deployed on different backends (VMs, baremetal).
Package machine defines interfaces to manage a variety of docker instances deployed on different backends (VMs, baremetal).
src/github.com/docker/machine/libmachine/provision/provisiontest
Package provisiontest provides utilities for testing provisioners
Package provisiontest provides utilities for testing provisioners
src/github.com/docker/machine/libmachine/versioncmp
Package versioncmp provides functions for comparing version strings.
Package versioncmp provides functions for comparing version strings.
src/github.com/rogpeppe/godef
Godef prints the source location of definitions in Go programs.
Godef prints the source location of definitions in Go programs.
src/github.com/rogpeppe/godef/go/ast
Package ast declares the types used to represent syntax trees for Go packages.
Package ast declares the types used to represent syntax trees for Go packages.
src/github.com/rogpeppe/godef/go/parser
A parser for Go source files.
A parser for Go source files.
src/github.com/rogpeppe/godef/go/printer
Package printer implements printing of AST nodes.
Package printer implements printing of AST nodes.
src/github.com/rogpeppe/godef/go/scanner
Package scanner implements a scanner for Go source text.
Package scanner implements a scanner for Go source text.
src/github.com/rogpeppe/godef/go/sym
The sym package provides a way to iterate over and change the symbols in Go source files.
The sym package provides a way to iterate over and change the symbols in Go source files.
src/github.com/rogpeppe/godef/go/token
This package defines constants representing the lexical tokens of the Go programming language and basic operations on tokens (printing, predicates).
This package defines constants representing the lexical tokens of the Go programming language and basic operations on tokens (printing, predicates).
src/github.com/rogpeppe/godef/go/types
Types infers source locations and types from Go expressions.
Types infers source locations and types from Go expressions.
src/github.com/sqs/goreturns/returns
Package returns implements a Go pretty-printer (like package "go/format") that also adds zero-value return values as necessary to incomplete return statements.
Package returns implements a Go pretty-printer (like package "go/format") that also adds zero-value return values as necessary to incomplete return statements.
src/github.com/uudashr/gopkgs
Package gopkgs is a utility to get list of golang packages.
Package gopkgs is a utility to get list of golang packages.

Jump to

Keyboard shortcuts

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