Download ebooks file Oracle cloud infrastructure: a guide to building cloud native applications jeev

Page 1


Oracle Cloud Infrastructure: A Guide to Building Cloud Native Applications

Jeevan Gheevarghese Joseph & Adao

Oliveira Junior & Mickey Boxell

Visit to download the full and correct content document: https://ebookmass.com/product/oracle-cloud-infrastructure-a-guide-to-building-cloudnative-applications-jeevan-gheevarghese-joseph-adao-oliveira-junior-mickey-boxell/

More products digital (pdf, epub, mobi) instant download maybe you interests ...

Beginning Helidon: Building Cloud-Native Microservices and Applications 1st Edition Dmitry Kornilov

https://ebookmass.com/product/beginning-helidon-building-cloudnative-microservices-and-applications-1st-edition-dmitrykornilov-2/

Beginning Helidon: Building Cloud-Native Microservices and Applications 1st Edition Dmitry Kornilov

https://ebookmass.com/product/beginning-helidon-building-cloudnative-microservices-and-applications-1st-edition-dmitrykornilov/

Oracle Cloud Infrastructure Architect Associate All-inOne Exam Guide (Exam 1Z0-1072) Roopesh Ramklass

https://ebookmass.com/product/oracle-cloud-infrastructurearchitect-associate-all-in-one-exam-guide-exam-1z0-1072-roopeshramklass/

CompTIA Cloud+ Guide to Cloud Computing West

https://ebookmass.com/product/comptia-cloud-guide-to-cloudcomputing-west/

Cloud-native Computing Pethuru Raj

https://ebookmass.com/product/cloud-native-computing-pethuru-raj/

Infrastructure Leader’s Guide to Google Cloud: Lead Your Organization's Google Cloud Adoption, Migration and Modernization Journey Jeremy Lloyd

https://ebookmass.com/product/infrastructure-leaders-guide-togoogle-cloud-lead-your-organizations-google-cloud-adoptionmigration-and-modernization-journey-jeremy-lloyd/

Practical Spring Cloud Function: Developing CloudNative Functions for Multi-Cloud and Hybrid-Cloud Environments 1st Edition Banu Parasuraman

https://ebookmass.com/product/practical-spring-cloud-functiondeveloping-cloud-native-functions-for-multi-cloud-and-hybridcloud-environments-1st-edition-banu-parasuraman-2/

Practical Spring Cloud Function: Developing CloudNative Functions for Multi-Cloud and Hybrid-Cloud Environments 1st Edition Banu Parasuraman

https://ebookmass.com/product/practical-spring-cloud-functiondeveloping-cloud-native-functions-for-multi-cloud-and-hybridcloud-environments-1st-edition-banu-parasuraman/

Infrastructure Leader’s Guide to Google Cloud: Lead Your Organization’s Google Cloud Adoption, Migration and Modernization Journey 1st Edition Jeremy Lloyd

https://ebookmass.com/product/infrastructure-leaders-guide-togoogle-cloud-lead-your-organizations-google-cloud-adoptionmigration-and-modernization-journey-1st-edition-jeremy-lloyd/

About This eBook

ePUB is an open, industry-standard format for eBooks. However, support of ePUB and its many features varies across reading devices and applications. Use your device or app settings to customize the presentation to your liking. Settings that you can customize often include font, font size, single or double column, landscape or portrait mode, and figures that you can click or tap to enlarge. For additional information about the settings and features on your reading device or app, visit the device manufacturer’s Web site.

Many titles include programming code or configuration examples. To optimize the presentation of these elements, view the eBook in single-column, landscape mode and adjust the font size to the smallest setting. In addition to presenting code and configurations in the reflowable text format, we have included images of the code that mimic the presentation found in the print book; therefore, where the reflowable format may compromise the presentation of the code listing, you will see a “Click here to view code image” link. Click the link to view the print-fidelity code image. To return to the previous page viewed, click the Back button on your device or app.

Oracle Cloud Infrastructure: A Guide to Building Cloud Native Applications

Oracle Cloud Infrastructure: A Guide to Building Cloud Native Applications

Jeevan Gheevarghese Joseph Adao Oliveira Junior
Mickey Boxell

Oracle Cloud Infrastructure: A Guide to Building Cloud Native Applications

Copyright© 2024 Pearson Education, Inc.

Published by Oracle Press

