Skip to content

Instantly share code, notes, and snippets.

@mcastelino
Last active March 12, 2019 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcastelino/ea29fd08aa0819a94ff7232c80e1cde7 to your computer and use it in GitHub Desktop.
Save mcastelino/ea29fd08aa0819a94ff7232c80e1cde7 to your computer and use it in GitHub Desktop.
Running Kata CI on your host using ccloudvm

Setup ccloudvm

For more info https://github.com/intel/ccloudvm

go get github.com/intel/ccloudvm/...
$ ccloudvm setup

Create a ccloud fedora VM

ccloudvm create fedora28 --cpus 8 --disk 40 --mem 8192 --name kata-ci

Log into the VM and set it up for CI

ccloudvm connect kata-ci
sudo dnf update
sudo dnf install -y git gcc dnf-plugins-core patch || ( sudo apt-get update -y && sudo apt-get install -y gcc git patch)
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
sudo dnf install -y docker-ce-18.06.1.ce
sudo mkdir /etc/docker
sudo -E gpasswd -a $USER docker
curl -LOk https://dl.google.com/go/go1.10.5.linux-amd64.tar.gz
sudo tar -xf go1.10.5.linux-amd64.tar.gz -C /usr/local
sudo sync
rm -rf go1.10.5.linux-amd64.tar.gz
mkdir -p ~/go
echo export GOPATH=~/go >> .bashrc 
echo export GOROOT=\"/usr/local/go\" >> .bashrc
echo export PATH=\"\$PATH:\$GOROOT/bin\" >> .bashrc
echo export KUBECONFIG=/etc/kubernetes/admin.conf >> .bashrc
source .bashrc
go get -d github.com/kata-containers/tests
pushd go/src/github.com/kata-containers/tests/
.ci/setup.sh

Run the CI on your code

cd ~/go/src/github.com/kata-containers/runtime
export CI=true
.ci/run.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment