Skip to content

Instantly share code, notes, and snippets.

@rn
Last active November 14, 2017 14:52
Show Gist options
  • Save rn/08d13b7ed30ab5fbde9a6dcaa24831ce to your computer and use it in GitHub Desktop.
Save rn/08d13b7ed30ab5fbde9a6dcaa24831ce to your computer and use it in GitHub Desktop.
arm64 server setup

This document outlines steps and common tasks for setting up a arm64 dev machine for LinuxKit.

Notes on packet.net

If you set up a server on packet.net using the docker account please use your name/slackhandle/initials in the machine name. We will garbage collect machine and whack machine not adhering to this policy without warning :).

Deploy a Ubuntu 16.04 LTS server on packet.net and ssh in as root.

You may wan to install some common tools:

apt-get install -y jq expect kvm

Install docker

Starting with 17.07(?) there are prebuild binaries on the testing channel. The instructions are loosely based on these instructions.

apt-get update
apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

# Add arm64 testing
add-apt-repository \
   "deb [arch=arm64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   test"
apt-get update
apt-get install -y docker-ce

Add a new user

New users are added to the docker and kvm group and optionally to the sudo group

USER=rneugeba
adduser $USER # or adduser --disabled-password $USER
usermod -aG docker $USER
usermod -aG kvm $USER
usermod -aG sudo $USER

Install other tools needed for LinuxKit

Install notary (for signing)

There are no prebuild arm64 binaries to building from source

git clone git@github.com:docker/notary.git && cd notary
git checkout v0.5.0
docker run --rm -ti -v $(pwd):/go/src/github.com/docker/notary arm64v8/debian:stretch
# then in the container
export GOPATH=/go
apt-get update && apt-get install -y libltdl-dev golang-go git make
cd /go/src/github.com/docker/notary/
make client
exit
# now install the binary
cp ./bin/notary /usr/bin

Install password manager CLI like lastpass (optional)

This needs to be compiled from source as well and needs the following packages:

apt-get install -y openssl libcurl4-openssl-dev libxml2 libssl-dev libxml2-dev pinentry-curses xclip cmake build-essential pkg-config

Then, download the latest release from github and unpack and make

Update qemu

The version of qemu/kvm which comes with 16.04 is quite old. So we install a newer version from source=

apt-get install -y automake libglib2.0-dev bison flex
wget http://download.qemu-project.org/qemu-2.10.0-rc1.tar.xz
tar xvJf qemu-2.10.0-rc1.tar.xz
cd qemu-2.10.0-rc1
./configure
make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment