We have a lot of lunch and learns at Omnitech . I enjoy these times where most of the developers can get together, share what we’re learning, and learn from others’ experiences and hard work. We have found the value of helping each other leap frog up the learning ladder.
I was able to go to NDC Minnesota 2019 . I had the privilege of attending Shahid Iqbahl ’s (from the U.K.) 2 day workshop on Docker and Kubernetes (k8s). You can read more about that experience on the Omnitech blog .
This is my outline and information for my presentation. It does not have all of what I’ll say and I probably won’t get through it all. Maybe it will be helpful to you as well.
Note: I’m using [*] to denote references.
“Docker is an application platform. It lets you package your application with everything it needs, from the operating system upwards, into a single unit that you can share and run on any computer that has Docker. Docker runs your application in a lightweight, isolated component called a container” [0]
“fully self contained abstraction layer” [3] – see the video in the link
Overtime, the industry has mostly moved from Hardware to VMs. Are we now going to Containers then Serverless?
Hardware > VM > Containers > Serverless
“Hyper-V isolation expands on the isolation provided by Windows Server containers by running each container in a highly optimized virtual machine.”
Windows 10 and Windows Server 2019 and Windows Nano Server
Working towards frictionless with Linux. Microsoft is working with Docker.
Docker first got this working in Linux with parts that already existed in Linux. [0] [4]
From [0] presentation PDF
[0] and page 10 of the presentation PDF
“A container may be only tens of megabytes in size, whereas a virtual machine with its own entire operating system may be several gigabytes in size. Because of this, a single server can host far more containers than virtual machines.” [7]
Each action in the DockerFile creates a new layer and increases the size of the image. Be aware of this to keep image sizes smaller. [1] Chapter 2.
Workshop exercises from NDC 2019 [0]. Docker Succinctly also had good examples [1]. You can try out Docker, without installing it at Kata Code .
See Docker commands Cmder aliases save you from typing docker over and over. Alias d=docker $*
d version
d image ls
d ps
(what’s running)
d pull redis
d run --name myredis redis
Ctrl+c break out, still running
d ps
(what’s running)
d stop myredis
d ps
Run and remove immediately
d run --rm redis
Run in detach mode (run most things, just starts and returns the hash)
d run -d redis
Remove image (short for d image rm redis
)
d rmi redis --force
You can tag
d run shahiddev/k8s:1.0
Map port > localhost:8081
d run -d -p 8081:80 shahiddev/k8s:1.0
“RDP/SSH”
d exec -it 96f bash
[14]
from PDF [14]
[0]
reference, my handwritten notes from [0]
Can make onboarding much easier and faster. There are no environments to setup besides Hyper-V and Docker.
[0] notes
Following the quick-start from Microsoft [5].
Install Docker Desktop (download or use Chocolately choco install docker-desktop
[6])
Windows 10 Professional or Enterprise with Anniversary Update (version 1607) or later. requirements .
Make sure Hyper-V is enabled in your Bios
Treat containers and clusters as cattle, not pets [11].
State is not persisted in an image. Volumes can be mounted to persist and share data written to the disk. [8] “Keep your containers as stateless as possible”[0]
Docker Swarm (basically defunct, though Docker Inc is selling services to help you convert to K8s) with docker-compose K8s = Kubernetes (8 letters in between K and s) and A11s = Accessibility
Why do you need an orchestrator? See the list on Microsoft’s Docs .
I saw in a Docker Con 2019 top 10 takeaways article, “don’t run K8s on premise unless you have to and know what you’re doing” (something like that).
choco install azure-cli
Ryan Hochsteler at NE Code 2019 introduced me to the idea of TDD-ing your Dockerfiles.
Since "config errors are costly", then we should have automated tests for our config files.
Another L&L about K8s.
Read Docker Succinctly.
Practice and use containers.
Watch more videos.
Learn more about the Visual Studio and VS Code tools.
Learn from looking at and running the eShopOnContainers eBook and code. [13]
Learn and practice with Helm and Azure Dev Spaces.
There is a ton to learn and a need to gain experience.
I'm using [*] to denote references.
[0] NDC Shahid Iqbal’s workshop https://github.com/shahiddev/docker-k8s-workshop PDF of his workshop (you’ll have to contact him to ge that) My Notes: Docker and Kubernetes workshop Shahid’s talk on YouTube
[13] eBook and reference code from @ardalis and Microsoft
DotNetRocks filter by the Containers tag [10] https://dotnetrocks.com/?show=1637, https://istio.io/ https://dotnetrocks.com/?show=1616 [4] https://dotnetrocks.com/?show=1599
MSDN magazine had a series. I even tore them out of my physical magazines. https://msdn.microsoft.com/en-us/magazine/mt814415.aspx https://www.google.com/search?ei=1cIWXc6cOZuNtAaXsr-YBQ&q=msdn+magazine+containers&oq=msdn+magazine+containers
[2] https://www.docker.com/resources/what-container
[3] Microsoft Docs on Windows Containers
[5] https://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/quick-start-windows-10
[6] https://stefanscherer.github.io/how-to-install-docker-the-chocolatey-way/
[7] https://www.cio.com/article/2924995/what-are-containers-and-why-do-you-need-them.html - June 2017, a bit out dated
[8] https://docs.docker.com/storage/volumes/
[9] https://cloud.google.com/containers/ - they run more than 2 billion containers a year with K8s!
[11] https://thenewstack.io/how-to-treat-your-kubernetes-clusters-like-cattle-not-pets/
[12] Visual Studio tools , https://www.youtube.com/watch?v=Tlswgxl_Xyk
Microsoft Build 2019 videos (search for containers)
[14] Docker Dev workflow See the PDF linked as well
Microsoft SQL on containers Webinar in May 2019
Shaid’s blog https://blog.headforcloud.com/2018/04/04/k8s-generate-yaml/
Kata Code - practice and learn
Kubernetes and containers are growing up fast, survey shows - June 22, 2019
Free Udemy course (as of July 17, 2019) Docker, From Zero To Hero: Become a DevOps Docker Master
Use Docker for SQL Integration Tests
Please consider using Brave and adding me to your BAT payment ledger. Then you won't have to see ads! (when I get to $100 in Google Ads for a payout, I pledge to turn off ads)
Also check out my Resources Page for referrals that would help me.