28,79 €
To gain a competitive edge in today's unpredictable economic climate, you’ll need to unravel the mystery of saving costs on Microsoft Azure Cloud. This book helps you do just that with proven strategies for building, running, and sustaining repeated cost optimization initiatives across your organization. You’ll learn how to collaborate with finance, procurement, product, and engineering teams to optimize your cloud spend and achieve cost savings that can make a significant impact on your bottom line.
The book begins by showing you how to effectively monitor and manage your cloud usage, identify cost-saving opportunities, and implement changes that’ll reduce your overall spend. Whether you're a small start-up or a large enterprise, this book will equip you with the knowledge and skills needed to achieve cost savings and maintain a lean cloud infrastructure. As you advance, you'll find out how to benchmark your current cloud spend and establish a budget for cloud usage. Throughout the chapters, you’ll learn how to negotiate with your cloud provider to optimize your rate, allocate cost for the container, and gain a solid understanding of metric-driven cost optimization.
By the end of this FinOps book, you’ll have become proficient in Azure Cloud financial management with the help of real-world examples, use cases, and scenarios.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 247
Veröffentlichungsjahr: 2023
Empowering teams to optimize their Azure cloud spend with FinOps best practices
Maulik Soni
BIRMINGHAM—MUMBAI
Copyright © 2023 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Group Product Manager: Mohd Riyan Khan
Publishing Product Manager: Suwarna Rajput
Senior Editor: Sayali Pingale
Technical Editor: Arjun Varma
Copy Editor: Safis Editing
Associate Project Manager: Ashwin Kharwa
Proofreader: Safis Editing
Indexer: Manju Arasan
Production Designer: Shankar Kalbhor
Marketing Coordinator: Agnes D’souza
First published: May 2023
Production reference: 1200423
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-80181-016-6
www.packtpub.com
This book would not have been possible without the unwavering support and encouragement from the following people. My mother, your love and guidance have been the foundation upon which I have built my life. My father, your wisdom and strength have been an inspiration to me. My wife Ripal, your belief in me and your unyielding devotion have given me the courage to pursue my dreams. And my son Shiven, you are the reason I strive to be a better person every day.
– Maulik Soni
Maulik Soni is a principal cloud solutions architect with a track record of helping commercial enterprise customers successfully adopt and implement Azure core infrastructure services. He has a bachelor’s degree in advanced accounting and auditing and an advanced diploma in computer business applications from the Department of Electronics and Accreditation of Computer Classes in New Delhi.
Maulik has delivered more than a dozen cost optimization assessments, providing actionable recommendations that have helped Fortune 50 companies save between $1-3 million per year in cloud costs. When he’s not at work, Maulik indulges his passion for street photography. He also enjoys exploring new destinations with his wife and son.
Special thanks to my friend and guide, Nirbhay Anand. Your unwavering support and encouragement throughout the writing of this book have been invaluable.
This book would not have been possible without the support from the entire Packt publishing team, specifically Suwarna Rajput and Niranjan Naikwadi for reaching out and convincing me to write this book, Ashwin Kharwa for constantly keeping me on the schedule, Sayali Pingale for coordinating smooth hand-offs during the complex editing process, and Agnes D'souza for wonderful coverage of graphics designs.
Mustafa Mamawala has been working in the IT industry for more than 29 years, and he has over 16 years of experience in designing software systems and providing solutions as an architect. He has played key roles in digital transformation initiatives, cloud transformation journeys, monolith to microservices transformations, agile and DevOps automation, application/product architecture review, data analytics, and engineering management.
Mustafa has led various communities of practice to build capabilities in Microsoft technologies, various cloud services such as Azure and Google Cloud Platform, and content management systems across organizations he has worked.
He currently works as a lead enterprise architect with HSBC Software Development India, based out of Pune.
I would like to thank my wife Tasneem and son Ebrahim, who helped me manage my time and commitments.
I would also like to thank my associate Nirbhay Anand, who introduced me to Packt Publications, and through whom I got this opportunity.
Special thanks to my friend Jaywant Thorat (Microsoft Certified Trainer and PowerBI expert) for helping me overcome environmental challenges while reviewing the hands-on activities in this book.
Nirbhay Anand has more than 16 years of solid software design, development, and implementation experience. He has developed software in different domains such as investment banking, manufacturing, supply chain, power forecasting, and railroad contract management.
Being a Microsoft techie, he has expertise in Azure and cloud computing, and as a technical program manager, he has been engaged with FinOps management.
Currently, he is associated with CloudMoyo, a leading cloud and analytics partner for Microsoft. CloudMoyo brings together powerful BI capabilities using the Azure data platform to transform complex data into business insights.
He is a passionate blogger and book reviewer.
I would like to thank my wife Vijeta and kids Navya and Nitrika (Nikku) for their support. I would also like to thank my friends, family, and well-wishers for their never ending support.
Hi there! Financial Operations (FinOps) is an emerging discipline that blends financial management, cloud expertise, and data analytics to optimize cloud spending while still ensuring that organizations have the resources they need to support their business objectives.
Practicing FinOps for Microsoft Azure helps with the following:
Providing visibility of cloud utilizationPresenting an opportunity to optimize cloud utilizationProviding a framework to practice with small changes over timeReinvesting money saved to fuel innovationIn today’s fast-paced and ever-changing cloud environment, mastering FinOps for Microsoft Azure is becoming a necessity for organizations of all sizes to stay competitive and agile.
There are many resources that cover the FinOps practice; the most popular one is the FinOps Foundation (https://finops.org). This book aims to cover all the best practices for applying FinOps for the Microsoft Azure cloud using native capabilities, except for container cost allocation.
With my extensive experience in conducting assessments for large customers with significant cloud spending, and utilizing the cloud service providers’ assessment questionnaire, I can provide relevant information and guidance on FinOps for Azure’s cost savings and business value realization activities.
According to a report by Flexera, 63% of enterprises are now using a dedicated FinOps team to manage their cloud spending, up from 45% in 2020. As FinOps adoption continues, the demand for expert resources also grows.
Possessing an understanding of both the financial and technical aspects of cloud services can be a highly valuable skill in bridging the gap between finance, procurement, engineering, and product management teams.
I wish you all the best to start the journey, and before you know it, you will be an expert.
Individuals and teams who are responsible for managing the financial aspects of their organization’s Azure cloud environment.
The target audience who can benefit from this content is as follows:
Finance professionals: You will learn how to manage cloud spending and optimize costs in AzureCloud architects: You will be able to design and implement cost-effective Azure solutions for your organizationSoftware engineers: You will learn how to develop cost-efficient applications and services in AzureDevOps professionals: You will gain insights to manage cloud resources and control costs as part of your continuous integration/continuous deployment (CI/CD) processIT managers: You will gain visibility into your organization’s cloud spending and make informed decisions about resource allocationBusiness leaders: You will gain an understanding of the financial implications of your organization’s cloud strategy and make strategic decisions based on cost dataChapter 1, Bringing Visibility and Allocating Cost, discusses the challenges faced by FinOps teams in establishing successful FinOps practices and provides solutions to overcome them. It also highlights Microsoft’s Cost Management + Billing tool to gain visibility of the existing IT environment and current cloud cost. The chapter also covers the topics of cost allocation using accounts, management groups, subscriptions, and tags, and explores cost analysis in the Azure portal for FinOps.
Chapter 2, Benchmarking Current Spend and Establishing Budget, provides an overview of benchmarking cloud spend and developing KPIs for consistent reporting to improve performance. It covers topics such as Azure’s on-demand and elastic nature, creating budgets, and configuring anomaly alerts in the Azure Cost Analysis tool.
Chapter 3, Forecasting the Future Spend, explains the importance of financial forecasting for FinOps teams and provides insights into various ways to obtain past and current usage and charges for cloud services in Azure. It highlights the significance of tagging resources and covers topics such as setting up cost management connectors in Power BI, forecasting based on manual estimates and past usage, advanced forecasting by application, and fully loaded cost forecasting.
Chapter 4, Case Study – Beginning the Azure FinOps Journey, is a case study of Peopledrift Healthcare’s journey to implement FinOps practice and achieve its objectives. The company faced challenges in estimating current and future spending and accurately forecasting spend. By implementing FinOps, they were able to overcome these challenges and improve their financial management gradually.
Chapter 5, Hitting the Goals for Usage Optimization, focuses on the Usage Optimization aspect of the FinOps Optimize phase, which targets cost avoidance and right-sizing. Cost avoidance can be achieved by deleting unneeded resources, while right-sizing involves selecting the right service SKUs for optimal workload performance. The chapter covers the Project Management Triangle Method for goal setting, as well as setting objectives and key results (OKRs) and KPIs. The top 10 usage optimization targets are discussed, along with trade-offs between cost, security, performance, and reliability.
Chapter 6, Rate Optimization with Discounts and Reservations, discusses rate optimization in FinOps, which involves getting better enterprise discounts and purchasing reservations to save costs. The chapter explains enterprise agreements, Azure Advisor recommendations, identifying opportunities for reservations, and monitoring reservation utilization. It also covers reservation purchase and cadence, details, renewal, savings, and chargeback reports, as well as reservation exchange and cancellation.
Chapter 7, Leveraging Optimization Strategies, discusses the importance of utilizing various optimization strategies in a holistic manner, including removing waste, right-sizing, purchasing reservations, savings plans, and highly discounted spot VMs. The focus is on highly discounted spot VMs. Additionally, the chapter discusses the Spot Priority Mix and Savings Plans, which provide a consistent compute capacity with additional spot VMs and are an alternative to reservations, respectively.
Chapter 8, Case Study – Realize Savings and Apply Optimizations, showcases how Peopledrift Inc. adopted the Microsoft Azure cloud and migrated their workload from on-premises to the cloud. After consistently high usage, the FinOps team started looking for ways to save money through rate and usage optimization. The case study discusses the KPIs designed to measure progress, the execution of the usage and rate optimization programs, and the consideration of Azure Savings Plans.
Chapter 9, Building a FinOps Culture, provides an overview of building a culture of FinOps through collaboration across business boundaries. Management buy-in is essential to establish a Center of Excellence (CoE) for cloud cost management, which is responsible for bringing stakeholders together and preparing a business plan that articulates savings opportunities.
Chapter 10, Allocating Cost for Containers, focuses on allocating cost for container workloads, specifically in Azure Kubernetes Services (AKS) clusters. The challenges of allocating costs in microservices and shared AKS clusters are discussed. The open source tool Kubecost is explored as an industry standard for cost allocation and visibility. The chapter also covers showback and chargeback mechanisms using Kubecost and provides cost optimization recommendations for AKS clusters.
Chapter 11, Metric-Driven Cost Optimization, introduces a cost management strategy for cloud computing environments, which involves using data and analytics to continuously monitor, measure, and optimize cloud costs. The chapter covers the core principles of Metric-Driven Cost Optimization (MDCO), reservation reporting using Power BI, setting thresholds for purchasing reservations, and automated reservation purchases based on MDCO triggers.
Chapter 12, Developing Metrics for Unit Economics, discusses the concept of unit economics in cloud FinOps and its importance in analyzing the costs and revenue associated with delivering a single unit or product within a business. It explains how FinOps teams can use this analysis to make informed decisions about pricing, cost optimization, and resource allocation. The chapter also covers tracking costs back to business benefits, developing metrics for unit economics, and implementing an activity-based cost model.
Chapter 13, Case Study – Implementing Metric-Driven Cost Optimizations and Unit Economics, focuses on implementing MDCO and unit economics for container allocation in the AKS platform. The team utilized a data-driven decision-making process to optimize cloud usage and purchase reservations. They also calculated IT costs per unit of service to understand the profitability of the DeliverNow platform. The case study provides insights into cost allocation for containers and shared services, metrics for reservation purchases, and unit metrics for calculating the per-unit cost and profitability of the business.
You will need to have a basic understanding of Azure cloud services and architecture as well as cloud cost management principles, financial management concepts, and the Azure Cost Management tool. Having access to usage and billing data for your Azure resources is also helpful to analyze your cloud cost.
Software/hardware covered in the book
Operating system requirements
Microsoft Azure portal access
Windows, macOS, or Linux
Microsoft Power BI Desktop
DAX Studio
Microsoft Power Automate
Azure SQL
AKS
Kubecost
You will need a Microsoft Power BI Pro or Premium license to run the data-driven alert feature described in Chapter 11, Metric-Driven Cost Optimization.
If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book’s GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.
We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: https://packt.link/YI44t.
There are a number of text conventions used throughout this book.
Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “Use Workbook 2, which provides a list of right-size recommendations for your virtual machines and virtual machine scale sets.”
A block of code is set as follows:
ResourceContainers| where type =~ 'Microsoft.Resources/subscriptions' | extend SubscriptionName=name | join ( ResourceContainers | where type =~ 'microsoft.resources/subscriptions/resourcegroups' | where tags =~ '' or tags =~ '{}' | extend resourceGroupName=id, RGLocation=location) on subscriptionId | project resourceGroupName, RGLocation, SubscriptionNameAny command-line input or output is written as follows:
Set-AzVM -ResourceGroupName "mySpotRG" -Name "mySpotVM" -SimulateEvictionBold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “On the Basics tab, select Flexible for the Orchestration mode.”
Tips or important notes
Appear like this.
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, email us at [email protected] and mention the book title in the subject of your message.
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.
Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Once you’ve read FinOps Handbook for Microsoft Azure, we’d love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.
Your review is important to us and the tech community and will help us make sure we’re delivering excellent quality content.
Thanks for purchasing this book!
Do you like to read on the go but are unable to carry your print books everywhere? Is your eBook purchase not compatible with the device of your choice?
Don’t worry, now with every Packt book you get a DRM-free PDF version of that book at no cost.
Read anywhere, any place, on any device. Search, copy, and paste code from your favorite technical books directly into your application.
The perks don’t stop there, you can get exclusive access to discounts, newsletters, and great free content in your inbox daily
Follow these simple steps to get the benefits:
Scan the QR code or visit the link belowhttps://packt.link/free-ebook/9781801810166
Submit your proof of purchaseThat’s it! We’ll send your free PDF and other benefits to your email directlyThis part provides an introduction to FinOps, covering strategies for improving visibility into cloud workloads and techniques for effective cost allocation. Additionally, you will discover how to establish a baseline spend and create and track a budget against spending, as well as techniques for forecasting future spending in the cloud. To solidify your understanding, a case study is presented at the end.
This part contains the following chapters:
Chapter 1, Bringing Visibility and Allocating CostChapter 2, Benchmarking Current Spend and Establishing BudgetChapter 3, Forecasting the Future SpendChapter 4, Case Study – Beginning the Azure FinOps JourneyWith so many things to look at, often, the FinOps team does not know where to start, what to look for, and how to establish a successful FinOps practice for the organization. In this chapter, we will start by bringing visibility to your existing IT environment using two powerful tools. First is the Microsoft Well-Architected Framework (WAF) Cost Optimization assessment questionnaire. This will help you understand the people side of things and what practices engineers, DevOps, product owners, and solution architects follow to build and deploy their workloads in Azure. At the end of the self-assessment, you will be provided with a baseline score. This score is your starting point to keep track of your improvements over a quarter or year. As you make small adjustments, this score will improve over time. The second tool we will explore is Microsoft’s Cost Management + Billing to show your current cloud costs and the drivers behind them.
Once you have this visibility, we will move on to understanding cost allocation. We will use accounts, management groups, subscriptions, and tags to allocate the cost proposed by the finance team.
In this chapter, we’re going to cover the following main topics:
Tools used in this book for implementing FinOps for Microsoft AzureWhat is the Microsoft Azure Well-Architected Framework?Creating a baseline using WAF – the Cost Optimization assessmentCost allocation from an accounting point of viewCost allocation in Azure for FinOpsExploring cost analysis in the Azure portalLet’s get started!
We will be using the Azure Well-Architected Review from Microsoft Assessments to accomplish the tasks in this chapter, which is available at https://docs.microsoft.com/en-us/assessments. It is an online self-assessment that takes about 30-60 minutes to complete.
When using this tool, be sure to sign in using your organization ID. In the next section, we will look at the tools that need to be installed to complete the tasks throughout this book.
Your organization uses Microsoft Azure. You will be using Microsoft Azure’s native capabilities to fulfill the requests by the FinOps team. Please follow the instructions provided to set up the tools and verify your access in Microsoft’s Azure portal.
We will be using Microsoft Azure’s command-line interface to run ad hoc scripts. Follow these steps to download and install the azcommand-line interface:
Open the Microsoft Edge browser.Navigate to https://aka.ms/installazurecliwindows.Once the download is complete, navigate to the Downloads folder.Run the MSI installer.Once complete, open Command Prompt and run the following command:az loginThis command will open a pop-up window where you can sign in to your Azure subscription. You will see the subscription details in Command Prompt after successful authentication.
Power BI Desktop is Microsoft’s tool for providing rich interactive reports and visual analytics. This tool is free to use and provides built-in connectors for Azure Cost Analysis. Follow these steps to download and install Power BI Desktop:
Open the Microsoft Edge browser.Navigate to https://aka.ms/pbidesktopstore. This link will open the Windows Store.Click Install.Once the installation is complete, go to the Start menu and open Power BI Desktop.You will see Power BI Desktop’s welcome screen, which contains Getting started videos and links to the Power BI tutorials.
Cost Management + Billing is a Microsoft native tool built into the Azure portal that allows you to analyze, manage, and optimize the costs of your application or workload. It currently supports the Microsoft Online Services Program, Enterprise Agreement, and Microsoft Customer Agreement types of billing account. To access Cost Management + Billing, you will need the Reader or Cost Management Reader permission in Azure. Let’s verify that you can access the billing data:
Open the Microsoft Edge browser.Navigate to https://portal.azure.com and sign in with your organization’s account.In the top search bar, search for Cost Management + Billing and select the highlighted service.Once it opens, you should be able to see the overview page, where you can see the latest billed amount, invoices over time, and subscriptions.Cost Management + Billing has a tab on the left where you can access a more detailed cost management view. You can also give it a try and make sure you can access the page.
Azure Advisor is a personalized service that scans Azure resources proactively periodically and provides actionable recommendations for workload optimization. To access the Advisor recommendations, you will need at least the Reader permission in Azure.
Follow these steps to access Azure Advisor:
Open the Microsoft Edge browser.Navigate to https://portal.azure.com and sign in with your organization’s account.In the top search bar, search for Advisor and select the highlighted service.Once it opens, you should be able to see the overview page with your Advisor score, score history, and recommendations across five categories – Cost, Security, Reliability, Operational Excellence, and Performance.You can click All Recommendations on the left navigation bar to view recommendations across all categories.
Azure Monitor is a cloud-based monitoring and analytics service by Microsoft. It collects and analyzes telemetry data from various sources, such as applications, infrastructure, and network devices. It helps you identify and troubleshoot issues proactively, optimize performance, and gain insights for better decision-making. At a minimum, you will need the Reader permission in Azure to view the monitoring data and dashboards.
Follow these steps to access Azure Monitor:
Open the Microsoft Edge browser.Navigate to https://portal.azure.com and sign in with your organization’s account.In the top search bar, search for Monitor and select the highlighted service.Once it has opened, you will be presented with an overview page that displays your monitor’s Insights, Detection, Triage, and Diagnostics details.On the overview page, you can also use the curated monitoring views for specific Azure resources, such as Application Insights, Container Insights, and VM Insights.
Azure Pricing Calculator