Hoboken, New Jersey

For information about buying this title in bulk quantities, or for special sales opportunities (which may include electronic versions; custom cover designs; and content particular to your business, training goals, marketing focus, or branding interests), please contact our corporate sales department at corpsales@pearsoned.com or (800) 382-3419.

For government sales inquiries, please contact governmentsales@pearsoned.com.

For questions about sales outside the U.S., please contact intlcs@pearson.com.

All rights reserved. This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information regarding permissions, request forms and the appropriate contacts within the Pearson Education Global Rights & Permissions Department, please visit www.pearsoned.com/permissions/.

Library of Congress Control Number: 2023944840

ISBN-13: 978-0-13-790253-8

ISBN-10: 0-13-790253-0

$PrintCode

General Manager

Mark Taub

Director, ITP Product Management

Brett Bartow

Executive Editor

Nancy Davis

Managing Editor

Sandra Schroeder

Development Editor

Christopher Cleveland

Senior Project Editor

Tonya Simpson

Copy Editor

Krista Hansing

Technical Editor

Peter Jausovec

Editorial Assistant

Cindy Teeters

Cover Designer

Chuti Prasertsith

Composition

codeMantra

Indexer

Warning and Disclaimer

This book is designed to provide information about Oracle Cloud Infrastructure. Every effort has been made to make this book as complete and as accurate as possible, but no warranty or fitness is implied.

The information is provided on an “as is” basis. The authors, Oracle Press, and Pearson shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this book or from the use of the discs or programs that may accompany it.

The views expressed in this book are those of the author or authors and do not necessarily reflect the views of Oracle.

Oracle does not make any representations or warranties as to the accuracy, adequacy or completeness of any information contained in this work, and is not responsible for any errors or omissions.

Feedback Information

At Oracle Press, our goal is to create in-depth technical books of the highest quality and value. Each book is crafted with care and precision, undergoing rigorous development that involves the unique expertise of members from the professional technical community.

Readers’ feedback is a natural continuation of this process. If you have any comments regarding how we could improve the quality of this book, or otherwise alter it to better suit your needs, you can contact us through email at feedback@oraclepress.com. Please make sure to include the book title and ISBN in your message.

We greatly appreciate your assistance.

Trademark Acknowledgments

Oracle, Java, MySQL and NetSuite are registered trademarks of Oracle Corporation and/or its affiliates. All other trademarks are the property of their respective owners.

Screen displays of copyrighted Oracle software and services have been reproduced herein with the permission of Oracle Corporation and/or its affiliates.

All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Oracle Press or Oracle Corporation cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark.

Pearson’s Commitment to Diversity, Equity, and Inclusion

Pearson is dedicated to creating bias-free content that reflects the diversity of all learners. We embrace the many dimensions of diversity, including but not limited to race, ethnicity, gender, socioeconomic status, ability, age, sexual orientation, and religious or political beliefs.

Education is a powerful force for equity and change in our world. It has the potential to deliver opportunities that improve lives and enable economic mobility. As we work with authors to create content for every product and service, we acknowledge our responsibility to demonstrate inclusivity and incorporate diverse scholarship so that everyone can achieve their potential through learning. As the world’s leading learning company, we have a duty to help drive change and live up to our purpose to help more people create a better life for themselves and to create a better world.

Our ambition is to purposefully contribute to a world where

Everyone has an equitable and lifelong opportunity to succeed through learning

Our educational products and services are inclusive and represent the rich diversity of learners

Our educational content accurately reflects the histories and experiences of the learners we serve

Our educational content prompts deeper discussions with learners and motivates them to expand their own learning (and worldview)

While we work hard to present unbiased content, we want to hear from you about any concerns or needs with this Pearson product so that we can investigate and address them.

Please contact us with concerns about any potential bias at https://www.pearson.com/report-bias.xhtml.

Figure Credits

Cover image: MiaStendal/AbobeStock

Figure 5-11, Figure 5-12, Figure 8-10, Figure 8-11: Grafana Labs

Chapter 5, 6, Icons of Kubernetes: The Kubernetes Authors

Figure 6-23, Figure 6-24: Center for Internet Security

Figure 9-6: Jenkins

Figure 9-7: Intuit

Figure 10-2, Figure 10-3, Figure 10-4: Github, Inc

at a Glance

Contents

