Docker Kubernetes Series: High Scale Applications

in #programming7 years ago

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.

Sort:  

I certainly love to dabble in coding & dig through things on github, but by no means can I say I "know" a language. I'm very much looking forward to the rest of the series. I imagine this is something that will be very useful for crypto-related things, but I think I still need to see the more of the series in order to better understand what it is we will be achieving here.

Can you post a simple example of what the "end result" is that could come of this?

Thanks for the interest!

Here is a link to the application we'll be building: Task List (Staging)

We'll be building a task list application in this series. This will demonstrate how you can build a large scale web application that is completely ready for production commercial use.

I am however working on something that is related to cryptocurrency. I'll show that off when it is more mature. It will follow what is said in this series though.

@clutteredcode Great first post. Welcome to Steemit!
Following you.

Thanks for the interest! Hope to get the next one out in a couple of days.

I've been trying to find a good tutorial series for Docker for way too long. Thanks for doing this, I'll be sure to read more of your work.

Damn, this makes me wish I studied something else rather than Philosophy :(

Dude, I love a good philosophical discussion. I'll teach you coding. If you tell me all your thoughts on God.

Is it a trick? :D Straight to the big question?

Actually that is partly a reason why I enrolled to philosophy. Unfortunately, I didn't find God but I found a passion for beer which isn't necessarily bad since the advent of Steemit :)

Welcome to SteemIt Dr Dev! Interested to see what kind of tutorials and creations you can cook and, and hoping to see more from you.

Take care and steem on.

Thanks! I'll try to get the next installment posted in the next couple of days.

what is this about ?? what is it ??

This post received a 5% vote by @minnowsupport courtesy of @sammosk from the Minnow Support Project ( @minnowsupport ). Join us in Discord.

Congratulations @clutteredcode! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

You published your First Post
You made your First Vote
You got a First Vote
Award for the number of upvotes received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Congratulations @clutteredcode! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

You made your First Comment

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Congratulations @clutteredcode!
Your post was mentioned in the hit parade in the following categories:

  • Upvotes - Ranked 3 with 149 upvotes
  • Pending payout - Ranked 10 with $ 78,54