[AZ-900] Short Note

สรุปของผมระหว่างลองใช้ Azure และศึกษาใน MS Learn เพื่อเตรียมสอบ AZ-900 ครับ

CapEx vs OpEx

  • Capital Expenditure - ลงทุนไปก่อน แล้วค่อยหักค่าเสื่อม เช่น ซื้อ Server / License
  • Operational Expenditure - จ่ายเท่าที่ใช้ เช่น จ่ายคน หรือบริการต่างๆ Public Cloud จะเป็นส่วนนี้

Cloud Concept

- Shared Responsibility

  • Shared Responsibility : หน้าที่การจัดการ ในแต่ละด้านระหว่างลูกค้า กับ Microsoft ใน Cloud Service แบบต่างๆ

- Cloud Model

  • On Premise (Private Cloud) - วาง Server จัดการเองทั้งหมด
  • Public Cloud
    • Infrastructure as a service (IaaS)
      • Provides servers and virtual machines, storage, networks, and operating systems on a pay-as-you-go basis
      • ให้ Infrastructure เราจัดการเอง
    • Platform as a service (PaaS)
      • Provides a fully managed environment for developing, testing, delivering, and managing cloud-based applications
      • มี Infra / Platform มาให้แล้ว เราแค่เอา App ของเรามา Deploy เอง
    • Software as a service (SaaS)
      • Provides hosting and management of an application and its underlying infrastructure, as well as any maintenance, upgrades, and security patching
      • ไม่ต้องลงอะไรมี Software ใช้งานเลย เช่น Office
  • Hybrid = Private + Public

Cloud Benefit

  • High Availability - มีหลาย Availability Zone - continuous user experience with no apparent downtime when things go wrong
  • Scalability - Vertically (เพิ่ม CPU/RAM) / Horizontally (เพิ่ม VM / Container)
  • Global Reach
  • Agility
  • Fault Tolerance - Azure Site Recovery (Remain available after failure occurs)
  • Elasticity
  • Low Latency (Customer latency capabilities)
  • Predictive Cost Considerations

Keyword

  • Subscription - ต้องมีเป็นอย่างแรกถึงจะใช้ Azure ได้
    • Management Group
      • Manage User access multiple resource and multiple subscription
      • เอามาครอบ Subscription อีกที (Group of Subscription) เอาไว้จัดการภาพรวม กรณีแยก Subscription ตามหน่วยงานภายในองค์กร เช่น การทำ Governance & Policy เข้าไป เพื่อดู Overall ครับ
  • Resource Group & Resource
    • Resource Group - ปกติ Azure จะเรียก Service ต่างๆ อย่าง VM / Database ว่าเป็น Resource โดยแต่ละ Resource ถูก Subscription ครอบอีกทีนึง
    • Resource - Azure Service ต่างๆ
    • tags - เป็น Metadata รูปแบบ Key-Value เอาไว้อ้างอิง เหมือนการออก Report ด้าน Cost จะเอา tag มา category ต่อด้วย ใช้ได้ทั้ง Resource Group และ Resource แต่ถ้ากำหนดที่ Resource Group ไว้ ต้องกำหนดใหม่ (ไม่ Extend) ที่ Resource ด้วย ยกเว้นกำหนด Azure Policy - tag
    • แต่ Permission ที่กำหนดไว้ใน Resource Group มัน Extend มา Resource ด้วย
  • Azure Resource Manager - Deployment and management service for Azure
    • Declarative templates - Infrastructure as a Code ใช้
      • ARM Template - เป็น JSON File ให้เก็บ Config ของ Resource เอาไว้ เผื่อ Re-deploy (repeatable and reliable)
      • Bicep (DSL Language)
    • Deploy, manage, and monitor all the resources as a group และกำหนด Dependencies ของแต่ละ Resource
    • Access Control จาก Azure RBAC
    • จัดการ Tag
  • การจัดการ resource บน Azure
    • Azure Portal - เป็นเว็บ สะดวก มี Azure Cloud Shell ให้ใช้ Command
    • Azure mobile app
    • Azure PowerShell - az something เป็น command-line (แต่ต้องลง PowerShell 7++)
    • Azure CLI - command-line คล้าย bash ของ Linux
    • NOTE: Windows / Linux / Mac ใช้ได้หมด
  • การ Control resource บน Azure
    • Azure RBAC - RBAC = Role Base Access Control ดูจาก Role โดยตัวอย่างการใช้ (ผมมักจำสับสันกับ Azure Policy)
      • Allow one user to manage virtual machines in a subscription and another user to manage virtual networks
      • Allow a DBA group to manage SQL databases in a subscription
      • Allow a user to manage all resources in a resource group, such as virtual machines, websites, and subnets
      • Allow an application to access all resources in a resource group
    • Azure ABAC - ABAC = Attribute Base Access Control
      • Attribute - ดูจาก tag ได้ ว่า Key/Value อะไร ?
    • Azure locks - เอาไว้จัดการ Resource Group / Resource (ถ้าตั้งที่ Resource Group มันจะ Inherit มายัง Resource ด้วย)
      • Read-only lock - อ่านได่อย่างเดียว
      • delete lock - ห้ามลบ
    • Azure Policy - service in Azure that enables you to create, assign, and manage policies that control or audit your resources.
    • Azure Blueprints - enables you to define a repeatable set of governance tools and standard Azure resources that your organization requires.

