{"id":6976,"date":"2021-07-06T16:17:16","date_gmt":"2021-07-06T10:47:16","guid":{"rendered":"https:\/\/opstree.com\/blog\/\/?p=6976"},"modified":"2021-07-06T16:22:37","modified_gmt":"2021-07-06T10:52:37","slug":"autoscale-azure-mysql-server-using-azure-automation-account-and-powershell","status":"publish","type":"post","link":"https:\/\/opstree.com\/blog\/2021\/07\/06\/autoscale-azure-mysql-server-using-azure-automation-account-and-powershell\/","title":{"rendered":"Autoscaling Azure MySql Server using Azure Automation"},"content":{"rendered":"\n<p>Azure automation is a cloud service that helps in automating management tasks thereby saving time and preventing errors. We can also use Azure automation for several other tasks in the cloud as well, for on-premises configuration items. Don&#8217;t wait for a traffic spike to take down your app or site. With Scheduled AutoScale, you can respond before anything happens.&nbsp;<\/p>\n\n\n\n<p>We had a standalone MySQL server that was running in production. When the workload used to increase\/decrease, we had to manually increase\/decrease the SKU tier. The process seemed hectic and time-consuming. That&#8217;s why we thought of autoscaling the MySQL server which led to better performance of the MySQL server and saved our time.<\/p>\n\n\n\n<p>In this blog, I have explained how to set up an Azure automation account, create a runbook, publish a runbook, scheduling, etc.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Identifying loads and increasing or decreasing your computing capacity is critical to business and requires manual intervention and downtime to achieve. On the other hand, monitoring the environment requires continuous effort\/resources.<\/p>\n\n\n\n<p>In a managed database scenario, most services already provide built-in auto- scale down capability. In the case of Azure Database for MySQL, we can configure the autoscale capability from the storage front, however, the computation requires manual intervention to achieve this by increasing the SKU levels or automating the entire process.<\/p>\n\n\n\n<p>To simplify the process, I am using Azure Automation account, Automation Runbook and PowerShell, and the whole process is explained step by step below.<\/p>\n\n\n\n<p><strong>Step-1: <\/strong>Create Azure Automation Account from the Azure portal for autoscaling the MySQL server.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/tzdREiwXUcPKgMGKTr92cAUqLzfCyPTlMM408g1Q6k9csL62OB3JtiCMUdAoHScT8wBHg0RZJUD-3TT4T8kIrAkrBnXhjFyjkxuSSsySiOXX9tuqtVZ25fnoX84q8PUtt3b2cOYm\" alt=\"\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Step-2: <\/strong>Since we are accessing Azure accounts (AZ. Accounts) and some Azure PowerShell modules to access MySQL (AZ. MySQL) resources, those modules are not included by default, so it can be accessed directly from the module gallery and will have to be imported.<\/p>\n\n\n\n<p>You can view the &#8220;Module gallery&#8221; by clicking on the option under the &#8220;Shared Resource&#8221; section as shown.<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/UcD_brXLH-N2Zx_512g_K7xV7ZudopsAU6NP8hdbjnd6c90vg-irSlPOD2JWdVP6w88E6OOEcxSOjSFCwpQr3_nAaHpBC2A9cvPKfdRD9cCDtLbM0tr4ccIyu5WB1bob6WHeoU-R\" alt=\"\" width=\"700\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>AZ. Accounts module:<\/strong> Manages credentials and common configuration for all Azure modules. Connect to Azure with an authenticated account for use with cmdlets from the Az PowerShell modules.<\/p>\n\n\n\n<p><strong>AZ. MySQL module:<\/strong> Gets information about a server.<\/p>\n\n\n\n<p><strong>Step-3: <\/strong>In the next step, we need a runbook where we have to define the flow or script below the whole process for scale-up and down (conveniently I have created two separate rule books for both scale up and down).<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/CyQKMFD716qSEZk-kAPjSqy10tVBmBDMuReWjgT5FtstwpQEVyo7Zoiy48i6eL9d9OI_oDSAE7HngWSe_bnM26BKtyB7M9uexhvo_284ScPA1wmcCbG3YNiezhoRqntOmfAY2QHy\" alt=\"\" width=\"700\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>I have chosen PowerShell as a runbook type, however, there are multiple other options like Python, Graphical, etc that can be used.<\/p>\n\n\n\n<p><strong>Step-4: <\/strong>I&#8217;ve included native code in the runbook console for changing or scaling your SKU values.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">### Parameters ###\n\n[CmdletBinding()]\nparam(\n\u00a0\u00a0\u00a0\u00a0[Parameter(Mandatory=$True)]\n\u00a0\u00a0\u00a0\u00a0[string]$ResourceGroupName,\n\u00a0\u00a0\u00a0\u00a0[Parameter(Mandatory=$True)]\n\u00a0\u00a0\u00a0\u00a0[string]$ServerName,\n\u00a0\u00a0\u00a0\u00a0[Parameter(Mandatory=$False)]\n\u00a0\u00a0\u00a0\u00a0[string]$SkuTier\n)\n\n# Track the execution date &amp; time\n$StartDate=(GET-DATE)\n\n### Log-in to Azure with AZ (standard code) ###\n\nWrite-Verbose -Message 'Connecting to Azure'\n# Name of the Azure Run As a connection\n$connectionName = \"AzureRunAsConnection\"\ntry\n{\n\u00a0\u00a0\u00a0\u00a0# Get the connection \"AzureRunAsConnection \"\n\u00a0\u00a0\u00a0\u00a0$servicePrincipalConnection=Get-AutomationConnection -Name $connectionName\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\n\u00a0\u00a0\u00a0\u00a0Connect-AzAccount `\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-ServicePrincipal `\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-TenantId $servicePrincipalConnection.TenantId `\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-ApplicationId $servicePrincipalConnection.ApplicationId `\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-CertificateThumbprint $servicePrincipalConnection.CertificateThumbprint\u00a0\n}\ncatch {\n\u00a0\u00a0\u00a0\u00a0if (!$servicePrincipalConnection)\n\u00a0\u00a0\u00a0\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0$ErrorMessage = \"Connection $connectionName not found.\"\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0throw $ErrorMessage\n\u00a0\u00a0\u00a0\u00a0}\u00a0\n\u00a0\u00a0\u00a0\u00a0else {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Write-Error -Message $_.Exception\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0throw $_.Exception\n\u00a0\u00a0\u00a0\u00a0}\n}\n\n### Setting SKU Tier for MySQLDatabase ###\n\n$CurrentSKU = (Get-AzMySqlServer -Name $ServerName -ResourceGroupName $ResourceGroupName).skuname\nIf($CurrentSKU -eq $SkuTier)\n{\n\u00a0\u00a0\u00a0\u00a0# Validating the existing SKU value\n\u00a0\u00a0\u00a0\u00a0Write-Error \"Cannot change pricing tier of $ServerName because the new SKU $SkuTier tier is equal to current SKU tier $CurrentSKU.\"\n\u00a0\u00a0\u00a0\u00a0return\n}\nelse\n{\n\u00a0\u00a0\u00a0\u00a0try\n\u00a0\u00a0\u00a0\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0# updating the existing SKU value with the new one\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Update-AzMySqlServer -Name \"$($ServerName)\" -ResourceGroupName\u00a0 \"$($ResourceGroupName)\" -sku \"$($SkuTier)\"\n\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0catch\n\u00a0\u00a0\u00a0\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Write-Error -Message $_.Exception.Message\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0throw $_.Exception\n\u00a0\u00a0\u00a0\u00a0}\u00a0\u00a0\u00a0\u00a0\n}\n<\/pre>\n\n\n\n<p>In this code, we have defined mandatory parameters for configuring azure resources for the MySql server.<\/p>\n\n\n\n<p>We are using cmdlets for managing Azure resources directly from the PowerShell command line. Azure PowerShell is designed to make it easy to learn and get started with but provides powerful features for automation.&nbsp;<\/p>\n\n\n\n<p><strong>Log-in to Azure with AZ (standard code)<\/strong><\/p>\n\n\n\n<p>Try to connect azure with the help of Az.Accounts module and if servicePrincipalConnection is not found then throw the error message else write error .exception and throw the .exception.<\/p>\n\n\n\n<p><strong>Setting SKU Tier for MySQLDatabase<\/strong><\/p>\n\n\n\n<p>Using the Az.mysqlserver module gets the information about a server for example servername, resourcegroupname etc. If the CurrentSKU value is equal to the SkuTier then cannot change pricing tier of the server because the new SKU tier is equal to the current SKU tier. But CurrentSKU value is not equal to the SkuTier then updating the existing SKU value with the new one.<\/p>\n\n\n\n<p><strong>Step-5: <\/strong>Save and test by entering the required parameters as mentioned below.<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/qC8eds5NE-7WY8LdU07Ks6jNMOYOoJoyYmn6g9CPewk4de9FANNrm539PQeOK2wj0VN2yvWUC_xzpCJn8IuQ2ajw2lC2Fi9WoFLzYWLoxw8tvuqJW_HRgijMk1eEAqtCZZdRzSWY\" alt=\"\" width=\"700\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/HSwuZrY7BpXH5o4CJ_r9OEIQ43QqBmZWtAnM-9fJlx5Y5zwl8GWKdLJx-SpfT5vb-IxdHGYbSRwgNE0Gmfoiyg5xbnA6uL0jKNBVltIVZ7yhV2UbDKAA-Je60D7G74pnWI_Q5a1r\" alt=\"\" width=\"700\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Step-6: <\/strong>Once you&#8217;re done with the review, click on the &#8220;Publish&#8221; option to publish the runbook. Click on &#8220;Yes&#8221; to confirm.<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/k62gD-So2inPnJgbaeA6F_rxroX6sQwz10EMuGv_mAWNpBKZUDVqfUidTwGa8W07gktMwEp8PRbydF_JjS50uJJDgyNkBoZu2SqRRVQ0kiVl13K2fGehOtU201orqzUX6gSDU9Z4\" alt=\"\" width=\"700\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Step-7: <\/strong>Your code is now ready to be published and linked with MySQL Alerts.<\/p>\n\n\n\n<ol><li>Go To MySQL resource and create a new alert rule<\/li><li>Choose the appropriate signal type (In my case I have selected CPU percent and defined the threshold value to 80%)<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/scwom9RGuMEXU4aDQrzTfYYUzSktvFITMdPmTvnWXpyDJ1FNIlnInae2KkIzJBN71Jm00EmD7BIXwFyWV88GSiULPl4mHb4z9F56GUeW9QnoBq9IVCWAWYdP5eUaVYHsfSESgWVW\" alt=\"\" width=\"700\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Step-8: <\/strong>Create Action Group and select User Defined Automation Runbook and select the one created above from the Runbook list.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/mbUKzudxJDfcjlKtVV95j3ESO8KI7FiyqHnFp2Zs0ymkZBCCzIUG3bF8km1sdqMqbzIL2nsCP7w29r48uYDBOGujL6IXyjWAEArdmQ1FwERQzFy9CsGLib_4Ju-ulEyQFW-kC9Pn\" alt=\"\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/uIeYvwRcdUu1hrhWzse5tACHL6tt74vGvkcfd7PzXhYClkdJTraCd564COs-Bf3jZgNBrf0p5qJzPvJy1Yo_KLwvlMSo1lXndyaCFVTZBneAQc0-QIMyBoP-9DF7vhxNeEr_loAY\" alt=\"\" width=\"700\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Step-9: <\/strong>Please specify the required parameter in the parameter selection and complete.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/VXaeSRz-lNusRoi81pImUkQ_eJtrB_cot013V1P7oFKvTtTFN0s_8rQGgElGgs5WDCyNJZMy5I4WTXKFCjEujloBMa4zeSFWC8QCnIQ9DVd7sRenxXygZC3vXC5PSkR0Ux4UOkzF\" alt=\"\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Step-10: <\/strong>Configure the runbook and save after specifying the required parameter in the parameter selection.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/qLlVznBJ5LuuqtV_2KxLUP8n7WY3ZbauvMp0-ufqv7ZMQrLJ13AlCeAIzv-NQkR89nnrh9Pz47ZsUS2ovidkNquND6AInBkp_8jvTLCWTe_Vws_FtYnflcMZ7DUpkpIWYJSTLPzU\" alt=\"\" \/><\/figure>\n\n\n\n<p><strong>Step-11: <\/strong>Finally, specify the alert description and severity that will help identify when this alert was triggered and take action.<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/UtW6yciV8dgML6gkeL2bfAeHo1mJh4_n00xj5gBn3pAk-S6VHhYNANHN7zzbqZW8FEoSitjnNnHIG7zsVqK40yIQUbt4ekdYPeoe4zpmuBPHAYItk9YWYlATmV88o742Bzh_27ag\" alt=\"\" width=\"700\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/BlVJj0q-lkQZzkTz4ydB6bM4nwL8gOhyCnD3qwGjm5DOlMSwfU1in7OI0skrceF9VCn145hAGgfvWopS_3gdRN57dVBNjP2Jsr3bVg8S2WCb6gbAKIABlvfafRDyRNJCnE0Fzjj6\" alt=\"\" width=\"700\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/CR9Pm4EUpYx1HU78x0Pbowivjbs73YoFDnbBxIUJlmMPY4Q-9HWPUCQ-oqzDqjWXC_CGcm1bGa5SvLWKxxeTFK64vvtc0f3sT-HfYT3gF6zK4uwK5lFwJhdXIMlOaxsPmPDV5CsT\" alt=\"\" width=\"700\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Step-12:<\/strong> With all these steps, we increased the SKU tier and achieved our task.<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/DMP201PSPIhK5NcCfoOWvADHXpqTQbwvDe26PcxYuFaCBjuPiSg-VWSkwtTcI5pIfMNCZc9SU5WP0w2YRuv5WK7ILClOPlbANd0nhUamtz-0tWB9DUuFwnOLCUMUgbypvoPMu4kr\" alt=\"\" width=\"700\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Conclusion:<\/strong><\/p>\n\n\n\n<p>The MySQL server was running in production and the workloads led to an increase in the CPU utilization and the same was decreasing when the workload was reduced.&nbsp;<\/p>\n\n\n\n<p>I tried searching for a solution to this scenario but there were not enough resources present online and so I decided to explore the service and checked how to increase\/decrease SKU whenever required.&nbsp;<\/p>\n\n\n\n<p>The above solution will help to identify the CPU threshold and take appropriate action based on the steps defined in Azure Automation Runbook. Also, it will help in tracking the changes as part of alerts for auditing purposes. This solution helps to reduce the upfront cost (which results from purchasing tier\\sku&#8217;s resources) and take proactive action when identifying low-usage or high-usage CPUs; accordingly, the alert scales up\\down depending on the configuration.<\/p>\n\n\n\n<p> <strong>Blog Pundit:<\/strong>  <a href=\"https:\/\/opstree.com\/blog\/\/author\/kapendrasingh\/\">&nbsp;<strong>Kapendra Singh<\/strong><\/a> and <a href=\"https:\/\/opstree.com\/blog\/\/author\/adeel109\/\"><strong>Adeel<\/strong> <strong>Ahmad<\/strong><\/a><\/p>\n\n\n\n<p>Opstree is an End to End DevOps solution provider<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button is-style-fill\"><a class=\"wp-block-button__link\" href=\"https:\/\/www.opstree.com\/contact-us\" target=\"_blank\" rel=\"noreferrer noopener\">CONTACT US<\/a><\/div>\n<\/div>\n\n\n\n<p class=\"has-text-align-center\"><strong>Connect Us <\/strong><\/p>\n\n\n\n<ul class=\"wp-block-social-links aligncenter items-justified-right is-layout-flex wp-block-social-links-is-layout-flex\"><li class=\"wp-social-link wp-social-link-linkedin  wp-block-social-link\"><a href=\"https:\/\/www.linkedin.com\/company\/opstree-solutions\" class=\"wp-block-social-link-anchor\" target=\"_blank\" rel=\"noopener\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z\"><\/path><\/svg><span class=\"wp-block-social-link-label screen-reader-text\">LinkedIn<\/span><\/a><\/li>\n\n<li class=\"wp-social-link wp-social-link-youtube  wp-block-social-link\"><a href=\"https:\/\/www.youtube.com\/channel\/UCeLma6SpNYH7jjYKSBNSexw\" class=\"wp-block-social-link-anchor\" target=\"_blank\" rel=\"noopener\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z\"><\/path><\/svg><span class=\"wp-block-social-link-label screen-reader-text\">YouTube<\/span><\/a><\/li>\n\n<li class=\"wp-social-link wp-social-link-github  wp-block-social-link\"><a href=\"https:\/\/github.com\/OpsTree\" class=\"wp-block-social-link-anchor\" target=\"_blank\" rel=\"noopener\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z\"><\/path><\/svg><span class=\"wp-block-social-link-label screen-reader-text\">GitHub<\/span><\/a><\/li>\n\n<li class=\"wp-social-link wp-social-link-facebook  wp-block-social-link\"><a href=\"https:\/\/www.facebook.com\/opstree\" class=\"wp-block-social-link-anchor\" target=\"_blank\" rel=\"noopener\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z\"><\/path><\/svg><span class=\"wp-block-social-link-label screen-reader-text\">Facebook<\/span><\/a><\/li>\n\n<li class=\"wp-social-link wp-social-link-medium  wp-block-social-link\"><a href=\"https:\/\/medium.com\/buildpiper\" class=\"wp-block-social-link-anchor\" target=\"_blank\" rel=\"noopener\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M20.962,7.257l-5.457,8.867l-3.923-6.375l3.126-5.08c0.112-0.182,0.319-0.286,0.527-0.286c0.05,0,0.1,0.008,0.149,0.02 c0.039,0.01,0.078,0.023,0.114,0.041l5.43,2.715l0.006,0.003c0.004,0.002,0.007,0.006,0.011,0.008 C20.971,7.191,20.98,7.227,20.962,7.257z M9.86,8.592v5.783l5.14,2.57L9.86,8.592z M15.772,17.331l4.231,2.115 C20.554,19.721,21,19.529,21,19.016V8.835L15.772,17.331z M8.968,7.178L3.665,4.527C3.569,4.479,3.478,4.456,3.395,4.456 C3.163,4.456,3,4.636,3,4.938v11.45c0,0.306,0.224,0.669,0.498,0.806l4.671,2.335c0.12,0.06,0.234,0.088,0.337,0.088 c0.29,0,0.494-0.225,0.494-0.602V7.231C9,7.208,8.988,7.188,8.968,7.178z\"><\/path><\/svg><span class=\"wp-block-social-link-label screen-reader-text\">Medium<\/span><\/a><\/li><\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Azure automation is a cloud service that helps in automating management tasks thereby saving time and preventing errors. We can also use Azure automation for several other tasks in the cloud as well, for on-premises configuration items. Don&#8217;t wait for a traffic spike to take down your app or site. With Scheduled AutoScale, you can &hellip; <a href=\"https:\/\/opstree.com\/blog\/2021\/07\/06\/autoscale-azure-mysql-server-using-azure-automation-account-and-powershell\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Autoscaling Azure MySql Server using Azure Automation&#8221;<\/span><\/a><\/p>\n","protected":false},"author":207494263,"featured_media":29900,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[28070474],"tags":[416364614,8139934,335778,513761177,5767724,41392,178495],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/11\/DevSecOps-1.jpg","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pfDBOm-1Ow","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/6976"}],"collection":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/users\/207494263"}],"replies":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/comments?post=6976"}],"version-history":[{"count":23,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/6976\/revisions"}],"predecessor-version":[{"id":7252,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/6976\/revisions\/7252"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media\/29900"}],"wp:attachment":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media?parent=6976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/categories?post=6976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/tags?post=6976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}