EC Agent implemented in Go before merge into Kubelet
These instructions assume that you wish to run the Agent as a standalone process and not as part of the kubelet. Additionally, it is assumed that the machine you're running the Agent on is running the modified version of the EC-4.20.16 Kernel and you've inserted the appropriate kernel modules you wish to test (i.e. cgroup_connection is required to make a conneciton to GCM, resize_quota for CPU requests, etc.)
- Install Docker
- Install Kubernetes
Add the following line to
sudo apt-get update && sudo apt-get install -y apt-transport-https curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
/etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
sudo apt-get update sudo apt-get install -y kubelet kubeadm kubectl
- Install latest version of Go (note: testing was done on v1.14.1)
Add the following lines in
sudo apt-get update cd /tmp wget https://dl.google.com/go/go1.14.1.linux-amd64.tar.gz sudo tar -xvf go1.14.1.linux-amd64.tar.gz sudo mv go /usr/local
~/.profile
:Finally,export GOROOT=/usr/local/go export GOPATH=$HOME/go export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
source ~/.profile
to update $GOPATH
- Make sure the node on which the agent is running is included in your Kubernetes cluster (i.e. can do
kubctl get nodes
on the master node to confirm) - Make sure the agent_ip has been updated correctly in ec_gcm/tests/app_def.json.
- Also, make sure ec_gcm is on branch
ref-agent-go
. This is because I beleive there WAS a protobuf error in sending header information and so I've removed that bit from the gcm in that specific branch. - Finally, run the Agent on the node via:
go run main.go
- And build/run the ec_gcm code as you normally would