Azure Service (by Cloud Model)

ข้างล่าง ผมจัดตามความเข้าใจของผมเองนะครับ อาจจะผิดได้

- Infrastructure as a service (IaaS)

  • Compute
    • Virtual Machines
      • ปกติตัว VM เมื่อ Deploy เสร็จจะใช้งานผ่าน RDP / SSH ถ้าต้องการใช้ผ่านเว็บ Browser ได้ ต้องเปิดใช้งาน Azure Bastion เพิ่ม
    • Azure Kubernetes Service (AKS) -
  • Storage Service / Azure Storage Account
    • Azure Blob Storage - large objects, เช่น video files / bitmaps.
      • เวลาสร้าง Virtual Machine แล้วมีสร้าง Disk เพิ่ม มันจะถูกมองเป็น Blob Storage เหมือนกัน
    • Azure File Storage - File Share ผ่าน SMB Protocol, Map network Drive
    • Azure Queue Storage
    • Azure Table Storage - No SQL
    • Note : ราคาของ Storage คิดแยกนะ โดยมีเงื่อนไขคร่าวๆ เนื้อที่ Volume ที่ใช้ / Disk / Data Transfer Costs / Data Redundancy ที่กำหนดไว้
  • Networking Service
    • Azure Virtual Network
    • Azure Load Balancer
    • Azure Application Gateway - web application firewall (WAF) Filter Request ที่ผิดปกติ
    • Azure VPN Gateway - Encrypt ข้อมูล
      • Cross-Premise
        1.1 Point-to-Site
        1.2 Site-to-Site
        1.3 Express Route
      • Cross-Virtual Network
        2.1 VNet-to-VNet
        2.2 VNet Peering
    • Note: Local Network Gateway ใช้แสดง On-Premise VPN Device ใน Azure
  • Azure DNS
    • Azure Traffic Manager - จัดการ Request ตาม IP เช่น จาก SEA ไป Server ใน SG / US ไป Server ใน East US
    • Azure ExpressRoute - ต่อ Network ตรงจาก On-premise > Azure Cloud
  • Disaster Recovery
    • Azure Site Recovery

