What has Docker Done for Us?

Slides:



Advertisements
Similar presentations
Implementing Tableau Server in an Enterprise Environment
Advertisements

System Center 2012 R2 Overview
Futures – Alpha Cloud Deployment and Application Management.
System Center 2012 Setup The components of system center App Controller Data Protection Manager Operations Manager Orchestrator Service.
Cloud computing is the use of computing resources (hardware and software) that are delivered as a service over the Internet. Cloud is the metaphor for.
Windows Azure Conference 2014 Running Docker on Windows Azure.
Cloud Computing & Amazon Web Services – EC2 Arpita Patel Software Engineer.
Windows Azure Virtual Machines Anton Boyko. A Continuous Offering From Private to Public Cloud.
System Center Lesson 4: Overview of System Center 2012 Components System Center 2012 Private Cloud Components VMM Overview App Controller Overview.
Powered by Microsoft Azure, PointMatter Is a Flexible Solution to Move and Share Data between Business Groups and IT MICROSOFT AZURE ISV PROFILE: LOGICMATTER.
20409A 7: Installing and Configuring System Center 2012 R2 Virtual Machine Manager Module 7 Installing and Configuring System Center 2012 R2 Virtual.
Deploying Highly Available SQL Server in Windows Azure A Presentation and Demonstration by Microsoft Cluster MVP David Bermingham.
© 2015 MetricStream, Inc. All Rights Reserved. AWS server provisioning © 2015 MetricStream, Inc. All Rights Reserved. By, Srikanth K & Rohit.
Amazon Web Services. Amazon Web Services (AWS) - robust, scalable and affordable infrastructure for cloud computing. This session is about:
Deploying Docker Datacenter on AWS © 2016, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Microsoft Dynamics NAV Microsoft Dynamics NAV managed service for partners, under the hood Dmitry Chadayev Corporate Vice President, Microsoft.
Architecting Enterprise Workloads on AWS Mike Pfeiffer.
PaaS services for Computing and Storage
SQL Database Management
12/29/2017 3:36 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Unit 3 Virtualization.
IT06 – HAVE YOUR OWN DYNAMICS NAV TEST ENVIRONMENT IN 90 MINUTES
“Was This Page Helpful?” Drupal said to Google
Bentley Systems, Incorporated
Essentials of UrbanCode Deploy v6.1 QQ147
100% Exam Passing Guarantee & Money Back Assurance
Scalable Web Apps Target this solution to brand leaders responsible for customer engagement and roll-out of global marketing campaigns. Implement scenarios.
Dockerize OpenEdge Srinivasa Rao Nalla.
OpenLegacy Training Day Four Introduction to Microservices
Docker and Azure Container Service
Docker Birthday #3.
6/11/2018 8:14 AM THR2175 Building and deploying existing ASP.NET applications using VSTS and Docker on Windows Marcel de Vries CTO, Xpirit © Microsoft.
Web Hosting with OpenShift
Dmytro Mykhailov How HashiCorp platform tools can make the difference in development and deployment Target and goal of HashiCorp.
Scalable Web Apps Target this solution to brand leaders responsible for customer engagement and roll-out of global marketing campaigns. Implement scenarios.
Cloud based Open Source Backup/Restore Tool
In-Memory Performance
Using External Persistent Volumes to Reduce Recovery Times and Achieve High Availability Dinesh Israni, Senior Software Engineer, Portworx Inc.
Exploring Azure Event Grid
Build /21/2018 © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION.
Kubernetes Container Orchestration
Using docker containers
Azure Container Instances
Kubernetes intro.
WEBINAR: Integrating SpiraTest with JIRA
HDFS on Kubernetes -- Lessons Learned
Intro to Docker Containers and Orchestration in the Cloud
20409A 7: Installing and Configuring System Center 2012 R2 Virtual Machine Manager Module 7 Installing and Configuring System Center 2012 R2 Virtual.
Getting Started with Kubernetes and Rancher 2.0
Clouds & Containers: Case Studies for Big Data
Learn. Imagine. Build. .NET Conf
AWS Cloud Computing Masaki.
HDFS on Kubernetes -- Lessons Learned
From Source to Production: The Latest in Container Dev
Orchestration & Container Management in EGI FedCloud
BusinessObjects IN Cloud ……InfoSol’s story
Container cluster management solutions
DEVOPS & THE FUTURE OF TESTING
OpenShift as a cloud for Data Science
Kubernetes.
Container technology, Microservices, and DevOps
OpenStack Summit Berlin – November 14, 2018
SCCM in hybrid world Predrag Jelesijević Microsoft 7/6/ :17 AM
Containers and DevOps.
Containers on Azure Peter Lasne Sr. Software Development Engineer
SSDT, Docker, and (Azure) DevOps
Presentation transcript:

Drupal and Container Orchestration: Using Kubernetes to Manage All the Things Presented by Shayan Sarkar | Booz Allen Hamilton Will Patterson | Booz Allen Hamilton Innovation center, Washington, D.C. Drupal GovCon 2017

What has Docker Done for Us? 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” #BoozAllen #Drupal4Gov

What Does Kubernetes do? 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 #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 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 Blue/Green deployments Rolling deployments #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 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 #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 #BoozAllen #Drupal4Gov

Drupal Examples #BoozAllen #Drupal4Gov

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 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. #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 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. #BoozAllen #Drupal4Gov

Service curl http://drupal/cron.php 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 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. #BoozAllen #Drupal4Gov

External Service Use RDS and provider services when possible 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 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 #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   * $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 #BoozAllen #Drupal4Gov

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 #BoozAllen #Drupal4Gov

Nothing is easy 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 #BoozAllen #Drupal4Gov

Lessons Learned 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. 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. #BoozAllen #Drupal4Gov

Getting Started 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 #BoozAllen #Drupal4Gov

Questions? Join us at the BooZ Allen expo Booth

Join the Conversation… …And Come Visit Our 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! #BoozAllen #Drupal4Gov

Join the Conversation… …And Come Visit Our Booth! 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! #BoozAllen #Drupal4Gov