SlideShare a Scribd company logo
1 of 43
Develop, Build, Deliver and
Run Microservices with
Containers in the Cloud
Eugene Fedorenko
About me
Eugene Fedorenko
Senior Architect
Flexagon
adfpractice-fedor.blogspot.com
@fisbudo
Agenda
•Microservices
•Containers
•Docker
•Build containers
•Kubernetes
•Deploy to the cloud
•OKE/AKS/GKE
•Serverless
•Build, Deploy and Test with functions
Start
Winter Olympics 2018
Dashboard microservice
Simple Development Lifecycle
Environments challenge
DEV TEST PROD
The Idea.
Virtual Machine
Container
•A lightweight, stand-alone, executable package of a piece of
software that includes everything needed to run it: code,
runtime, system tools, system libraries, settings.
•Containers share the host operating system rather than the
hardware directly
•Way more lightweight than a VM
•Docker is the most popular implementation
Docker Container Manager
Docker vs VM
Medal table microservice
Microservices
•An architecture pattern decomposing vertically a
monolith system into loosely coupled subsystems
(microservices). Nothing more. The pattern doesn't
dictate how it should be done technically.
•Just to highlight it: Microservices and Containers
are not the same and totally independent. You can
use Docker with a monolith app, and you can have
several microservices without using Docker at all.
Containers content
UI
• Alpine
• Nginx 1.10.2
• Jet app
– html, css, js
Middleware
• Ubuntu
• Java 1.8.0_171
• Tomcat 8.5
• ADF libraries
12.2.1
• ADF BC app (war)
Database
• Oracle Linux
• Oracle DB
11.2.0.2 XE
• DB schema with
dashboard tables
Build an image
FROM nginx:1.10.2-alpine
COPY web /usr/share/nginx/html
EXPOSE 80
Dockerfile
•Cloud based registry
– Public (free)
– Private
•Centralized resource for container images
•Docker CLI provides access to Docker Hub
– docker search, pull, login, push
Docker Hub
Simple Development Lifecycle
•Open Source platform (Google born)
•Orchestration engine for Ops
•A level of abstraction hiding the complexity of a hybrid
environment (prem/cloud)
•Configuration properties
•Load balancing
•Scalability
•Security
•Visibility
Kubernetes
• Cluster. Set of physical or VMs. Masters and workers.
• Node. Worker. Minion. A physical or virtual machine. Docker is installed on it.
• Kubelet. Internal service running on each worker node and managed by a master
node. Makes sure that everything works according to configuration files.
Kubernetes Architecture
• Kubectl. Kubernetes CLI.
• REST API.
• Dashboard.
Kubernetes Architecture
• Pod. Logical set of containers. A smallest deployable and scalable unit
• Replica set. Defines how many instances of a pod should be alive
• Deployment. Creates a Replica Set to bring up a desired number of Pods
Kubernetes Architecture
• Service. Logical set of pods with a stable ip/access rules and name. Has a
lightweight internal load balancer.
• Internal, External
Kubernetes Architecture
Microservice as a K8s application
Front End
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: olympics-dsh-fe
labels:
run: olympics-dsh-fe
spec:
replicas: 1
template:
metadata:
labels:
run: olympics-dsh-fe
spec:
containers:
- image: eugeneflexagon/olympics-dsh-fe:latest
imagePullPolicy: Always
name: olympics-dsh-fe
ports:
- containerPort: 80
protocol: TCP
apiVersion: v1
kind: Service
metadata:
name: olympics-dsh-fe-svc
spec:
selector:
run: olympics-dsh-fe
ports:
- port: 8088
targetPort: 80
type: ClusterIP
Middleware
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: olympics-dsh-mw
labels:
run: olympics-dsh-mw
spec:
replicas: 1
template:
metadata:
labels:
run: olympics-dsh-mw
spec:
containers:
- image: eugeneflexagon/olympics-dsh-mw:latest
env:
- name: OLYMPICS_DB_URL
value: "jdbc:oracle:thin:@olympics-dsh-db-svc:1521:XE"
name: olympics-dsh-mw
ports:
- containerPort: 8080
apiVersion: v1
kind: Service
metadata:
name: olympics-dsh-mw-svc
spec:
selector:
run: olympics-dsh-mw
ports:
- port: 8088
targetPort: 8080
type: ClusterIP
Database
apiVersion: apps/v1beta2
kind: StatefulSet
metadata:
name: olympics-dsh-db
labels:
run: olympics-dsh-db
spec:
selector:
matchLabels:
run: olympics-dsh-db
serviceName: "olympics-dsh-db-svc"
replicas: 1
template:
metadata:
labels:
run: olympics-dsh-db
spec:
containers:
- image: eugeneflexagon/olympics-dsh-db:latest
volumeMounts:
- mountPath: /u01/app/oracle/oradata
name: dsh-db
name: olympics-dsh-db
ports:
- containerPort: 1521
apiVersion: v1
kind: Service
metadata:
name: olympics-dsh-db-svc
spec:
selector:
run: olympics-dsh-db
ports:
- port: 1521
targetPort: 1521
clusterIP: None
volumeClaimTemplates:
- metadata:
name: dsh-db
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 100M
Pods communication
<Resource name="jdbc/olympics-db-connDS"
auth="Container"
type="oracle.jdbc.pool.OracleDataSource"
factory="oracle.jdbc.pool.OracleDataSourceFactory"
url="${OLYMPICS_DB_URL}"
...
spec:
containers:
- image: eugeneflexagon/olympics-dsh-mw
env:
- name: OLYMPICS_DB_URL
value: "jdbc:oracle:thin:@olympics-dsh-db-svc:1521:XE"
imagePullPolicy: Always
name: olympics-dsh-mw
Ingress
Ingress
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: olympics-ing
annotations:
kubernetes.io/ingress.class: 'nginx'
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
tls:
- secretName: tls-secret
rules:
- http:
paths:
- path: /javabackend-dsh
backend:
serviceName: olympics-dsh-mw-svc
servicePort: 8088
- path: /olympics-dsh
backend:
serviceName: olympics-dsh-fe-svc
servicePort: 8088
K8S clusters in the cloud
Kubectl
•K8s command line tool
•Configured with “config” file
– $HOME/.kube/config
•Can be configured for multiple clusters (contexts)
•Configuration is provider specific
kubectl config use-context aws
kubectl apply -f olympics-fe.yaml
Build & Deploy automation
Build & Deploy automation
Workflows as Function Flows
Serverless
• A unit of work consumes resources only when it is used
– Function is a unit of work
• stateless
• serves one goal
• arguments (input) and result (output)
• Orchestration of independent pieces of work (functions as a
service FaaS)
– Carrying state of the entire flow (program)
– Error handling
– Transaction management
Serverless
• Code centric paradigm. Hyde Infrastructure.
–Focus on coding resolving business problems and forget about
infrastructure
–Everything is working on some “computing resources”
• Scalability
–Developers don't do anything for scaling. Scaling is handled
automatically.
• Billing
–Don't pay for idle time
–Pay for milliseconds
• Utilization
–Many small pieces running for short time on same VM
Serverless Platforms
•AWS Lambda
•Azure Functions
•OpenWhisk
– Open Source / Apache
•Fn
– Open Source / Oracle
– container native
•OpenFaaS
– Open Source / Alex Ellis
– container native
Fn
• Fn components are Docker containers
• Requires only Docker engine
• Can run on Kubernetes cluster
Ojet Builder Container
Ojet Builder Function
curl http://localhost:8080/ojetbuilder /build -d “$GIT_URL
$NEXUS_URL $PROJECT_VERSION"
Q&A

More Related Content

What's hot

Docker Platform 1.9
Docker Platform 1.9Docker Platform 1.9
Docker Platform 1.9
Docker, Inc.
 

What's hot (20)

DockerCon SF 2015: DHE/DTR
DockerCon SF 2015: DHE/DTRDockerCon SF 2015: DHE/DTR
DockerCon SF 2015: DHE/DTR
 
Highly Available Persistent Applications in Containers by Kendrick Coleman, E...
Highly Available Persistent Applications in Containers by Kendrick Coleman, E...Highly Available Persistent Applications in Containers by Kendrick Coleman, E...
Highly Available Persistent Applications in Containers by Kendrick Coleman, E...
 
Introducing LinuxKit
Introducing LinuxKitIntroducing LinuxKit
Introducing LinuxKit
 
On Prem Container Cloud - Lessons Learned
On Prem Container Cloud - Lessons LearnedOn Prem Container Cloud - Lessons Learned
On Prem Container Cloud - Lessons Learned
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Dell Trials and Triumphs using Docker on Client Systems by Sean McGinnis and ...
Dell Trials and Triumphs using Docker on Client Systems by Sean McGinnis and ...Dell Trials and Triumphs using Docker on Client Systems by Sean McGinnis and ...
Dell Trials and Triumphs using Docker on Client Systems by Sean McGinnis and ...
 
Windows Server and Docker - The Internals Behind Bringing Docker and Containe...
Windows Server and Docker - The Internals Behind Bringing Docker and Containe...Windows Server and Docker - The Internals Behind Bringing Docker and Containe...
Windows Server and Docker - The Internals Behind Bringing Docker and Containe...
 
Proof of Concept: Serverless with Swarm by Nirmal Mehta, Booz Allen Hamilton
Proof of Concept: Serverless with Swarm by Nirmal Mehta, Booz Allen Hamilton Proof of Concept: Serverless with Swarm by Nirmal Mehta, Booz Allen Hamilton
Proof of Concept: Serverless with Swarm by Nirmal Mehta, Booz Allen Hamilton
 
Docker for Ops: Docker Networking Deep Dive, Considerations and Troubleshooti...
Docker for Ops: Docker Networking Deep Dive, Considerations and Troubleshooti...Docker for Ops: Docker Networking Deep Dive, Considerations and Troubleshooti...
Docker for Ops: Docker Networking Deep Dive, Considerations and Troubleshooti...
 
DCSF19 Containers for Beginners
DCSF19 Containers for BeginnersDCSF19 Containers for Beginners
DCSF19 Containers for Beginners
 
JEEconf 2017
JEEconf 2017JEEconf 2017
JEEconf 2017
 
fabric8 ... and Docker, Kubernetes & OpenShift
fabric8 ... and Docker, Kubernetes & OpenShiftfabric8 ... and Docker, Kubernetes & OpenShift
fabric8 ... and Docker, Kubernetes & OpenShift
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
 
Introduction to Docker | Docker and Kubernetes Training
Introduction to Docker | Docker and Kubernetes TrainingIntroduction to Docker | Docker and Kubernetes Training
Introduction to Docker | Docker and Kubernetes Training
 
Docker Platform 1.9
Docker Platform 1.9Docker Platform 1.9
Docker Platform 1.9
 
Building a Platform-as-a-Service with Docker and Node.js
Building a Platform-as-a-Service with Docker and Node.jsBuilding a Platform-as-a-Service with Docker and Node.js
Building a Platform-as-a-Service with Docker and Node.js
 
DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2
 
Structured Container Delivery by Oscar Renalias, Accenture
Structured Container Delivery by Oscar Renalias, AccentureStructured Container Delivery by Oscar Renalias, Accenture
Structured Container Delivery by Oscar Renalias, Accenture
 
NetflixOSS for Triangle Devops Oct 2013
NetflixOSS for Triangle Devops Oct 2013NetflixOSS for Triangle Devops Oct 2013
NetflixOSS for Triangle Devops Oct 2013
 

Similar to Microservices with containers in the cloud

Kubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CDKubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CD
Stfalcon Meetups
 
Kubernetes @ meetic
Kubernetes @ meeticKubernetes @ meetic
Kubernetes @ meetic
Sébastien Le Gall
 
DevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes IntegrationDevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes Integration
Hank Preston
 

Similar to Microservices with containers in the cloud (20)

Containers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshellContainers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshell
 
Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307
 
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
 
HOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLDHOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLD
 
Kubernetes - training micro-dragons without getting burnt
Kubernetes -  training micro-dragons without getting burntKubernetes -  training micro-dragons without getting burnt
Kubernetes - training micro-dragons without getting burnt
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !
 
Pro2516 10 things about oracle and k8s.pptx-final
Pro2516   10 things about oracle and k8s.pptx-finalPro2516   10 things about oracle and k8s.pptx-final
Pro2516 10 things about oracle and k8s.pptx-final
 
Kubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CDKubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CD
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
ITB2017 - Keynote
ITB2017 - KeynoteITB2017 - Keynote
ITB2017 - Keynote
 
Exploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonExploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in Python
 
GlobalAzureBootCamp 2018
GlobalAzureBootCamp 2018GlobalAzureBootCamp 2018
GlobalAzureBootCamp 2018
 
DevOps Fusion 2019: Docker - Why the future takes place in containers
DevOps Fusion 2019: Docker - Why the future takes place in containersDevOps Fusion 2019: Docker - Why the future takes place in containers
DevOps Fusion 2019: Docker - Why the future takes place in containers
 