- Platform as a service (PaaS)

  • App Service
    • รองรับ .NET / .NET Core / Node.js / Java / Python / PHP
    • มี 4 แบบ
      • Web apps
      • API apps - REST API / full Swagger support
      • WebJobs - เอาอะไรที่ไม่ใช่เว็บ (exe / jar / script) หรือ เว็บมาทำ background job / ต้้ง trigger ได้
      • Mobile apps - เป็น back-end
    • Azure Application Insights เอาไว้ดูข้อมูล application performance management (APM)
  • Azure Container Instance
    • เอา App ในรูปแบบ Container มา Deploy
  • Serverless
    • Azure Functions - Code-first (imperative) + stateless  โดยเอา 1 Function / Method ภาษาที่เด่นๆ เช่น C# มาเปิดเป็น End Point (REST API) เช่น เอา Azure Functions มารับราคา Order จาก Client และเก็บลง Cosmos DB
      Note มันทำ Unit Test ที่ Local ได้
    • Azure Logic Apps - Designer-first (declarative) Web-based Logic designer / Low Code / orchestration API (ผมไปนึกถึงพวก BPMN)
    • Azure Event grid
  • Azure Virtual Desktop - Remote Desktop มาใช้ PC แต่เราไม่ต้องไปจัดการเองแบบ Azure Virtual Machine
  • Azure Cognitive Search -
  • Azure CDN -
  • Database Service
  • Identity and Access Management
  • Big Data and Data Analytic
    • Azure Synapse Analytics (Azure SQL Data Warehouse) เหมือน Databrick แต่ Engine ข้างในต่างกัน รวมถึงสามารถใช้พวก Complex Query อย่าง T-SQL ได้ หรือ ต่อ Power BI เพื่อ Report ได้เลย
    • Azure HDInsight - Full Analytic Solution มี Hadoop ในตัว / Low-cost and scalable
    • Azure Data Lake Analytics - ใช้สำหรับงาน Data Analytic Ad-Hoc

- Software as a service (SaaS)

  • Azure DevOps Service - สำหรับสาย DEV
    • Azure Repos- Source Code Repository
    • Azure Boards - Agile Kanban boards
    • Azure Pipelines - CI/CD pipeline
    • Azure Test Plans - CI/CD Test Tools
    • Azure Artifacts - File Server เก็บผลจาก CI/CD
    • Azure DevTest Labs - Environment เอา่ไว้ทดสอบก่อนจะ Release อาจจะทำเป็น ARM Template ได้ พอใช้เสร็จมันจะถูกลบทิ้งไป
      NOTE: มี GitHub / GitHub Actions GitHub is a lighter-weight tool than Azure DevOps
  • Governance and Compliance
    • Azure Policy - เอาไว้กำหนดกฏ เพื่อคุมการใช้ Resource หรือตรวจว่า Compile ตามมาตรฐานต่างๆไหม เช่น ISO20
  • IoT
    • IoT Hub - Simple IoT Solution
    • Azure IoT Central - IoT Hub + (Web-based dashboard + manage) + Reporting ถ้าไม่ต้องการคุมหมด ไม่ต้องใช้ Feed Data จาก IoT แล้วเอาใช้ Azure Data Analytic
    • Azure Sphere - Azure IoT Central + security is critical.
  • General Security
    • Microsoft Defender for Cloud (Azure Security Center) -
      • monitoring service ทั้งของ Azure และชาวบ้าน
      • การกำหนด Security Policy, การป้องกัน และ ตลอดจนคำแนะนำต่างๆ สำหรับ Resources ต่างๆ โดยดูจาก security posture (มองครบด้าน Confidentiality , Integrity, and Availability) และตีเป็นค่า secure score
    • Azure Key Vault - Manage secrets / Encryption keys / SSL/TLS certificates / hardware security modules (HSMs) Secret
    • Microsoft Sentinel (Azure Sentinel) - combine security data (Security Information & Event Management) from all of its monitoring tools into a single report
  • Monitoring
    • Azure Advisor - evaluates your Azure resources and makes recommendations to help improve reliability, security, and performance, achieve operational excellence, and reduce costs.
    • Azure Monitor -
      • platform for collecting, analyzing, visualizing, and potentially taking action based on the metric and logging data from your entire Azure and on-premises environment.
      • set up alerts for key events เช่น ทำ Auto Scaling
    • Azure Service Health -
      • view of the health of the Azure services, regions, and resources you rely on. The status.azure.com website
      • official outage root cause analyses (RCAs) for Azure incidents
      • สร้าง Rule ไว้แจ้ง Alert Service ได้ด้วยนะ

