4th Street Bar Hive-Bar

Hive-Bar Powered by Hive beta-fdb5b5b

Community post

Docker Kubernetes Series: High Scale Applications

Docker Kubernetes Series: High Scale Applications

In this series I'll outline how I build and deploy web applications with high scale and availability with full DevOps in a language agnostic way so that you can build your very own using which ever technologies best suit your experience and goals.

In this first article we'll get docker and minikube installed on your local system for development. I believe minikube is one of the best ways for single or teams of developers to work because it keeps your code environment similar from dev to production regardless of OS.  It helps eliminate "It works on my machine" syndrome.

I'm developing on a linux system with ubuntu 16.04.2 installed so commands may vary from your setup but all the principles will be the same.

Installing Docker

Remove legacy

sudo apt remove --purge -y docker docker-engine

Install Prerequisites

sudo apt update
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common

Install Docker Community Edition

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install -y docker-ce

Add user to docker group

sudo usermod -aG docker $(whoami)

Installing VirtualBox

sudo apt remove virtualbox*
sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib"
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
sudo apt update
sudo apt install -y virtualbox-5.1

Install kubectl (Kubernetes CLI)

Install

curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/

Enable Autocompletion

echo $'\n# kubectl autocompletion\nsource <(kubectl completion bash)' >> ~/.bashrc
source ~/.bashrc

Uninstall kubectl (if you don't want to use it again)

sudo rm /usr/local/bin/kubectl
rm -rf ~/.kube

Installing Minikube (Local Kubernetes)

Install

curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/

Specific versions and instructions can be found here: Minikube Releases

Start Minikube (also link minikube to local docker environment)

minikube start && eval $(minikube docker-env)

Open Minikube Dashboard(display web interface)

minikube dashboard

Cleanup Minikube (remove vm)

minikube stop
minikube delete

Uninstall Minikube(if you don't want to use it again)

sudo rm /usr/local/bin/minikube
rm -rf ~/.minikube

Now you have everything in place to start developing! 

In the next installment we'll talk about deploying a secure database and implementing a scalable REST interface for manipulating data in the database.

152 upvotes $12.89

Replies (15)

Review before signing

Posting as . Signing with . Keychain permission: Posting. Hive Keychain will ask you to approve this action next.


  
Technical details

Operation fingerprint: