Hello Everyone,
Welcome to the discussion of Docker
I’m Syed Fazal, your facilitator for this discussion.
Plan to cover Agenda:
1. Introduction to Docker.
2. Installing the Docker Engine - Oracle Virtualbox / Hyper-V
3. Docker Images & Containers
4. Deepdive into Docker Images and Development
a. Deploying application using Docker - Spring Boot Microservice (Casestudy/Usecase - Order and Inventory)
b. Storing and Retrieving Docker images from Docker Hub
5. Docker Volumes
6. Docker Networking
Today’s Agenda:
1. Docker recap
2. Introduction to Kubernetes
- Lab Practicals
3. Do it yourself
- Build a docker image to setup Kafka Server
- Build Order Microservice
- Build Inventory Microservice
Container Orchestration
Consider you have 1 cat
who is responsible for its care: Yourself
Consider you are owner of 500 sheep
who is responsible for its care: Hire an assistant
Give instructions to the assistant.
Consider you have 1 virtual machine
Taking care of the health of the VM is the Operations Engineer's responsibility.
Consider you have 500 containers
Taking care of the containers is done by an Assistant (Container Orchestration Platform)
- health of containers
- scalability factors of containers (increasing the containers / decreasing)
Developer builds the Docker image
Ops Engineer give instruction to Container Orchestration platform for creating containers
What are the choices available for Container Orchestration?
https://landscape.cncf.io/card-mode?category=scheduling-orchestration&grouping=category
Kuberenetes
- Container orchestration platform
- Terminology of Kubernetes:
- POD: Wrapper on container taking care of Networking & Volume concepts (Managed by K8s)
- Controller: Used to control the PODs (Managed by Operations Engineer)
- Service: Used to access the PODs (Managed by Operations Engineer)
Kubernetes Lab Activities
Location: https://drive.google.com/drive/folders/1_OOOZLp6sqGJRGEwpK1idcM9FcunSVDS
Documents to be processed in below order:
1. [Lab Setup] K8s Minikube.pdf (This is applicable only for Oracle Virtualbox)
2. Practice 1.1 - K8s Procedural Approach.pdf (Commands approach)
3. Practice 1.2 - K8s Deployment Controller.pdf (YML file approach)
Do it yourself
1. Build a docker image by using below instructions to create Kafka container
- Download https://archive.apache.org/dist/kafka/2.5.0/kafka_2.12-2.5.0.tgz
- Unzip tgz and tar file to C:/labs/docker-labs folder
- Please use the ‘openjdk:8-alpine’ image
- Copy kafka_2.12-2.5.0 to Image
- Change current working directory in Image to /kafka_2.12-2.5.0
- Start the zookeeper using below script
start bin\zookeeper-server-start.sh config\zookeeper.properties
- Start the kafka server using below script
start bin\kafka-server-start.sh config\server.properties
- Create the Topic by name ‘test’ using below command
bin\kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic test
Let us focus on “Kubernetes Lab Activities - Labsetup & Practice 1.1”
Time: 30 to 45 mins
Let us focus on “Build a docker image to setup Kafka Server - Do it yourself”
Let us conclude our discussion for today.
Email: [email protected]
Kindly refer below links for Order and other Microservices
https://github.com/microservices-demo/orders
https://github.com/microservices-demo/shipping