DevEx | there’s no place like k3s
DevEx | there’s no place like k3sDevEx | there’s no place like k3s
DevEx | there’s no place like k3s
 
Kubernetes @ meetic
Kubernetes @ meeticKubernetes @ meetic
Kubernetes @ meetic
 
DevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes IntegrationDevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes Integration
 
Overcoming 5 Common Docker Challenges: How We Do It at RightScale
Overcoming 5 Common Docker Challenges: How We Do It at RightScaleOvercoming 5 Common Docker Challenges: How We Do It at RightScale
Overcoming 5 Common Docker Challenges: How We Do It at RightScale
 
Container orchestration k8s azure kubernetes services
Container orchestration  k8s azure kubernetes servicesContainer orchestration  k8s azure kubernetes services
Container orchestration k8s azure kubernetes services
 
Microservices and containers for the unitiated
Microservices and containers for the unitiatedMicroservices and containers for the unitiated
Microservices and containers for the unitiated
 
Continuous Deployment with Kubernetes, Docker and GitLab CI
Continuous Deployment with Kubernetes, Docker and GitLab CIContinuous Deployment with Kubernetes, Docker and GitLab CI
Continuous Deployment with Kubernetes, Docker and GitLab CI
 

Recently uploaded

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Recently uploaded (20)

%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 