1 Introduction to Oracle Cloud Infrastructure

Realms, Regions, and Availability Domains

Tenancies and Compartments

Controlling Access to Resources

Cloud Guard and Security Zones

Service Limits and Cost Management

Getting Started with Your Tenancy

Setting Up Users and Groups

Setting Up API Keys and Auth Tokens

Planning How Your Teams Will Use OCI

Summary

References

2 Infrastructure Automation and Management

One Set of APIs, Different Ways to Call Them

A Quick Terraform Primer

A Basic Introduction to the Terraform Language

Terraform State Tracking

The OCI Terraform Provider

Setting Up the OCI Terraform Provider

Managing OCI Resources with Terraform

Simplifying Infrastructure Management with the Resource Manager Service

Helm and Kubernetes Providers

Generating Resource Manager Stacks

Resource Discovery

Drift Detection

Generating a User Interface from Terraform Configurations with a Custom Schema

Publishing Your Stacks with Deploy Buttons

Managing Multiregion and Multicloud Configurations

Summary

References

3 Cloud Native Services on Oracle Cloud Infrastructure

Oracle Container Image Registry

Working with OCIR

Image Signing

Image Scanning

Creating Containers from Images

Compute Instances

Container Instances

Container Engine for Kubernetes

Service Mesh

Serverless Functions

API Gateways

Components of an API Gateway

Working with the API Gateway Service

Messaging Systems

Streaming

Understanding the Streaming Service

Working with the OCI Streaming Service

OCI Events Service

Summary

References

4 Understanding Container Engine for Kubernetes

Monoliths and Microservices

Containers

Container Orchestration and Kubernetes

Oracle Container Engine for Kubernetes

OCI-Managed Components and Customer-Managed Components

Control Plane

Data Plane

Billable Components

Kubernetes Concepts

Cloud Controller Manager

Nodes and Node Pools

Node Pool Properties

Worker Node Images and Shapes

Kubernetes Labels

SSH Keys

Tagging Your Resources

Creating a Cluster

Quick Create Cluster Workflow

Custom Create Cluster Workflow

Using the OCI Command-Line Interface

Using the Terraform Provider and Modules

Automation and Terraform Code Generation

Asynchronous Cluster Creation

Cluster Topology Considerations

Using Multiple Node Pools

Scheduling Workloads on Specific Nodes

Kubernetes Networking

Container Network Interface (CNI)

OCI VCN-Native Pod Networking CNI

Flannel CNI

Kubernetes Storage

StorageClass: Flex Volume and CSI Plug-ins

Updating the Default Storage Class

File System Storage

Kubernetes Load Balancer Support

Working with the OCI Load Balancer Service

SSL Termination with OCI Load Balancer

Working with the OCI Network Load Balancer Service

Specifying Reserved Public IP Addresses

Commonly Used Annotations

Understanding Security List Management Modes

Using Node Label Selectors

Security Considerations for Your Cluster

Cluster Topology and Configuration Security Considerations

Authorization Using Workload Identity and Instance

Principls

Securing Access to the Cluster

OCI IAM and Kubernetes RBAC

Federation with an IDP

Summary

References

5 Container Engine for Kubernetes in Practice

Kubernetes Version Support

Upgrading the Control Plane

Upgrading the Data Plane

Upgrading an Existing Node Pool

Upgrading by Adding a Node Pool

Alternative Host OS (Not Kubernetes Version)

Upgrade Options

Scaling a Cluster

Manual Scaling

Autoscaling

Scaling Workloads and Infrastructure Together

Autoscaler Best Practices

Cluster Access and Token Generation

Service Account Authentication

Configuring DNS

Configuring Node Local DNS Cache

Configuring ExternalDNS

Cluster Add-ons

Configuring Add-ons

Disabling Add-ons

Observability: Prometheus and Grafana

Monitoring Stack Components

Installing the kube-prometheus-stack

Operators and OCI Service Operator for Kubernetes

Getting Started with Operators on OKE

Operators for OCI, Oracle Database, and Oracle

WebLogic

Troubleshooting Nodes with Node Doctor

Configuring SR-IOV Interfaces for Pods on OKE Using Multus

Using Bare Metal Nodes

Using Virtual Machine Nodes

Summary

References

6 Securing Your Workloads and Infrastructure

Kubernetes Security Challenges

Concepts of Kubernetes Security

4Cs of Kubernetes Security

Securing Oracle Cloud Infrastructure Container Engine for Kubernetes (OKE)

Private Clusters

Kubernetes Role-Based Access Control (RBAC) with OCI IAM Groups

Data Encryption and Key Management Service

Audit Logging

Security Zones

Network Security Groups (NSGs)

Web Application Firewall (WAF)

Network Firewall

Allowed Registries

Cloud Guard

Hardening Containers and OKE Worker Nodes

Container Scanning

Container Image Signing

Center for Internet Security (CIS) Kubernetes

Benchmarks

Using SELinux with OKE

Worker Nodes Limited Access

Securing Your Workloads

Security Context

syscalls and seccomp

Open Policy Agent (OPA)

OPA Gatekeeper

Open Web Application Security Project (OWASP)

Supporting Tools

External Container Scanning Tools

CIS-CAT Pro Assessor

Kube-bench

AppArmor

Falco

Tracee

Trivy

National Institute of Standards and Technology (NIST)

Kubernetes Benchmarks

NIST Kubernetes Benchmarks

National Checklist Program Repository

National Vulnerability Database

NIST SP 800-190 Application Container Security Guide

Summary References

7 Serverless Platforms and Applications

Container Instances

Architecture

Using Container Instances

Serverless Functions

OCI Functions

Using OCI Functions

Building Your First Function

Adding an API Gateway

Function Logs and Distributed Tracing

Service Mesh

Using the Service Mesh

Adding a Service Mesh to an Application

Summary References

8 Observability

OCI Monitoring

Alarms

OCI Logging

Service Logs

Custom Logs

Audit Logs

Auditing OKE Activity

Advanced Observability in OCI

Logging Analytics

Enabling and Using Logging Analytics

Prometheus and Grafana with OKE

Using the OCI DataSource Plug-ins for Grafana

eBPF-Based Monitoring with Tetragon on OKE

Tetragon: eBPF-Based Security Observability and Enforcement

Running Tetragon on Oracle Container Engine for Kubernetes (OKE)

Summary

References

9 DevOps and Deployment Automation

OCI DevOps Service

Code Repositories

Triggers

Build Pipelines

Artifacts

Environments

Deployment Pipelines

Elastically Scaling Jenkins on Kubernetes

Setting Up Jenkins on OKE

GitOps with ArgoCD

Setting Up Argo CD on OKE

Summary

References

10 Bringing It Together: MuShop

Architecture

Source Code Structure

Services

Storefront

API

Catalog Carts

User Orders

Fulfillment

Payment

Assets

DBTools

Edge Router Events

Newsletter Subscription Load

Building the Services

Infrastructure Automation

Helm Charts

Utilities and Supporting Components

Deploying MuShop

Summary

References

Index

About the Authors

Jeevan Gheevarghese Joseph is a senior principal product manager in the Containers and Kubernetes Services group within Oracle Cloud Infrastructure. He focuses on product strategy for containers and Kubernetes platforms at OCI. Jeevan also works with strategic customers as an advisor to help them make the most of Oracle’s tooling and technology platforms. Jeevan’s interests include application architecture, developer tooling, automation, and crossproduct integration. Before his current role, he held positions in the Oracle A-Team and Oracle Data Cloud. He routinely speaks at developer events and industry conferences.

Adao Oliveira Junior has been working in the technology industry for more than two decades, with five years of experience in cloud native solutions. He is a senior principal solutions architect who excels at gathering high-level requirements and turning them into technical solutions, aiding customers and partners worldwide. Adao has held various positions, including sales engineering and product manager, in organizations like Oracle A-Team and OCI Developer Adoption. He is a well-known figure in the cloud native field and has made significant contributions to open-source projects and the Kubernetes community. Adao holds multiple Kubernetes certifications, including CKS, CKA, CKAD, and KCNA, as well as other computer and cloud industry certifications.

Mickey Boxell is a senior principal product manager in the Containers and Kubernetes Services group within Oracle Cloud Infrastructure. He has been a member of the Kubernetes release team for many releases, including as the communications coordinator for Kubernetes 1.24 and the docs lead for Kubernetes 1.27. Mickey has worked in the cloud platform and infrastructure

space for the past decade. He has spoken at numerous developer meetups and conferences, contributed to many open-source projects, and worked directly with many customers to help implement Oracle technology.

