Last active
June 19, 2018 16:15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script will install kata-containers v1.0 and | |
# latest docker-ce. Then it will run the docker | |
# integration tests from the kata-containers/tests repository. | |
# Install Kata Containers | |
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/katacontainers:/release/xUbuntu_$(lsb_release -rs)/ /' > /etc/apt/sources.list.d/kata-containers.list" | |
curl -sL http://download.opensuse.org/repositories/home:/katacontainers:/release/xUbuntu_$(lsb_release -rs)/Release.key | sudo apt-key add - | |
sudo -E apt-get update | |
sudo -E apt-get -y install kata-runtime kata-proxy kata-shim | |
# Install docker | |
sudo -E apt-get -y install apt-transport-https ca-certificates software-properties-common | |
curl -sL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
arch=$(dpkg --print-architecture) | |
sudo -E add-apt-repository "deb [arch=${arch}] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo -E apt-get update | |
sudo -E apt-get -y install docker-ce | |
# Make Kata Containers default runtime for docker | |
sudo mkdir -p /etc/systemd/system/docker.service.d/ | |
cat <<EOF | sudo tee /etc/systemd/system/docker.service.d/kata-containers.conf | |
[Service] | |
ExecStart= | |
ExecStart=/usr/bin/dockerd -D --add-runtime kata-runtime=/usr/bin/kata-runtime --default-runtime=kata-runtime | |
EOF | |
sudo systemctl daemon-reload | |
sudo systemctl restart docker | |
# install make | |
sudo apt-get -y install make | |
# Install golang | |
curl -O https://storage.googleapis.com/golang/go1.9.2.linux-amd64.tar.gz | |
sudo tar -C /usr/local -xzf go1.9.2.linux-amd64.tar.gz | |
export GOROOT="/usr/local/go" | |
export GOPATH=${HOME}/go | |
export PATH=${GOPATH}/bin:/usr/local/go/bin:/usr/sbin:${PATH} | |
# Run docker tests | |
go get github.com/kata-containers/tests | |
cd $GOPATH/src/github.com/kata-containers/tests | |
git checkout 1.0.0 | |
RUNTIME=kata-runtime sudo -E PATH=$PATH make integration |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment