Skip to content

Getting Started Docker

Antonio Barbalace edited this page Jun 14, 2020 · 2 revisions

H-Containers enables container migration (checkpoint/restart and live-migation), with and without Docker, among any pair of machines (of any ISA, including ARM and x86), running Linux, with identical kernel Cgroup configuration. Note that AWS provides kernel images for different ISAs with the same kernel Cgroup configuration.

AWS

  1. Recommended Systems/AMIs: Linux 4.15.0-1043-aws #45-Ubuntu 18.04 LTS x86_64 and aarch64
    Note: For Ubuntu 20.04 LTS user, the pre-requites package of CRIU-HET is different, please following this Here

  2. In order to do migration in AWS machines, both of your machines need to have an ssh-keygen setup. Since it is impossible to log in to your AWS machine without a public key. AWS will give you a public key, but in order to run the script successfully, highly recommend user to set up ssh-keygen in your machines.

$ssh-keygen # keep default storage place, just keep click 'return' until done.  
#copy the content of ~/.ssh/id_rsa.pub to another machine ~/.ssh/authorizedi_keys
  1. The config.sh script will help you to do all following set-ups, with -i flag, it will compile and install criu. The Script and more detail you can find in here
$ ./config.sh 
or
$ ./config.sh -i 

a) Install the CRIU-HET : Installation details

b) Install Docker (version 18.09). Note: Docker version in both machine should be identical

#x86
sudo add-apt-repository \
		    "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   		    $(lsb_release -cs) \
   		    stable"
#ARM
sudo add-apt-repository \
            	    "deb [arch=arm64] https://download.docker.com/linux/ubuntu \
   	   	    $(lsb_release -cs) \
   	            stable"
	    
	    
sudo apt-get update
sudo apt-get install docker-ce=5:18.09.6~3-0~ubuntu-bionic docker-ce-cli=5:18.09.6~3-0~ubuntu-bionic containerd.io -y

Verify Docker is installed correctly by running the hello-world image. (Offical instruction from Docker).

$ sudo docker run hello-world 

c) Config the Docker

Turn on the Docker experimental feature and add the following (if daemon.json file does not exist, create it) and then restart the docker service:

vim /etc/docker/daemon.json (docker daemon configuration file)

{
	"experimental": true
}

service docker restart
  1. (Option)Popcorn-compiler (branch: criu) - If you want to use Popcorn Compiler (harder)

    (Please see popcorn-compiler/README for machine prerequisites)

    (Please see popcorn-compiler/INSTALL for toolchain installation instructions)

Clone this wiki locally