About the Technical Reviewer

Drawing from more than 15 years of experience in software development and technology, Peter Jausovec specializes in the cloud-native space, Kubernetes, and service meshes. He is an international speaker, book author, and creator of popular Kubernetes, Istio, and Envoy courses. Peter regularly shares his technical knowledge and insights on cloud-native technologies through his blog on learncloudnative.com.

Dedications

Jeevan: I dedicate this book to my loving family. To my amazing wife, Annie, for being the rock in my life and my shoulder to lean on. Thank you for your constant support through the endless late nights and missed weekends. To my wonderful daughter, Eva, for the sheer joy you bring us. I hope I can make up for every bedtime story and good night hug I missed. To my parents, who gave me wings, pointed at the sky, and were unafraid to let me fly: Appa, I wish you were here to see this.

Adao: To my beloved family, you have been my rock throughout this entire journey. Your unwavering support and love have kept me going. This book is dedicated to you as a small token of my appreciation for all you have done for me. Thank you for inspiring me to pursue my passions and believing in me when I didn’t believe in myself. I love you all more than words can express.

Mickey: I would like to give a huge thank you to my family for their support. To my fiancée, Rainy, thank you for always brightening my day. To my parents, Kris and Tim, thank you for shaping me into the person I am today.

Acknowledgments

Jeevan: Thanks to Brad Posner, who told me that I could write a book. Without your encouragement, this idea would not have taken shape.

I sincerely thank my coauthors, Adao and Mickey. This book would still be just an idea without you guys. Special thanks to our technical reviewers, Peter Jausovec, and Matt Vander Vliet, who both had an immense impact on keeping this book on point.

Thanks to Loïc Tregan, Matt Vander Vliet, Adao Junior, and Peter Jausovec. I still remember the day MuShop started in a meeting room. MuShop and its success inspired this book, and none of it would have been possible without this team.

To all my colleagues from the Oracle A-Team. It’s a privilege to have worked with all of you and learned from the legends that you are. #ATeamForever

A special thanks to the mentors that I’ve had over the years. Ric Smith, Stefan Krantz, Yogesh Bhootada, Loïc Tregan, and Brad Posner—thank you for all the support, direction, and help you have given me over the years to grow and expand my horizons.

Special thanks to Nancy Davis, executive editor at Pearson, and Christopher Cleveland, our development editor. You believed in us when we didn’t ourselves.

Last but not least, a special thanks to the Containers and Kubernetes team at OCI for their tireless dedication toward building a rock-solid product. I’ll also use this opportunity to thank my current and past colleagues in Oracle Cloud Infrastructure for building a world-class platform and executing a vision for a hyperscale cloud that can scale fast and democratize the cloud provider ecosystem.

Adao: I want to express my heartfelt gratitude to Jeevan and Mickey, who worked tirelessly to make this book a reality. Your dedication, hard work, and unwavering support have been invaluable throughout this journey. I am truly blessed to have such a fantastic team of individuals who share my passion for this project.

Special thanks to Nancy Davis, executive editor at Pearson, and Christopher Cleveland, our development editor. Your creativity, insights, and attention to detail have brought this book to life. I am grateful for your unwavering commitment to excellence and your willingness to go above and beyond to ensure its success.

I would also like to thank our technical reviewers, Peter Jausovec and Matthew Vander Vliet. Your support and wisdom have been instrumental in helping us achieve our goals. The MuShop project that we started together was a great inspiration for this book.

Finally, I want to thank my family and friends for their unwavering support and encouragement. Your love and belief in me have constantly inspired and motivated me.

Thank you, everyone, for your hard work, dedication, and support throughout this journey. This book would not have been possible without you.

Mickey: I would like to begin by thanking Jeevan and Adao for bringing me into this project. This book would not have been possible without your knowledge and dedication. I would also like to say thank you to Diane Anderson, for helping me develop good working habits and guiding me at the start of my career; to the Cloud Native Labs team, for giving me space to grow and develop my understanding of cloud native technology; to Jesse Butler, for mentoring me and always being there to help even long after we parted teams; to Jonathan Schreiber and Jon Reeve, for taking a chance on me as a new product manager; and to Devika Nair, for helping me refine my craft.

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.
Download ebooks file Oracle cloud infrastructure: a guide to building cloud native applications jeev by Education Libraries - Issuu