<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rolf Schutten on Medium]]></title>
        <description><![CDATA[Stories by Rolf Schutten on Medium]]></description>
        <link>https://medium.com/@rolfschutten?source=rss-e4a376b31e60------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*SWZeRoTnsIJzpFp0_1S54Q@2x.jpeg</url>
            <title>Stories by Rolf Schutten on Medium</title>
            <link>https://medium.com/@rolfschutten?source=rss-e4a376b31e60------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 11:10:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rolfschutten/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Reducing Azure Consumption Costs with Automated Bastion Host Provisioning]]></title>
            <link>https://itnext.io/reducing-azure-consumption-costs-with-automated-bastion-host-provisioning-5e2cff14a977?source=rss-e4a376b31e60------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e2cff14a977</guid>
            <category><![CDATA[powershell]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Rolf Schutten]]></dc:creator>
            <pubDate>Sun, 21 May 2023 08:40:30 GMT</pubDate>
            <atom:updated>2023-05-21T08:40:30.042Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*52cblIbcJ54j4BKU.jpg" /></figure><p>In this blog, we will learn how to schedule the provisioning of an Azure Bastion Host using Azure Functions to optimize cloud spend. This blog also covers the provisioning of all resources with Terraform.</p><h3>Introduction</h3><h4>Azure Bastion</h4><p>Azure Bastion is a managed platform-as-a-service (PaaS) offering in Microsoft Azure that provides secure and seamless remote access to virtual machines (VMs) over the Secure Shell (SSH) or Remote Desktop Protocol (RDP) without the need for a public IP address or a VPN connection. It is a fully managed platform that simplifies administrative tasks by providing an easy-to-use, browser-based interface for managing VMs.</p><p>Azure Bastion provides a more secure way to access VMs by using Remote Desktop Protocol (RDP) and SSH over Transport Layer Security (TLS) instead of opening ports in the network firewall to allow direct connections. It eliminates the need to expose RDP and SSH ports to the public internet and reduces the risk of cyber-attacks such as brute-force attacks, malware, and ransomware.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/0*6tKO4qHn1jwyrDOv.png" /></figure><p>With Azure Bastion, you can connect to VMs securely from anywhere in the world using just a web browser. Azure Bastion provides a consistent user experience regardless of the location, device, or operating system of the client machine. It supports all major web browsers and does not require any additional software to be installed on the client machine.</p><h4>Azure Functions</h4><p>Azure Functions is a serverless compute service offered by Microsoft Azure. It allows developers to create and run event-driven, serverless applications, without the need to manage the underlying infrastructure. With Azure Functions, developers can write code in a variety of programming languages, such as C#, Java, JavaScript, Python, and PowerShell, and deploy it quickly and easily.</p><p>Azure Functions is designed for building microservices, which are small, independent, and loosely-coupled services that work together to provide a larger application or system. Each microservice is responsible for a specific task or function, and can be developed, tested, and deployed independently of other microservices. This approach makes it easier to maintain, update, and scale the application, as each microservice can be scaled independently based on its workload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cSXSr9iMoeTkU8Im.png" /></figure><p>Azure Functions can be triggered by a variety of events, such as an HTTP request, a message on a queue, a change in a database, or a timer. When a function is triggered, it runs in a stateless container and performs its specified task. Azure Functions can be integrated with other Azure services, such as Azure Storage, Azure Event Hubs, and Azure Service Bus, as well as with third-party services and APIs.</p><h3>Automated Bastion Host Provisioning</h3><p>In the following steps, we are going to create a straightforward virtual network in Azure, with a subnet dedicated to Azure Bastion. We will also set up an Azure Function with a managed identity and a storage account, and develop two functions within it. The first function will be responsible for deploying a Bastion Host every weekday at 8:30 AM, while the second function will be tasked with removing that same Bastion Host every weekday at 6:00 PM. These functions will automate the deployment and management of the Bastion Host, saving time and effort for the IT team. The managed identity will provide secure access to the resource group and ensure that the functions can run securely without requiring any additional authentication.</p><p>Overall, these steps will demonstrate the power of Azure’s services and show how they can be used to automate routine tasks and improve IT efficiency.</p><h4>Prerequisites</h4><p>Let’s get started with automating the provisioning of a Bastion Host with Azure Functions. We’ll deploy the components with Terraform. How to use Terraform or build CI/CD pipelines will not be covered in this blog article. Before you can start deploying, there are some prerequisites to fulfill:</p><ul><li><strong>Azure tenant and user account:</strong> You’ll need an Azure tenant, an Azure Active Directory (Azure AD) instance. This instance is the foundation of the environment. And it allows you to create an identity (user account) to connect to Azure, set up the environment, and deploy the resources.</li><li><strong>Subscriptions:</strong> You’ll need a subscription and owner permissions to deploy the resources.</li><li><strong>Terraform:</strong> You’ll need the Terraform command-line interface to deploy and manage Azure resources. You can find more information about Terraform and the AzureRM provider in the <a href="https://registry.terraform.io/providers/hashicorp/azurerm/latest">documentation</a>.</li></ul><p>Once you have fulfilled the prerequisites, we are ready to move forward and deploy and automate the provisioning!</p><h4>Variables</h4><p>First, download the Terraform files from this <a href="https://github.com/rolfschutten/automated-bastion-host-provisioning">GitHub repository</a> for the rest of this guide.</p><p>Review the files and adjust where necessary. Specifically the following variables in the <em>variables.tf</em> file apply to the following resources:</p><ul><li><strong>ServiceName:</strong> This describes the name of the service in the defined naming convention, which is {ResourceType}-<strong>{ServiceName}</strong>-{EnvironmentPrefix}-###. This applies to all resources.</li><li><strong>EnvironmentPrefix:</strong> This describes the prefix of all resources in the defined naming convention, which is {ResourceType}-{ServiceName}-<strong>{EnvironmentPrefix}</strong>-###, referring to environment type. For example, choose <em>p</em> for production, <em>t</em> for testing and <em>a</em> for acceptance.</li><li><strong>Location:</strong> This value defines the selected region the resource is being deployed, for all resources being deployed.</li><li><strong>VNetPrefixSecondOctet:</strong> This value defines the second octet of the IP address space for the Virtual Network. For example: if you need a address space of 172.<strong>20</strong>.8.0/22, choose 20.</li><li><strong>VNetPrefixThirdOctet:</strong> This value defines the third octet IP address space for the Virtual Network. For example: if you need a address space of 172.20.<strong>8</strong>.0/22, choose 8.</li><li><strong>Timezone:</strong> This value defines the timezone for your Azure Function to be in, and is actually representing the WEBSITE_TIME_ZONE value in your Function.</li><li><strong>CreateSchedule:</strong> This value defines the schedule when the Bastion Host should be created. It is a NCRONTAB expression, which is explained <a href="https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-timer?tabs=in-process&amp;pivots=programming-language-powershell#ncrontab-expressions">here in the Microsoft documentation</a>.</li><li><strong>DeleteSchedule:</strong> This value defines the schedule when the Bastion Host should be deleted. It is a NCRONTAB expression, which is explained <a href="https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-timer?tabs=in-process&amp;pivots=programming-language-powershell#ncrontab-expressions">here in the Microsoft documentation</a>.</li></ul><h4>Resources</h4><p>When executing the terraform plan and terraform apply commands after adjusting your variables.tf file, the following resources are being created:</p><ul><li><strong>Resource Group:</strong> A resource group is being created. This group is being used to store all resources that are created as part of this guide.</li><li><strong>Virtual Network:</strong> A /22 virtual network is being created within the resource group.</li><li><strong>Subnet:</strong> A /26 subnet named <em>AzureBastionSubnet</em> is being created in that same virtual network.</li><li><strong>Public IP:</strong> A static public IP address with the Standard sku is being created, which will be used as public IP address for the Bastion Host.</li><li><strong>Storage Account:</strong> When creating a function app, you must create or link to a general-purpose Azure Storage account that supports Blob, Queue, and Table storage. This requirement exists because Functions relies on Azure Storage for operations such as managing triggers and logging function executions. In our case we create a standard storage account, with the LRS replication type.</li><li><strong>Service Plan:</strong> A service plan, which represents the Azure Function hosting plan, is being created within the resource group. In this case, a dynamic consumption-based plan is being deployed with the Windows OS type.</li><li><strong>Function App:</strong> A function app, which is linked with the mentioned storage account and service plan. The function app is provided with a (SystemAssigned) managed identity. This identity is given the “Contributor” rights to the resource group, so it is authorized to deploy the Bastion Host. In addition, the function app is provided with some environment variables for proper operation, and configured as a PowerShell function app.</li><li><strong>Create Function:</strong> A function, created within the function app, named <em>Create-Azure-Bastion</em>. This function contains a PowerShell script, which switches to the context of the current subscription, and according to the specified schedule (specified in the variables.tf file) provisiones a Bastion Host.</li><li><strong>Delete Function:</strong> A function, created within the function app, named <em>Delete-Azure-Bastion</em>. This function contains a PowerShell script, which switches to the context of the current subscription, and according to the specified schedule (specified in the variables.tf file) deletes the provisioned Bastion Host.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/0*GTwcb74pKrEcujEE.png" /></figure><p>The specified variables for the schedule can be found in the <a href="https://portal.azure.com/">Azure portal</a> in the function’s function.json file (see screenshot above). The PowerShell script can be found in the run.ps1 file. You can look into these files to go to your Function App resource, click Functions in the left menu, and click the specific function. You don’t have to adjust anything here.</p><blockquote><em>If you want to test the function, you need to adjust the schedule. The schedule is passed as a parameter in the PowerShell script. Running the script manually, at a time that does not match the schedule, will never result in the provisioning of a Bastion Host!</em></blockquote><h4>Dependencies</h4><p>The PowerShell script relies on two Azure PowerShell modules, <a href="https://www.powershellgallery.com/packages/Az.Accounts/">Az.Accounts</a> and <a href="https://www.powershellgallery.com/packages/Az.Network">Az.Network</a>. These dependencies must be specified in the requirements.psd1 under <em>App files</em> in the function app, so that they are downloaded before the script is executed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/0*iHb743dRN_Mys4MH.png" /></figure><p>We will add these dependencies manually. First, go into your host.json file (see screenshot above). You can look into this file to go to your Function App resource, click App files in the left menu, and choose the host.json file from the dropdown-menu. Important here is that the managedDependency value is set to True, as seen on the screenshot above. Now, go into your requirements.psd1 file (see screenshot above). Make sure this file contains the <a href="https://www.powershellgallery.com/packages/Az.Accounts/">Az.Accounts</a> and <a href="https://www.powershellgallery.com/packages/Az.Network">Az.Network</a> PowerShell-modules with the (major) version numbers. In my case, the file looks like below:</p><pre># This file enables modules to be automatically managed by the Functions service.<br># See https://aka.ms/functionsmanageddependency for additional information.<br>#<br>@{<br>    # For latest supported version, go to &#39;https://www.powershellgallery.com/packages/Az&#39;. <br>    # To use the Az module in your function app, please uncomment the line below.<br>    #&#39;Az&#39; = &#39;9.*&#39;<br>    &#39;Az.Accounts&#39; = &#39;2.*&#39;<br>    &#39;Az.Network&#39; = &#39;5.*&#39;<br>}</pre><p>After making the above changes, it is important that you restart the function app. If you have successfully completed all steps, a Bastion Host will be provisioned at the next time according to the specified schedule.</p><h3>Closing words</h3><p>In Microsoft Azure, temporarily pausing or deprovisioning a resource during periods when it is not needed, is a great way to save costs. Using Azure Functions, it is possible to automate the provisioning and deprovisioning of resources during office hours. In this article we used a time-based triggered Azure Function to automatically provision a Bastion host at the start of office hours, and deprovision it at the end of office hours. We saved up approx. € 124,67 per month, by running the Bastion Host 264 hours a month instead of 730 hours a month. Overall, the concept of “snoozing” in Azure, is a powerful way to reduce costs and optimize resource utilization, and can be easily automated using Azure Functions. To learn more about the topics that were covered in this blog article, refer to the links below:</p><ul><li><a href="https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-powershell?tabs=powershell">Azure Functions PowerShell developer guide</a></li><li><a href="https://github.com/Azure/azure-powershell/blob/main/documentation/azure-powershell-modules.md">Azure PowerShell modules</a></li><li><a href="https://learn.microsoft.com/en-us/azure/bastion/bastion-create-host-powershell">Deploy Bastion using Azure PowerShell</a></li><li><a href="https://learn.microsoft.com/en-us/azure/azure-functions/functions-host-json">host.json reference for Azure Functions 2.x and later</a></li><li><a href="https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/windows_function_app">Terraform azurerm_windows_function_app</a></li></ul><p>Thank you for taking the time to go through this post and making it to the end. Stay tuned because we’ll keep continuing providing more content on topics like these in the future.</p><p><em>This post was originally published on </em><a href="https://schutten.cloud/post/understanding-and-designing-for-pci-dss-compliance-in-azure/"><em>Schutten.cloud</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e2cff14a977" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/reducing-azure-consumption-costs-with-automated-bastion-host-provisioning-5e2cff14a977">Reducing Azure Consumption Costs with Automated Bastion Host Provisioning</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding and designing for PCI DSS compliance in Azure]]></title>
            <link>https://itnext.io/understanding-and-designing-for-pci-dss-compliance-in-azure-8b1f1aaecf1?source=rss-e4a376b31e60------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b1f1aaecf1</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[compliance]]></category>
            <category><![CDATA[governance]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Rolf Schutten]]></dc:creator>
            <pubDate>Wed, 05 Apr 2023 13:37:30 GMT</pubDate>
            <atom:updated>2023-04-05T13:37:30.029Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nQz7oR9E5z_S_Xnh.jpg" /></figure><p>In this blog, we will dive into the details of PCI DSS and how it applies to organizations using Azure. This blog will also provide insights on how to design your environment to be PCI DSS compliant.</p><h3>Introduction</h3><p>The Payment Card Industry Data Security Standard (PCI DSS) is a set of security standards designed to ensure that all companies that accept, process, store or transmit credit card information maintain a secure environment. PCI DSS applies to all organizations that accept, process, store, or transmit cardholder data, regardless of size or the number of transactions. The standard was developed by major credit card brands, including Visa, Mastercard, American Express, Discover, and JCB, to ensure that merchants follow a set of security guidelines when accepting card payments. Non-compliance can result in hefty fines and damage to a company’s reputation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*BuewX9_UCwctBlAo.png" /></figure><p>For organizations using Microsoft Azure, the good news is that the platform offers a number of features that can help with PCI DSS compliance. However, it’s important to understand the requirements of PCI DSS so you can act on your design considerations and decisions to become compliant with it. By the end of this blog, you will have a better understanding of the importance of PCI DSS compliance and how to achieve it in Azure. Whether you’re a security professional or simply someone looking for knowledge you need to make informed decisions on how to secure data, configure networks, and implement access controls, among other critical security measures. So, let’s get started!</p><h3>Understanding the Payment Card Industry Data Security Standard</h3><p>The Payment Card Industry Data Security Standard (PCI DSS) consists of 12 high-level requirements, which are divided into six objectives:</p><ol><li>Build and Protect a Secure Network</li><li>Protect Cardholder Data</li><li>Create a Vulnerability Management Program</li><li>Apply Strong Access Control Measures</li><li>Regularly Monitor and Test Networks</li><li>Create a Policy Regarding Information Security</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/0*fDZmJVCYkoLOEE2d.png" /></figure><blockquote><em>It’s important to note that the specifics of each requirement and how they are implemented may vary based on the size and type of an organisation. PCI DSS provides a flexible framework for ensuring PCI DSS, but it’s up to you as a professional to determine the best way to meet the requirements in their specific context.</em></blockquote><h3>Build and Protect a Secure Network</h3><p>This category covers requirements for securing the network infrastructure that processes cardholder data, including firewalls, routers, and other network devices. The requirements in this category are:</p><h4>Install and maintain a firewall to protect your cardholder data.</h4><ol><li>Create and implement standards for configuration of firewalls and routers.</li><li>Create a firewall and router configuration that restrics connections between untrusted networks and all system components in the cardholder data environment.</li><li>Restrict direct global access to any syustem component of the cardholder data medium over the internet.</li><li>Install personal firewall software on all mobile devices that are connected to the internet and used to access the network when they are out of the network.</li><li>Make sure that security policies and operational procedures for managing firewalls are documented, in use, and known to all affected parties.</li></ol><h4>Do not use the vendor’s default settings for system passwords and other security parameters.</h4><ol><li>Always change the default settings and values ​​provided by the manufacturer and remove or disable unnecessary default accounts before installing any system on the network.</li><li>Create configuration standards for all components of the system.</li><li>Encrypt all non-console administrative access to devices using strong encryption.</li><li>Keep an inventory of all PCI DSS in-scope system components.</li><li>Make sure that security policies and operational procedures are documented, in use, and known to all affected parties to manage the manufacturer’s default values ​​and other safety parameters.</li><li>Shared hosting service providers must protect the environment and cardholder data hosted by each organization.</li></ol><h3>Protect Cardholder Data</h3><p>This category covers requirements for protecting sensitive cardholder data, such as encryption and secure storage. The requirements in this category are:</p><h4>Protect stored cardholder data.</h4><ol><li>Keep cardholder data storage to a minimum by developing and implementing policies, procedures and processes for data retention and destruction of cardholder data (CHD).</li><li>Do not store sensitive authentication data after authorization, even if it is encrypted.</li><li>If the primary account number (PAN) has to be displayed, mask it to view it.</li><li>Make the primary account number unreadable wherever it is stored.</li><li>Create and implement procedures to protect the keys used to protect stored cardholder data from disclosure and misuse.</li><li>Document and implement all key management processes and encryption key procedures used to encrypt cardholder data.</li><li>Security policies and operational procedures must be documented, used and known to all affected parties to protect stored cardholder data.</li></ol><h4>Encrypt cardholder data when transmitting over open, public networks.</h4><ol><li>Use strong encryption and security protocols to protect sensitive cardholder data during transmission over open, public networks.</li><li>Never send Primary Account Number (PAN) information without password over end-user messaging technologies.</li><li>To encrypt the transmission of cardholder data, ensure that security policies and operational procedures are documented, in use, and known to all affected parties.</li></ol><h3>Create a Vulnerability Management Program</h3><p>This category covers requirements for identifying, evaluating, and mitigating security risks and vulnerabilities in the cardholder data environment. The requirements in this category are:</p><h4>Protect all systems against malware and update anti-virus software regularly.</h4><ol><li>Install anti-virus software on all systems that are commonly affected by malware.</li><li>Make sure all anti-virus mechanisms are working properly.</li><li>Anti-virus software should work effectively and cannot be disabled by users.</li><li>Ensure that security policies and operational procedures are documented, in use, and known to all affected parties to protect systems against malware.</li></ol><h4>Develop secure systems and applications.</h4><ol><li>Identify vulnerabilities using reputable external sources and create a risk ranking for newly discovered vulnerabilities.</li><li>Install valid security patches provided by the vendor to ensure that all system components and software are protected from known vulnerabilities.</li><li>Securely develop all software applications.</li><li>Create change control processes and follow procedures for all changes in system components.</li><li>Identify and fix common vulnerabilities in software development processes.</li><li>Continuously monitor new threats and vulnerabilities for open web applications and ensure that these applications are protected against known attacks.</li><li>Ensure that security policies and operational procedures are documented, in use, and known to all affected parties to develop secure systems and applications.</li></ol><h3>Apply Strong Access Control Measures</h3><p>This category covers requirements for controlling access to cardholder data, including user authentication and authorization. The requirements in this category are:</p><h4>Restrict access to cardholder data based on business requirements.</h4><ol><li>Limit access to system components and cardholder data only to those who need it for their job functions.</li><li>Create secure access control systems.</li><li>Ensure that security policies and operational procedures to restrict access to cardholder data are documented, in use, and known to all affected parties.</li></ol><h4>Identify and authenticate access to system components.</h4><ol><li>Define and implement policies and procedures to ensure correct user identity management for users and administrators across all system components.</li><li>Provide appropriate user authentication management for users and administrators in all system components.</li><li>Secure all individual administrative access to the CDE and all remote access to the CDE using multi-factor authentication.</li><li>Document and communicate authentication policies and procedures to all users.</li><li>Do not use group, shared or public IDs, passwords or other authentication methods.</li><li>Where other authentication mechanisms are used, the use of these mechanisms should be assigned as follows.</li><li>Limit all access to any database containing cardholder data.</li><li>Ensure that security policies and operational procedures for authentication and identification are documented, in use, and known to all affected parties.</li></ol><h4>Restrict physical access to cardholder data.</h4><ol><li>Create and use appropriate facility access controls to limit and monitor physical access to systems in the cardholder data environment.</li><li>Develop procedures to distinguish between staff and visitors easily.</li><li>Restrict physical access to sensitive areas for employees as follows.</li><li>Follow procedures to identify and empower visitors.</li><li>Protect all media that contains physically sensitive data.</li><li>Have strict control over the internal or external distribution and transmission of any media.</li><li>Have strict control over media storage and accessibility.</li><li>Destroy media when it is no longer needed for business or legal reasons.</li><li>Protect devices that receive payment card data through physical interaction from tampering and replacement.</li><li>Ensure that security policies and operational procedures to restrict physical access to cardholder data are documented, in use, and known to all affected parties.</li></ol><h3>Regularly Monitor and Test Networks</h3><p>This category covers requirements for monitoring and testing the security of the cardholder data environment, including logging and analysis of security events. The requirements in this category are:</p><h4>Track and monitor all access to network resources and cardholder data.</h4><ol><li>Create a process that connects access to system components to each user.</li><li>Set up an automatic log review mechanism to reproduce events.</li><li>Record at least the user ID, event type, date and time, success or failure indicator, the origin of the event, and the identity or name of the affected data, resource or system component for evPCI DSS</li><li>Synchronize all critical system clocks and times using time synchronization technology.</li><li>Keep the logs in a way that cannot be altered.</li><li>Regularly review logs and security events for all system components to identify abnormalities or suspicious activity.</li><li>Retain the log history for at least one year and have at least three months of data ready for analysis.</li><li>Create and implement processes for timely detection and reporting of failures of critical security control systems for service providers.</li><li>Ensure that security policies and operational procedures are documented, in use, and known to all affected parties to monitor all access to network resources and cardholder data.</li></ol><h4>Test security systems and processes regularly.</h4><ol><li>Create processes to test the presence of wireless access points (802.11), and identify all authorized and unauthorized wireless access points quarterly.</li><li>Perform internal and external network vulnerability scans at least every three months and after a significant change in the network.</li><li>Apply a methodology for penetration testing.</li><li>Use intrusion detection or intrusion prevention techniques to detect or prevent network intrusion.</li><li>Set up a change detection mechanism to detect unauthorized modification of critical system files, configuration files or content files.</li><li>Ensure that security policies and operational procedures for security monitoring and testing are documented, in use, and known to all affected parties.</li></ol><h3>Create a Policy Regarding Information Security</h3><p>This category covers requirements for establishing, maintaining, and disseminating a formal information security policy that governs the protection of cardholder data. The requirements in this category are:</p><h4>Create a policy that addresses information security for all staff.</h4><ol><li>Create and publish an information security policy.</li><li>Create and implement a risk assessment process.</li><li>Acceptable usage policies for critical technologies should be developed, and the appropriate use of these technologies should be defined.</li><li>Ensure that security policy and procedures clearly define information security responsibilities for all personnel.</li><li>Assign information security management responsibilities to a person or team.</li><li>Implement a formal information security awareness program to inform all staff about the importance of cardholder data security.</li><li>To minimize the risk of attack from local sources, run a history scan of candidates before hiring.</li><li>Create and implement policies and procedures to manage service providers where cardholder data is shared, or that may affect the security of cardholder data.</li><li>Service providers must notify their customers in writing that they are responsible for the security of the cardholder data they store, process or transmit on behalf of the customer.</li><li>Create and implement an incident response plan. Be prepared to respond immediately to violations.</li><li>Service providers should evaluate at least quarterly to verify that personnel are following security policies and operational procedures.</li></ol><p>For detailed information, you can refer to the <a href="https://www.pcisecuritystandards.org/documents/PCI_DSS-QRG-v3_2_1.pdf">PCI DSS Quick Reference Guide</a> or the <a href="https://www.pcisecuritystandards.org/document_library">PCI DSS Standard</a> from the PCI SSC Documentation library.</p><h3>Designing for PCI DSS Compliant Azure Solutions</h3><p>Within Azure (or any other public cloud) you have to deal with the shared responsibility model and a demarcation between (security) tasks that are performed by the cloud provider and which tasks are performed by your organization. The workload responsibilities vary depending on whether the workload is hosted on Platform as a Service (PaaS) or Infrastructure as a Service (IaaS). That also has an impact on the PCI DSS requirements, and whether it is assigned to Azure or you, or whether responsibility is shared.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*cfJt0zYUWDuUayw7" /></figure><p>Below is explained which responsibilities should be fulfilled by you in the context of implementing PCI DSS compliance in Azure. To implement the PCI DSS in Microsoft Azure, organizations should focus on the following categories:</p><ol><li><strong>Network design:</strong> Organizations should design their Azure network to be secure and segmented, with appropriate access controls in place.</li><li><strong>Data protection:</strong> Organizations should use Azure features such as Azure Key Vault, Azure Disk Encryption, and Azure Storage Service Encryption to protect sensitive cardholder data.</li><li><strong>Access control:</strong> Organizations should use Azure features such as Azure Active Directory and Azure Multi-Factor Authentication to control access to sensitive data and resources.</li><li><strong>Monitoring and logging:</strong> Organizations should use Azure features such as Azure Monitor, Azure Log Analytics, and Azure Security Center to monitor and log activity in their Azure environment.</li><li><strong>Incident response:</strong> Organizations should have a plan in place for responding to security incidents, and use Azure Security Center to help identify and respond to incidents.</li><li><strong>Compliance:</strong> Organizations should use Azure Policy and Azure Security Center to ensure that their Azure environment is compliant with relevant regulations, including PCI DSS.</li></ol><h3>Network design</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*0m9qIi4aJutWD-I_.png" /></figure><p>To be compliant with the Payment Card Industry Data Security Standard (PCI DSS) in an Azure environment, there are several network design requirements that must be implemented. These requirements can be achieved by including, but are not limited to, by implementing:</p><ol><li><strong>Segmentation:</strong> It is important to segment the cardholder data environment from the rest of the network to reduce the scope of the PCI DSS assessment. This can be achieved using Virtual Networks (VNets) in Azure. A <a href="https://learn.microsoft.com/en-us/azure/architecture/reference-architectures/containers/aks-pci/aks-pci-network">reference architecture of an AKS regulated cluster for PCI-DSS</a> can be found on the Microsoft Architecture Center and used as an example. There is a lot more <a href="https://learn.microsoft.com/en-us/azure/architecture/reference-architectures/hybrid-networking/network-level-segmentation">information in the Microsoft Learn documentation about network-level segmentation</a>, that can help you design a secure and segmented network design.</li><li><strong>Firewall Configuration:</strong> Firewalls should be configured to block all incoming and outgoing traffic that is not explicitly required. This helps to protect against unauthorized access to the cardholder data environment. There are various firewall and NVA options within Azure, like Azure Firewall and third-party options. Microsoft has extensive documentation available to get you started with <a href="https://learn.microsoft.com/en-us/azure/firewall/rule-processing">Azure Firewall</a>.</li><li><strong>Network Access Controls:</strong> Network access controls should be implemented to prevent unauthorized access to the cardholder data environment. On a networking level, this can be achieved using Network Security Groups (NSGs) in Azure and reinforced with the Access Controls on identity level. In addition, ny administrative access points, such as a jump box, should deny all access in the initial configuration. This also implies the use of <a href="https://learn.microsoft.com/en-us/azure/defender-for-cloud/just-in-time-access-usage">Just-in-Time (JIT) access</a>.</li><li><strong>Remote Access:</strong> In addition to the above, all remote access must be explicitly allowed. This also means providing access for specific locations and, and where possible, conditional based access needs to be implemented. Remote access to the cardholder data environment should be limited and secured using technologies such as Virtual Private Networks (VPN) and Multi-Factor Authentication (MFA).</li><li><strong>Encryption:</strong> All cardholder data transmitted over public networks should be encrypted using strong cryptography and security protocols (for example, TLS, IPSEC, SSH, etc.) to safeguard sensitive cardholder data. Microsoft has written an article on <a href="https://learn.microsoft.com/en-us/azure/architecture/reference-architectures/containers/aks-pci/aks-pci-data#requirement-41">designing your strategical chain of TLS termination points</a> on Microsoft Learn.</li></ol><h3>Data Protection</h3><p>To be compliant with the Payment Card Industry Data Security Standard (PCI DSS) in an Azure environment, there are several data protection requirements that must be implemented. These requirements can be achieved by including, but are not limited to, by implementing:</p><ol><li><strong>Data Encryption:</strong> All cardholder data should be encrypted both in transit and at rest. Azure provides <a href="https://learn.microsoft.com/en-us/azure/virtual-machines/disk-encryption-overview">encryption services</a> such as Azure Disk Encryption, Azure Key Vault, and Azure Storage Service Encryption to help with this.</li><li><strong>Phyiscal Protection:</strong> The physical security of the cardholder data environment must be maintained to prevent unauthorized access, theft, or damage. This includes the security of the Azure datacenters, which is obviously the responsibility of Microsoft. You can find all the documentation and evidence/assurance of Microsoft for <a href="https://servicetrust.microsoft.com/viewpage/PCI">PCI compliance in their Service Trust Portal</a>.</li></ol><h3>Access Control</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/0*Ycr_fUvP5uDQpeVB.png" /></figure><p>To be compliant with the Payment Card Industry Data Security Standard (PCI DSS) in an Azure environment, there are several access control requirements that must be implemented. These requirements can be achieved by including, but are not limited to, by implementing:</p><ol><li><strong>User Management:</strong> Only authorized individuals should have access to the cardholder data environment. Azure provides role-based access control (RBAC) and Azure Active Directory (AD) to support this requirement.</li><li><strong>Authentication:</strong> Strong authentication mechanisms, such as Multi-Factor Authentication (MFA), must be used to verify the identity of individuals accessing the cardholder data environment. Azure provides MFA solutions such as <a href="https://learn.microsoft.com/en-us/azure/active-directory/authentication/concept-mfa-howitworks">Azure AD MFA</a> to support this requirement.</li><li><strong>Authorization:</strong> Authorization rules must be established to control access to the cardholder data environment and the information contained within it. This can be achieved using <a href="https://learn.microsoft.com/en-us/azure/role-based-access-control/overview">Azure RBAC</a> and AD.</li><li><strong>Password Management:</strong> Strong password policies must be in place, including requirements for password complexity, expiration, and history. Azure provides password management solutions such as <a href="https://learn.microsoft.com/en-us/azure/active-directory/authentication/concept-password-ban-bad">Azure AD Password Protection</a> to support this requirement.</li><li><strong>Least Privilege:</strong> The principle of <a href="https://learn.microsoft.com/en-us/azure/active-directory/develop/secure-least-privileged-access">least privilege</a> must be followed, ensuring that individuals have only the access they need to perform their job responsibilities. This can be achieved using Azure RBAC.</li></ol><h3>Monitoring and Logging</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Rea_6YIuBZ-yuODz.png" /></figure><p>To be compliant with the Payment Card Industry Data Security Standard (PCI DSS) in an Azure environment, there are several monitoring and logging requirements that must be implemented. These requirements can be achieved by including, but are not limited to, by implementing:</p><ol><li><strong>Security Incidents</strong>: Monitoring and logging should be in place to detect and respond to security incidents. <a href="https://learn.microsoft.com/en-us/azure/architecture/framework/security/monitor-logs-alerts">Azure provides services</a> such as Microsoft Sentinel, Azure Monitor and Azure Log Analytics to support these activities.</li><li><strong>Access Logging</strong>: Detailed <a href="https://learn.microsoft.com/en-us/azure/azure-monitor/logs/data-security">logs of all access</a> to the cardholder data environment must be maintained, and a mechanism for detecting unauthorized access must be in place. Azure provides services such as Azure Monitor and Azure Log Analytics to support these activities.</li><li><strong>Vulnerabilities</strong>: Regular vulnerability scans and penetration testing must be performed to identify and remediate security weaknesses. Azure provides <a href="https://learn.microsoft.com/en-us/azure/defender-for-cloud/auto-deploy-vulnerability-assessment">Microsoft Defender services</a> to support these activities.</li><li><strong>Logging Retention</strong>: Logs must be retained for at least one year, and longer if required by law or regulation. Azure provides storage solutions such as Azure Blob Storage and Azure Archive Storage to support these requirements, or moving to an Archive Log Analytics Tier to reduce costs in comparison to Basic Log Analytics. You can read more about it in <a href="https://techcommunity.microsoft.com/t5/microsoft-sentinel-blog/ingest-archive-search-and-restore-data-in-microsoft-sentinel/ba-p/3195126">this article by Matthew Lowe</a>.</li><li><strong>Tampering Protection</strong>: Logs must be protected from unauthorized modification or deletion. Azure provides <a href="https://learn.microsoft.com/en-us/azure/azure-monitor/logs/data-security#tamper-proofing-and-immutability">tamper-proof storage solutions</a> such as Azure Blob Storage and Azure Archive Storage to support these requirements.</li></ol><h3>Incident Response</h3><p>To be compliant with the Payment Card Industry Data Security Standard (PCI DSS) in an Azure environment, there are several incident response requirements that must be implemented. These requirements can be achieved by including, but are not limited to, by implementing:</p><ol><li><strong>Response Planning</strong>: A formal incident response plan must be in place and tested regularly to ensure that the organization can respond quickly and effectively in the event of a security breach. This plan should include steps for identifying, containing, and resolving security incidents, as well as steps for communicating with stakeholders.</li><li><strong>Alerting</strong>: Alerts must be configured to notify the appropriate personnel in the event of a security incident. Azure provides services such as <a href="https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-overview">Azure Alerts</a> to support these activities.</li><li><strong>Communication</strong>: As part of your formal incident response plan, a mechanism for rapid communication with stakeholders, including law enforcement, must be in place to ensure that incidents are reported and resolved in a timely manner. Azure provides solutions such as <a href="https://azure.microsoft.com/en-us/products/notification-hubs">Azure Notification Hubs</a> and Azure Functions to support these requirements.</li><li><strong>Lessons Learned</strong>: A process must be in place to document lessons learned from security incidents and to incorporate these lessons into future incident response plans. Azure provides solutions such as <a href="https://azure.microsoft.com/en-us/products/devops/boards">Azure DevOps and Azure Boards</a> to support these requirements, which is a great solution to support these requirements.</li></ol><h3>Compliance</h3><p>To be compliant with the Payment Card Industry Data Security Standard (PCI DSS) in an Azure environment, there are several compliance requirements that must be implemented. These requirements can be achieved by including, but are not limited to, by implementing:</p><ol><li><strong>Documentation</strong>: Detailed documentation of the cardholder data environment and associated security controls must be maintained. This documentation should include information on the architecture, network topology, and security policies and procedures. Azure provides solutions such as Azure Policy and Azure Resource Manager templates to support these requirements.</li><li><strong>Patch Management:</strong> Regular patch management should be in place to ensure that the operating systems and applications used in the cardholder data environment are up-to-date and free of vulnerabilities.</li><li><strong>Assessments and Reviews:</strong> Regular assessments must be performed to verify that security controls are in place and are functioning as intended. Azure provides services such as <a href="https://learn.microsoft.com/en-us/azure/governance/policy/samples/pci-dss-3-2-1">Microsoft Defender for Cloud and Azure Compliance Manager</a> to support these activities.</li><li><strong>Reporting:</strong> Regular reporting on the compliance status of the cardholder data environment must be provided to stakeholders. Azure provides services such as Azure Compliance Manager and Power BI to support these requirements.</li></ol><p>These are most of the key requirements for PCI DSS compliant compliance in an Azure environment. It’s important to note that compliance with PCI DSS involves multiple control objectives and requirements beyond just compliance. Ultimately, the applicability and fulfillment of each requirement partly depends on the chosen technologies and service types (for example, between PaaS and IaaS).</p><h3>Closing words</h3><p>Becoming PCI DSS compliant in Azure requires careful planning, implementation, and monitoring of your Azure environment. Azure provides a range of features and tools to help you meet the requirements of PCI DSS and protect sensitive cardholder data. The key to a successful implementation is to understand the requirements of PCI DSS and how to use Azure to meet them. This blog has provided an overview of the requirements, as well as guidance on how to design your environment to be PCI DSS compliant using Azure features such as Azure Key Vault, Azure Disk Encryption, Azure Storage Service Encryption, Azure Active Directory, Azure Multi-Factor Authentication, Azure Monitor, Azure Log Analytics, Azure Security Center, and Azure Policy. To learn more about PCI DSS compliance in Azure, refer to the links provided to Microsoft’s documentation or check out some of the resources below to help you forward:</p><ul><li><a href="https://www.pcidssguide.com/pci-dss-requirements/">PCI DSS Requirements</a></li><li><a href="https://servicetrust.microsoft.com/viewpage/PCI">Service Trust Portal — PCI DSS</a></li><li><a href="https://azure.microsoft.com/en-us/blog/new-pci-dss-azure-blueprint-makes-compliance-simpler/">New PCI DSS Azure Blueprint makes compliance simpler</a></li><li><a href="https://azure.microsoft.com/en-us/blog/payment-processing-blueprint-for-pci-dss-compliant-environments/">Azure Security and Compliance Blueprint for PCI DSS-compliant Payment Processing environments</a></li></ul><p>With a well-planned and implemented PCI DSS compliant solution in Azure, you can ensure the protection of sensitive cardholder data and minimize the risk of a data breach.</p><p>Thank you for taking the time to go through this post and making it to the end. Stay tuned because we’ll keep continuing providing more content on topics like these in the future.</p><p><em>This post was originally published on </em><a href="https://schutten.cloud/post/understanding-and-designing-for-pci-dss-compliance-in-azure/"><em>Schutten.cloud</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b1f1aaecf1" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/understanding-and-designing-for-pci-dss-compliance-in-azure-8b1f1aaecf1">Understanding and designing for PCI DSS compliance in Azure</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build Your Own Pokédex in AKS with ReactJS, PokéAPI, Azure Draft, and GitHub Actions]]></title>
            <link>https://itnext.io/build-your-own-pok%C3%A9dex-in-aks-with-reactjs-pok%C3%A9api-azure-draft-and-github-actions-88ba47e7e00?source=rss-e4a376b31e60------2</link>
            <guid isPermaLink="false">https://medium.com/p/88ba47e7e00</guid>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Rolf Schutten]]></dc:creator>
            <pubDate>Mon, 27 Mar 2023 10:05:10 GMT</pubDate>
            <atom:updated>2023-03-27T10:05:10.548Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vsNdo0xXuToTEST4.jpg" /></figure><p>In this blog article, we’ll be creating a Pokédex application using ReactJS and PokéAPI, containerizing it with Azure Draft, and deploying it to Azure Kubernetes Services using GitHub Actions. We’ll go through the full process of creating and deploying a Pokédex application using the technologies mentioned.</p><h3>Introduction</h3><p>As a 90s kid, the Pokémon franchise has played a significant role in my childhood. With the recent announcement that Ash Ketchum, the iconic protagonist of the series, will be retiring, I wanted to pay tribute to the beloved character by creating a Pokédex application using some of the latest and greatest technologies. Especially because that my own children also watch the widely acclaimed television series every day.</p><p>For those who may not be familiar, ReactJS is a popular JavaScript library for building user interfaces and PokéAPI is a RESTful API that allows us to retrieve information about various Pokemon. By combining these technologies, we will be able to create a dynamic and interactive application that is both visually appealing and informative.</p><p>Once the application is complete, we will then containerize it using Azure Draft. Containerization allows us to package the application and its dependencies into a single, lightweight container that is easy to deploy and manage. This container can then be easily deployed to various environments, like Azure Kubernetes Services (AKS). Finally, we will use GitHub Actions to automate the deployment process. GitHub Actions is a powerful tool that allows us to automate various tasks, including building, testing, and deploying code. By leveraging GitHub Actions, we can streamline the deployment process and easily deploy our containerized application to AKS with just a few simple steps.</p><p>In this blog article, we’ll go through the full process of creating and deploying a Pokédex application using the technologies mentioned above. Let’s get started!</p><h3>Prerequisites</h3><p>Before you can start onboarding, there are some prerequisites to fulfill:</p><ul><li><strong>Azure tenant and user account:</strong> You’ll need an Azure tenant, an Azure Active Directory (Azure AD) instance. This instance is the foundation of the environment. And it allows you to create an identity (user account) to connect to Azure, set up the environment, and deploy the resources.</li><li><strong>Subscription(s):</strong> You’ll need a subscription and owner permissions to deploy the resources and minimize the costs by removing the resources at the end.</li><li><strong>Git</strong>: You’ll need to have Git installed on your machine to track and deploy changes to your files within the source code of your app.</li><li><strong>GitHub account:</strong> You’ll need a GitHub account. We’ll be using GitHub Actions to streamline the deployment process and easily deploy our app to AKS.</li><li><strong>GitHub CLI</strong>: You’ll need to have GitHub CLI installed on your machine.</li><li><strong>NodeJS:</strong> You’ll need to have Node ≥= 14.0.0 and npm ≥=5.6 installed on your machine.</li><li><strong>Go:</strong> You’ll need to have Go ≥1.18.x installed on your machine.</li><li><strong>Visual Studio Code</strong>: You’ll need a code editor. Although any code editor will do and this is something of personal preference, Visual Studio Code is a good (and free) choice.</li></ul><h3>Build the React Pokédex App</h3><p>First, we will go through the process of creating a new ReactJS project and setting it up for optimal code organization and flexibility. We will start by organizing our files, starting with the files that can be removed from a standard ReactJS project. We will then go through the files that should be created or moved. After, we will go through the code and explanations for creating your own Pokédex app using ReactJS. By following the steps outlined in this section, you will have your very own working Pokédex app.</p><h3>Step 1: Create a new React project</h3><p>Create a new React project by running the following command in your terminal:</p><pre>npx create-react-app pokedex-app</pre><p>This will create a new directory called <em>“pokedex-app”</em> with a basic React setup, including a preconfigured development environment and a <em>package.json</em> file with some default packages. It allows you to start building a React application without having to spend time configuring tools like webpack and Babel. You can then navigate into the directory and start the development server by running:</p><pre>cd pokedex-app<br>npm start</pre><p>This will open a new browser window with your React app running on localhost. We can now start building the app by modifying the files in the <em>“src”</em> directory.</p><h3>Step 2: Deleting unnecessary files and creating the outline</h3><p>We will make it easier and more dynamic to import/export files by moving and deleting some files, and we will create new files that we will be needing to create the Pokédex app. Move into the src directory to start modifying some of the files.</p><pre>cd src</pre><p>First, we’ll remove the <em>logo.svg</em> file. We are not going to use it. To do so, run the following command in your terminal:</p><pre>rm logo.svg</pre><p>Now create a <em>test</em>, directory, an <em>assets</em> directory, a <em>components</em> directory, and a <em>styles</em> directory inside the new components directory. Run the commands below in your terminal:</p><pre>mkdir test<br>mkdir assets<br>mkdir components<br>mkdir components/styles</pre><p>Move the files to the corresponding directories by running the following command in your terminal:</p><pre>mv App.js components/<br>mv App.css components/styles/<br>mv App.test.js test/</pre><p>For the aesthetic of the Pokédex we need the Pokémon logo and sprites of the Pokémon. Download the images <a href="https://github.com/rolfschutten/pokedex-aks/tree/main/src/assets">here</a>, and place them in the assets directory. To create the new files that we will need to create the Pokédex app, run the following commands below:</p><pre>touch Pokemon.js<br>touch PokeClasses.js<br><br>cd components<br>touch PokeList.js styles/PokeList.css<br>touch PokeCell.js styles/PokeCell.css<br>touch DetailView.js styles/DetailView.css</pre><p>After running the commands, your new file structure in the src directory will look like this:</p><pre>src<br>|   index.css<br>|   index.js<br>|   PokeClasses.js<br>|   Pokemon.js<br>|<br>|__assets<br>|   |   logo.png<br>|   |   sprites.png<br>|<br>|___components<br>|   |   App.js<br>|   |   DetailView.js<br>|   |   PokeCell.js<br>|   |   PokeList.js<br>|   |___styles<br>|       │   App.css<br>|       |   DetailView.css<br>|       |   PokeCell.css<br>|       |   PokeList.js<br>|<br>|___test<br>|   |   App.test.js</pre><h3>Step 3: Coding the React Pokédex App</h3><p>In this step, the necessary code to create your very own React Pokédex app is provided and explained. You can follow along and create your own Pokédex, and are welcome to copy and paste the code. The .css stylesheets are not described, but all necessary files can be viewed and copied from <a href="https://github.com/rolfschutten/pokedex-aks">this public GitHub repository</a>.</p><p><strong>Index.js:</strong> Line 1 to 4 import the different objects, components and modules it needs to render out the ReactJS application. Line 5 is using the ReactDOM.render() method to render the ‘App’ component to the DOM element with an ID of ‘root’. This is the starting point of the React application.</p><pre>import React from &#39;react&#39;;<br>import ReactDOM from &#39;react-dom&#39;;<br>import &#39;./index.css&#39;;<br>import App from &#39;./components/App&#39;;<br><br>ReactDOM.render(&lt;App /&gt;, document.getElementById(&#39;root&#39;));</pre><p><strong>PokeClasses.js:</strong> This code defines an array of objects called ‘pokeClasses’. Each object represents a Pokemon species and has an ‘id’ property and a ‘backgroundPosition’ property. The ‘id’ property is a unique identifier for the Pokemon species, and the ‘backgroundPosition’ property is a string that specifies the position of an image of the Pokemon in the <em>assets/sprites.png</em> sprite sheet. This sprite sheet is a single image file that contains multiple images of different Pokemon. The ‘backgroundPosition’ property is used to specify which part of the sprite sheet to display as the image of the Pokemon. The array has a total of 151 objects, one for each of the original 151 Pokemon species. Because it this is a file with 606 lines of code, it is not included in this blog article. You can <a href="https://raw.githubusercontent.com/rolfschutten/pokedex-aks/main/src/pokeClasses.js">view the file here</a>.</p><p><strong>Pokemon.js:</strong> This code defines the Pokemon class. The class has a constructor function that takes in an object called ‘data’ as an argument. The ‘constructor’ function is called every time a new ‘Pokemon’ object is created. Inside the constructor, the ‘this’ keyword refers to the newly created ‘Pokemon’ object. The code sets the ‘id’, ‘name’, ‘sprite’, and ‘type’ properties of the ‘Pokemon’ object to the values of the corresponding properties in the ‘data’ object. The ‘id’ property is a unique identifier for the Pokemon. The ‘name’ property is the name of the Pokemon. The ‘sprite’ property is the URL of an image of the Pokemon. The ‘type’ property is the type of the Pokemon (e.g. fire, water, grass). The ‘export default Pokemon;’ line at the end of the code makes the ‘Pokemon’ class available for other modules to import and use.</p><pre>class Pokemon {<br>    constructor(data) {<br>      this.id = data.id;<br>      this.name = data.name;<br>      this.sprite = data.sprites.other.dream_world.front_default;<br>      this.type = data.types[0].type.name;    <br>    }<br>  }<br>  <br>  export default Pokemon;</pre><p><strong>App.js:</strong> This code defines a React component called ‘App’ that displays a list of Pokémon and displays detailed information about a selected Pokémon. The component has a ‘pokemon’ property in its state that stores information about the selected Pokémon. When a Pokémon is clicked, the component sends a request to the PokéAPI to get information about the Pokémon and updates the ‘pokemon’ property in the state with the new information. The component renders a ‘PokeList’ component and a ‘DetailView’ component, passing them the ‘handleOnClick’ function and the ‘pokemon’ property as props, respectively. The component can be imported and used by other modules.</p><pre>import React, { Component } from &#39;react&#39;;<br>import PokeList from &#39;./PokeList&#39;;<br>import DetailView from &#39;./DetailView&#39;;<br>import Pokemon from &#39;../Pokemon&#39;;<br>import &#39;./styles/App.css&#39;;<br>import Logo from &#39;../assets/logo.png&#39;;<br><br>class App extends Component {<br>  constructor() {<br>    super();<br>    this.state = {<br>      pokemon: {}<br>    };<br><br>    this.handleOnClick = this.handleOnClick.bind(this);<br>  }<br><br>  handleOnClick(id) {<br>    fetch(`http://pokeapi.co/api/v2/pokemon/${id}/`)<br>      .then(res =&gt; res.json())<br>      .then(data =&gt; {<br>        const pokemon = new Pokemon(data);<br>  <br>        this.setState({ pokemon });<br>      })<br>      .catch(err =&gt; console.log(err));<br>  }<br><br>render() {<br>    document.title = &#39;Pokedex App by Schutten.cloud&#39;<br>    return (<br>      &lt;div className=&quot;App&quot;&gt;<br>        &lt;div className=&quot;App-header&quot;&gt;<br>          &lt;img src={Logo} alt=&quot;Pokemon&quot; className=&quot;Logo&quot; /&gt;<br>          &lt;h1&gt;Schutten.cloud&lt;/h1&gt;   <br>        &lt;/div&gt;<br>        &lt;PokeList handleOnClick={this.handleOnClick} /&gt;<br>        &lt;DetailView pokemon={this.state.pokemon} /&gt;<br>      &lt;/div&gt;<br>    );<br>  }<br>}<br>export default App;</pre><p><strong>DetailView.js:</strong> This code defines a functional React component called ‘DetailView’. The component is a function that takes in a single prop called ‘pokemon’ and returns a JSX element that represents the structure and content of the component. The ‘pokemon’ prop is destructured into its individual properties: ‘id’, ‘name’, ‘sprite’, and ‘type’. These properties are then used to render the ‘id’, ‘name’, and ‘type’ of the Pokemon and to display the Pokemon’s image (‘sprite’). The JSX element returned by the ‘DetailView’ component consists of a ‘section’ element with the ‘detail-view’ class and several child elements, including an ‘img’ element and a ‘div’ element. The ‘img’ element displays the Pokemon’s image using the ‘sprite’ URL, and the ‘div’ element contains the ‘id’, ‘name’, and ‘type’ of the Pokemon. The ‘export default DetailView;’ line at the end of the code makes the ‘DetailView’ component available for other modules to import and use.</p><pre>import React from &#39;react&#39;;<br>import &#39;./styles/DetailView.css&#39;;<br><br>const DetailView = ({ pokemon }) =&gt; {<br>    const { id, name, sprite, type } = pokemon;<br>  <br>    return (<br>      &lt;section className=&quot;detail-view&quot;&gt;<br>        &lt;img src={sprite} className=&#39;sprite-image&#39; alt=&quot;sprite&quot;/&gt;<br>        &lt;div className=&#39;data-wrapper&#39;&gt;<br>          &lt;h1 className=&#39;data-name&#39;&gt;ID: {id} {name}&lt;/h1&gt;<br>          &lt;p className=&quot;data-char&quot;&gt;Type: {type}&lt;/p&gt;<br>        &lt;/div&gt;<br>      &lt;/section&gt;<br>    )<br>  }<br>export default DetailView;</pre><p><strong>PokeCell.js:</strong> This code defines a functional React component called ‘PokeCell’ that represents a single cell in a list of Pokemon. The component takes in a ‘pokeClass’ object that has an ‘id’ and a ‘backgroundPosition’ property, and a ‘handleOnClick’ function. The component renders a ‘button’ element with a background image specified by the ‘pokeClass’ object and an ‘onClick’ event handler that calls the ‘handleOnClick’ function with the ‘id’ of the Pokemon when the button is clicked. The component can be imported and used by other modules.</p><pre>import React from &#39;react&#39;;<br>import sprites from &#39;../assets/sprites.png&#39;;<br>import &#39;./styles/PokeCell.css&#39;;<br><br>const PokeCell = ({ pokeClass, handleOnClick }) =&gt; {<br>  const { id, backgroundPosition } = pokeClass;<br>  const style = { backgroundImage: `url(https://medium.com/$%7Bsprites%7D)`, backgroundPosition };<br>  return &lt;button onClick={() =&gt; handleOnClick(id)} style={style} className=&quot;poke-cell&quot;&gt;&lt;/button&gt;<br>};<br>export default PokeCell;</pre><p><strong>PokeList.js:</strong> This code defines a functional React component called ‘PokeList’ that displays a list of Pokemon. The component takes in a ‘handleOnClick’ function and creates a list of ‘PokeCell’ components using an array of ‘pokeClass’ objects. Each ‘PokeCell’ component is passed the ‘pokeClass’ object and the ‘handleOnClick’ function as props. The component can be imported and used by other modules.</p><pre>import React from &#39;react&#39;;<br>import PokeCell from &#39;./PokeCell&#39;;<br>import { pokeClasses } from &#39;../pokeClasses&#39;;<br>import &#39;./styles/PokeList.css&#39;;<br><br>const PokeList = ({ handleOnClick }) =&gt; {<br>  const cells = pokeClasses.map(pokeClass =&gt; {<br>    return (<br>      &lt;PokeCell <br>        key={pokeClass.id} <br>        pokeClass={pokeClass} <br>        handleOnClick={handleOnClick}<br>      /&gt;<br>    );<br>  });<br>  return (<br>    &lt;section className=&quot;poke-list&quot;&gt;<br>      {cells}<br>    &lt;/section&gt;<br>  )<br>}<br>export default PokeList;</pre><p>If you have followed all the steps correctly, your Pokédex app is now ready. Below is a screenshot of the Pokédex app with styling:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DK6hAF1LA7d3k8hM.png" /></figure><h3>Creating the AKS cluster</h3><p>Obviously, we need an AKS cluster to deploy our Pokédex app to, once it has been containerized. We’ll use the AKS Construction Helper for creating the needed resources. AKS Construction Helper a tool for simplifying the deployment of Azure Kubernetes Service (AKS) clusters. The AKS Construction Helper is an open-source project hosted on GitHub and available <a href="https://azure.github.io/AKS-Construction">here</a>. The AKS Construction Helper offers a variety of options to customize your AKS deployment. You can choose the region and the size of the nodes in your cluster, as well as the number of nodes and the version of Kubernetes to use. In addition, you can specify the maximum and minimum number of nodes in your cluster, as well as the maximum and minimum number of pods per node. The AKS Construction Helper also offers several deployment options. You can deploy your cluster using the Azure Portal, the Azure CLI, Terraform, ARM, Bicep, or a configuration file written in either YAML or JSON. This flexibility allows you to choose the method that best fits your workflow and your team’s needs. Overall, the AKS Construction Helper is a valuable tool for anyone looking to deploy and manage AKS clusters quickly and easily.</p><h3>Step 1: Choose your principles and options</h3><p>We will go with the following <em>“Simples bare-bones cluster”</em> and <em>“Simple cluster with no additional access limitations”</em> security and operations principles for demo purposes. <strong>Keep in mind that these are not configuration options you should ever use in production environments.</strong> Fill in the resource and resource group names to your liking, as well as the Azure region to deploy the resources to. Furthermore, we choose the option to create a <em>“Basic”</em> Azure Container Registry, and make sure that the deployment user is granted the <em>“acrPush”</em> role, which gives us permission to push images to the Azure Container Registry (ACR) associated with the cluster. The generated output for <em>“Command Line”</em> should look something like the code below:</p><pre># Create Resource Group<br>az group create -l WestEurope -n rg-t-pokemon-001<br><br># Deploy template with in-line parameters<br>az deployment group create -g rg-t-pokemon-001  --template-uri https://github.com/Azure/AKS-Construction/releases/download/0.9.6/main.json --parameters \<br>	resourceName=aks-t-pokemon-001 \<br>	JustUseSystemPool=true \<br>	registries_sku=Basic \<br>	acrPushRolePrincipalId=$(az ad signed-in-user show --query id --out tsv) \<br>	enableTelemetry=false \<br>	fileCSIDriver=false \<br>	diskCSIDriver=false</pre><p>This code creates an Azure resource group and then uses the Azure Deployment Manager to deploy an AKS cluster. The resource group is created using the az group create command, which creates a resource group named “rg-t-pokemon-001” in the West Europe region. The AKS cluster is deployed using the az deployment group create command and a JSON template file hosted on GitHub. The command specifies the resource group to deploy to, the URL of the JSON template file, and a set of parameters to pass to the template. These parameters include the name of the AKS cluster, the size of the virtual machine nodes in the cluster, and various other options for configuring the cluster. The acrPushRolePrincipalId parameter is set to the ID of the signed-in user, which gives that user permission to push images to the Azure Container Registry (ACR) associated with the cluster. The enableTelemetry and fileCSIDriver parameters are both set to false, which disables telemetry data collection and the file-based Container Storage Interface (CSI) driver. The diskCSIDriver parameter is also set to false, which disables the disk-based CSI driver.</p><h3>Step 2: Deploy the resources with Azure Cloud Shell</h3><p>Head over to the <a href="http://shell.azure.com/">Azure Cloud Shell</a> and login with your credentials. Make sure you choose the right subscription that you want to deploy to. You can validate if you’ve chosen the right subscription by running the az account show command in the Azure Cloud Shell, and you can switch to another subscription by running the az account set --subscription &quot;SubscriptionName&quot; command. Once you’ve chosen the right subscription, run the two commands from step 1. When the deployment is done, you should’ve successfully created your AKS cluster and ACR in a new resource group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fOznHh6l6Q2lB3fQ.png" /></figure><h3>Containerize and deploy with Azure Draft and GitHub Actions</h3><p>To containerize the Pokédex app we’ve created earlier, we will use Azure Draft and deploy it using GitHub Actions. Azure Draft is a tool for simplifying the process of containerizing applications and deploying them to Azure Kubernetes Service (AKS). Azure Draft is an open-source project hosted on GitHub and can be found <a href="https://github.com/Azure/draft">here</a>. Azure Draft is designed to make it easy for developers to containerize their applications and deploy them to AKS. It does this by providing a set of tools and templates that automate common tasks, such as building Docker images, creating Kubernetes manifests, and setting up continuous delivery pipelines. To use Azure Draft, you simply need to install it on your local machine and then run a few simple commands. The tool will take care of the rest, including creating a Dockerfile and a Helm chart for your application, as well as setting up a continuous delivery pipeline using GitHub Actions.</p><h3>Step 1: Install the latest release of Azure Draft</h3><p>Open your terminal and cd to your directory where you want to download/install Azure Draft. Within that directory, run the following commands:</p><pre>git clone https://github.com/Azure/draft.git<br>cd draft/<br>make<br>mv draft $HOME/go/bin/</pre><p>Or install it using HomeBrew by running the following commands:</p><pre>$ brew tap azure/draft<br>$ brew install draft</pre><h3>Step 2: Create the Dockerfile and Kubernetes manifests</h3><p>Open your terminal and cd to the directory that holds your <em>pokedex-app</em>. If you followed this guide step-by-step, this folder should be called <em>“pokedex-app”</em>. Within that directory, run the following command:</p><pre>draft create</pre><p>When prompted to choose a deployment option, choose manifests. When prompted to enter the port exposed in the application, write 3000. This is the default for ReactJS. It should take a couple of seconds to run. When completed, you see that Azure Draft has created a Dockerfile file and a manifests folder, containing two YAML-files. Open the generated files and validate them. Azure Draft is a tool to make your life easier, but you can’t fully rely on tools. In my case I had to change the node version (from 10 to 16), on the top line of my Dockerfile. Your Dockerfile should look similar as shown below:</p><pre>FROM node:16<br>ENV PORT 3000<br>EXPOSE 3000<br><br>RUN mkdir -p /usr/src/app<br>WORKDIR /usr/src/app<br>COPY package.json .<br>RUN npm install<br>COPY . .<br><br>CMD [&quot;npm&quot;, &quot;start&quot;]</pre><p>If you want to validate the Dockerfile and make sure the app is running correctly, you could locally build and run the docker container on your device. For the build you would run the docker build command, and for running the container you would use the docker run command. Obviously, you’ll need Docker installed on your local device to do so.</p><h3>Step 3: Create your Git repository and setup your OIDC connection</h3><p>First, open your webbrowser and go to <a href="https://github.com/">GitHub.com</a>. Create a new repository. Now, go back to your terminal and, if you aren’t within the <em>pokedex-app</em> directory already, cd to this directory. Within this directory, run the following command:</p><pre>draft setup-gh</pre><p>When prompted, choose the azure provider, fill in an app registration name, choose the subscription ID where your AKS and ACR are deployed to, fill in the resource group name (in our case <em>rg-t-pokemon-001</em>), and fill in your organization (or username) and repository name on GitHub. If all information was provided correctly, the OIDC (Open ID Connect) connection should be setup in a matter of seconds. You can validate this by looking up the app registration in your Azure Active Directory, and going into your Secrets&gt;Actions, under repository settings on GitHub.</p><h3>Step 4: Generate the GitHub Actions workflow</h3><p>Open your terminal and, if you aren’t within the <em>pokedex-app</em> directory already, cd to the <em>pokedex-app</em> directory. Within this directory, run the following command:</p><pre>draft generate-workflow</pre><p>When prompted, fill in the resource names and the name of the resource group. Name the container to your liking, I named it <em>“pokedex-front-end”</em>. Lastly, it will prompt you to enter the name of the repository branche to deploy from. For demonstration purposes it’s allright to fill in the <em>“main”</em> branche.</p><h3>Step 5: Push your code and trigger the workflow</h3><p>Open your terminal and make sure you are within the <em>pokedex-app</em> directory. Within this directory, run the following commands:</p><pre>git init<br>git add .<br>git commit -m &quot;Initial commit&quot;<br>git branch -M main<br>git remote add origin https://github.com/&lt;organization name&gt;/&lt;repository name&gt;.git<br># For example:<br># git remote add origin https://github.com/rolfschutten/pokedex-aks.git<br>git push -u origin main</pre><p>If done correctly, our application files, Dockerfile, manifest files, and GitHub Actions workflow is pushed to our GitHub repository. Because the generated GitHub Actions workflow has a trigger on the branch we pushed the files to, it will automatically trigger and start running. You can validate and observe this under the “Actions” tab within your GitHub repository.</p><h3>Behold your containerized application</h3><p>Now that we’ve written the application, deployed the infrastructure, containerized the app with Azure Draft, and deployed it from GitHub Actions to our AKS cluster, it’s time to review the application in its new containerized form.</p><p>Head over to the <a href="http://shell.azure.com/">Azure Cloud Shell</a> and login with your credentials. Make sure you choose the right subscription where you’ve deployed the AKS cluster to, that holds your application. Run the following command to list all services within the default namespace:</p><pre>kubectl get services</pre><p>Among the values that are returned in the terminal is, among other things, a public IP address. This is the IP address of your application. This is created from the <em>“service.yaml”</em> manifest file. Open your web browser and go to <a href="http://./"><strong>http://</strong>.</a> If everything went well, you should now see the Pokédex app in your web browser. Congratulations, you have successfully coded, containerized and deployed your Pokédex app to an AKS cluster.</p><h3>Clean up the resources</h3><p>We will remove all resources created during this guide to save costs and keep an overview of your environment. Head over to the <a href="http://shell.azure.com/">Azure Cloud Shell</a> and login with your credentials. Remove the resource group, including all the resources. It’ll prompt you for confirmation. When removing the AKS cluster resource, which is included in the deleted resource group, Azure will automatically delete the other resource group (containing the virtual network, load balancer, etc.).</p><pre>az group delete --name rg-t-pokemon-001</pre><p>You can log out of the Azure CLI after. Don’t forget to delete the GitHub repository as well, if you have no use for it anymore. You can do so by clicking the <em>“Delete this repository”</em> button under Settings&gt;General of your GitHub repository.</p><h3>Summary</h3><p>We went through the Azure Draft tool, used it to containerize our self-made Pokédex ReactJS application, created an OIDC-connection to GitHub and created a GitHub Actions workflow with Azure Draft, and used this to deploy the app to our infrastructure. There’s so much more to learn when it comes to containerization and Kubernetes. Check out some of these resources to help you forward:</p><ul><li><a href="https://github.com/Azure/draft">Azure Draft: A day 0 tool for getting your app on k8s fast</a></li><li><a href="https://learn.microsoft.com/en-us/azure/aks/draft">Draft for Azure Kubernetes Service (AKS)</a></li><li><a href="https://azure.github.io/AKS-Construction/">AKS Construction Helper</a></li><li><a href="https://learn.microsoft.com/en-gb/azure/cloud-adoption-framework/scenarios/app-platform/aks/landing-zone-accelerator">AKS landing zone accelerator</a></li><li><a href="https://kubernetes.io/docs/home/">Kubernetes Documentation</a> Thank you for taking the time to go through this post and making it to the end. Stay tuned because we’ll keep continuing providing more content on this topic in the future.</li></ul><p><em>This post was originally published on </em><a href="https://schutten.cloud/post/build-your-own-pokedex-app-in-aks/"><em>Schutten.cloud</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88ba47e7e00" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/build-your-own-pok%C3%A9dex-in-aks-with-reactjs-pok%C3%A9api-azure-draft-and-github-actions-88ba47e7e00">Build Your Own Pokédex in AKS with ReactJS, PokéAPI, Azure Draft, and GitHub Actions</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Improve application resilience with Azure Chaos Studio]]></title>
            <link>https://itnext.io/improve-application-resilience-with-azure-chaos-studio-eaabd8e983f9?source=rss-e4a376b31e60------2</link>
            <guid isPermaLink="false">https://medium.com/p/eaabd8e983f9</guid>
            <category><![CDATA[chaos-engineering]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[site-reliability-engineer]]></category>
            <dc:creator><![CDATA[Rolf Schutten]]></dc:creator>
            <pubDate>Mon, 27 Mar 2023 09:59:55 GMT</pubDate>
            <atom:updated>2023-03-27T09:59:55.124Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TMjj50DtNvJrOxQH.jpg" /></figure><p>Breakdowns are inevitable; nowadays, developers are driven to consider built-in resilience an obligation rather than an option.</p><p>Chaos engineering disciplines developers to build confidence in systems and break systems on purpose so weaknesses can be found and fixed before they break when least expected. Deliberately introducing faults that simulate real-world outages is precisely what Azure Chaos Studio was designed for.</p><p>We’ll look at the Azure Chaos Studio service and its features. Then we’ll compare the service to other chaos engineering tools, followed by a step-by-step Azure Chaos Studio experiment.</p><h3>Azure Chaos Studio</h3><p>Azure Chaos Studio is Microsoft’s fully managed chaos engineering experimentation platform for accelerating the discovery of hard-to-find problems. It allows you to validate product quality by using the faults from the library, which include CPU pressure, network latency, blocked resource access, and even infrastructure outages.</p><blockquote><em>At the time of writing, Azure Chaos Studio is in Public Preview. With the </em><a href="https://techcommunity.microsoft.com/t5/azure-governance-and-management/announcing-the-public-preview-of-azure-chaos-studio/ba-p/2893050"><em>announcement</em></a><em> on November 2, 2021, Microsoft has promised to add new faults to the </em><a href="https://docs.microsoft.com/en-us/azure/chaos-studio/chaos-studio-fault-library"><em>fault library</em></a><em> continuously.</em></blockquote><p>Azure Chaos Studio drives application resilience by performing ad-hoc drills and integrations with your CI/CD pipelines. Chaos Studio uses Azure Resource Manager (ARM), which makes it easy to deploy and run your chaos experiments the same way you deploy and manage your infrastructure — leveraging ARM templates, Azure Policy, role-based access control, and more. Chaos Studio also integrates with Azure Application Insights and leverages Azure Active Directory for securing access to your resources. With Chaos Studio, you can easily stop an experiment and roll back the fault being injected to avoid having more impact on an environment than initially intended.</p><h3>Fault types</h3><p>With Chaos Studio, you create chaos experiments that allow you to orchestrate safe, controlled fault injection on your Azure resources. A chaos experiment describes the faults and the resources to run against.</p><p>Chaos Studio supports three types of faults:</p><ul><li><strong>Service-direct faults:</strong> These faults run directly against an Azure resource without any installation or instrumentation. Examples include rebooting an Azure Cache for Redis cluster or blocking all network access to a Key Vault.</li><li><strong>Agent-based faults:</strong> These faults run in virtual machines or virtual machine scale sets for in-guest failures. They require the installation of the Chaos Studio agent. Examples include applying virtual memory pressure or killing a running process.</li><li><strong>Chaos Mesh faults:</strong> Run faults on Kubernetes clusters using <a href="https://chaos-mesh.org/">Chaos Mesh</a>. Chaos Mesh is an open-source chaos engineering platform for Kubernetes. It requires installing Chaos Mesh on your Azure Kubernetes Service (AKS) cluster. Examples include causing pod failures, container issues, and network faults like delays, duplications, loss, and corruption.</li></ul><h3>Chaos engineering tools comparison</h3><p>Let’s look at other chaos engineering tools like ChaosBlade, Chaos Monkey, Gremlin, and Litmus. How does Azure Chaos Studio compare to these other chaos engineering tools?</p><p><a href="https://chaosblade.io/en/"><strong>ChaosBlade</strong></a><strong>:</strong> If you’re looking for a wide range of experiment types and target platforms, managing experiments through CLI commands, Kubernetes manifests, or REST API calls, then ChaosBlade might be what you are looking for. It is modular, where the core tool is designed to be an experiment orchestrator, and the attacks are implemented separately. On the downside, if you are looking for detailed documentation, you better be able to read Standard Chinese because ChaosBlade lacks detailed English documentation.</p><p><a href="https://netflix.github.io/chaosmonkey/"><strong>Chaos Monkey</strong></a><strong>:</strong> Chaos Monkey laid the foundation for chaos engineering tools. It only has one attack type: terminating virtual machine instances. It is deliberately unpredictable, giving you limited control over blast radius and execution when <em>“releasing the monkey”</em>. However, it creates the right mindset — preparing for disasters anytime.</p><p><a href="https://www.gremlin.com/"><strong>Gremlin</strong></a><strong>:</strong> Gremlin was the first managed enterprise chaos engineering service designed to improve reliability for web-based apps. It provides dozens of attack vectors, stops and rolls back attacks, and an integrated recommendation system. Gremlin allows customizable UI configurations, the ability for various attacks, simultaneously running tests, and automation support with a CLI and API. Unfortunately, Gremlin has no reporting capabilities, and although there is a free version, full software use requires a paid license and doesn’t come cheap.</p><p><a href="https://litmuschaos.io/"><strong>Litmus</strong></a><strong>:</strong> Litmus is a Kubernetes-related tool, providing many experiments for containers, Pods, nodes, and specific platforms and tools. Litmus includes a health checking feature, which lets you monitor the health of your application before, during, and after running an experiment. However, getting started with Litmus is much more complicated than most other tools. It requires you to create service accounts and annotations for each application and namespace you want to experiment on. This makes running experiments lengthy and complicated and gives you lots of administrative overhead when cleaning up experiments.</p><p>For the Azure-native software engineers, it becomes almost obvious that Azure Chaos Studio is the preferred choice. Particular requirements can lead to other chaos engineering tools based on specific characteristics. Ultimately, the tool will be just a resource to reach your goal faster and easier; achieve greater resilience.</p><h3>Unleash chaos</h3><p>Let’s deploy a simple AKS cluster and an app on which to run a chaos experiment so that you can familiarize yourself with Azure Chaos Studio. We’ll also cover the onboarding of the AKS cluster in Azure Chaos Studio and the creation of an experiment that causes pod failures. But before you can start deploying, there are some prerequisites to fulfill:</p><ul><li><strong>Azure tenant and user account:</strong> You’ll need an Azure tenant, an Azure Active Directory (Azure AD) instance. This instance is the foundation of the environment. And it allows you to create an identity (user account) to connect to Azure, set up the environment, and deploy the resources.</li><li><strong>Subscriptions:</strong> You’ll need a subscription and owner permissions to deploy the resources and minimize the costs by removing the resources at the end.</li><li>You’ll need to understand Azure Resource Groups and Azure Resource Manager (ARM) templates. You can find more information about ARM templates in the <a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/">documentation</a>.</li><li><strong>Azure CLI:</strong> You’ll need the Azure command-line interface for deploying the resources, and you can find more information about the Azure CLI in the <a href="https://docs.microsoft.com/en-us/cli/azure/">documentation</a>.</li><li><strong>Kubectl:</strong> You’ll need the Kubernetes command-line tool for deploying images and running other commands against your Kubernetes cluster. You can find more information about kubectl in the <a href="https://kubernetes.io/docs/reference/kubectl/kubectl/">documentation</a>.</li><li><strong>Helm:</strong> You’ll need the Helm command-line tool to deploy and configure applications and services. You can find more information about helm in the <a href="https://helm.sh/docs/intro/install/">documentation</a>.</li></ul><h3>Create the AKS cluster</h3><p>First, we will deploy an AKS cluster to host our application. We’ll deploy the Azure Kubernetes Cluster by using an ARM template.</p><p><strong>Step 1:</strong> Download the ARM templates from the supporting <a href="https://github.com/rolfschutten/improve-application-resilience-with-azure-chaos-studio">GitHub repository</a> for the rest of this guide. Review and adjust the templates and commands when needed. We won’t be covering the details in this post.</p><p><strong>Step 2:</strong> Start your preferred terminal and connect to Azure using the Azure CLI and your identity (user account).</p><pre>az login</pre><p><strong>Step 3:</strong> List the available subscriptions and locate the preferred subscription ID.</p><pre>az account list --output table</pre><p><strong>Step 4:</strong> Set the subscription you’re using to deploy the resources. Use the subscription ID from the previous step.</p><pre>az account set --subscription &lt;subscriptionId&gt;</pre><p><strong>Step 5:</strong> Set your environment variables and create a resource group.</p><pre>$RESOURCE_GROUP_NAME=&quot;rg-t-aks-weu-chaos-robino-01&quot;<br>$AKS_NAME=&quot;aks-t-weu-chaos-robino-01&quot;<br>$DNS_PREFIX=&quot;aks-t-weu-chaos-robino-01-dns&quot;<br>$LOCATION=&quot;westeurope&quot;<br>$NODE_SIZE=&quot;Standard_B2s&quot;<br>$DEPLOYMENT_NAME=&quot;AksDeploymentRobino-01&quot;<br><br>az group create \<br>  --name $RESOURCE_GROUP_NAME \<br>  --location &quot;$LOCATION&quot;</pre><p><strong>Step 6:</strong> Set the folder you’ve downloaded the ARM templates as your working directory and run the following code to deploy the cluster. Wait for the deployment to finish. This may take a couple of minutes.</p><pre>az deployment group create \<br>  --name $DEPLOYMENT_NAME \<br>  --resource-group $RESOURCE_GROUP_NAME \<br>  --template-file &quot;./aks-cluster.json&quot; \<br>  --parameters location=$LOCATION resourceName=$AKS_NAME dnsPrefix=$DNS_PREFIX agentCount=1 agentVMSize=$NODE_SIZE</pre><p><strong>Step 7:</strong> Review what is deployed. You’ll find a resource group that contains the service, node pools, and networking. And that you have a separate resource group that contains the nodes, a load balancer, public IP addresses, network security group (NSG), managed identity, virtual network, and route table.</p><h3>Deploy the web app</h3><p>Now, we’ll deploy a <a href="https://github.com/Azure-Samples/azure-voting-app-redis">sample app</a> packaged into a container image and upload this to an Azure Container Registry. We’ll create the Azure Container Registry using the ARM template.</p><p><strong>Step 1:</strong> Set the environment variables using your terminal from the previous steps.</p><pre>$ACR_NAME=&quot;acrtaksweuchaosrobino01&quot;<br>$DEPLOYMENT_NAME=&quot;AcrDeploymentRobino-01&quot;</pre><p><strong>Step 2:</strong> Run the following code to deploy the container registry using the ARM template. Wait for the deployment to finish. This may take a couple of minutes.</p><pre>az deployment group create \<br>  --name $DEPLOYMENT_NAME \<br>  --resource-group $RESOURCE_GROUP_NAME \<br>  --template-file &quot;./acr.json&quot; \<br>  --parameters registryLocation=$LOCATION registryName=$ACR_NAME</pre><p><strong>Step 3:</strong> Once the container registry is deployed, it’s time to import the container image of the sample application. Use the commands below to log in to your container registry and import the image.</p><pre>az acr login -n $ACR_NAME --expose-token<br><br>az acr import --name $ACR_NAME \<br>  --source mcr.microsoft.com/azuredocs/azure-vote-front:v2 \<br>  --image azure-vote-front:v2</pre><p>Run the command below to validate that the container image has successfully been imported.</p><pre>az acr repository list --name $ACR_NAME --output table</pre><p><strong>Step 4:</strong> We need to give our AKS cluster access to pull the image from our container registry. We’ll use the managed identity of the cluster. Use the command below to get your managed identity’s ID representing your cluster’s agent pool. From the returned values, copy its principal ID.</p><pre>az identity list \<br>  --query &quot;[?contains(name,&#39;$AKS_NAME-agentpool&#39;)].{Name:name, PrincipalId:principalId}&quot; \<br>  --output table</pre><p>Use the command below to give the managed identity the AcrPull role on the resource group level. This allows it to pull images from the container registry, which we previously deployed within the same resource group as the AKS cluster. Ensure you’ve adjusted the principal ID before executing the command.</p><pre>az role assignment create \<br>  --assignee &quot;&lt;principalId&gt;&quot; \<br>  --role &quot;AcrPull&quot; \<br>  --resource-group $RESOURCE_GROUP_NAME</pre><p><strong>Step 5:</strong> The manifest file you’ve downloaded from the GitHub repository uses the image from the example container registry, which most likely won’t exist when you follow these instructions. Open the <em>azure-vote-app.yml</em> manifest file with a text editor or IDE and run the following command to get your ACR login server name:</p><pre>az acr list --resource-group $RESOURCE_GROUP_NAME --query &quot;[].{acrLoginServer:loginServer}&quot; --output table</pre><p>Replace <em>acrtaksweuchaosrobino01.azurecr.io</em> with your ACR login server name. The image name is found on line 53 of the manifest file. Provide your own ACR login server name, ensuring your manifest file looks like the following example:</p><pre>containers:<br>- name: azure-vote-front<br>  image: &lt;acrName&gt;.azurecr.io/azure-vote-front:v2</pre><p><strong>Step 6:</strong> Next, we’ll deploy the application using the kubectl apply command. This command parses the manifest file and creates the defined Kubernetes objects. To do so, we need to get the access credentials for our AKS cluster by running the az aks get-credentials command. Run the commands below—having the folder which holds your manifest file as the working directory.</p><pre>az aks get-credentials -g $RESOURCE_GROUP_NAME -n $AKS_NAME<br>kubectl apply -f azure-vote-app.yml --validate=false</pre><p>This may take a few minutes to complete. Use the command below to monitor the deployment status.</p><pre>kubectl rollout status deployment/azure-vote-front</pre><p>Once completed, you should have two pods, <em>azure-vote-front</em> and <em>azure-vote-back</em>, in a running state. You can validate this by running the command below.</p><pre>kubectl get pods</pre><p><strong>Step 7:</strong> You should now have a working voting app published to the internet over HTTP. Run the command below.</p><pre>kubectl get service</pre><p>Copy the <em>EXTERNAL_IP</em> of the <em>azure-vote-front</em> service, and paste it into your browser. Congratulations, you’ve now successfully deployed the Azure Voting App.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rquQUgP6NbrMQsB7.png" /></figure><h3>Set up Chaos Mesh</h3><p>We must install Chaos Mesh on our AKS cluster to inject faults. Let’s go ahead and install it.</p><p><strong>Step 1:</strong> Our first step will be adding the <em>chaos-mesh</em> chart repository and ensuring we have the latest update. Run the commands below to add the repository.</p><pre>helm repo add chaos-mesh https://charts.chaos-mesh.org<br>helm repo update</pre><p><strong>Step 2:</strong> To scope our Chaos Mesh pods, services, and deployments, we’ll create a separate namespace. Run the command below to create the namespace.</p><pre>kubectl create ns chaos-testing</pre><p><strong>Step 3:</strong> Next, we’ll install Chaos Mesh into the namespace. Run the command below to install chaos mesh to your AKS cluster.</p><pre>helm install chaos-mesh chaos-mesh/chaos-mesh --namespace=chaos-testing --set chaosDaemon.runtime=containerd --set chaosDaemon.socketPath=/run/containerd/containerd.sock</pre><p>The installation will create multiple pods and services. Validate that the pods are running using the command below.</p><pre>kubectl get pods -n chaos-testing</pre><p>If everything went as intended, you’ve successfully installed Chaos Mesh on your AKS cluster.</p><h3>Onboard the AKS cluster</h3><p>Azure Chaos Studio cannot inject faults against a resource unless that resource has been onboarded. Using the ARM template you’ve downloaded, we’ll create a target and capability on the AKS cluster resource. In our case, the PodChaos capability represents the Chaos Mesh fault. Run the command below to onboard the AKS cluster to Azure Chaos Studio. Ensure you have the folder that holds the template as your working directory.</p><pre>$DEPLOYMENT_NAME=&quot;OnboardDeploymentRobino-01&quot;<br>az deployment group create \<br>  --name $DEPLOYMENT_NAME \<br>  --resource-group $RESOURCE_GROUP_NAME \<br>  --template-file &quot;./onboard.json&quot; \<br>  --parameters resourceName=$AKS_NAME resourceGroup=$RESOURCE_GROUP_NAME</pre><p>To validate the successful onboarding, navigate to <a href="https://portal.azure.com/#view/Microsoft_Azure_Chaos/ChaosStudioMenuBlade/~/targetsManagement">Azure Chaos Studio Targets</a> in the Azure Portal, and see if your AKS cluster has the <em>service-direct</em> option enabled.</p><h3>Create an experiment</h3><p>Now, we’ll deploy a chaos experiment using the ARM template. The experiment we’ll deploy uses the <a href="https://docs.microsoft.com/en-us/azure/chaos-studio/chaos-studio-fault-library#aks-chaos-mesh-pod-faults">AKS Chaos Mesh pod faults</a> capability, which will cause a pod fault in the AKS cluster.</p><p><strong>Step 1:</strong> Open the <em>experiment.json</em> file in your IDE or text editor and inspect it. We will adjust anything. However, it’s good to understand how the deployment works, especially the parts on lines 61 and 62, which contains the <em>jsonSpec</em>. This contains a JSON-escaped Chaos Mesh spec that uses the <a href="https://chaos-mesh.org/docs/simulate-pod-chaos-on-kubernetes/#create-experiments-using-yaml-configuration-files">PodChaos kind</a>. You can use a <a href="https://www.convertjson.com/yaml-to-json.htm">YAML-to-JSON converter like this one</a> to convert the Chaos Mesh YAML to JSON and minify it, and use a <a href="https://www.freeformatter.com/json-escape.html">JSON string escape tool</a> to escape the JSON spec. Only include the YAML under the <em>jsonSpec</em> property (don’t include metadata, kind, etc.). As I’ve already done this for you, we’re ready to deploy the template.</p><p><strong>Step 2:</strong> Add the environment variables, using your terminal from the previous steps. You can use the commands below.</p><pre>$EXPERIMENT_NAME=&quot;exp-t-aks-weu-chaos-pod-robino-01&quot;<br>$DEPLOYMENT_NAME=&quot;ExperimentDeploymentRobino-01&quot;</pre><p><strong>Step 3:</strong> Run the following code to deploy the chaos experiment. The deployment should complete in a matter of seconds.</p><pre>az deployment group create \<br>  --name $DEPLOYMENT_NAME \<br>  --resource-group $RESOURCE_GROUP_NAME \<br>  --template-file &quot;./experiment.json&quot; \<br>  --parameters resourceName=$EXPERIMENT_NAME location=$LOCATION clusterName=$AKS_NAME</pre><p>You’ve now successfully deployed your chaos experiment. If you like, you can <a href="https://portal.azure.com/#view/Microsoft_Azure_Chaos/ChaosStudioMenuBlade/~/chaosExperiment">review your chaos experiment</a> in the Azure Portal before going to the next step.</p><p><strong>Step 4:</strong> To run the experiment, it needs the permissions for the target resource. More information about the required permissions can be found in the <a href="https://docs.microsoft.com/en-us/azure/chaos-studio/chaos-studio-fault-providers">documentation</a>. Run the command below to retrieve the experiment’s ID, so we can use it for assigning the required permissions in the next step.</p><pre>az ad sp list \<br>  --display-name $EXPERIMENT_NAME \<br>  --query [].id --output table</pre><p><strong>Step 5:</strong> Run the command below to give the experiment the <em>Azure Kubernetes Service Cluster Admin Role</em> on the resource group. Make sure you’ve adjusted the principal ID before executing the command.</p><pre>az role assignment create \<br>  --assignee &quot;&lt;principalId&gt;&quot; \<br>  --role &quot;Azure Kubernetes Service Cluster Admin Role&quot; \<br>  --resource-group $RESOURCE_GROUP_NAME</pre><h3>Run the experiment and evaluate your findings</h3><p>We’re finally ready to run the freshly created chaos experiment.</p><p><strong>Step 1:</strong> Go to the <a href="https://portal.azure.com/#view/Microsoft_Azure_Chaos/ChaosStudioMenuBlade/~/chaosExperiment">Chaos Studio Experiments blade</a> in the Azure Portal, using your browser of choice. Here you’ll find the chaos experiment we’ve created in the previous steps. Open another tab with the application we deployed earlier, using the <em>EXTERNAL_IP</em> of step 7 of the Deploy a web application chapter of this post.</p><p><strong>Step 2:</strong> Click on the chaos experiment we’ve created in the previous steps, and click Start. It’ll start the following sequence: <em>PreProcessingQueued</em>, <em>PreProcessing</em>, <em>WaitingToStart</em>, and eventually, after about 30 seconds, <em>Running</em>.</p><p><strong>Step 3:</strong> While the experiment runs, refresh your web application in the other browser tab. You’ll find that it isn’t working anymore. Since we’re running a controlled and targeted chaos experiment, we know there should be some pod faults within the cluster. Go to your terminal and run the following command:</p><pre>kubectl get pods</pre><p>You’ll find that the pods tried to restart themselves. Our experiment continues injecting pod failures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*h96RINJPioJZN9M2.png" /></figure><p><strong>Step 4:</strong> Cancel the experiment, or wait until it has finished after 10 minutes. It should return the <em>Canceled</em> status if you canceled the experiment or the <em>Success</em> status if you let it run for 10 minutes. To make sure, refresh your web application on the other browser tab.</p><p><strong>Step 5:</strong> Evaluate your findings, learning from them to make your infrastructure and application more resilient. For example, in this particular experiment, we’ve learned that the pod can restore itself. After all, the web app worked perfectly fine after the chaos experiment ended. However, the pod itself is a single failure point as the application runs on a single pod instance. We must add high availability to the solution to make it more resilient.</p><p>Running more “What-If” scenarios, translated into chaos experiments, will deliver different results and findings. Bringing chaos engineering to practice will lead you to run multiple chaos experiments on other targets, sequentially and parallel.</p><h3>Clean up the resources</h3><p>We will remove all resources created during this guide to save costs and keep an overview of your environment.</p><p><strong>Step 1:</strong> Remove the resource group, including all the resources. It’ll prompt you for confirmation. When removing the AKS cluster resource, which is included in the deleted resource group, Azure will automatically delete the other resource group (containing the virtual network, load balancer, etc.).</p><pre>az group delete --name $RESOURCE_GROUP_NAME</pre><p><strong>Step 2:</strong> Finally, log out of the Azure CLI.</p><pre>az logout</pre><h3>Summary</h3><p>We went through the Azure Chaos Studio service, compared it to other chaos engineering tools, and created and ran a simple chaos experiment against an AKS cluster. There’s so much more to learn when it comes to chaos engineering. Check out some of these resources to help you forward:</p><ul><li><a href="https://docs.microsoft.com/en-us/azure/chaos-studio/">Azure Chaos Studio documentation</a></li><li><a href="https://docs.microsoft.com/en-us/azure/architecture/framework/resiliency/chaos-engineering">Chaos engineering — Microsoft Azure Well-Architected Framework</a></li><li><a href="https://principlesofchaos.org/">Principles of chaos engineering</a></li></ul><p>Thank you for taking the time to go through this post and making it to the end. Stay tuned because we’ll keep continuing providing more content on this topic in the future.</p><p><em>This post was originally published on </em><a href="https://robino.io/"><em>Robino.io</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eaabd8e983f9" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/improve-application-resilience-with-azure-chaos-studio-eaabd8e983f9">Improve application resilience with Azure Chaos Studio</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Management at scale with Azure Lighthouse]]></title>
            <link>https://rolfschutten.medium.com/management-at-scale-with-azure-lighthouse-5c2430e9168d?source=rss-e4a376b31e60------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c2430e9168d</guid>
            <category><![CDATA[cloud-management]]></category>
            <category><![CDATA[cloud-governance]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[governance]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Rolf Schutten]]></dc:creator>
            <pubDate>Mon, 27 Mar 2023 09:48:52 GMT</pubDate>
            <atom:updated>2023-03-27T09:48:52.085Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gGjIyzcUUHyn88YW.jpg" /></figure><p>More and more organizations are finding their way to the cloud. Managing different customer tenants is becoming more challenging for service providers, while customers need insight and control over the access of their multiple service providers.</p><p>What Azure Lighthouse delivers is enabling multi-tenant management with scalability, automation, and enhanced governance across resources.</p><p>We’ll look at the Azure Lighthouse service and its features. Then we’ll compare the service to other options to manage multiple tenants, followed by a step-by-step guide to onboard an environment to Azure Lighthouse.</p><h3>Azure Lighthouse</h3><p>Azure Lighthouse lets customers delegate resource management permissions to service providers over scopes, including subscriptions, resource groups, and individual resources, which enable service providers to perform management operations on their behalf. It uses the Azure Resource Manager capabilities and the standard role-based access control (RBAC) mechanisms. It works regardless of the licensing construct, whether enterprise agreements (EA), cloud solution providers (CSP), or pay-as-you-go subscriptions.</p><p>Azure Lighthouse offers service providers a single control plane to view and manage Azure across all their customers. Partners can manage resources from multiple distinct customers through their Azure portal or CLI context. Azure Lighthouse makes customer resources visible to service providers as Azure resources in their tenant, making it easy for service providers to automate status monitoring and manage the resources of many customers from a single location. This applies to everything relevant to Azure resource management, from the Azure portal to services such as Azure Policy, Resource Graph, Log Analytics features of Azure Monitor, or Update Management.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*MSbt-eFNaKpJu_25.jpg" /></figure><h3>Enable zero trust with Privileged Identity Management</h3><p>Microsoft offers the possibility to easily enable Azure AD Privileged Identity Management (PIM) capabilities for Azure Lighthouse. Only the eligible roles assigned to that specific user can be activated with PIM-enabled Azure Lighthouse. This follows the zero trust cybersecurity protocol and allows using just-in-time access (JIT) and other PIM capabilities, significantly reducing the risk of operator errors. You can find more information about Privileged Identity Management in the <a href="https://docs.microsoft.com/en-us/azure/active-directory/privileged-identity-management/">documentation</a>.</p><h3>Comparison with other options</h3><p>Let’s look at other options to access multiple Azure tenants; Admin on behalf of (AOBO) and Azure Active Directory B2B. How does Azure Lighthouse compare to these other options?</p><p><strong>Admin On Behalf Of (AOBO)</strong> grants CSP partners delegated administrator privileges via the partner portal. When onboarding a customer’s CSP, the customer explicitly gives these permissions via the invitation link. This allows owner role-based access control (RBAC) access on all Azure subscriptions for that customer. Not long ago, partners were also given the Global Administration role in Azure Active Directory. Still, with the advent of granular delegated administration privileges (GDAP), they are now assigned lower permissions to read the directory by default. This follows the least-privileged access principles and the zero trust cybersecurity protocol.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*OTsPJ-G6sKsYqG4l.png" /></figure><p>AOBO helps overcome the challenge of accessing multiple customer tenants without creating separate accounts for each tenant. However, it is not a real scalable management solution. With AOBO, you still perform actions from one account within one tenant. If you want to perform actions in multiple tenants via AOBO, you are forced to log in per tenant one by one and perform your activities there. This option is only available to CSP partners for customers who participate in the CSP program. In addition, it provides different scalability in insight than Azure Lighthouse because it cannot look across the context of multiple customers or tenants. In other words, it does not provide the “single pane of glass”.</p><p><strong>Azure Active Directory (AD) B2B</strong> is one of the external identity options Azure AD offers. It is a “bring your own identity” solution so external users can use their Azure AD identity in another tenant. B2B collaboration users are represented in your directory as guest users. This makes it possible to hand out access rights and admin privileges to guest users like tenant-own users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*vbFVSRwJQeoAOPMY.jpg" /></figure><p>If you want to perform actions in multiple tenants via Azure AD B2B, you are forced to log in per tenant one by one and perform your activities there. This works just as if you had a customer or domain-specific account. Azure AD B2B forces you to send a guest invitation per identity or user, accept it, and then grant the desired permissions within the customer tenant. This makes the option less scalable and efficient for our purpose. In addition, Azure AD B2B provides different scalability in insight than Azure Lighthouse does because it cannot look across the context of multiple customers or tenants.</p><h3>Onboarding a customer</h3><p>Let’s onboard an Azure subscription to Azure Lighthouse and give specific role-based access so that you can familiarize yourself with Azure Lighthouse. Unfortunately, there is no support for Privileged Identity Management (PIM) with Terraform, which will not be covered in these steps. However, it should be a matter of time before it will be supported, as <a href="https://github.com/hashicorp/terraform-provider-azurerm/issues/15311">feature requests</a> are already being raised. In the meantime, you can use the <a href="https://registry.terraform.io/providers/azure/azapi/latest/docs">AzAPI provider</a> to enable PIM using the ARM samples below. Before you can start onboarding, there are some prerequisites to fulfill:</p><ul><li><strong>Azure tenant and user account:</strong> You’ll need two Azure tenants, two Azure Active Directory (Azure AD) instances. One tenant represents the service provider, while the second tenant represents the customer.</li><li><strong>Subscriptions:</strong> You’ll need a subscription and owner permissions in the “customer tenant” to onboard and deploy resources.</li><li><strong>Terraform:</strong> You’ll need the Terraform command-line interface to deploy and manage Azure resources. You can find more information about Terraform and the AzureRM provider in the <a href="https://registry.terraform.io/providers/hashicorp/azurerm/3.20.0">documentation</a>.</li></ul><blockquote><em>In this guide, we use Terraform, but Microsoft also offers the capability to manage Azure Lighthouse through ARM templates. You can find more information and samples about this in this </em><a href="https://github.com/Azure/Azure-Lighthouse-samples"><em>GitHub repository</em></a><em>.</em></blockquote><ul><li><strong>Azure CLI:</strong> You’ll need the Azure command-line interface for executing the ARM template deployments, and you can find more information about the Azure CLI in the <a href="https://docs.microsoft.com/en-us/cli/azure/">documentation</a>.</li></ul><p>Once you have fulfilled the prerequisites, we are ready to start onboarding!</p><p><strong>Step 1:</strong> Download the Terraform files from <a href="https://github.com/rolfschutten/management-at-scale-with-azure-lighthouse">our GitHub repository</a> for the rest of this guide. Review the files and adjust where necessary. Line 2 of the main.tf file contains the ID of the built-in <em>Contributor</em> RBAC role. If you wish to assign a different role, you can find the necessary IDs in the <a href="https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles">Microsoft documentation</a>. Delegating the Owner and User Access Administrator role with Azure Lighthouse is impossible.</p><p><strong>Step 2:</strong> Start your preferred terminal and connect to Azure using the Azure CLI and your service provider identity (user account).</p><pre>az login</pre><p>Run the command below to retrieve the tenant ID from the service provider tenant. Copy the ID and put it in the <em>ManagingTenant</em> value of the variables.tf file.</p><pre>az account list --query “[[].name, [].homeTenantId]” --output table</pre><p>Next, we’ll create a security group within the service provider tenant. This security group represents the users that will receive the delegated permissions to the customer tenant. Run the command below to create an Azure Active Directory group. You can adjust the display name and mail nickname to your liking.</p><pre>az ad group create \<br>  --display-name “Team Robino” \<br>  --mail-nickname “Robino”</pre><p>Once completed, your terminal receives output from the deployment. Copy the “id” and put this in the <em>AdminGroup</em> value of the variables.tf file.</p><p>Now we have to add ourselves to this group. Run the command below to retrieve your user id so we can add it to the group.</p><pre>az ad signed-in-user show</pre><p>From the output in your terminal, copy the “id” value. We need it for our next step to add ourselves to the group we’ve created in the previous step. To do so, run the command below.</p><pre>az ad group member add \<br>  --group “Team Robino” \<br>  --member-id “xxxxxxxx–xxxx-xxxx–xxxx-xxxxxxxxxxxx”</pre><p><strong>Step 3:</strong> Let’s connect to the customer Azure tenant using the Azure CLI and your customer identity (user account). In practice, you will likely have to let your customer carry out these steps.</p><p>Log out from the service provider tenant and log in with your customer identity by running the commands below.</p><pre>az logout<br>az login</pre><p>As we want to delegate permissions on a subscription level, we need to retrieve the subscription ID of the subscription to that we want to delegate permissions. Run the command below to retrieve the subscription IDs of the customer tenant.</p><pre>az account list --query “[[].name, [].id]” --output table</pre><p>Copy the id in your terminal output from the subscription to which you’d like to delegate permissions. Put this in the <em>SubscriptionId</em> value of the variables.tf file.</p><p>We must register the Managed Services resource provider to enable the use and onboarding. An Azure resource provider is a collection of REST operations that provide functionality for an Azure service. Use the command below to switch to the subscription we want to onboard and register the <em>Microsoft.ManagedServices</em> resource provider. Use the ID from the previous step.</p><pre>az account set --subscription “xxxxxxxx-xxxx–xxxx–xxxx–xxxxxxxxxxxx” <br>az provider register --namespace ‘Microsoft.ManagedServices’</pre><p><strong>Step 4:</strong> Now it’s finally time to deploy our Terraform code, which will delegate resource management permissions to our service provider. Run the commands below from the folder where you’ve downloaded the .tf files as your working directory. These commands will initialize the working directory, create an execution plan, and execute the actions proposed in the plan. If you are new to Terraform or want to learn more about it, you can find more information about Terraform in the <a href="https://www.terraform.io/intro">documentation</a>.</p><pre>terraform init<br>terraform plan<br>terraform apply --auto-approve</pre><p>Once the deployment is completed, you can access the <a href="https://portal.azure.com/">Azure Portal</a> with your customer account to validate the deployment. You should see a delegation similar to the image below from the delegations blade in the Azure Lighthouse service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*iwHuVAHnCONYaJDF.jpg" /></figure><p><strong>Step 5:</strong> Now, we should have delegated resource management permissions. Let’s validate it by creating a resource group in our customers’ tenant. First, log in with your service provider account using the commands below.</p><pre>az logout<br>az login</pre><p>To create a resource group in the customer’s subscription, we’ll need to switch to that subscription context. First, run the command below to list all subscriptions you have access to. The onboarded subscription from the previous steps should be visible in the list.</p><pre>az account list — output table</pre><p>From the terminal output, copy the ID of the subscription. This ID should be the same as the ID you’ve put in the <em>SubscriptionID</em> value of the variables.tf file. Run the command below to switch context to this subscription, using the ID of the subscription you’ve just copied.</p><pre>az account set — subscription xxxxxxxx-xxxx–xxxx–xxxx–xxxxxxxxxxxx</pre><p>To create a resource group, run the command below. Change the values to your liking if you’d like.</p><pre>az group create -l westeurope -n rg-t-weu-robino</pre><p>Once your deployment has succeeded, we’ll validate the creation of the resource group in the <a href="https://portal.azure.com/">Azure Portal</a>. Being logged in with the service provider account, click on the cogwheel in the top right corner. In the Directories + subscriptions blade, make sure you’ve selected the customer directory and subscriptions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*ynd6uY2MpQu79v2L.jpg" /></figure><blockquote><em>For service providers that have multiple customers onboarded in Azure Lighthouse, numerous customers can be selected for total overviews. This can be extremely useful for services such as Microsoft Defender for Cloud, Backup Center, or Azure Monitor. This may give you an overview of all alerts and statuses of your customers.</em></blockquote><p>Looking in the Resource groups blade, you should now see your freshly created resource group. This proves that we have been delegated the resource management privileges to create a resource group in the customer’s subscription.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*T4g7knSKVuo_gBL4.jpg" /></figure><p><strong>Step 6:</strong> Let’s clean up the resources and deployment before ending this step-by-step guide. Run the command below from your terminal to delete the resource group we’ve created in the previous steps. If you have changed the name of the resource group, adjust the command accordingly.</p><pre>az group delete -n rg-t-weu-robino</pre><p>We’ll log in with the customer’s account to offboard the customer’s subscription. Do so by executing the commands below.</p><pre>az logout<br>az login</pre><p>Instead of using Terraform to apply the desired state, we will use the terraform destroy command to destroy what Terraform previously deployed. Run the commands below to do so.</p><pre>terraform plan<br>terraform destroy</pre><p>Your terminal output will describe what will be destroyed. This should be the Lighthouse assignment, as it is the only resource that was managed and deployed by Terraform in this guide. Terraform will prompt you to confirm. Type in yes to confirm and destroy the Lighthouse assignment.</p><p>As soon as the deployment is completed, head on to the <a href="https://portal.azure.com/">Azure Portal</a> with your service provider account and validate.</p><h3>Summary</h3><p>We went through the Azure Lighthouse service, compared it to other options for managing multiple tenants, and onboarded a tenant to Azure Lighthouse. Azure Lighthouse holds many secrets and possibilities to leverage scalable and automation capabilities. Check out the <a href="https://docs.microsoft.com/en-us/azure/lighthouse/">Azure Lighthouse Documentation</a> to learn more about Azure Lighthouse.</p><p>Thank you for taking the time to go through this post and making it to the end. Keep an eye on this blog for more content on similar topics.</p><p><em>This post was originally published on </em><a href="https://robino.io/"><em>Robino.io</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c2430e9168d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop robbing yourself: 7 ways to optimize Azure costs today]]></title>
            <link>https://itnext.io/stop-robbing-yourself-7-ways-to-optimize-azure-costs-today-d53a11694d50?source=rss-e4a376b31e60------2</link>
            <guid isPermaLink="false">https://medium.com/p/d53a11694d50</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[cost-management]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Rolf Schutten]]></dc:creator>
            <pubDate>Mon, 15 Aug 2022 19:51:07 GMT</pubDate>
            <atom:updated>2022-08-15T19:51:07.512Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nteWpSEEF2YMjgyP6gfRww.jpeg" /></figure><p>In this blog article, I share 7 ways with which you can start optimizing your Azure costs today. In addition, I also share 7 options that Microsoft has for offering Azure credits, so that you can reduce your costs even further.</p><h3>Cost Optimization</h3><p>Cost optimization is a business-focused, continuous discipline to drive spending and cost reduction, while maximizing business value. You should treat cost optimization as a process, rather than a one-time activity. When taking advantage of the various tools in Azure that provides cost optimization recommendations doesn’t have to be a time consuming task. Below are 7 ways to optimize your Azure costs today:</p><h4>1. Set up budgets and allocate costs to teams and projects</h4><p>Managing and monitoring spending is facilitated from <a href="https://azure.microsoft.com/en-us/services/cost-management/">Azure Cost Management</a>. Here you can <a href="https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/tutorial-acm-create-budgets">specify budgets, set alarms</a> and view per resource, resource group, subscription, tag, etc. where which costs come from. <a href="https://docs.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/resource-tagging">Because costs are often allocated to different departments, you can also make a distinction based on tagging</a>. In this way you can immediately inform the relevant budget holders about his/her costs and have a targeted conversation about this. Being aware of costs in relation to use, and recognizing the patterns for increases and decreases of costs, is the first and most important step in cost optimization.</p><h4>2. Shutdown unused resources</h4><p>Obviously, you save costs if you turn off resources when you are not using them. Virtual machines, ExpressRoute circuits, and other resources can be identified by <a href="https://azure.microsoft.com/en-us/services/advisor/">Azure Advisor</a>, which gives you recommendations on which resources to shut down, and how much you would save. You can also apply the concept of “snoozing”, which means turning resources on during usage hours, but turning them off outside of usage hours. This is <a href="https://docs.microsoft.com/en-us/azure/automation/automation-solution-vm-management">easy to automate</a> with the help of <a href="https://azure.microsoft.com/services/automation/">Azure Automation</a>, or embedded solutions within Azure services, for example <a href="https://docs.microsoft.com/en-us/azure/virtual-desktop/autoscale-scaling-plan">Scaling Plans for Azure Virtual Desktop</a>.</p><h4>3. Right-size underused resources</h4><p>Right-sizing is not a service or tool, neither can you access it from the Azure portal. Right-sizing is a process in which the goal is to find the “perfect fit“, or “right size” for a workload, so that costs can be reduced without compromising performance requirements. Or, improve performance to a required level, whilst minimizing the extra costs. It is about finding the most optimal size in relation to needs and requirements. Microsoft offers a variety of tools to support your right-sizing process, such as <a href="https://azure.microsoft.com/services/advisor/">Azure Advisor</a>, <a href="https://azure.microsoft.com/services/monitor/">Azure Monitor</a> and Insights, <a href="https://azure.microsoft.com/services/cost-management/">Cost Management and Billing</a>, etc. If you’re considering migrating to Azure from your data center, <a href="https://docs.microsoft.com/en-us/azure/migrate/concepts-assessment-calculation#types-of-assessments">Azure Migrate’s performance-based evaluation</a> can help you right-sizing from the start.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fgXpduNc3MJ5X56i.png" /><figcaption>Opportunity for savings by <a href="https://azure.microsoft.com/nl-nl/blog/author/dianagao/">Diana Gao</a> on <a href="https://azure.microsoft.com/nl-nl/blog/rightsize-to-maximize-your-cloud-investment-with-microsoft-azure/">Rightsize to maximize your cloud investment with Microsoft Azure | Azure-blog en -updates | Microsoft Azure</a></figcaption></figure><p>Right-sizing should be applied especially in migration scenarios from on-premises data centers to Azure. In Azure there really is no reason to apply overcommitment and/or over-provisioning, you provision exactly what you need, when you need it, and you pay for what you use. An additional advantage is that you do not have to commit to a certain generation of hardware (CPU family or chipset), for the duration of the hardware depreciation. Instead of having to spend three to five years with the same hardware generation, you can enjoy the latest generations that Microsoft Azure offers with a few mouse clicks away.</p><p>Also, consider <a href="https://azure.microsoft.com/en-us/services/virtual-machines/spot/">Spot Virtual Machines</a>, which allow you to purchase unused computing power with significant cost savings. This is a very cost-effective way for workloads that can handle interruptions and don’t need to run within a specific time frame.</p><h4>4. Take advantage of the Azure Hybrid Benefit</h4><p>If you are an organization that has licensed their current on-premises workloads with <a href="https://www.microsoft.com/en-us/licensing/licensing-programs/software-assurance-getting-started">Software Assurance</a>, Microsoft offers <a href="https://azure.microsoft.com/en-us/pricing/hybrid-benefit/">the option</a> to bring these licenses into Azure. You then no longer pay for the licenses within the consumption model, so that you do not have to write off the purchased licenses in one go. This can make a significant difference if you want to migrate your on-premises workloads to Azure.</p><h4>5. Configure autoscaling</h4><p>Dynamic upscaling and downscaling can of course also be cost effective. By working with autoscaling, resources become available when you need them, and are deleted when you no longer need them.</p><h4>6. Choose the right Azure compute service</h4><p>Besides virtual machines, there are many more compute services that Azure offers. Azure offers many ways to host your code. Most compute services require less management burden than virtual machines and therefore the total cost of ownership can be much lower. You should operate more cost efficiently by selecting the right compute service for your application, if you can.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zMKIl3q5xZPeR5Ck.png" /><figcaption>Flowchart to select a candidate compute service by <a href="https://www.microsoft.com/">Microsoft </a>on <a href="https://docs.microsoft.com/en-us/azure/architecture/guide/technology-choices/compute-decision-tree">Choose an Azure compute service — Azure Architecture Center | Microsoft Docs</a></figcaption></figure><p>Microsoft has written <a href="https://docs.microsoft.com/en-us/azure/architecture/guide/technology-choices/compute-decision-tree">an extensive article</a> about finding the right compute service.</p><h4>7. Reserve instances for consistent workloads</h4><p>You can get a discount of up to 72 percent over pay-as-you-go pricing on Azure services, if you make a longer commitment to use certain instances. These reservations can be made for a one- or three-year term. It’s strongly advised to apply reserved instances after considering the optimalization options above, in order to achieve the maximum cost advantage. Reserved instances are bought over the entire contract period, assuming you run the workloads 730 hours a month. Shutting down these resources will not affect the costs anymore, after buying a reservation. It may therefore be cheaper not to make reservations and to work with “snoozing” or “autoscaling”, or a mix of these. On the other hand, in some cases it is already attractive to purchase a reserved instance, even if the instance is only used for a few months. It is recommended that you always calculate this for yourself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*nzg1J-BsUtykr8NGNXIDeQ.png" /><figcaption>Azure Reservations by <a href="https://www.microsoft.com/">Microsoft </a>on <a href="https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/save-compute-costs-reservations#charges-covered-by-reservation">What are Azure Reservations? | Microsoft Docs</a></figcaption></figure><p>Reserved instances are not limited to virtual machines only. Microsoft offers <a href="https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/save-compute-costs-reservations#charges-covered-by-reservation">reserved instances</a> across a variety of products and services within its portfolio, including databases, App Services, and various software plans.</p><h3>Azure Credits</h3><p>In addition to the 7 ways of optimizing Azure costs, Microsoft provides 7 ways to help you save money through Azure credits:</p><ol><li><a href="https://azure.microsoft.com/en-us/pricing/member-offers/credit-for-visual-studio-subscribers/">Visual Studio Subscriptions</a>, giving $150 in monthly credits for Visual Studio Enterprise subscribers, or $100 in monthly credits for subscribers through MSDN Platforms. For Visual Studio Professional and Visio Studio Test Professional, you get $50 in monthly credits.</li><li><a href="https://azure.microsoft.com/en-us/free/students/">Azure for Students</a>, giving full-time students $100 in credit in order to help them further their career and build their skills in Azure. This only applies for students at an accredited, two or four-year educational institution, and only when signing up with their school email address.</li><li><a href="https://azure.microsoft.com/en-us/free/">Azure Free Accounts</a>, giving access to a number of popular Azure services at no cost. In addition, you’ll also get $200 in credit from Microsoft to use for the next 30 days.</li><li><a href="https://azure.microsoft.com/en-us/offers/ms-azr-0025p/">Microsoft Partner Network</a>, giving the Microsoft’s Action Pack program members $100 of Azure credits every month.</li><li><a href="https://startups.microsoft.com/en-us/">Microsoft for Startups</a>, giving $200 of Azure credits that can be used for the next 30 days. In addition, Microsoft made the technical enablement features free of cost and available to all startups.</li><li><a href="https://azure.microsoft.com/en-us/education/">Azure for Education</a>, giving educators $200 of Azure credits to use learning resources and developer tools in order to build cloud-based skills. This applies to all students, educators and institutions.</li><li><a href="https://www.microsoft.com/en-us/nonprofits/azure">Microsoft for Nonprofits</a>, where Microsoft offers donations and discounted products for nonprofit and nongovernmental organizations. Each year, approved organizations receive $3,500 in Azure credits which can be used for all Azure services created by Microsoft.</li></ol><p>These credits are spending caps, because they are reduced if they are used to purchase resources that are not offered for free, similar to gift cards from a retail store.</p><h3>Closing words</h3><p>In this blog article I described 7 ways how you can start cost optimization within Azure today. As icing on the cake, I have listed 7 options that Microsoft offers to reduce your costs even further, using Azure credits.</p><p>When embracing consumption-driven models, in which you pay according to use, cost control is very important. Instead of periodic investment and capacity plans for the replacement and delivery of infrastructure components, cost management within a cloud context should be thought of as a continuous process. Stop robbing yourself, and adopt the many tools that Microsoft provides to perform good cost management.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d53a11694d50" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/stop-robbing-yourself-7-ways-to-optimize-azure-costs-today-d53a11694d50">Stop robbing yourself: 7 ways to optimize Azure costs today</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloud rationalization in 5 steps: this is how you get the best out of the cloud!]]></title>
            <link>https://itnext.io/cloud-rationalization-in-5-steps-this-is-how-you-get-the-best-out-of-the-cloud-106047e5581e?source=rss-e4a376b31e60------2</link>
            <guid isPermaLink="false">https://medium.com/p/106047e5581e</guid>
            <category><![CDATA[innovation]]></category>
            <category><![CDATA[application]]></category>
            <category><![CDATA[digital-transformation]]></category>
            <category><![CDATA[cloud-strategy]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Rolf Schutten]]></dc:creator>
            <pubDate>Mon, 08 Aug 2022 22:03:39 GMT</pubDate>
            <atom:updated>2022-08-08T22:03:39.275Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4NNX15jhVw6YDhpDsRDnqw.jpeg" /></figure><p>In this blog I will roughly explain what cloud rationalization is, why it is an important part of digital transformations or cloud adoption, and I will help you get started with cloud rationalization.</p><h3>What is cloud rationalization</h3><p>Digital transformation is at the top of the agenda for many organizations, and cloud adoption is inextricably linked to this transformation. This has an impact on people, processes and technology. It’s all the more strange that many IT organizations are mainly focused on technology, without considering the intended business outcomes and motives for cloud adoption in the migration and modernization strategies. While cloud rationalization should of course take into account the capabilities and impossibilities of target platforms and compatibility, it is primarily a strategic consideration.</p><p>Cloud rationalization is an integral part of any digital transformation program and cloud adoption plan. Cloud adoption plans convert the aspirational goals of a cloud adoption strategy into an actionable plan. It is common that a cloud adoption strategy arises from a business case, consisting of financial and technical considerations, motives and expected outcomes against which justification of the projects is measured. Cloud rationalization is the process of evaluating assets to determine the best way to migrate or modernize each asset in the cloud, closely aligned with the cloud adoption strategy.</p><h4>The Rs of rationalization</h4><p>There are several definitions of rationalization options circulating on the internet. The five R’s of rationalization listed here describe the most common rationalization options and the options described by Microsoft:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*9vg1Y6KQc96-EB8iqJKPWg.jpeg" /><figcaption>The five Rs of rationalization by Rolf Schutten on <a href="https://schutten.cloud/">Schutten.Cloud</a></figcaption></figure><p>The other definitions that are used refer in most cases to the options mentioned above. Below is an overview of some rationalization options that basically mean the same thing, but use a different name:</p><ul><li><strong>Replatform:</strong> Replatform is in most cases the same as Rebuild.</li><li><strong>Repurchase:</strong> Repurchase is in most cases the same as Replace.</li><li><strong>Retain:</strong> Retain is the option where no migration of the application will be executed at this point. Reasons can be the lack of important information, being hindered by other factors, or the application fitting the current requirements.</li><li><strong>Retire:</strong> Retire is the option where an application is explicitly phased out.</li><li><strong>Reimagine:</strong> Reimagine is in most cases the same as Rearchitect.</li></ul><h4>The pitfalls of cloud rationalization</h4><p>It is impossible to make rationalization decisions before analyzing workloads and associated assets, and gaining deeper knowledge of the current digital estate. A rationalization decision is closely intertwined with the objectives and intended results. For example, the motivations for a data center exit and reduction in capital investment may fit well with a “Rehost” approach, but that approach in itself will not (directly) result in a reduction in vendor or technical complexity, cost savings, or increased business agility. More will be needed to achieve these goals. “Replace”, “Refactor” or “Rebuild” approaches may be more appropriate for some workloads.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Y1zO844szWp4w62w.png" /><figcaption><em>The stages of your migration and modernization journey by </em><a href="https://www.microsoft.com/"><em>Microsoft</em></a><em> on </em><a href="https://azure.microsoft.com/migration/migration-journey/#how-to-migrate"><em>How to Migrate and Modernize with the Cloud | Microsoft Azure</em></a><em> .</em></figcaption></figure><p>Another pitfall in cloud rationalization is the assumption that rationalization decisions must be made for the entire landscape before the migration or modernization can begin. Microsoft has as a rule of thumb that it generally takes 40–80 FTE hours per application to perform an analysis. This would mean that an application landscape of 50 applications results in 2000–4000 FTE hours, before the migration or modernization can take place. For example, I remember the <a href="https://zoek.officielebekendmakingen.nl/blg-828214.pdf">“Attack Program Information Facilities” of the Dutch National Police</a> . At the start of that program (in 2010), the landscape consisted of approximately 1200 applications. That would result in a workload of 48,000 to 96,000 working hours; this implies 24 to 48 full-time employees needed to complete the analysis within one year. A lot can change in that time. Therefore, it is recommended to take an incremental approach and perform cloud rationalization per application or workload.</p><h3>Cloud rationalization in 5 steps</h3><p>When it comes to a full analysis of your digital estate and cloud rationalization, it generally takes place in 5 steps: discovery, tracking, analysis, dependency mapping, and reporting. The following sections describe the input, processing, and output of these steps, and in some cases some tools that support these steps. There are many tools available on the internet from different providers. It is up to the person conducting the analysis to choose the right tooling. The analysis leads to an overview of the targets, challenges, resources and costs needed to make rationalization decisions.</p><h4>Prerequisites</h4><p>As mentioned earlier, motives and expected business outcomes lead to a digital transformation program and/or a cloud adoption plan. The chosen (cloud) strategy is a fundamental part of this. The <a href="https://docs.microsoft.com/azure/cloud-adoption-framework/strategy/">Microsoft Cloud Adoption Framework for Azure</a> describes detailed examples and antipatterns for building a business case and cloud strategy. It is preconditional that these steps have already been taken before rationalization decisions are made; simply because these decisions must be based on previous strategic choices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VYf9r2ZoagBx79Fk.png" /><figcaption><em>Lifecycle of the Cloud Adoption Framework by </em><a href="https://www.microsoft.com/"><em>Microsoft</em></a><em> on </em><a href="https://docs.microsoft.com/azure/cloud-adoption-framework/overview"><em>Microsoft Cloud Adoption Framework for Azure documentation — Cloud Adoption Framework | Microsoft Docs</em></a><em> .</em></figcaption></figure><h4>Step 1. Discovery</h4><p>It all starts with inventorying and measuring the digital estate and assets owned by the organization today. The digital estate consists of assets such as virtual machines (VMs), servers, applications, data, and so on. How the digital estate should be measured depends on the desired business outcomes.</p><ul><li>Organizations primarily looking to optimize costs, operational processes, agility, or other aspects of their operations focus on VMs, servers, and workloads.</li><li>Organizations that want to realize customer-centric transformations focus on applications, APIs, and transactional data that support customers.</li><li>Organizations focused on launching new products or services focus on silos of data across the organization to build a strong foundation of data.</li><li>Organizations that prioritize operational stability will need to include this as a focus area and measure business continuity, disaster recovery, and reliability of workloads and assets.</li></ul><p>Organizations generally complete all these transformations in parallel. The prioritization must be determined on the basis of the previously drawn up cloud strategy. Remember it is best practice to go for an iterative approach. This is why having a clear cloud strategy is a precondition for all cloud adoption efforts. When you understand the most important form of transformation, digital estate planning becomes much easier to manage. Typically some form of inventory can be found in CMDB databases or IT spreadsheets. If you do not have an inventory of your digital assets in your organization, then you need to build one either in an automated way or manually. Example of tools that can support your discovery efforts are <a href="https://aka.ms/AzureMigrate">Azure Migrate</a> , <a href="https://www.lansweeper.com/">Lansweeper</a> , <a href="https://www.solarwinds.com/server-application-monitor/use-cases/it-inventory-management">SolarWinds</a> , or other inventory and asset management software that is around on the market. An inventory is rarely complete in its first iteration. Therefore it’s recommended that the inventory is validated by stakeholders and power users.</p><p>When the inventory is complete, it provides an overview of the current digital estate and all assets owned by an organization. The form in which this is presented depends on the preference in which the inventory has taken place, but some examples are a CMDB database, IT spreadsheets and/or architecture diagrams.</p><h4>Step 2. Tracking</h4><p>The next step is to make a first selection of rationalization decisions based on the inventory. Some rationalization options can be crossed out immediately. By reducing the number of potential outcomes, it’s easier to reach an initial decision about the future state of an asset. When you reduce the options, you also reduce the number of questions asked of the business at this early stage. Aspects such as the makeup, compatibility and end-of-support of applications or workloads play a major role here. Some examples are for example:</p><ul><li>A monolithic application that is no longer supported by the application vendor is not likely to qualify for a “Rebuild” or “Rearchitect” option.</li><li>A workload on an outdated operating system for which security updates are no longer available and which is no longer supported will not be eligible for a “Rehost” option.</li><li>A business-critical application that has recently invested heavily in customization to support specific business models and processes, will not likely qualify for a “Replace” option.</li></ul><p>The preference is to reduce all rationalization options to two options that remain, which need to be further investigated and analyzed. For example, if the options are limited to rehost, or replace, the business needs to answer only one question during initial rationalization, which is whether to replace the asset. A powerful tool that can help the tracking and analyzing efforts of application rationalization is <a href="https://www.castsoftware.com/products/highlight">CAST Highlight</a> . There are other tools on the market that support these efforts, but <a href="https://www.castsoftware.com/products/highlight">CAST Highlight</a> is one of the more well-known and mature tools out there.</p><h4>Step 3. Analysis</h4><p>The <a href="https://schutten.cloud/post/cloud-rationalization-in-5-steps#the-rs-of-rationalization">quantitative and qualitative factors</a> should be further analyzed in this step, so that a sound rationalization decision can be taken. In addition to these factors, the use of the workload or application in question (forecast), optimization of costs, and license offers are also considered. The analysis should lead to the results of the remaining rationalization options, looking at the final state of these options:</p><ul><li>How does the choice relate to the motivations to drive cloud adoption and are the expected business outcomes being achieved?</li><li>What are the differences between the qualitative and quantitative factors?</li><li>What are the expected costs (the investment required to reach the final state and the expected total cost of ownership over a predefined period)?</li></ul><p>This analysis means that the expected usage needs to be viewed both quantitatively (based on actual metrics and collected data) and qualitatively investigated (by talking to business and application owners about seasonal patterns, expected usage, etc.). Various monitoring tools can be very helpful for this analysis. Also <a href="https://aka.ms/AzureMigrate">Azure Migrate</a> is a helpful tool to collect this quantitative data, which can immediately make recommendations for possible optimizations (all depending on the rationalization options).</p><p>To calculate the required investments you can use the <a href="https://azure.microsoft.com/pricing/tco/">Total Cost of Ownership (TCO) Calculator</a> , <a href="https://azure.microsoft.com/pricing/calculator/">Azure Pricing Calculator</a> , or third party tools such as <a href="https://www.thecloudlab.com/">The Cloudlab Smart Calculator</a> .</p><h4>Step 4. Dependency mapping</h4><p>The next step involves providing insight into dependencies and mitigating any issues. These dependencies can exist in several areas, such as:</p><ul><li>Multi-tier applications, where a solution consists of a front-tier (web), middle-tier (processing) and backend (database). Depending on the rationalization options, a particular migration or implementation method and sequence may be preconditional or more logical.</li><li>System integrations, where applications or workloads integrate with each other to create one or more business processes.</li><li>Other dependencies, e.g. in connectivity.</li></ul><p>It is highly dependent on the relevant application or workload where any dependencies lie. The previous inventories, analyzes and conversations with business and application owners will have to make these transparent.</p><p>Mitigating actions can be, for example, a sequence of migration and modernization actions, the joint migration and/or modernization, or a two-stage approach in which a Rehost is performed first before modernization is carried out.</p><h4>Step 5. Reporting</h4><p>Finally, it is important to compile good and reliable reports and present them to the decision-making body for cloud rationalization. If multiple scenarios are possible for an application or workload, these must be placed next to each other. The advantages and disadvantages, expected outcomes and mutual differences of the remaining options will have to be listed, so that a decision can be made.</p><p>All of the aforementioned tools have contributed to this point, and each of these tools provides information that is relevant to the reporting. To support a <a href="https://prince2.wiki/management-products/benefits-management-approach/">benefits review plan</a> , tools like <a href="https://docs.microsoft.com/azure/cloud-adoption-framework/digital-estate/app-dynamics">AppDynamics</a> are a godsend. For a large digital estate, it is recommended to use a similar support tool, so that control and insight remain on all different applications and workloads. It is probably less relevant for the smaller digital estates.</p><h3>Closing words</h3><p>This blog article has explained what cloud rationalization is, why it is important, and in which steps you come to rationalization decisions, so that you can get the most out of the cloud. This is just one way to approach cloud rationalization, but there is no single road that leads to Rome, and no cloud adoption journey is the same. It is therefore important to delve into the possibilities and impossibilities of the cloud, to define what the intended results and expected outcomes are, and what implications possible choices may have. <a href="https://docs.microsoft.com/azure/cloud-adoption-framework/digital-estate/5-rs-of-rationalization">Microsoft</a> , <a href="https://aws.amazon.com/blogs/enterprise-strategy/new-possibilities-seven-strategies-to-accelerate-your-application-migration-to-aws">Amazon</a> and <a href="https://cloud.google.com/blog/products/application-development/application-rationalization-what-why-and-how">Google</a> have each written their own guidelines and documentation on this topic, which are definitely worth a closer look if you want to get started with cloud rationalization.</p><p>Defining a cloud strategy, drawing up a cloud adoption plan, choosing the right rationalization options, and migrating, modernizing and transforming your digital estate is not easy. There are countless examples where the digital transformation or cloud adoption has not been successful or has not delivered the expected business outcomes. In many cases, organizations would therefore be wise to hire a partner who will support and guide them in this.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=106047e5581e" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/cloud-rationalization-in-5-steps-this-is-how-you-get-the-best-out-of-the-cloud-106047e5581e">Cloud rationalization in 5 steps: this is how you get the best out of the cloud!</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hitting the Apex: Onboard a root or apex domain and a self-managed SSL certificate]]></title>
            <link>https://itnext.io/hitting-the-apex-onboard-a-root-or-apex-domain-and-a-self-managed-ssl-certificate-e1a6cf5d90f9?source=rss-e4a376b31e60------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1a6cf5d90f9</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Rolf Schutten]]></dc:creator>
            <pubDate>Fri, 15 Jul 2022 08:00:17 GMT</pubDate>
            <atom:updated>2022-07-15T08:00:17.495Z</atom:updated>
            <content:encoded><![CDATA[<h3>Hitting the Apex: Onboard a root or apex domain and add a self-managed SSL certificate</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I6ewoXEXy6rMRdNHKKzqmQ.jpeg" /></figure><p>In this article, we’ll cover how you onboard a root or apex domain to your CDN endpoint, and add a self-managed SSL certificate. We’ll also cover how to enforce HTTPS traffic on your CDN endpoint.</p><p>If you are reading this, chances are you want to create your own static website, want to know more about static site generators, how to host your static website using Azure services, or how you can automate the full integration of your web code and the deployment of your site build. Either way, the series of blog posts below might be something for you!</p><p>This article is written as a successor to a series that includes:</p><ul><li><a href="https://itnext.io/the-only-guide-you-need-for-a-static-website-in-azure-part-1-create-a-static-website-da00ddc85f2d">The only guide you need for a static website in Azure — Part 1: Create a static website</a>. In this article, I cover what a static website is, what there is to choose from, and how to create a (local) static website.</li><li><a href="https://itnext.io/the-only-guide-you-need-for-a-static-website-in-azure-part-2-host-your-static-site-in-azure-9114b7069db2">The only guide you need for a static website in Azure — Part 2: Host your site using Azure Blob Storage</a>. In this article, I cover how you can host your static website in Azure Blob Storage, what there is to choose from, and some basics around Content Delivery Network (CDN).</li><li><a href="https://itnext.io/the-only-guide-you-need-for-a-static-website-in-azure-part-3-automate-using-azure-devops-e53aa65c1fba">The only guide you need for a static website in Azure — Part 3: Automate using Azure DevOps Pipelines</a>. In this article, I cover what the Azure DevOps services are, and how to automate the build and deployment for your static website to Azure storage.</li></ul><p>Let’s get started.</p><h3>What is Azure DNS?</h3><p>Azure DNS is a hosting service for DNS domains that provides name resolution by using Microsoft Azure infrastructure. By hosting your domains in Azure, you can manage your DNS records by using the same credentials, APIs, tools, and billing as your other Azure services. You can’t use Azure DNS to buy a domain name.</p><p>If you want to learn more about Azure DNS, check out <a href="https://docs.microsoft.com/en-us/azure/dns/">the official documentation from Microsoft</a>.</p><h3>What is Azure Key Vault?</h3><p>Azure Key Vault is a cloud service for securely storing and accessing secrets, API keys, passwords, certificates, and cryptographic keys, so you can keep them private.</p><p>If you want to learn more about Azure Key Vault, check out <a href="https://docs.microsoft.com/en-us/azure/key-vault/general/">the official documentation from Microsoft</a>.</p><h3>Prerequisites</h3><p>To start onboarding your apex or root domain to your CDN endpoint and add a self-managed SSL certificate, make sure you have met the following prerequisites.</p><h4>Azure subscription</h4><p>For this guide you need an Azure subscription, with <a href="https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles">a native user account that has the rights</a> to create and edit an Azure Storage Account, and upload the static website build to this account.</p><h4>Azure-hosted website</h4><p>For this guide you need an Azure hosted website. This guide takes a static website from Azure Blob storage as the starting point. You also need a CDN profile with an endpoint to this static website. If you don’t have these things ready yet, create your static website build by following the <a href="https://itnext.io/the-only-guide-you-need-for-a-static-website-in-azure-part-1-create-a-static-website-da00ddc85f2d">first</a> and <a href="https://itnext.io/the-only-guide-you-need-for-a-static-website-in-azure-part-2-host-your-static-site-in-azure-9114b7069db2">second</a> part of my <em>“The only guide you need for a static website in Azure”</em> blog series.</p><h4>Self-managed SSL certificate</h4><p>You will need an SSL certificate for this guide if you plan to follow the full guide and bring in your own SSL certificate. It is not possible to choose for an Azure-managed certificate for an apex or root domain. You can purchase an SSL certificate from the most common domain providers, such as <a href="https://www.cloudflare.com/ssl/dedicated-certificates/">Cloudflare</a> , <a href="https://www.namecheap.com/security/ssl-certificates/">Namecheap</a> , or local providers like <a href="https://www.transip.nl/ssl-certificaten/">TransIP</a> from the Netherlands.</p><h4>Azure CLI</h4><p>In this guide you’ll use the Azure Cloud Shell for Azure CLI. However, if you prefer to work from your local workstation you can <a href="https://docs.microsoft.com/en-us/cli/azure/install-azure-cli">install the Azure CLI locally</a>.</p><h3>Onboarding your root or apex domain</h3><p>An apex is the “root” level of your domain, for example <em>schutten.cloud</em>. The domain apex is the “root” of the domain name hierarchy. Each subdomain of this (eg. <em>www.schutten.cloud</em>) is not a domain apex, but a subdomain of <em>schutten.cloud</em>.<br>Let’s onboard the apex domain to an Azure CDN endpoint.</p><h4>Create DNS zone</h4><p>Open the <a href="https://shell.azure.com/">Azure Cloud Shell</a>, either by using the link or by clicking on its icon once you are logged in to the <a href="https://portal.azure.com/">Azure Portal</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pL1fDz51_WwrhM2R.png" /><figcaption><em>Image by Rolf Schutten on </em><a href="https://www.schutten.cloud/"><em>Schutten.cloud</em></a></figcaption></figure><p>If you are using the Azure CLI locally, you’ll first need to sign in using the az login command to using any CLI commands.</p><p>Now create a resource group that will contain the DNS zone. In the example below, I create a resource group named <em>rg-p-weu-schuttencloud</em> in the <em>west-europe</em> region. Use the example to create your own resource group by replacing the values with your own:</p><pre>az group create \<br>    --name rg-p-weu-schuttencloud \<br>    --location westeurope</pre><p>Now create a DNS zone. In the example below, I create a DNS zone named <em>schutten.cloud</em> in the resource group <em>rg-p-weu-schuttencloud</em>. Use the example to create your own DNS zone by replacing the values with your own:</p><pre>az network dns zone create \<br>    --name schutten.cloud \ <br>    --resource-group rg-p-weu-schuttencloud</pre><h4>Create an alias record for zone apex</h4><p>Now create a recordset in the apex of the zone. In the example below I create a recordset in the apex of the <em>schutten.cloud</em> zone, with a TTL (time-to-live) of 60 seconds and my CDN endpoint as the target resource. Use the example to create your own DNS zone by replacing the values with your own:</p><pre>az network dns record-set a create \<br>    --name &quot;@&quot; \<br>    --resource-group rg-p-weu-schuttencloud \<br>    --zone-name schutten.cloud \<br>    --target-resource YourCDNEndpoint \<br>    --ttl 60</pre><p>This will create a zone apex record pointing to your CDN resource, which uses a CNAME record-mapping <em>cdnverify</em> for onboarding the domain on your CDN profile. In my case <em>cdnverify.schuttencloud.com</em>.</p><h4>Delegate the domain</h4><p>The next thing to do is to update the NS (name server) records for your domain with your domain registrar.</p><p>Before you can delegate your DNS zone to Azure DNS, you need to know the name servers for your zone. In the example below I retrieve the required information for the earlier DNS zone <em>schutten.cloud</em>. Use the example to retrieve your own DNS zone information by replacing the values with your own:</p><pre>az network dns zone show \<br>    --resource-group rg-p-weu-schuttencloud \<br>    --name schutten.cloud</pre><p>The answer returned should look like the image below, where the four lines after <em>“nameServers”</em> are the ones we’ll need in the next step. Write these down.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4hmYvLXymAfQo5jXT9wnuA.png" /><figcaption><em>Image by Rolf Schutten on </em><a href="https://www.schutten.cloud/"><em>Schutten.cloud</em></a></figcaption></figure><p>As each registrar has its own DNS management tools to change the name server records for a domain, it is not possible to include this in this manual. Your domain registrar probably has documentation available for updating the NS records. If not, please contact your domain registrar.</p><p>To verify that the NS records are updated correctly, you can use the nslookup command. Use the example below and replace the values with your own:</p><p>nslookup -type=SOA schutten.cloud</p><p>Your response should look similar to the following nslookup output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*PNJCJY4uJPksVWzkKijNtw.png" /><figcaption><em>Image by Rolf Schutten on </em><a href="https://www.schutten.cloud/"><em>Schutten.cloud</em></a></figcaption></figure><h4>Onboard the custom domain on your CDN</h4><p>Now that we have registered our apex domain, we can add it to the CDN endpoint. In the example below I add the domain <em>schutten.cloud</em> to my CDN endpoint <em>ep-cdn-schuttencloud</em>, which is part of the CDN profile <em>cdn-schuttencloud</em>. Use the example to add your own custom domain to your CDN endpoint by replacing the values with your own:</p><pre>az cdn custom-domain create \<br>    --name schuttenclouddomain \<br>    --resource-group rg-p-weu-schuttencloud \<br>    --hostname schutten.cloud \<br>    --endpoint-name ep-cdn-schuttencloud \<br>    --profile-name cdn-schuttencloud</pre><p>Azure verifies that the CNAME record exists for the custom domain name you entered. If the CNAME is correct, your custom domain will be validated.</p><p>You have now added your apex/root domain to your CDN endpoint and should be able to reach your static website hosted in your Azure (Blob) storage account on this domain in your web browser.</p><h3>Using a self-managed SSL certificate</h3><p>In <a href="https://itnext.io/the-only-guide-you-need-for-a-static-website-in-azure-part-2-host-your-static-site-in-azure-9114b7069db2">this blog</a> we’ve created a CDN endpoint with a CDN managed certificate for the <a href="https://schutten.cloud/"><em>www.schutten.cloud</em></a> subdomain. Unfortunately, it is not possible to use CDN managed certificates for apex/root domains. You are therefore obliged to submit your own certificate. Azure Key Vault is the obvious choice to store the certificate. Let’s get started.</p><h4>Create an Azure Key Vault</h4><p>Now create an Azure Key Vault that will store your certificate. In the example below I am creating an Azure Key Vault within the same resource group as the Azure DNS Zone, which is <em>rg-p-weu-schuttencloud</em>, again in the w<em>est-europe </em>region. Use the example below to create your key vault by replacing the values with your own.</p><pre>az keyvault create \<br>    --name &quot;kv-p-weu-schuttencloud&quot; \<br>    --resource-group &quot;rg-p-weu-schuttencloud&quot; \<br>    --location westeurope</pre><h4>Register the service principal for CDN/Front Door</h4><p>To enable the CDN endpoint to access the certificate in the key vault, we register a service principal. In the example below, I register a service principal in Azure Active Directory as an app. Execute this command:</p><pre>az ad sp create --id 205478c0-bd83-4e1b-a9d6-db63a3e1e1c8</pre><p>After this we have to give the service principal access to be able to request the certificate. In the example below I give <em>’get’</em> permissions to the service principal on the secrets and certificates in the key vault. Use the example below and replace the values with your own:</p><pre>az keyvault set-policy \<br>    --name &quot;kv-p-weu-schuttencloud&quot; \<br>    --certificate-permissions get \<br>    --secret-permissions get \<br>    --application-id 205478c0-bd83-4e1b-a9d6-db63a3e1e1c8</pre><p>The service principal can now access this key vault and the certificates it contains.</p><h4>Prepare your certificate (optional)</h4><p>Azure Key Vault only accepts <a href="https://en.wikipedia.org/wiki/PKCS_12">PKCS12</a> and <a href="https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail">PEM</a> certificates, but sometimes SSL certificate vendors provide the certificate in a different format. In my case, my supplier provided the certificates in <a href="https://en.wikipedia.org/wiki/X.509#Certificate_filename_extensions">CRT format</a> . With openssl we can solve this problem and create a supported PFX certificate from the .CRT certificates. You can download <a href="https://www.openssl.org/">OpenSSL from their website</a> , or by executing the choco install openssl command, if you&#39;re using Chocolatey like myself.</p><p>Run the following command in the folder of your downloaded certificates, where the key file should be just a text file with your private in it, which you received from your SSL certificate provider:</p><pre>openssl pkcs12 -export -out schutten.cloud.pfx -inkey certificate.key -in certificate.crt -in rootca.crt</pre><p>You now have a certificate which is ready to be imported in the Azure Key Vault.</p><h4>Import certificate to Azure Key Vault</h4><p>Now import your certificate to the Azure Key Vault. In the example below I’m naming the certificate <em>SchuttenCloud</em> and importing the <em>certificate.pfx</em> PKCS12-file to the earlier created key vault. Use the example below to import your own certificate to your key vault by replacing the values with your own.</p><pre>az keyvault certificate import \<br>    --name &quot;SchuttenCloud&quot; \<br>    --file &quot;certificate.pfx&quot; \<br>    --vault-name &quot;kv-p-weu-schuttencloud&quot;</pre><h4>Enable HTTPS on CDN endpoint</h4><p>Now enable HTTPS on the custom domain for Azure CDN, by using the example below and replacing the values with your own:</p><pre>az cdn custom-domain enable-https \<br>    --name schuttenclouddomain \<br>    --resource-group rg-p-weu-schuttencloud \<br>    --endpoint-name ep-cdn-schuttencloud \<br>    --profile-name cdn-schuttencloud \<br>    --min-tls-version 1.2 \<br>    --user-cert-grou-name rg-p-weu-schuttencloud \<br>    --user-cert-secret-name SchuttenCloud \<br>    --user-cert-vault-name kv-p-weu-schuttencloud</pre><p>You have now enabled HTTPS on your your CDN endpoint and should be able to reach your static website hosted in your Azure (Blob) storage account on this domain in your web browser trough HTTPS.</p><h3>Redirecting HTTP requests to HTTPS</h3><p>Obviously we want to redirect all HTTP requests to HTTPS. If you don&#39;t know why this is important, I suggest you read <a href="https://itnext.io/monitor-ssl-tls-certificates-with-azure-application-insights-4f55c792786b">this blog article</a>.</p><p>In the example below, a CDN engine rule is added to forward all traffic coming in via HTTP to the HTTPS protocol. More information about the parameters and fields within a CDN engine rule can be found on Microsoft’s <a href="https://docs.microsoft.com/en-us/azure/cdn/cdn-standard-rules-engine-match-conditions">official documentation</a> site. Use the example below to create the rule yourself, by replacing the values with your own:</p><pre>az cdn endpoint rule add \<br>    --name ep-cdn-schuttencloud \<br>    --resource-group group rg-p-weu-schuttencloud \<br>    --profile-name cdn-schuttencloud \ <br>    --order 1 \<br>    --rule-name &quot;EnforceHTTPS&quot; \<br>    --match-variable RequestScheme \<br>    --operator Equal \<br>    --match-values HTTP \<br>    --action-name &quot;UrlRedirect&quot; \<br>    --redirect-protocol Https \<br>    --redirect-type Moved</pre><p>All traffic coming in via an HTTP request is now redirected to HTTPS.</p><h3>Conclusion</h3><p>In this article, you have read what Azure DNS is, what Azure Key Vault is, how you onboard your apex or root domain to your CDN endpoint, how to use a self-managed SSL certificate being stored in an Azure Key Vault, and how to enforce HTTPS traffic on your CDN endpoint. Don’t forget that it is important to monitor your SSL certificate. Azure won’t notify you out-of-the-box when the certificate expires, neither will they automatically renew it, as they do for you with an Azure-managed certificate. In <a href="https://itnext.io/monitor-ssl-tls-certificates-with-azure-application-insights-4f55c792786b">this blog article</a> I explain how you can monitor an SSL certificate, using Azure Application Insights.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1a6cf5d90f9" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/hitting-the-apex-onboard-a-root-or-apex-domain-and-a-self-managed-ssl-certificate-e1a6cf5d90f9">Hitting the Apex: Onboard a root or apex domain and a self-managed SSL certificate</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Chaos to Optimum with Azure Chaos Studio]]></title>
            <link>https://itnext.io/from-chaos-to-optimum-with-azure-chaos-studio-8bc0cae20a35?source=rss-e4a376b31e60------2</link>
            <guid isPermaLink="false">https://medium.com/p/8bc0cae20a35</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[chaos-engineering]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Rolf Schutten]]></dc:creator>
            <pubDate>Sat, 09 Jul 2022 12:54:23 GMT</pubDate>
            <atom:updated>2022-07-09T12:54:23.322Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fFuP4i-qWxyg3lggaq5qSg.jpeg" /></figure><p>In this article, I’ll explain what Azure Chaos Studio and chaos engineering is, how Azure Chaos Studio can be used to test and improve application resiliency, and share my thoughts on my first hands-on experiences.</p><h3>About Azure Chaos Studio</h3><p>At <a href="https://myignite.microsoft.com/">Microsoft Ignite</a> on the 2nd of November 2021, Microsoft has launched Azure Chaos Studio, which has been in <a href="https://techcommunity.microsoft.com/t5/azure-governance-and-management/announcing-the-public-preview-of-azure-chaos-studio/ba-p/2893050">Public Preview</a> since. Azure Chaos Studio is an Azure service that helps you to test and improve application resiliency for Azure-based solutions.</p><h4>What is chaos engineering?</h4><p>Chaos engineering is a methodology that helps developers attain consistent reliability by hardening services against failures in production. <a href="https://www.netflix.com/">Netflix </a>was one of the first companies to introduce the concept of chaos engineering, using the proprietary and well-known tool <a href="https://netflix.github.io/chaosmonkey/">Chaos Monkey</a>. The tool intentionally and randomly triggers all kinds of faults. The idea behind this is that the infrastructure has such a robustness level that it is prepared for these real-world scenarios. The goal is to observe, monitor, respond to, and improve your system’s reliability under adverse circumstances.</p><p>Another way to think about chaos engineering is that it’s about embracing the inherent chaos in complex systems, and through experimentation, growing the confidence in your solution’s ability to handle the chaos.</p><h4>What is Azure Chaos Studio?</h4><p><a href="https://azure.microsoft.com/services/chaos-studio">Azure Chaos Studio</a> is a managed service that uses chaos engineering to help you measure, understand, and improve your cloud application and service resilience. It runs experiments which can simulate faults or cause incidents, such as a region going down or an application failure causing 100% CPU usage on a virtual machine.</p><p>Resilience is the capability of a system to handle and recover from disruptions. Application disruptions can cause errors and failures that can adversely affect your business and mission. Whether you’re developing, migrating, or operating Azure applications, it’s important to validate and improve your application’s resilience.</p><p>Within Azure Chaos Studio there are three ways to set up Azure Chaos Studio experiments:</p><ul><li>Using service-direct fault, which runs directly against an Azure resource without any need for instrumentation.</li><li>Using agent-based fault, which requires the setup and installation of the chaos agent.</li><li>Using <a href="https://chaos-mesh.org/">Chaos Mesh</a>, a free, open-source chaos engineering platform for Kubernetes to inject faults into an AKS cluster. Chaos Mesh faults are service-direct faults that require Chaos Mesh to be installed on the AKS cluster.</li></ul><h3>Chaos in practice</h3><p>On the <a href="https://docs.microsoft.com/en-us/azure/chaos-studio/">documentation page of Azure Chaos Studio</a>, Microsoft has placed three how-to guides to get started with Azure Chaos Studio, for <a href="https://docs.microsoft.com/en-us/azure/chaos-studio/chaos-studio-tutorial-service-direct-portal">service-direct</a>, <a href="https://docs.microsoft.com/en-us/azure/chaos-studio/chaos-studio-tutorial-agent-based-portal">agent-based</a> and <a href="https://docs.microsoft.com/en-us/azure/chaos-studio/chaos-studio-tutorial-aks-portal">AKS Chaos Mesh</a> faults. In the following scenarios I use the agent-based and service-direct faults.</p><p>The lab environment used consists of two Linux (Ubuntu 20.04) virtual machines with Apache web service installed, and are behind a load balancer. They are deployed on a virtual network with a subnet and an associated network security group (to allow HTTP traffic from the Internet, and to allow SSH traffic to the virtual machines from my home network).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3iPixriosMUuqhjALUxJ0A.png" /><figcaption>Picture by Rolf Schutten</figcaption></figure><p>The published page on the virtual machines differ slightly from each other, so that we can see on the respective landing page, which virtual machine is currently responsible for publishing the web page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-wK3owQeKZuvzvk1cmIkAQ.png" /><figcaption>Picture by Rolf Schutten</figcaption></figure><h4>Chaos scenario #1. Unexpected CPU spike</h4><p>In this scenario, we cause an unexpected CPU spike on one of the virtual machines, to test whether the load balancer settings are optimal and reduce downtime. The Chaos Studio agent for Linux requires stress-ng, an open-source application that can cause various stress events on a virtual machine. You can install stress-ng by <a href="https://docs.microsoft.com/en-us/azure/virtual-machines/ssh-keys-portal">connecting to your Linux virtual machine</a> and running the appropriate installation command for your package manager, for example:</p><pre>sudo apt-get update &amp;&amp; sudo apt-get -y install unzip &amp;&amp; sudo apt-get -y install stress-ng</pre><p>The Azure Chaos Studio experiment looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*2gWznKiSPx4haGbxdh08BQ.png" /><figcaption>Picture by Rolf Schutten</figcaption></figure><p>After starting the experiment, the utilization of the CPU increases immediately, stress-ng is clearly doing its job.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ldfGaXjmuFPNxv6poGRlkw.png" /><figcaption>Picture by Rolf Schutten</figcaption></figure><p>When accessing the public IP address of the load balancer, placed in front of the virtual machines publishing the web pages, both web pages (running on different virtual machines) still show up while running the experiment. This is as expected, because the targeted virtual machine is still running and active, and in the lab environment the web pages are accessed via HTTP. HTTP health probes have therefore been set up in the load balancer. With HTTP health probes it’s not possible to balance load based on the CPU utilization of the virtual machines. With HTTPS health probes you can, by adding a customized script to the health probe. In a real world scenario, if load needs to be balanced based on CPU utilization of the underlying virtual machines, an HTTPS health probe must be set up with a custom script.</p><h4>Chaos scenario #2. Unexpected datacenter or zone failure</h4><p>In this scenario, we cause an unexpected outage of an Azure zone, to test whether placing the VMs in different availability zones does its job and reduce outages. Virtual machine 1 is in availability zone 1, virtual machine 2 is in availability zone 2. The other resources are regional services.</p><p>The Azure Chaos Studio experiment looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*NdogJQh0KBh-Ggg4UQ_TFA.png" /><figcaption>Picture by Rolf Schutten</figcaption></figure><p>After initiating the experiment, the target virtual machine immediately enters a stopped state. When accessing the public IP address of the load balancer, placed in front of the virtual machines publishing the web pages, only one web page (of the non-targeted virtual machines) shows up while running the experiment. This is as expected, because the load balancer routes us to the non-targeted virtual machine, as the configured health probe is giving a negative signal to the load balancer for the target virtual machine.</p><p>As soon as the experiment has ended, the target virtual machine will (automatically) be restarted properly and its web page can also be accessed again.</p><h3>Closing thoughts</h3><p>When I think of chaos engineering I think of terminating scenario’s in (pre-)production, to validate ensure that engineers implement their services to be resilient to instance failures. This is exactly what Azure Chaos Studio does. Using Azure Chaos Studio is safe and somewhat predictable: your experiment is a workflow, where you determine what the trigger is (and when), that could be part of your build and release pipelines for instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZdIgNeps8IhouqUuhICUJA.jpeg" /><figcaption>Picture by <a href="https://azure.microsoft.com/en-us/services/chaos-studio/">Microsoft</a></figcaption></figure><p>Microsoft has built a nice <a href="https://docs.microsoft.com/en-us/azure/chaos-studio/chaos-studio-fault-library">library of standard faults and actions</a>, that will go a long way to help most professionals evaluate the resilience of their infrastructure. That is where the strength of Azure Chaos Studio lies: evaluating and proving against specific scenarios, at a planned time. That can be very valuable for managed service providers (MSPs) and independent software vendors (ISVs). And not unimportant, the integration possibilities in CI/CD pipelines are very promising.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8bc0cae20a35" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/from-chaos-to-optimum-with-azure-chaos-studio-8bc0cae20a35">From Chaos to Optimum with Azure Chaos Studio</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Monitor SSL/TLS certificates with Azure Application Insights]]></title>
            <link>https://itnext.io/monitor-ssl-tls-certificates-with-azure-application-insights-4f55c792786b?source=rss-e4a376b31e60------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f55c792786b</guid>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[ssl-certificate]]></category>
            <category><![CDATA[ssl]]></category>
            <dc:creator><![CDATA[Rolf Schutten]]></dc:creator>
            <pubDate>Sat, 02 Jul 2022 13:29:31 GMT</pubDate>
            <atom:updated>2022-07-02T13:29:31.311Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nal97vHVARHhgwuAszuUPg.jpeg" /></figure><p>In this article, I’ll explain what SSL/TLS encryption is, how SSL certificates are used to establish SSL/TLS encryption, and how to monitor for expiring SSL certificates using Azure Application Insights.</p><h3>What is SSL/TLS?</h3><p>Secure Sockets Layer (SSL), the predecessor of Transport Layer Security (TLS), is an encryption-based Internet security protocol, which ensures privacy, authentication and also the integrity of information in Internet communications. Encryption is a way to conceal information by altering it, so it appears as random data. Encryption is crucial for security on the Internet.</p><p>TLS was created in 1999 and is the up-to-date encryption protocol used today. SSL, which has not been updated since 1996, has some known vulnerabilities, and is considered insecure and deprecated. Today, the terms “SSL encryption” and “TLS encryption” are used interchangeably, but in most cases refers to TLS.</p><p>Any website with an HTTPS web address uses SSL/TLS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/0*hlHe2yNPvgxRAR1C.jpg" /><figcaption><em>Picture by Rolf Schutten</em></figcaption></figure><h4>What are SSL certificates?</h4><p>An SSL certificate is a file hosted in a website’s server displaying important information for verifying the owner of a website, and encrypting web traffic with SSL/TLS. It includes a public key, the information about the issuer of the certificate, and the associated (sub)domains. Clients attempting to communicate with the website’s server will reference this file to get the public key and verify the server’s identity. The private key is kept and used only on the server side.</p><p>The public and private keys used for SSL are essentially long strings of characters used for encrypting and decrypting data. Data encrypted with the public key can only be decrypted with the private key, and vice versa.</p><p>SSL certificates are needed to keep user data secure, verify the ownership of the website (preventing attackers from creating fake versions of the site), and gain user trust. Many users won’t notice the difference between an http:// and an https:// web address, but modern browsers have made more noticable ways to prove websites are secure. An example is given below, where the lock shows the website is secure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/0*Nh6QDbMw-RvjAOpT.jpg" /><figcaption><em>Picture by Rolf Schutten</em></figcaption></figure><h4>How does SSL/TLS encryption work?</h4><p>Enabling secure communication begins with the “handshake”, letting the client (such as web browsers) and server open a secure connection. During the handshake the client and server use the public and private keys to exchange randomly generated data, which is used to create new (session) keys for encryption.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/0*PMzmcvZyJaH74_iD.jpg" /><figcaption><em>Picture by Rolf Schutten</em></figcaption></figure><p>After the handshake, both sides use the same session keys for encryption. Once session keys are in use, the public and private keys are not used anymore. These session keys are temporary, and are not used again once the session is terminated. Whenever a new session needs to be established, new session keys will be generated for that session.</p><h3>How to monitor for expiring SSL certificates using Azure Application Insights?</h3><h4>Prerequisites</h4><p>To start monitoring for expiring SSL certificates using Azure Application Insights, make sure you have met the following prerequisites.</p><p><strong>SSL certificate to monitor</strong></p><p>For starters, you need an application with an SSL certificate to monitor. If you don’t have your own application, you can use any public website with an HTTPS web address.</p><p><strong>Azure subscription</strong></p><p>For this guide you need an Azure subscription, with <a href="https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles">a native user account that has the rights</a> to create and edit a fresh instance of Azure Application Insights, and configure tests in Application Insights.</p><p><strong>Azure CLI</strong></p><p>In this guide you’ll use the Azure Cloud Shell for Azure CLI. However, if you prefer to work from your local workstation you can <a href="https://docs.microsoft.com/en-us/cli/azure/install-azure-cli">install the Azure CLI locally</a>.</p><h4>Creating Application Insights instance</h4><p>Open the <a href="https://shell.azure.com/">Azure Cloud Shell</a>, either by using the link or by clicking on its icon once you are logged in to the <a href="https://portal.azure.com/">Azure Portal</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1l5qPZaJmmZI1BLc.png" /><figcaption><em>Picture by Rolf Schutten</em></figcaption></figure><p>If you are using the Azure CLI locally, you’ll first need to sign in using the az login command to use any CLI commands.</p><h4>Create a resource group</h4><p>Now create the resource group by using the following command:</p><pre>az group create \<br>    --name &lt;Name&gt; \<br>    --location &lt;Region&gt;</pre><p>You’ll change the parameters according to your needs. In my case I choose the Western Europe region and I’m naming my resource group “rg-schuttencloud-ssl”.</p><pre>az group create \<br>    --name rg-schuttencloud-ssl \<br>    --location westeurope</pre><h4>Install the Azure Application Insights extension</h4><p>Azure CLI offers the capability to load extensions. Extensions for Azure CLI are characterized as Python wheels that aren’t shipped as part of the CLI, but run as CLI commands. The Azure Application Insights extension is <strong>not</strong> loaded by default, hence we need to install it. You install the extension by running the following command:</p><pre>az extension add \<br>    --name application-insights</pre><blockquote><em>Notice how Azure CLI returns a message that this extension is still in preview. You can learn more about Microsoft Azure Previews and its Terms of Use </em><a href="https://azure.microsoft.com/en-us/support/legal/preview-supplemental-terms/"><em>here</em></a><em>.</em></blockquote><h4>Create an Azure Application Insights instance</h4><p>You can now deploy Azure Application Insights resources and have a resource group to deploy them to. Create an Azure Applications Insights instance by using the following command:</p><pre>az monitor app-insights component create \<br>    --app &lt;AppName&gt; \<br>    --location &lt;Region&gt; \<br>    --resource-group &lt;ResourceGroupName&gt; \<br>    --application-type &lt;ApplicationType&gt; \<br>    --kind &lt;KindOfApplication&gt;</pre><p>You’ll change the parameters according to your needs. In my case I choose the Western Europe region and I’m naming my application “app-sslmonitor”. I’m placing the resource in the earlier created resource group “rg-schuttencloud-ssl”. The type of application being monitored is “web” and the same goes for the kind of application that this component is referring to.</p><pre>az monitor app-insights component create \<br>    --app app-sslmonitor \<br>    --location westeurope \<br>    --resource-group rg-schuttencloud-ssl \<br>    --application-type web \<br>    --kind web</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0bqVkV4gE7NAwhXoruGF-g.jpeg" /><figcaption><em>Picture by Rolf Schutten</em></figcaption></figure><p>Now your Application Insights instance is deployed, we can go forward configuring our test.</p><h3>Configuring the Application Insights test</h3><p>Although the functionality we are going to use is in a preview state, it is a nice addition to the ping and load tests that Application Insights originally offered. To create the test, we go through the following steps (with reference to the image below):</p><p>1 — Within the Application Insights instance we just deployed, go to <strong>Investigate &gt; Availability</strong>.</p><p>2 — Create a new standard test by clicking on <strong>Add Standard (preview) test</strong> at the top.</p><p>3 — The configuration window for a new default test opens. For testing purposes I have filled in the following parameters, but adjust these to your needs:</p><ul><li>Test name: test-schuttencloud-ssl.</li><li>URL: https://schutten.cloud, which is the application/website I will be monitoring for an expiring SSL certificate.</li><li>Parse dependent requests: Unchecked, as I don’t want to parse anything beyond just the SSL certificate validity.</li><li>Enable retries for availability test failures: Unchecked. If checked, the test will retry within 20 seconds if the test fails, and will record a failure only if it fails three times in a row.</li><li>Enable SSL certificate validity: Checked, as it’s the main purpose of configuring this test. Obviously, this option only works for URLs starting with <a href="https://./">https://.</a></li><li>Proactive lifetime check: 365 days, for testing purposes. In a production environment you’ll want to adjust this to your needs, for example to 30 days. You can choose from 1, 7, 30, 90, or 365 days.</li><li>Test frequency: 15 minutes, as it’s the longest interval to choose from.</li><li>Test locations: West- and North-Europe. However, Microsoft recommends at least 5 test locations.</li></ul><p>4 — Click on <strong>Create</strong>. The test is now created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bfK-32Q3QbvEHsrl6pfPaQ.jpeg" /><figcaption><em>Picture by Rolf Schutten</em></figcaption></figure><h3>Results of the Application Insights test</h3><p>The results of the test are displayed on the alerts page. The fastest way to display these is to click on the three dots and go to <strong>Open Rules (Alerts) page</strong>. In my case, an error has (expectedly) been issued, because my SSL certificate is not valid for 365 days or longer. From here you could add notifications and action groups to the alert rule.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*VGm1Ic4FVq3uLOrkFycFRA.jpeg" /><figcaption><em>Picture by Rolf Schutten</em></figcaption></figure><h3>Conclusion</h3><p>In this article, you have read what SSL/TLS is, what SSL certificates are, how SSL/TLS encryption works, and how to monitor for expiring SSL certificates using Azure Application Insights. Obviously, there is more than one solution to monitor the expiration of SSL certificates. For example, it is possible to monitor the expiration of SSL certificates based on self-made scripts (for example with PowerShell), possibly with integration into your existing monitoring solution. In addition, there are third-party vendors that offer tools with the ability to monitor the expiration of SSL certificates, such as:</p><ul><li><a href="https://sematext.com/synthetic-monitoring/">Sematext Synthetics</a></li><li><a href="https://trackssl.com/">TrackSSL</a></li><li><a href="https://www.pingdom.com/">Pingdom</a></li><li><a href="https://smartbear.com/">Smartbear</a></li></ul><p>Ultimately, the choice for a monitoring solution will have to arise from the wishes and needs of your specific organization. Nevertheless, preventing expired SSL certificates will always be on the must-do list, especially now that you are familiar with its function and importance after reading this article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f55c792786b" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/monitor-ssl-tls-certificates-with-azure-application-insights-4f55c792786b">Monitor SSL/TLS certificates with Azure Application Insights</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>