Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Build modern cloud native applications with Kub...

Build modern cloud native applications with Kubernetes and OSS databases on Azure | Data Platform Summit 2020 | Sunitha Muthukrishna

With changing customer requirements, you need to think about modernizing your approach to application development to be cloud-ready. In this session, we will show you how to modernize your application with Azure Kubernetes Service (AKS) and MySQL on Azure. We will walk through on how to migrate an application that uses PostgreSQL or MySQL to Kubernetes using AKS and Azure Database for MySQL. In additional to the migration, you will also learn how to optimize AKS to work best with Postgres or MySQL on Azure and to simplify migration and operational efficiency resulting in increased scalability, improved performance, and reduced costs.

Azure Database for PostgreSQL

December 04, 2020
Tweet

More Decks by Azure Database for PostgreSQL

Other Decks in Technology

Transcript

  1. Build modern cloud native applications with Kubernetes and OSS databases

    on Azure Sunitha Muthukrishna Senior Program Manager Microsoft
  2. 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
  3. Azure builds upon the core benefits of PostgreSQL and MySQL

    Global reach Security Scale up Built-in HA Compliance Easy ecosystem integration
  4. 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
  5. 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
  6. 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
  7. Introducing Flexible Server (Preview) for Build resilient apps across availability

    zones Maximum control for your databases Simplified developer experience
  8. 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)
  9. Data Platform Virtual Summit 2020 is a community initiative by

    DataPlatformGeeks AZURE KUBERNETES SERVICE
  10. 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
  11. 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
  12. Data Platform Virtual Summit 2020 is a community initiative by

    DataPlatformGeeks DEPLOY WORDPRESS APP IN AKS + MYSQL FLEXIBLE SERVER
  13. 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 <IP address>
  14. 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\<local-userame>\.azure-kubectl Get Credentials to connect to the cluster az aks get-credentials --name MyAKSCluster --resourcegroup MyResourcegroup
  15. 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.
  16. Data Platform Virtual Summit 2020 is a community initiative by

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

    DataPlatformGeeks CREATE A POSTGRES FLEXIBLE SERVER
  18. Command to create postgres flexible server Create Postgres flexible database

    server using these command • az postgres flexible-server create [OPTIONS]
  19. Data Platform Virtual Summit 2020 is a community initiative by

    DataPlatformGeeks BEST PRACTICES FOR CLOUD NATIVE APPS WITH OSS DATABASES
  20. 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( "<connection_string>", options => options.EnableRetryOnFailure(maxRetryCount, maxRetryDelay, errorNumbersToAdd));
  21. 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
  22. Data Platform Virtual Summit 2020 is a community initiative by

    DataPlatformGeeks SCALE AND MANAGE AKS CLUSTER AND FLEXIBLE SERVER
  23. 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
  24. 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
  25. 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
  26. Data Platform Virtual Summit 2020 is a community initiative by

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

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

    DataPlatformGeeks SECTION DIVIDER Type 2 -
  30. 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
  31. Chart Type 1 0 1 2 3 4 5 6

    Category 1 Category 2 Category 3 Category 4 Series 1 Series 2 Series 3
  32. 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
  33. 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