ive Paths to Cloud Native Choose Your Own Adventure Jesse Butler Principal Cloud Native Advocate, OCI. cloudnative.oracle.com @jlb13
A presentation at InnoTech San Antonio in April 2019 in San Antonio, TX, USA by Jesse Butler
ive Paths to Cloud Native Choose Your Own Adventure Jesse Butler Principal Cloud Native Advocate, OCI. cloudnative.oracle.com @jlb13
Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
The Old World • Once upon a time, proprietary systems and software were bundled and sold as a unit • This created independent silos per vendor, each with ecosystems of tools and service vendors • Systems analysts surfaced system data and implemented improvements Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
More Recent History • There were a lot of moving parts in the typical Old World IT organization • The advent of web applications made time to market a far more sensitive metric • DevOps arose as a means of reducing friction between where software is created and where it is deployed Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Advent of DevOps • DevOps brings the concerns of development and operations closer together, much like systems analysts • Developers think in terms of deployments, dev and ops work closely to ensure quality • DevOps is as much a cultural shift as it is technical Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
DevOps, Mother of Invention • Microservices • Continuous Integration • Continuous Delivery • Containers • Cloud Adoption Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Getting to the Cloud, Two Ways • Coming to the cloud at this point can be daunting, but fear not! • Happily, this is proven ground with a couple of viable paths to entry • Largely dependent upon team dynamics and organizational culture Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
ive Containers and Kubernetes Path One, Tried and True cloudnative.oracle.com Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Monolithic Applications Users Application Database Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Monolithic Applications Users Application Database Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Microservices • Microservices are the de facto standard for cloud native software • Microservices allow development teams to deploy portable and scalable applications • Microservices can be difficult to manage and monitor, putting burden on Ops and DevOps. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Microservices Example • Microservices should do one thing, promoting separation of concerns • Microservices should be idempotent and stateless Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Microservices Users Cart Orders Database Cluster Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Reports
Docker • Docker changed the way we build and ship software • Application and host are decoupled, making application services portable • Containers are an implementation detail, but a critical one Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Docker Example • Docker is used in production at massive scale every day • Interactively, a development utility for creating containers and container images • Dockerfile defines content of a container and its runtime configuration • ‘docker build. –tag data_service:1.0’ Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Docker Is a Start But, once we abstract the host away by using containers, we no longer have our hands on an organized platform. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Kubernetes Kubernetes provides abstractions for deploying software in containers at scale Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Kubernetes as a Platform • Infrastructure resource abstraction • Cluster software where one or more masters control worker nodes • Scheduler deploys work to the nodes • Work is deployed in groups of containers Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Working with OKE and OCIR on OCI OCI Registry OCI Container Engine for Kubernetes Cluster Management Encryption for Data in Transit (SSL) and at Rest HA - 3 Masters/etcd across 3 ADs OKE Dashboard in OCI Console Customer’s OCI Account/Tenancy VM based Clusters and Nodes Bare Metal Clusters and Nodes Oracle Cloud Infrastructure Oracle Managed Customer Managed Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 19
Kubernetes Example • Deployments are defined in YAML • We define what images to use to create our containers, configuration elements, how many instances to run • Kubernetes makes it happen, and keeps it all running as defined • ‘kubectl create -f’ and glory awaits Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Migration from the Old World… Users Application Database Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
…to Cloud Native Kubernetes Hotness • Microservices running in orchestrated containers • Everybody’s happy • What happens now? Load balancer Service Service Service Database Queue Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Day Two Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Table Stakes for Services at Cloud Scale • We require a method to simply and repeatably deploy software, and simply and recoverably modify deployments • We require telemetry, observability, and diagnosability for our software if we hope to run at cloud scale Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Beyond Basics • Ingress and Traffic Management • Tracing and Observability • Metrics and Analytics • Identity and Security Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
API Gateway • Exposes backend services as an API, acting as a reverse proxy • Routes all calls as needed through the gateway to the appropriate service • Single point of entry for AuthN, encryption and tracing Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Service Mesh • Infrastructure layer for controlling and monitoring service-to-service traffic • A data plane deployed alongside application services, and a control plane used to manage the mesh • Transparent to deployments, leveraging a proxy in the data plane in order to inject services Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Continuous Integration / Continuous Deployment • Continuous integration is the practice of developers integrating iterative progress • Continuous deployment is a release strategy which deploys the latest tested versions of software available • Automation is critical for these practices in production Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
More Containers, More Problems • Docker and Kubernetes gets us rolling • Solutions exist for what we need from there, service mesh makes it tidy • Still, there are more decisions to make… Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Cloud Native Computing Foundation • Container orchestration ecosystem is constantly evolving • CNCF supports the ecosystem and fosters community • Began with Google’s donation of Kubernetes, now over 30 projects Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Microservices: Cloud Native Path 1, Tried and True • Microservices in containers on Kubernetes in the cloud is the new compute paradigm • It’s not magic, it’s not simple, but it is proven and learnable and doable • Large and expanding ecosystem and community, great learning materials, helpful people, and plenty of room in the pool • Of course, there’s another choice… Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
ive Serverless Path Two, Brave and Rewarding cloudnative.oracle.com Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Microservices Deploying Code to Systems We Build in the Cloud with Excellent Abstractions Load balancer Service Service Service Database Queue Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Serverless Deploying Code to Systems We Build in the Cloud with Excellent Abstractions Load balancer Service Service Service Database Queue Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
What Is Serverless? • Event-driven architecture • Invisible infrastructure • Automatic scaling on demand • Granular billing for execution only • Fault tolerant and highly available Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
How Does it Work? Upload Function Source Code Configure Function Trigger Function is invoked when triggered Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Billed for execution time, not idle time
Functions and Serverless • Serverless doesn’t strictly mandate the use of functions • Would-be microservices are implemented as functions • Functions are mapped to events – API calls – Object store actions – Messages arriving in a queue Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Function Example • Different projects and products differ in use and workflow • This example function can be deployed in Oracle Functions • Just the code, configured against any number of event triggers • As with microservices, applications are composed of many functions Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Fn Project • • • • • • Open source serverless compute platform Cloud-agnostic, or on premises Container-based functions platform Native CloudEvents support Active project w/ 3500+ commits across 70+ contributors Enterprise focus: Secure, Scalable, Observable Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Oracle Functions Pay Per Use Oracle Functions Pay for execution, not for idle time Functions-as-a-Service Oracle Cloud Integrated Container Native Open Source Engine Multi-tenant Secure Autonomous Platform auto-scales functions No servers to provision, manage No Lock-in Built on open-source Fn Project and Docker Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 41
Key Features Open Source Engine Container Native Function Dev Kits Fine-grained Billing Advanced Diagnostics HTTP Events Streams Timer Oracle Cloud Triggers Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Use Case: Web and Mobile Backends ORACLE CLOUD Identity Database API Platform Web, Mobile Apps Mobile Trigger functions Functions Process data Storage Data persisted Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Use Case: Real-Time Stream Processing ORACLE CLOUD Messaging/ Streaming Database Functions Data from multiple sources – Product Reviews and Ratings, Customer Service Interactions, Social Media, etc. Trigger functions Perform user sentiment analysis Records saved in database Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Dashboards with user sentiment analysis trends
Use Case: Real-Time File Processing ORACLE CLOUD Database Storage Functions High resolution product image uploaded to storage Trigger functions Generate images of different resolutions and sizes Storage Images saved in Storage, metadata in Database Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Generated images displayed on various pages and devices
Use Case: Batch Processing ORACLE CLOUD Scheduled batch job Database Database Functions Credit card transactions Transaction details Calculate bonus points Bonus points updated Loyalty bonus received Scheduled batch job Database Storage Functions Utility consumption Consumption details Generate utility bill PDF file PDF files saved in Storage Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Utility bill PDF file
Serverless: Cloud Native Path 2, Brave and Rewarding • Serverless allows teams to focus on code and business logic, infrastructure becomes invisible • Leverages all we have learned over the last decade, but it’s automated and abstracted • Can significantly reduce costs, given proper planning and implementation • Fastest path to Cloud Native from the Old World Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Microservices or Serverless? • Maintaining your own fleet of containers provides a great deal of flexibility and offers the best opportunities for observability and monitoring • Though the learning curve can be steep, there are solutions for every common production need, and a huge and helpful community • Managed cloud services like OKE on OCI make Kubernetes easy to deploy and puts most of the complexity on us, letting you focus on building your systems and deployments Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Microservices or Serverless? • Serverless is likely a faster and simpler path to cloud native, especially for some applications, with fully-managed invisible infrastructure • Not paying for idle time almost guarantees a reduction in OpEx, often a significant reduction • Serverless softly enforces many cloud native best practices, allowing teams to get productive quickly with far less learning curve Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
So, really… Microservices or Serverless? • These are not mutually exclusive approaches and in fact can compliment each other well • Applications and services which require specific infrastructure components are likely to remain in the managed container space for some time • Applications which are primarily backend implementations behind an API should strongly consider going straight to serverless • Moving forward, greenfield projects should always compare the two Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Thanks! cloud.oracle.com/tryit cloudnative.oracle.com