The following documents using Kraken to create a Kubernetes 'cluster' on a Linux host (Ubuntu 15.10) using VirtualBox+Vagrant as the technology to form the cluster, (of virtual machines).
Install Ubuntu 15.10 (Wily Werewolf) on a host that is capable of running VirtualBox to create virtual machines. This example was done using a 24G memory + 8 core ESXi virtual machine with Nested Virtualization enabled.
Update the installation:
sudo apt-get update
sudo apt-get dist-upgrade
sudo shutdown -r # force the latest kernel to be running.
Ensure that '/usr/local/bin' is in your $PATH.
Install the latest Ansible using PIP.
sudo apt-get install build-essential python-dev python-pip
sudo pip install ansible
Install Docker using the Ubuntu Installation instructions:
sudo apt-get install apt-transport-https ca-certificates
sudo apt-key adv \
--keyserver hkp://p80.pool.sks-keyservers.net:80 \
--recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo touch /etc/apt/sources.list.d/docker.list
sudo sh -c \
"echo 'deb https://apt.dockerproject.org/repo ubuntu-wily main' >> /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install docker-engine
## the service is not started during install.
sudo service docker start
Add your user to the docker
group
sudo adduser <user_name> docker
Log out and back in for the group change to take effect.
Install Docker Compose:
curl -L \
https://github.com/docker/compose/releases/download/1.6.2/docker-compose-`uname -s`-`uname -m` > docker-compose
sudo mv docker-compose /usr/local/bin
sudo chown root.root /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Install Docker Machine:
curl -L \
https://github.com/docker/machine/releases/download/v0.6.0/docker-machine-`uname -s`-`uname -m` > docker-machine
sudo mv docker-machine /usr/local/bin
sudo chown root.root /usr/local/bin/docker-machine
sudo chmod +x /usr/local/bin/docker-machine
Install Virtualbox using the Ubuntu packaged version:
sudo apt-get install virtualbox
Install Vagrant directly from HashiCorp's download instructions for Debian.
cd /tmp
wget https://releases.hashicorp.com/vagrant/1.8.1/vagrant_1.8.1_x86_64.deb
sudo dpkg -i vagrant_1.8.1_x86_64.deb
Install Terraform from HashiCorp using their installation instructions:
sudo apt-get install unzip
cd /tmp
wget wget https://releases.hashicorp.com/terraform/0.6.13/terraform_0.6.13_linux_amd64.zip
cd /usr/local/bin
sudo unzip /tmp/terraform_0.6.13_linux_amd64.zip
Install Go in preparation to build Terraform providers.
sudo apt-get install golang
cd ~
mkdir go # create a 'go' directory in your $HOME
Add GOPATH=$HOME/go
to your environment variables
export GOPATH=~/go
At this point it is not strictly necessary, but it never hurts -- REBOOT.
Install custom Terraform providers from (Samsung-AG)[https://github.com/Samsung-AG/kraken], written in Go:
go get github.com/Samsung-AG/terraform-provider-execute
go get github.com/Samsung-AG/terraform-provider-coreosbox
go get github.com/Samsung-AG/terraform-provider-coreosver
Add the GOPATH
bin directory to your PATH
:
export PATH=~/go/bin:$PATH
cd ~ ## or to a directory you want to clone the Kraken repo into.
git clone https://github.com/Samsung-AG/kraken
cd kraken
Start a cluster named 'bubo':
terraform apply \
-input=false \
-state=terraform/local/terraform.tfvars \
-var 'cluster_name=bubo' \
terraform/local