Slide 1

Slide 1 text

Build modern cloud native applications with Kubernetes and OSS databases on Azure Sunitha Muthukrishna Senior Program Manager Microsoft

Slide 2

Slide 2 text

Speaker Sunitha Muthukrishna, Senior Program Manager Azure Database for PostgreSQL, MySQL & MariaDB @mksuni

Slide 3

Slide 3 text

Agenda What’s new with Open Source DBs on Azure • What’s is AKS • Top scenarios for AKS • Best practices with using AKS • Deploy a cloud native WordPress application with MySQL • Simple Postgres Deployment • Github Action for Postgres and MySQL • Scale and Manage the cluster and database • Diagnose and Solve experiences

Slide 4

Slide 4 text

Azure builds upon the core benefits of PostgreSQL and MySQL Global reach Security Scale up Built-in HA Compliance Easy ecosystem integration

Slide 5

Slide 5 text

Existing deployment options for Postgres and MySQL Hyperscale (Citus) Worry-free PostgreSQL in the cloud with an architecture built to scale out Single Server Enterprise-ready, fully managed community OSS engines

Slide 6

Slide 6 text

Looking back Security § Azure AD authentication § Customer-managed key encryption § Infrastructure double encryption § Minimum TLS version requirements Performance § Read replicas § Intelligent Performance Manageability § RI for all GA services § Storage auto grow Trusted by companies of all sizes 50 regions

Slide 7

Slide 7 text

New deployment option : Flexible Server Hyperscale (Citus) Worry-free PostgreSQL in the cloud with an architecture built to scale out Single Server Enterprise-ready, fully managed community OSS engines Azure Arc enabled Postgres Hyperscale NEW Scale out PostgreSQL in environment of your choice Flexible Server (Preview) NEW Maximum control with a simplified developer experience

Slide 8

Slide 8 text

Introducing Flexible Server (Preview) for Build resilient apps across availability zones Maximum control for your databases Simplified developer experience

Slide 9

Slide 9 text

When to use Single Server vs. Flexible Server (Preview) Single Server Flexible Server (Preview) Database Version § MySQL 5.7, 8 § Postgres 9.5, 9.6, 10, 11 § MySQL 5.7 § MySQL 8.0 (planned) § Postgres 11, 12 § Postgres 13 (planned) High Availability Built-in HA (Single-AZ) Zone Redundant HA Scheduled Maintenance System scheduled System or custom scheduled Stop/Start P P PITR P P Network Isolation P Private Link P VNET Integration Customer managed keys for Encryption P O (planned) Reserved Instances (RI) P O (planned) Cross region replicas P O (planned) Uptime SLA 99.99% O (planned)

Slide 10

Slide 10 text

Data Platform Virtual Summit 2020 is a community initiative by DataPlatformGeeks AZURE KUBERNETES SERVICE

Slide 11

Slide 11 text

Kubernetes on its own is not enough Save time from infrastructure management and roll out updates faster without compromising security Unlock the agility for containerized applications using: • Infrastructure automation that simplifies provisioning, patching, and upgrading • Tools for containerized app development and CI/CD workflows • Services that support security, governance, and identity and access management IDE container support Registry supporting Helm CI/CD Monitoring Microservice debugging Networking Virtual machines Security Governance Identity Source code repository <\> Kubernetes Storage Data Infrastructure automation

Slide 12

Slide 12 text

Azure Kubernetes Service Enterprise-grade by design Unified management Multi-layer security Hardened security and layers of isolation across compute resources, data, and networking Enterprise support Support from certified Kubernetes experts or an interactive portal experience for faster diagnostics and troubleshooting Consistent configuration and governance across environments Built-in best practices Proactive and actionable recommendations, based on knowledge from thousands of enterprise engagements

Slide 13

Slide 13 text

Top Scenarios for Kubernetes on Azure with OSS databases

Slide 14

Slide 14 text

