SlideShare une entreprise Scribd logo
1  sur  21
DRUPAL AND CONTAINER
ORCHESTRATION:
Using Kubernetes to Manage All the Things
Presented by
Shayan Sarkar | Booz Allen Hamilton
Will Patterson | Booz Allen Hamilton
DRUPAL GOVCON 2017
Innovation center, Washington, D.C.
• Continuous delivery
- Deliver software more often and with less errors
- No time spent on dev-to-ops handoffs
• Improved Security
- Containers help isolate each part of your system and provides
better control of each component of your system
• Run anything, anywhere
- All languages, all databases, all operating systems
- Any distribution, any cloud, any machine
• Reproducibility
- Reduces the times we say “it worked on my machine”
WHAT HAS DOCKER DONE FOR US?
1
#BoozAllen #Drupal4Gov
• Kubernetes is an open-source system for automating deployment,
scaling, and management of containerized applications.
• Improves reliability
- Continuously monitors and manages your containers
- Will scale your application to handle changes in load
• Better use of infrastructure resources
- Helps reduce infrastructure requirements by gracefully scaling up
and down your entire platform
• Coordinates what containers run where and when across your system
• How do all the different types of containers in a system talk to each
other?
• Easily coordinate deployments of your system
- Which containers need to be deployed
- Where should the containers be deployed
WHAT DOES KUBERNETES DO?
2
#BoozAllen #Drupal4Gov
THE POD IS THE CORE KUBERNETES COMPONENT
• The Pod is the core component of Kubernetes
• Collection of 1 or more containers
• Each pod should focus on one container, however sidecar containers
can be added to enhance features of the core container
3
spec:
template:
spec:
containers:
- name: drupal
image: cr.io/repo/mydrupal:v1
#BoozAllen #Drupal4Gov
PODS CAN HANDLE SCALING AND DEPLOYMENTS
• Once Kubernetes understands what is in a pod, multiple
management features are available:
• System Performance
- Scale up/down the number of pods based on CPU load or
other criteria
• System Monitoring
- Probes to check the health of each pod
- Any unhealthy ones get killed and new pod is put into service
• Deployments
- Deploy new versions of the container
- Control traffic to the new pods to test the new version
o Blue/Green deployments
o Rolling deployments
4
#BoozAllen #Drupal4Gov
KUBERNETES SERVICES TIE TOGETHER THE PODS
• Kubernetes Services are used to control communications with the
pods
- Load balance the requests
- Don’t send traffic to the unhealthy ones
- Only talk to the correct version
5
apiVersion: v1
kind: Service
metadata:
name: drupal
spec:
selector:
app: drupal
ports:
- name: http-port
port: 80
type: LoadBalancer
#BoozAllen #Drupal4Gov
SERVICES STRUCTURE ALLOW MULTIPLE COMPONENTS
• With the Service architecture Kubernetes handles things
that you often might have to worry about
- Service discovery
- Load balancing
- Scaling
• Service discovery allows each pod just needs to call the
name of the service it wants to talk to
• Services have multiple options
- Session based load balancing
- Single port based services
- External Services
• The Service architecture of Kubernetes can be scaled up to
handle as many services as you would like for your system
6
#BoozAllen #Drupal4Gov
WHERE IS THE INFRASTRUCTURE?
• You don’t have to worry about the infrastructure
• The entire design of pods and services is described
with YAML files
• Nothing in deployments, pod management, service
discovery, monitoring, etc required any knowledge
about how many servers, IP addresses, load balancers,
or anything else with the infrastructure
• Behind the scenes, Kubernetes is aware of all of the
servers available, load balancers, application gateways
and will configure them automatically according to
what is in the YAML files
7
#BoozAllen #Drupal4Gov
8
#BoozAllen #Drupal4Gov
DRUPAL EXAMPLES
DEPLOYMENT
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: drupal
spec:
template:
spec:
containers:
- name: drupal
image: cr.io/repo/mydrupal:v1
ports:
containerPort: 80
• Deployment—connects a Pod with replication control and
rollout management
- Synchronizes app configuration across instances
- Production deploys are as simple as updating an image tag
- No more bouncing apache on a dozen servers
• Contains a Pod spec
9
#BoozAllen #Drupal4Gov
AUTOSCALING
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
spec:
scaleTargetRef:
apiVersion: extensions/v1beta1
kind: Deployment
name: drupal
minReplicas: 2
maxReplicas: 10
targetCPUUtilizationPercentage: 50
• Realizes the promise of the cloud: scales your app in response
to load, in real time
• Kubernetes tracks resource utilization
• Responds by adding or removing pods to the Replica Set
• Kubernetes core supports CPU utilization
• Other resources are available via add-ons
• Pod autoscaling != node autoscaling
• Node autoscaling for GCE and AWS as add-ons
10
#BoozAllen #Drupal4Gov
SERVICE
apiVersion: v1
kind: Service
metadata:
name: drupal
spec:
selector:
app: drupal
ports:
- name: http-port
port: 80
type: LoadBalancer
• curl http://drupal/cron.php
• Manages ports and internal IP’s with domain name resolution
• Opens ports on agent nodes
• Manages load balancing between pods
• Provisions cloud provider load balancer
• Exposes pods to Kubernetes service discovery
11
#BoozAllen #Drupal4Gov
EXTERNAL SERVICE
kind: Service
apiVersion: v1
metadata:
name: mysql-service
spec:
type: ExternalName
externalName: mysql.example.com
ports:
- port: 3306
• Use RDS and provider services when possible
• No need to hard code external services in your application
• Adds an external resource to Kubernetes service discovery
12
#BoozAllen #Drupal4Gov
DEPLOYMENT: CONFIGURATION MANAGEMENT
apiVersion: extensions/v1beta1
kind: Deployment
spec:
replicas: 2
template:
spec:
containers:
- name: drupal
image: cr.io/repo/mydrupal:v1
ports:
containerPort: 80
env:
- name: DB_HOSTNAME
value: mysql-service
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: mysql-service-secrets
key: password
imagePullSecrets:
- name: registrykey
13
#BoozAllen #Drupal4Gov
* $databases['default']['default'] = array(
* 'driver' => 'sqlite',
* 'database' => '/path/to/databasefilename',
* );
* @endcode
*/
$databases['default']['default'] = array(
'driver' => 'mysql',
'database' => 'mydrupaldb',
'username' => getenv('DB_USERNAME'),
'password' => getenv('DB_PASSWORD'),
'host' => getenv('DB_HOSTNAME'),
);
/**
* Access control for update.php script.
*
* If you are updating your Drupal installation using
* are not logged in using either an account with the
* updates" permission or the site maintenance account
* created during installation), you will need to modify
DEPLOYMENT: VOLUMES
apiVersion: extensions/v1beta1
kind: Deployment
spec:
replicas: 2
template:
spec:
containers:
- name: drupal
image: cr.io/repo/mydrupal:v1
ports:
containerPort: 80
volumeMounts:
- name: my-drupal-volume
mountPath: /drupal-7.56/sites/files
volumes:
- name: my-drupal-volume
azureFile:
secretName: azure-storage-secret
shareName: <pre-existing-file-share>
readOnly: false
• Manages networked drives across containers and VM’s
• volumeMounts sets the mount path and references a named
volume
• Volumes can be defined as
- Pre-created named volumes
- Dynamically provisioned Persistent Volume Claims
14
#BoozAllen #Drupal4Gov
15
#BoozAllen #Drupal4Gov
NOTHING IS EASY
• Kubernetes is open source and fast moving. Cloud provider specific
integrations might trail a couple versions.
- Ingress Controllers
- Managed Disks
• While the Infrastructure is generally transparent, you still need to
ensure that the cloud provider implemented Kubernetes support in a
manner that meets your system needs
- Internal vs External load balancers
- Cluster Scaling
• Leverage the strength of the open source community.
LESSONS LEARNED
16
#BoozAllen #Drupal4Gov
Install local utilities: kubectl and minikube
https://kubernetes.io/docs/tasks/tools/install-kubectl/
Checkout the Kubernetes docs
https://kubernetes.io/docs/home/
Unified Logging with Fluentbit
http://fluentbit.io/documentation/0.11/kubernetes/
Syslog, Docker, and Drupal
https://github.com/BradJonesLLC/docker-drupal
GETTING STARTED
17
#BoozAllen #Drupal4Gov
QUESTIONS?
JOIN US AT THE BOOZ ALLEN EXPO BOOTH
ADDITIONAL RESOURCES
• Red Hat OpenShift : Enterprise implementation of Kubernetes
- https://www.openshift.com/
• Kops : Kubernetes cluster management utility
- https://github.com/kubernetes/kops
Booz Allen’s Drupal.org Profile: https://www.drupal.org/booz-allen-hamilton
Join the Conversation…
…And Come Visit Our Booth!
19
#BoozAllen #Drupal4Gov
FOR MORE INFORMATION…
Today’s Speakers – Please visit our booth for further Q&A:
• Shayan Sarkar, Solution Architect, Sarkar_Shayan@bah.com
• Will Patterson, Drupal Developer, Patterson_William@bah.com
Please contact Booz Allen’s Strategic Innovation Group for more information on our Drupal practice:
• Arash Farazdaghi, Solution Architect, Farazdaghi_Arash@bah.com
• Eric Robbins, Solution Architect, Robbins_Eric@bah.com
• Craig Warsaw, Principal Solution Architect, Warsaw_Craig@bah.com
Join the Conversation…
…And Come Visit Our Booth!
20
#BoozAllen #Drupal4Gov

Contenu connexe

Tendances

Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerLuong Vo
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT CampusAjeet Singh Raina
 
Az 104 session 5: Azure networking
Az 104 session 5: Azure networkingAz 104 session 5: Azure networking
Az 104 session 5: Azure networkingAzureEzy1
 
Unleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCacheUnleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCacheAmazon Web Services
 
Deep Dive on Amazon Elastic File System (Amazon EFS)
Deep Dive on Amazon Elastic File System (Amazon EFS)Deep Dive on Amazon Elastic File System (Amazon EFS)
Deep Dive on Amazon Elastic File System (Amazon EFS)Amazon Web Services
 
Getting started with Docker
Getting started with DockerGetting started with Docker
Getting started with DockerRavindu Fernando
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Ryan Jarvinen
 
Apache Sentry for Hadoop security
Apache Sentry for Hadoop securityApache Sentry for Hadoop security
Apache Sentry for Hadoop securitybigdatagurus_meetup
 
Docker: From Zero to Hero
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Herofazalraja
 
Dockers and kubernetes
Dockers and kubernetesDockers and kubernetes
Dockers and kubernetesDr Ganesh Iyer
 
Docker introduction
Docker introductionDocker introduction
Docker introductiondotCloud
 

Tendances (20)

Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
VMware Disaster RECOVERY
VMware Disaster RECOVERYVMware Disaster RECOVERY
VMware Disaster RECOVERY
 
presentation on Docker
presentation on Dockerpresentation on Docker
presentation on Docker
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT Campus
 
Terraform
TerraformTerraform
Terraform
 
Az 104 session 5: Azure networking
Az 104 session 5: Azure networkingAz 104 session 5: Azure networking
Az 104 session 5: Azure networking
 
Introduction to container based virtualization with docker
Introduction to container based virtualization with dockerIntroduction to container based virtualization with docker
Introduction to container based virtualization with docker
 
Unleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCacheUnleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCache
 
Deep Dive on Amazon Elastic File System (Amazon EFS)
Deep Dive on Amazon Elastic File System (Amazon EFS)Deep Dive on Amazon Elastic File System (Amazon EFS)
Deep Dive on Amazon Elastic File System (Amazon EFS)
 
Terraform
TerraformTerraform
Terraform
 
Getting started with Docker
Getting started with DockerGetting started with Docker
Getting started with Docker
 
Docker Kubernetes Istio
Docker Kubernetes IstioDocker Kubernetes Istio
Docker Kubernetes Istio
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17
 
Apache Sentry for Hadoop security
Apache Sentry for Hadoop securityApache Sentry for Hadoop security
Apache Sentry for Hadoop security
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Docker: From Zero to Hero
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Hero
 
Dockers and kubernetes
Dockers and kubernetesDockers and kubernetes
Dockers and kubernetes
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Oracle Cloud Infrastructure
Oracle Cloud InfrastructureOracle Cloud Infrastructure
Oracle Cloud Infrastructure
 

Similaire à Drupal and Container Orchestration - Using Kubernetes to Manage All the Things.pptx

What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017Patrick Chanezon
 
Kubernetes-Presentation-Syed-Murtaza-Hassan
Kubernetes-Presentation-Syed-Murtaza-HassanKubernetes-Presentation-Syed-Murtaza-Hassan
Kubernetes-Presentation-Syed-Murtaza-HassanSyed Murtaza Hassan
 
DevOps and BigData Analytics
DevOps and BigData Analytics DevOps and BigData Analytics
DevOps and BigData Analytics sbbabu
 
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...Brian Grant
 
WSO2Con USA 2015: Keynote - Kubernetes – A Platform for Automating Deployment...
WSO2Con USA 2015: Keynote - Kubernetes – A Platform for Automating Deployment...WSO2Con USA 2015: Keynote - Kubernetes – A Platform for Automating Deployment...
WSO2Con USA 2015: Keynote - Kubernetes – A Platform for Automating Deployment...WSO2
 
4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)
4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)
4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)PROIDEA
 
DEVNET-1183 OpenShift + Kubernetes + Docker
DEVNET-1183	OpenShift + Kubernetes + DockerDEVNET-1183	OpenShift + Kubernetes + Docker
DEVNET-1183 OpenShift + Kubernetes + DockerCisco DevNet
 
APPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + Docker
APPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + DockerAPPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + Docker
APPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + DockerSteven Pousty
 
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Mandi Walls
 
Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307Inhye Park
 
DevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesDevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesRonny Trommer
 
Openstack days sv building highly available services using kubernetes (preso)
Openstack days sv   building highly available services using kubernetes (preso)Openstack days sv   building highly available services using kubernetes (preso)
Openstack days sv building highly available services using kubernetes (preso)Allan Naim
 
Container Conf 2017: Rancher Kubernetes
Container Conf 2017: Rancher KubernetesContainer Conf 2017: Rancher Kubernetes
Container Conf 2017: Rancher KubernetesVishal Biyani
 
Containers, microservices and serverless for realists
Containers, microservices and serverless for realistsContainers, microservices and serverless for realists
Containers, microservices and serverless for realistsKarthik Gaekwad
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to KubernetesVishal Biyani
 
An Introduction to Kubernetes and Continuous Delivery Fundamentals
An Introduction to Kubernetes and Continuous Delivery FundamentalsAn Introduction to Kubernetes and Continuous Delivery Fundamentals
An Introduction to Kubernetes and Continuous Delivery FundamentalsAll Things Open
 
Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015WaveMaker, Inc.
 
Kube Overview and Kube Conformance Certification OpenSource101 Raleigh
Kube Overview and Kube Conformance Certification OpenSource101 RaleighKube Overview and Kube Conformance Certification OpenSource101 Raleigh
Kube Overview and Kube Conformance Certification OpenSource101 RaleighBrad Topol
 

Similaire à Drupal and Container Orchestration - Using Kubernetes to Manage All the Things.pptx (20)

What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
 
Kubernetes-Presentation-Syed-Murtaza-Hassan
Kubernetes-Presentation-Syed-Murtaza-HassanKubernetes-Presentation-Syed-Murtaza-Hassan
Kubernetes-Presentation-Syed-Murtaza-Hassan
 
DevOps and BigData Analytics
DevOps and BigData Analytics DevOps and BigData Analytics
DevOps and BigData Analytics
 
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
 
WSO2Con USA 2015: Keynote - Kubernetes – A Platform for Automating Deployment...
WSO2Con USA 2015: Keynote - Kubernetes – A Platform for Automating Deployment...WSO2Con USA 2015: Keynote - Kubernetes – A Platform for Automating Deployment...
WSO2Con USA 2015: Keynote - Kubernetes – A Platform for Automating Deployment...
 
4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)
4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)
4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)
 
Data harmonycloudpowerpointclientfacing
Data harmonycloudpowerpointclientfacingData harmonycloudpowerpointclientfacing
Data harmonycloudpowerpointclientfacing
 
DEVNET-1183 OpenShift + Kubernetes + Docker
DEVNET-1183	OpenShift + Kubernetes + DockerDEVNET-1183	OpenShift + Kubernetes + Docker
DEVNET-1183 OpenShift + Kubernetes + Docker
 
APPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + Docker
APPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + DockerAPPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + Docker
APPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + Docker
 
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
 
Mcroservices with docker kubernetes, goang and grpc, overview
Mcroservices with docker kubernetes, goang and grpc, overviewMcroservices with docker kubernetes, goang and grpc, overview
Mcroservices with docker kubernetes, goang and grpc, overview
 
Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307
 
DevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesDevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to Kubernetes
 
Openstack days sv building highly available services using kubernetes (preso)
Openstack days sv   building highly available services using kubernetes (preso)Openstack days sv   building highly available services using kubernetes (preso)
Openstack days sv building highly available services using kubernetes (preso)
 
Container Conf 2017: Rancher Kubernetes
Container Conf 2017: Rancher KubernetesContainer Conf 2017: Rancher Kubernetes
Container Conf 2017: Rancher Kubernetes
 
Containers, microservices and serverless for realists
Containers, microservices and serverless for realistsContainers, microservices and serverless for realists
Containers, microservices and serverless for realists
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
An Introduction to Kubernetes and Continuous Delivery Fundamentals
An Introduction to Kubernetes and Continuous Delivery FundamentalsAn Introduction to Kubernetes and Continuous Delivery Fundamentals
An Introduction to Kubernetes and Continuous Delivery Fundamentals
 
Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015
 
Kube Overview and Kube Conformance Certification OpenSource101 Raleigh
Kube Overview and Kube Conformance Certification OpenSource101 RaleighKube Overview and Kube Conformance Certification OpenSource101 Raleigh
Kube Overview and Kube Conformance Certification OpenSource101 Raleigh
 

Dernier

Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilVinayVitekari
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...vershagrag
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesMayuraD1
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Ramkumar k
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxpritamlangde
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxmaisarahman1
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfsumitt6_25730773
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Servicemeghakumariji156
 

Dernier (20)

FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdf
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 

Drupal and Container Orchestration - Using Kubernetes to Manage All the Things.pptx

  • 1. DRUPAL AND CONTAINER ORCHESTRATION: Using Kubernetes to Manage All the Things Presented by Shayan Sarkar | Booz Allen Hamilton Will Patterson | Booz Allen Hamilton DRUPAL GOVCON 2017 Innovation center, Washington, D.C.
  • 2. • Continuous delivery - Deliver software more often and with less errors - No time spent on dev-to-ops handoffs • Improved Security - Containers help isolate each part of your system and provides better control of each component of your system • Run anything, anywhere - All languages, all databases, all operating systems - Any distribution, any cloud, any machine • Reproducibility - Reduces the times we say “it worked on my machine” WHAT HAS DOCKER DONE FOR US? 1 #BoozAllen #Drupal4Gov
  • 3. • Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications. • Improves reliability - Continuously monitors and manages your containers - Will scale your application to handle changes in load • Better use of infrastructure resources - Helps reduce infrastructure requirements by gracefully scaling up and down your entire platform • Coordinates what containers run where and when across your system • How do all the different types of containers in a system talk to each other? • Easily coordinate deployments of your system - Which containers need to be deployed - Where should the containers be deployed WHAT DOES KUBERNETES DO? 2 #BoozAllen #Drupal4Gov
  • 4. THE POD IS THE CORE KUBERNETES COMPONENT • The Pod is the core component of Kubernetes • Collection of 1 or more containers • Each pod should focus on one container, however sidecar containers can be added to enhance features of the core container 3 spec: template: spec: containers: - name: drupal image: cr.io/repo/mydrupal:v1 #BoozAllen #Drupal4Gov
  • 5. PODS CAN HANDLE SCALING AND DEPLOYMENTS • Once Kubernetes understands what is in a pod, multiple management features are available: • System Performance - Scale up/down the number of pods based on CPU load or other criteria • System Monitoring - Probes to check the health of each pod - Any unhealthy ones get killed and new pod is put into service • Deployments - Deploy new versions of the container - Control traffic to the new pods to test the new version o Blue/Green deployments o Rolling deployments 4 #BoozAllen #Drupal4Gov
  • 6. KUBERNETES SERVICES TIE TOGETHER THE PODS • Kubernetes Services are used to control communications with the pods - Load balance the requests - Don’t send traffic to the unhealthy ones - Only talk to the correct version 5 apiVersion: v1 kind: Service metadata: name: drupal spec: selector: app: drupal ports: - name: http-port port: 80 type: LoadBalancer #BoozAllen #Drupal4Gov
  • 7. SERVICES STRUCTURE ALLOW MULTIPLE COMPONENTS • With the Service architecture Kubernetes handles things that you often might have to worry about - Service discovery - Load balancing - Scaling • Service discovery allows each pod just needs to call the name of the service it wants to talk to • Services have multiple options - Session based load balancing - Single port based services - External Services • The Service architecture of Kubernetes can be scaled up to handle as many services as you would like for your system 6 #BoozAllen #Drupal4Gov
  • 8. WHERE IS THE INFRASTRUCTURE? • You don’t have to worry about the infrastructure • The entire design of pods and services is described with YAML files • Nothing in deployments, pod management, service discovery, monitoring, etc required any knowledge about how many servers, IP addresses, load balancers, or anything else with the infrastructure • Behind the scenes, Kubernetes is aware of all of the servers available, load balancers, application gateways and will configure them automatically according to what is in the YAML files 7 #BoozAllen #Drupal4Gov
  • 10. DEPLOYMENT apiVersion: extensions/v1beta1 kind: Deployment metadata: name: drupal spec: template: spec: containers: - name: drupal image: cr.io/repo/mydrupal:v1 ports: containerPort: 80 • Deployment—connects a Pod with replication control and rollout management - Synchronizes app configuration across instances - Production deploys are as simple as updating an image tag - No more bouncing apache on a dozen servers • Contains a Pod spec 9 #BoozAllen #Drupal4Gov
  • 11. AUTOSCALING apiVersion: autoscaling/v1 kind: HorizontalPodAutoscaler spec: scaleTargetRef: apiVersion: extensions/v1beta1 kind: Deployment name: drupal minReplicas: 2 maxReplicas: 10 targetCPUUtilizationPercentage: 50 • Realizes the promise of the cloud: scales your app in response to load, in real time • Kubernetes tracks resource utilization • Responds by adding or removing pods to the Replica Set • Kubernetes core supports CPU utilization • Other resources are available via add-ons • Pod autoscaling != node autoscaling • Node autoscaling for GCE and AWS as add-ons 10 #BoozAllen #Drupal4Gov
  • 12. SERVICE apiVersion: v1 kind: Service metadata: name: drupal spec: selector: app: drupal ports: - name: http-port port: 80 type: LoadBalancer • curl http://drupal/cron.php • Manages ports and internal IP’s with domain name resolution • Opens ports on agent nodes • Manages load balancing between pods • Provisions cloud provider load balancer • Exposes pods to Kubernetes service discovery 11 #BoozAllen #Drupal4Gov
  • 13. EXTERNAL SERVICE kind: Service apiVersion: v1 metadata: name: mysql-service spec: type: ExternalName externalName: mysql.example.com ports: - port: 3306 • Use RDS and provider services when possible • No need to hard code external services in your application • Adds an external resource to Kubernetes service discovery 12 #BoozAllen #Drupal4Gov
  • 14. DEPLOYMENT: CONFIGURATION MANAGEMENT apiVersion: extensions/v1beta1 kind: Deployment spec: replicas: 2 template: spec: containers: - name: drupal image: cr.io/repo/mydrupal:v1 ports: containerPort: 80 env: - name: DB_HOSTNAME value: mysql-service - name: DB_PASSWORD valueFrom: secretKeyRef: name: mysql-service-secrets key: password imagePullSecrets: - name: registrykey 13 #BoozAllen #Drupal4Gov * $databases['default']['default'] = array( * 'driver' => 'sqlite', * 'database' => '/path/to/databasefilename', * ); * @endcode */ $databases['default']['default'] = array( 'driver' => 'mysql', 'database' => 'mydrupaldb', 'username' => getenv('DB_USERNAME'), 'password' => getenv('DB_PASSWORD'), 'host' => getenv('DB_HOSTNAME'), ); /** * Access control for update.php script. * * If you are updating your Drupal installation using * are not logged in using either an account with the * updates" permission or the site maintenance account * created during installation), you will need to modify
  • 15. DEPLOYMENT: VOLUMES apiVersion: extensions/v1beta1 kind: Deployment spec: replicas: 2 template: spec: containers: - name: drupal image: cr.io/repo/mydrupal:v1 ports: containerPort: 80 volumeMounts: - name: my-drupal-volume mountPath: /drupal-7.56/sites/files volumes: - name: my-drupal-volume azureFile: secretName: azure-storage-secret shareName: <pre-existing-file-share> readOnly: false • Manages networked drives across containers and VM’s • volumeMounts sets the mount path and references a named volume • Volumes can be defined as - Pre-created named volumes - Dynamically provisioned Persistent Volume Claims 14 #BoozAllen #Drupal4Gov
  • 17. • Kubernetes is open source and fast moving. Cloud provider specific integrations might trail a couple versions. - Ingress Controllers - Managed Disks • While the Infrastructure is generally transparent, you still need to ensure that the cloud provider implemented Kubernetes support in a manner that meets your system needs - Internal vs External load balancers - Cluster Scaling • Leverage the strength of the open source community. LESSONS LEARNED 16 #BoozAllen #Drupal4Gov
  • 18. Install local utilities: kubectl and minikube https://kubernetes.io/docs/tasks/tools/install-kubectl/ Checkout the Kubernetes docs https://kubernetes.io/docs/home/ Unified Logging with Fluentbit http://fluentbit.io/documentation/0.11/kubernetes/ Syslog, Docker, and Drupal https://github.com/BradJonesLLC/docker-drupal GETTING STARTED 17 #BoozAllen #Drupal4Gov
  • 19. QUESTIONS? JOIN US AT THE BOOZ ALLEN EXPO BOOTH
  • 20. ADDITIONAL RESOURCES • Red Hat OpenShift : Enterprise implementation of Kubernetes - https://www.openshift.com/ • Kops : Kubernetes cluster management utility - https://github.com/kubernetes/kops Booz Allen’s Drupal.org Profile: https://www.drupal.org/booz-allen-hamilton Join the Conversation… …And Come Visit Our Booth! 19 #BoozAllen #Drupal4Gov
  • 21. FOR MORE INFORMATION… Today’s Speakers – Please visit our booth for further Q&A: • Shayan Sarkar, Solution Architect, Sarkar_Shayan@bah.com • Will Patterson, Drupal Developer, Patterson_William@bah.com Please contact Booz Allen’s Strategic Innovation Group for more information on our Drupal practice: • Arash Farazdaghi, Solution Architect, Farazdaghi_Arash@bah.com • Eric Robbins, Solution Architect, Robbins_Eric@bah.com • Craig Warsaw, Principal Solution Architect, Warsaw_Craig@bah.com Join the Conversation… …And Come Visit Our Booth! 20 #BoozAllen #Drupal4Gov

Notes de l'éditeur

  1. While the Pod is the atomic unit of the Kubernetes resource model, you’ll almost never deal with Pods directly. Instead we use deployments. A Deployment is effectively a dynamic set of pods with replication control and rollout management. The core of a Deployment is actually a Pod spec. As you can see here we have defined a single container in our pod, specifying an image stored in private container registry. Additionally we specified the credentials for accessing the container registry using a Kubernetes secret. This allows us to keep credentials out of source control but still keep them secure and available for our application. Finally a Deployment allows us to specify how many copies of a Pod should be running at a time. Having a fixed number of replicas is useful, but the real strength of an orchestration tool is in dynamic scailing.
  2. Autoscaling really is the ultimate promise of cloud hosting—elastic databases, elastic storage, and now, elasticity for you application Kubernetes provides auto-scaling via a Horizontal Pod Auto-scaler. Kubernetes tracks CPU utilization of the agent nodes and responds by scaling the replica set up or down. In this example we have created a pod autoscaler for our Drupal deployment. The auto scaler acts on any kubernetes resources matching the attributes in the target reference. So here we’re targeting any deployment resource with the name “drupal”. And instructing kubernetes to schedule an additional pod every time CPU utilization exceeds 50%, up to 10 copies. Right now, kubernetes core only supports CPU utilization as a trigger, but other measures are available as add-ons. But a word of caution. Pod autoscaling is not the same as scaling your VM set. That functionality is available as add-ons for GCE and AWS.
  3. At this point we have anywhere between 2 and 10 copies of our Drupal pod running on at most as many nodes. We need a way to direct traffic to the correct nodes, and once there, to the correct container. This is where a service comes in. Just like the autoscaler, a service targets resources based on metadata. Here we target our drupal pods, specifying port 80 And finally, instruct kubernetes to provision an elastic load balancer from the cloud provider, configuring all the rules necessary to load balance across the set of nodes. This gets us external access to our loadbalacned drupal cluster via a dynamically provisioned IP on the load balancer, as well as including the service name in the Kubernetes cluster-internal DNS service. In this case, “drupal” becomes a valid hostname for any pod in the cluster, allowing us to, say, trigger cron from another pod without knowing which nodes the drupal pods are running on.
  4. Another use for Kubernetes service discovery is providing DNS resolution for external services. The most common use for a Drupal application would be accessing a Relational Database Service. With this configuration, drupal can access the database with the hostname `mysql-service`. First off, databases. They’re crucial part of any Drupal site, and it’s tempting to go ahead and add MySQL to your cluster But, when it comes to persisting data, nothing is simple Kubernets provides the building blocks to run a stateful set of pods But it comes down to individual cloud provider support if the data disk can be reliably identified by kubernetes and consistently attached. In our experience, whenever possible, use the Relational Database Server provided by your cloud host
  5. So. I’m sure you saw this one coming. Orchestration fills a big hole in managing containers in the cloud But this is complicated functionality, wrangling disparate systems, all while being cloud host agnostic We’ll go over a few gotchas when getting started with Kubernetes
  6. Just as support for volumes differs between cloud providers, The same is true for provisioning a network internal load balancer and auto scaling a cluster To make a long story short, Kubernetes releases a new version every 3 months with a slew of new functionality Before jumping on the latest version, check that it works with your cloud provider And if it doesn’t take a look at their git hub. They are moving just as quickly, and actively respond to questions and bugs It really is an example of open source at it’s best, when you have Google, Amazon, and Microsoft all working on the same project.