Azure Storage Redundancy

  • Local (LRS) 3 Copy แต่เก็บไว้ใร Data Center เดียวดัน
  • Zone (ZRS) Sync กระจาบไปใน 3 Data Center ใน Region เดียวกัน
  • GEO- (GRS) LRS + LRS มี 6 copy
    • Replicates your data to a secondary region that is in different geographic locations from the primary region
  • GEO-Zone (GZRS) ZRS + LRS มี 6 copy

Layers of defense in depth

  • Physical security - ป้องกัน Data Center มีรั้ว มียาม มี CCTV
  • Identity and access - Authentication & Authorization (Azure AD)
  • Perimeter - DDoS protection (Azure DDoS Protection) / perimeter firewalls (Azure Firewall)
  • Network - limits communication between resources through segmentation and access controls. ตัวอย่าง network security group (NSG)
  • Compute - secures access to virtual machines
  • Application - security a design
  • Data - Storage + Encryption

SLA

  • Azure VM ที่ Deploy 2 VM และอยู่คนละ Availability Zone
    • Connectivity = 99.99%
  • Monthly Uptime %
    • Monthly Uptime % = (Maximum Available Minutes-Downtime) / Maximum Available Minutes
  • Net SLA ถ้ามี 2 Service ใช้งานร่วมกัน ให้เอา SLA แต่ละ Service มาคูณกัน แล้วหาร 100 เช่น
    • Web App SLA = 99.95%
    • SQL DB = 99.99%
    • Net SLA = (99.95 x 99.99) / 100 = 99.94
  • Reference : SLA for Azure Cloud Services | Microsoft Azure

คำนวณค่าใช้จ่าย

  • Total Cost of Ownership (TCO) Calculator - เครื่องมือที่ MS เตรียมไว้สำหรับคำนวณงบประมาณที่ต้องเตรียมไว้ หากย้ายจาก Local > Azure โดยต้องกำหนด
    • Workload - Server / Storage / Database / Networking
    • Assumptions - การใช้งานจริงที่เกิด อาจจะเผื่อไปด้วย
    • Report - สรุปงบประมาณที่ต้องเตรียม
  • Pricing Calculator - เครื่องมือสำหรับคำนวณงบประมาณ เมื่อย้ายไปใช้ Azure แล้ว และทำพวก estimate expected monthly bills ได้
  • Azure Advisor - เครื่องมือสำหรับช่วยลดค่าใช้จ่ายที่ไม่จำเป็นบน Azure
  • Azure Reservation - จ่ายล่วงหน้า 1 หรือ 3 ปี ตามที่ Tool คำนวณ Estimate ไว้ และทาง Microsoft มีส่วนลดมาให้ เพราะเหมาจ่ายไปแล้ว

NOTE อื่นๆ

  • Azure Information Protection (AIP) - ใช้สำหรับปกป้อง Documents and emails
  • Azure Trust Center - เอาไว้ตรวจสอบว่า Azure Compliance ตามมาตรฐานอะไรบ้าง
  • ถ้าองค์กรไหน Security สูงมากๆ
    • ใช้ Azure Dedicated Host เข้ามา Run VM Cloud ที่ได้ เป็นแบบ Private / Hybrid
    • Azure Government - ของรัฐบาล US แยก Zone กันไป แต่ดูแลโดย Microsoft
    • มี US ที่จีนมีแยกเหมือนกัน Azure China (21Vianet) คนดูแล Shanghai Blue Cloud Technology Co., Ltd. (บ ลูกของรัฐบาลจีน)
    • Azure German - ใช้ใน EU
  • Azure Support Plan
    • ตอนสมัครต้องระวังตอนเลือกนะ เดี๋ยวโดนหักเงินฟรี
    • ถ้าต้องการ Architecture Support จาก ProDirect delivery managers ต้องสมัคร Support แบบ PROFESSIONAL DIRECT
  • Video อันนี้ มีประโยชน์นะครับ ฟังไปเรื่อยๆตอนทำงาน
  • อันนี้เป็นภาษาไทยครับ ฟัง Concept ได้ แต่เข้าใจว่าพวก ชื่อ Service ต่างๆ ปรับไปตามกาลเวลาครีบ

Knowledge Check

Reference


Discover more from naiwaen@DebuggingSoft

Subscribe to get the latest posts to your email.