Data Platform Virtual Summit 2020 is a community initiative by DataPlatformGeeks DEPLOY WORDPRESS APP IN AKS + MYSQL FLEXIBLE SERVER

Slide 15

Slide 15 text

Command to create mysql flexible server Create MySQL flexible database server using these command which uses public access connectivity. Provide an IP address for your client machine to give access. az mysql flexible-server create --public-access

Slide 16

Slide 16 text

Command to create aks cluster with 4 node count Create an AKS cluster az aks create --name MyAKSCluster --resourcegroup MyResourcegroup –node-count 4 Install Kubectl to connect and manage cluster az aks install-cli Set PATH set PATH=%PATH%;C:\Users\\.azure-kubectl Get Credentials to connect to the cluster az aks get-credentials --name MyAKSCluster --resourcegroup MyResourcegroup

Slide 17

Slide 17 text

Install Kubernetes manifest file Use the sample WordPress Kubernetes yaml file Docker image used in the demo php-sample-app:wordpress This docker image has custom WordPress installation with custom wp-config.php.

Slide 18

Slide 18 text

Data Platform Virtual Summit 2020 is a community initiative by DataPlatformGeeks OPTIMIZED WORDPRESS APP ON AKS AND MYSQL FLEXIBLE SERVER

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

Data Platform Virtual Summit 2020 is a community initiative by DataPlatformGeeks CREATE A POSTGRES FLEXIBLE SERVER

Slide 21

Slide 21 text

Command to create postgres flexible server Create Postgres flexible database server using these command • az postgres flexible-server create [OPTIONS]

Slide 22

Slide 22 text

Data Platform Virtual Summit 2020 is a community initiative by DataPlatformGeeks BEST PRACTICES FOR CLOUD NATIVE APPS WITH OSS DATABASES

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

Retry logic for transient faults • An error occurs when you try to open a connection. • An idle connection is dropped on the server side. When you try to issue a command, it can't be executed. • An active connection that currently is executing a command is dropped. protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) => optionsBuilder.UseNpgsql( "", options => options.EnableRetryOnFailure(maxRetryCount, maxRetryDelay, errorNumbersToAdd));

Slide 25

Slide 25 text

Connection pooling PostgreSQL or MySQL pod Main app Main app Pgbouncer Connect Connect

Slide 26

Slide 26 text

Optimize container sizing • Some containers may require large amount of memory • Cron runs memory heavy jobs such as indexer which allocates a few GB of memory • Redis may allocate 4 – 8 GB of memory Resource requests

Slide 27

Slide 27 text

Data Platform Virtual Summit 2020 is a community initiative by DataPlatformGeeks SCALE AND MANAGE AKS CLUSTER AND FLEXIBLE SERVER

Slide 28

Slide 28 text

Commands to scale up your cluster and database server Scale the AKS cluster • az aks scale --resource-group myResourcegroup --name myAKSCluster --node-count 1 -- nodepool-name MyPoolname Scale the MySQL database server using these commands. The example below will convert storage size to 512 GB and update the pricing tier to Burstable 2vCore • az mysql flexible-server update --sku-name Standard_B2s --resource-group myResourcegroup –name servername --storage-size 512 Example for PostgreSQL flexible server • az postgres flexible-server update --sku-name Standard_B2s --resource-group myResourcegroup –name servername --storage-size 512

Slide 29

Slide 29 text

Commands to manage your cluster (Start/Stop) This is in preview (documentation) Install AKS preview CLI # Install the aks-preview extension az extension add --name aks-preview # Update the extension to make sure you have the latest version installed az extension update --name aks-preview Register Start/Stop preview feature az feature register --namespace "Microsoft.ContainerService" --name "StartStopPreview“ Refresh registration Microsoft.ContainerService resource provider az provider register --namespace Microsoft.ContainerService Start and Stop the AKS cluster az aks stop --name myAKSCLuster –resource-group MyResourcegroup az aks start --name myAKSCLuster –resource-group MyResourcegroup