Microservices with containers in the cloud

  • 1. Develop, Build, Deliver and Run Microservices with Containers in the Cloud Eugene Fedorenko
  • 2. About me Eugene Fedorenko Senior Architect Flexagon adfpractice-fedor.blogspot.com @fisbudo
  • 3. Agenda •Microservices •Containers •Docker •Build containers •Kubernetes •Deploy to the cloud •OKE/AKS/GKE •Serverless •Build, Deploy and Test with functions
  • 10. Container •A lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it: code, runtime, system tools, system libraries, settings. •Containers share the host operating system rather than the hardware directly •Way more lightweight than a VM •Docker is the most popular implementation
  • 14. Microservices •An architecture pattern decomposing vertically a monolith system into loosely coupled subsystems (microservices). Nothing more. The pattern doesn't dictate how it should be done technically. •Just to highlight it: Microservices and Containers are not the same and totally independent. You can use Docker with a monolith app, and you can have several microservices without using Docker at all.
  • 15. Containers content UI • Alpine • Nginx 1.10.2 • Jet app – html, css, js Middleware • Ubuntu • Java 1.8.0_171 • Tomcat 8.5 • ADF libraries 12.2.1 • ADF BC app (war) Database • Oracle Linux • Oracle DB 11.2.0.2 XE • DB schema with dashboard tables
  • 17. FROM nginx:1.10.2-alpine COPY web /usr/share/nginx/html EXPOSE 80 Dockerfile
  • 18. •Cloud based registry – Public (free) – Private •Centralized resource for container images •Docker CLI provides access to Docker Hub – docker search, pull, login, push Docker Hub
  • 20. •Open Source platform (Google born) •Orchestration engine for Ops •A level of abstraction hiding the complexity of a hybrid environment (prem/cloud) •Configuration properties •Load balancing •Scalability •Security •Visibility Kubernetes
  • 21. • Cluster. Set of physical or VMs. Masters and workers. • Node. Worker. Minion. A physical or virtual machine. Docker is installed on it. • Kubelet. Internal service running on each worker node and managed by a master node. Makes sure that everything works according to configuration files. Kubernetes Architecture
  • 22. • Kubectl. Kubernetes CLI. • REST API. • Dashboard. Kubernetes Architecture
  • 23. • Pod. Logical set of containers. A smallest deployable and scalable unit • Replica set. Defines how many instances of a pod should be alive • Deployment. Creates a Replica Set to bring up a desired number of Pods Kubernetes Architecture
  • 24. • Service. Logical set of pods with a stable ip/access rules and name. Has a lightweight internal load balancer. • Internal, External Kubernetes Architecture
  • 25. Microservice as a K8s application
  • 26. Front End apiVersion: extensions/v1beta1 kind: Deployment metadata: name: olympics-dsh-fe labels: run: olympics-dsh-fe spec: replicas: 1 template: metadata: labels: run: olympics-dsh-fe spec: containers: - image: eugeneflexagon/olympics-dsh-fe:latest imagePullPolicy: Always name: olympics-dsh-fe ports: - containerPort: 80 protocol: TCP apiVersion: v1 kind: Service metadata: name: olympics-dsh-fe-svc spec: selector: run: olympics-dsh-fe ports: - port: 8088 targetPort: 80 type: ClusterIP
  • 27. Middleware apiVersion: extensions/v1beta1 kind: Deployment metadata: name: olympics-dsh-mw labels: run: olympics-dsh-mw spec: replicas: 1 template: metadata: labels: run: olympics-dsh-mw spec: containers: - image: eugeneflexagon/olympics-dsh-mw:latest env: - name: OLYMPICS_DB_URL value: "jdbc:oracle:thin:@olympics-dsh-db-svc:1521:XE" name: olympics-dsh-mw ports: - containerPort: 8080 apiVersion: v1 kind: Service metadata: name: olympics-dsh-mw-svc spec: selector: run: olympics-dsh-mw ports: - port: 8088 targetPort: 8080 type: ClusterIP
  • 28. Database apiVersion: apps/v1beta2 kind: StatefulSet metadata: name: olympics-dsh-db labels: run: olympics-dsh-db spec: selector: matchLabels: run: olympics-dsh-db serviceName: "olympics-dsh-db-svc" replicas: 1 template: metadata: labels: run: olympics-dsh-db spec: containers: - image: eugeneflexagon/olympics-dsh-db:latest volumeMounts: - mountPath: /u01/app/oracle/oradata name: dsh-db name: olympics-dsh-db ports: - containerPort: 1521 apiVersion: v1 kind: Service metadata: name: olympics-dsh-db-svc spec: selector: run: olympics-dsh-db ports: - port: 1521 targetPort: 1521 clusterIP: None volumeClaimTemplates: - metadata: name: dsh-db spec: accessModes: [ "ReadWriteOnce" ] resources: requests: storage: 100M
  • 29. Pods communication <Resource name="jdbc/olympics-db-connDS" auth="Container" type="oracle.jdbc.pool.OracleDataSource" factory="oracle.jdbc.pool.OracleDataSourceFactory" url="${OLYMPICS_DB_URL}" ... spec: containers: - image: eugeneflexagon/olympics-dsh-mw env: - name: OLYMPICS_DB_URL value: "jdbc:oracle:thin:@olympics-dsh-db-svc:1521:XE" imagePullPolicy: Always name: olympics-dsh-mw
  • 31. Ingress apiVersion: extensions/v1beta1 kind: Ingress metadata: name: olympics-ing annotations: kubernetes.io/ingress.class: 'nginx' nginx.ingress.kubernetes.io/rewrite-target: / spec: tls: - secretName: tls-secret rules: - http: paths: - path: /javabackend-dsh backend: serviceName: olympics-dsh-mw-svc servicePort: 8088 - path: /olympics-dsh backend: serviceName: olympics-dsh-fe-svc servicePort: 8088
  • 32. K8S clusters in the cloud
  • 33. Kubectl •K8s command line tool •Configured with “config” file – $HOME/.kube/config •Can be configured for multiple clusters (contexts) •Configuration is provider specific kubectl config use-context aws kubectl apply -f olympics-fe.yaml
  • 34. Build & Deploy automation
  • 35. Build & Deploy automation
  • 37. Serverless • A unit of work consumes resources only when it is used – Function is a unit of work • stateless • serves one goal • arguments (input) and result (output) • Orchestration of independent pieces of work (functions as a service FaaS) – Carrying state of the entire flow (program) – Error handling – Transaction management
  • 38. Serverless • Code centric paradigm. Hyde Infrastructure. –Focus on coding resolving business problems and forget about infrastructure –Everything is working on some “computing resources” • Scalability –Developers don't do anything for scaling. Scaling is handled automatically. • Billing –Don't pay for idle time –Pay for milliseconds • Utilization –Many small pieces running for short time on same VM
  • 39. Serverless Platforms •AWS Lambda •Azure Functions •OpenWhisk – Open Source / Apache •Fn – Open Source / Oracle – container native •OpenFaaS – Open Source / Alex Ellis – container native
  • 40. Fn • Fn components are Docker containers • Requires only Docker engine • Can run on Kubernetes cluster
  • 42. Ojet Builder Function curl http://localhost:8080/ojetbuilder /build -d “$GIT_URL $NEXUS_URL $PROJECT_VERSION"
  • 43. Q&A