Slide 30

Slide 30 text

Commands to manage your database server (Start/Stop) Start and Stop the MySQL database server az mysql flexible-server stop --name servername –resource-group MyResourcegroup az mysql flexible-server start --name servername –resource-group MyResourcegroup Start and Stop the PostgreSQL database server az postgres flexible-server stop --name servername –resource-group MyResourcegroup az postgres flexible-server start --name servername –resource-group MyResourcegroup

Slide 31

Slide 31 text

Data Platform Virtual Summit 2020 is a community initiative by DataPlatformGeeks DIAGNOSE APPLICATION ISSUES

Slide 32

Slide 32 text

Diagnose and Solve experience for AKS

Slide 33

Slide 33 text

Database Server metrics like CPU usage %

Slide 34

Slide 34 text

Database Server metrics like Queries executed and many more

Slide 35

Slide 35 text

aka.ms/postgres-flexible-server-docs [email protected] [email protected] MySQL aka.ms/postgres-cloud9 aka.ms/mysql-flexible-server-docs aka.ms/postgres-flexible-blog aka.ms/mysql-flexible-blog aka.ms/mysql-tenthline

Slide 36

Slide 36 text

Data Platform Virtual Summit 2020 is a community initiative by DataPlatformGeeks QUESTIONS ?

Slide 37

Slide 37 text

Data Platform Virtual Summit 2020 is a community initiative by DataPlatformGeeks Sunitha Muthukrishna @mksuni @AzureDBMySQL @AzureDBPostgres thank you merci grazie danke ध"यवाद ευχαριστώ gracias ధన#$ా&'ల) 谢谢

Slide 38

Slide 38 text

APPENDIX

Slide 39

Slide 39 text

Heading Styling • Heading One Style, 28pt • Body content, 20pt Segoe UI (gray) • Heading Two Style, 24pt • Body content, 20pt Segoe UI (gray) • HEADING THREE STYLE, 22PT, BOLD, ALL CAPS • Body content, 20pt Segoe UI (gray)

Slide 40

Slide 40 text

SECTION DIVIDER Type 1 -

Slide 41

Slide 41 text

Data Platform Virtual Summit 2020 is a community initiative by DataPlatformGeeks SECTION DIVIDER Type 2 -

Slide 42

Slide 42 text

Azure Kubernetes Services Provides orchestration with your favorite tools and more Development tools Platform Azure Kubernetes Service Azure Red Hat OpenShift Azure Container Instances Azure Arc Management across environments Community Active Directory Azure Policy Security Center Key Vault Azure Advisor GitHub Visual Studio Code Azure Container Registry Azure Dev Spaces Azure Monitor

Slide 43

Slide 43 text

Chart Type 1 0 1 2 3 4 5 6 Category 1 Category 2 Category 3 Category 4 Series 1 Series 2 Series 3

Slide 44

Slide 44 text

Chart Type 2 Sales 1st Qtr 2nd Qtr 3rd Qtr 4th Qtr

Slide 45

Slide 45 text

Table Heading 1 Heading 2 Heading 3 Heading 4 Heading 5 Heading 6

Slide 46

Slide 46 text

Slide for Showing Developer’s Software Code • Use this layout to show software code • The font is Consolas, a monospace font • The slide doesn’t use bullets but levels can be indented using the “Increase List Level” icon on the Home menu

Slide 47

Slide 47 text

Video Video Title • Add subtitle

Slide 48

Slide 48 text

Demo Demo Title • Name • Title • Group

Slide 49

Slide 49 text

Special Thanks To for supporting DataPlatformGeeks & SQLServerGeeks Community Initiatives

Slide 50

Slide 50 text

Three Ways to Win Prizes Post your selfie with hash tag #DPS2020 Give Session & Conference Feedback Visit our Sponsors & Exhibitors Thank You Follow us on Twitter @TheDataGeeks @DataAISummit