<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4208378482021219922</id><updated>2026-10-28T05:05:00.970-07:00</updated><category term="Sharepoint"/><category term="MVC"/><category term="Azure"/><category term="Asp.Net"/><category term="Patterns"/><category term="Sharepoint Online"/><category term="AWS"/><category term="WCF"/><category term="JQuery"/><category term="Azure DevOps"/><category term="Entity Framework"/><category term="Security"/><category term="Android"/><category term="Docker"/><category term="Mobile"/><category term="C#"/><category term="Office365"/><category term="Sharepoint Framework"/><category term="WEB API"/><category term="AWS Security"/><category term="DevOps"/><category term="Functions"/><category term="Node.js"/><category term="REACT"/><category term="Testing"/><category term="AWS Subnet"/><category term="AWS VPC"/><category term="Bot Framework"/><category term="Cloud"/><category term="CloudDevOps"/><category term="Container"/><category term="Fiddler"/><category term="IAC"/><category term="OAuth"/><category term="Open AI"/><category term="PhoneGap"/><category term="PowerApps"/><category term="REST"/><category term="ServiceBus"/><category term="Terraform"/><category term="AWS Cloud Watch"/><category term="AWS EC2"/><category term="AWS IAM"/><category term="AWS LAMBDA"/><category term="About Me"/><category term="AngularJS"/><category term="Azure FinOps"/><category term="Azure Network"/><category term="Flow"/><category term="Hyper-V"/><category term="IoC"/><category term="Kubernetes"/><category term="Linux"/><category term="MicroServices"/><category term="Microsoft Flow"/><category term="OData"/><category term="Octopus"/><category term="PowerShell"/><category term="SQL"/><category term="Server"/><title type='text'>Aspiring Architect</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>150</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-5873788030530218528</id><published>2026-06-08T20:37:46.197-07:00</published><updated>2026-06-08T20:37:46.197-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Container"/><category scheme="http://www.blogger.com/atom/ns#" term="Docker"/><title type='text'>Top 15 Docker Runtime Issues - Reproduce - Resolve</title><content type='html'>&lt;p&gt;&amp;nbsp;In this post we will go through top 15 runtime issues you might face in managing docker containers. Re-create those issues on your docker environment , debug step by step and resolve them.&lt;/p&gt;&lt;p&gt;For this i have created a Github repo which got a docker-compose file which will re-create the issue and a README file which will describe what exactly the issue we created, and step by step guide to debug the issue, and how to fix it. We got 15 folders one for each runtime issue.&lt;/p&gt;&lt;p&gt;Github Repo :&amp;nbsp;&lt;a href=&quot;https://github.com/pratappilaka24/Top-15-Docker-Runtime-Issues&quot;&gt;https://github.com/pratappilaka24/Top-15-Docker-Runtime-Issues&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Below are the Runtime issues we will be looking at.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;OOM (Out-of-Memory) Killer&lt;/li&gt;&lt;li&gt;CPU Throttling&lt;/li&gt;&lt;li&gt;Disk IO Exhaustion&lt;/li&gt;&lt;li&gt;DNS Resolution Failure&lt;/li&gt;&lt;li&gt;Volume Permission Denied&lt;/li&gt;&lt;li&gt;Port Binding Conflicts&lt;/li&gt;&lt;li&gt;Health Check &amp;amp; Restart Loops&lt;/li&gt;&lt;li&gt;Docker Socket Exposure&lt;/li&gt;&lt;li&gt;Zombie Processes&lt;/li&gt;&lt;li&gt;Container Logs Exhaustion&lt;/li&gt;&lt;li&gt;Network MTU Mismatch&lt;/li&gt;&lt;li&gt;Environment Variable Secret Leakage&lt;/li&gt;&lt;li&gt;Timezone Mismatch Inside Containers&lt;/li&gt;&lt;li&gt;Open File Limit Exhaustion&lt;/li&gt;&lt;li&gt;SELinux Blocking Container Operations&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;I have a RHEL 10 vm which i am using as host and mounted the shared drive with all the samples on it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi89ju0dpwdcX9Yt4hVfZlGaa_12Z6GM-N32BYdRagPB3TkG1jhkTZRYArYwV9TGiblqrO3GLamCqRweU87un_2aMBDsZckRv_zOr6gAkLAJnQK1ezZrSZxg5KbR1vK7JVhPMcCXDwldktpGXrhAcOiQs9BkOx2_wuU5oGyAVptJwtayRaIEc1sVr8p0xU/s3429/Base.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;427&quot; data-original-width=&quot;3429&quot; height=&quot;80&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi89ju0dpwdcX9Yt4hVfZlGaa_12Z6GM-N32BYdRagPB3TkG1jhkTZRYArYwV9TGiblqrO3GLamCqRweU87un_2aMBDsZckRv_zOr6gAkLAJnQK1ezZrSZxg5KbR1vK7JVhPMcCXDwldktpGXrhAcOiQs9BkOx2_wuU5oGyAVptJwtayRaIEc1sVr8p0xU/w640-h80/Base.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Lets start recreating the runstime issues one by one.&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;01.&amp;nbsp;OOM (Out-of-Memory) Killer — Container Killed by Kernel&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;The Linux OOM (Out-of-Memory) Killer terminates processes (or containers) when the system or cgroup memory limit is exhausted. In production, this manifests as containers suddenly disappearing with exit code **137** (SIGKILL). This is one of the most common and impactful production incidents.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Reproduce by navigating to the said folder and run &quot;Docker-compose up&quot;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKqvFe_5VL9bNcfGU_bjebEyy5hyphenhyphenRcJJQ_LS-vj1pMlcjrAIPI-XoieE9lgBvdE8AGxIEg0kzoGxRWspxmBTCUWFvkzsTOEF4JuW2N3CE8hfwffuS4D1C04DRxf2Nd35iX_t5rKRaiijYNCZ516jiKhQtM9Cf15QjbLBdM4x-F01A4daHMN38bB6H49QE/s2031/01.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;297&quot; data-original-width=&quot;2031&quot; height=&quot;94&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKqvFe_5VL9bNcfGU_bjebEyy5hyphenhyphenRcJJQ_LS-vj1pMlcjrAIPI-XoieE9lgBvdE8AGxIEg0kzoGxRWspxmBTCUWFvkzsTOEF4JuW2N3CE8hfwffuS4D1C04DRxf2Nd35iX_t5rKRaiijYNCZ516jiKhQtM9Cf15QjbLBdM4x-F01A4daHMN38bB6H49QE/w640-h94/01.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;You can see that container momory gradually allocated for a single data operation. Finally killing the container due to 137 exit code whch is famously known as OOM Killer.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Resolution:&lt;/b&gt; Implemnt memory soft limit on the container thus always limiting the memory use of operatons within the container. Please reffer to README file for best parctices and more ways to handle the issue.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;02.&amp;nbsp;CPU Throttling — Container Starved of CPU Causing Latency Spikes&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;CPU throttling occurs when a container&#39;s CPU usage exceeds its assigned quota (set via `cpus` or `cpu_period`/`cpu_quota`). The Linux CFS (Completely Fair Scheduler) throttles the container, causing tasks to queue up. In production this appears as **sudden latency spikes**, **slow API responses**, or **timeouts** even when the host has plenty of idle CPU&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We have implemnted a good and bad containers with CPU limits being too constarint on bad one. You can literally see difference in the latency for a batch operation in both.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgITxBdWdormUVTIsS1kZP9unQhho6MAUxwyrKFwlrZYrKtHT8hplv82s928a6Uca3Kas380AyhFOT8mKg0atN59IB3yJZEpNxZu8YWIXH37a7U6glTlVl_4tUOCW_0Ja-3Tv7jYqPbTIZwIxROaPC7OB09kwNEu55GZGWN2bQbmhIrk-shHRczwCPKHaA/s1660/02.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;325&quot; data-original-width=&quot;1660&quot; height=&quot;126&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgITxBdWdormUVTIsS1kZP9unQhho6MAUxwyrKFwlrZYrKtHT8hplv82s928a6Uca3Kas380AyhFOT8mKg0atN59IB3yJZEpNxZu8YWIXH37a7U6glTlVl_4tUOCW_0Ja-3Tv7jYqPbTIZwIxROaPC7OB09kwNEu55GZGWN2bQbmhIrk-shHRczwCPKHaA/w640-h126/02.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;you see theone with out bounds on CPU responded in 6 milli seconds, the one on bounds responded in 98 milli seconds.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Resolution&lt;/b&gt;: Its good to set bounds , only by understanding the optimum value for it. Please reffer to README file for best parctices and more ways to handle the issue.&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;03.&amp;nbsp;Disk I/O Exhaustion — Container Saturating Storage&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;A container performing unbounded disk writes (log flooding, bulk data processing, database dumps) can saturate the storage subsystem, causing I/O wait to spike across the entire host. Other containers and host processes become slow or unresponsive. This is a classic &quot;noisy neighbor&quot; problem in shared production environments.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0akzYQIZ75x_157laG940lo0kAD4th7nxJC4V6wVtbfJPN2ow7RB2NY6eTflO6sCMD5Waop-JWkVgMme6dZIif7_BKFSZleR2FcVj5wHGm2y76CV66YtdcfAw6kD4pdBKPnpLn9E7AuW5RNLuUitfthkiUhLhpsSA8eVerZv3sfWvZFbsDE9tmTEQS1c/s2122/03.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;940&quot; data-original-width=&quot;2122&quot; height=&quot;284&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0akzYQIZ75x_157laG940lo0kAD4th7nxJC4V6wVtbfJPN2ow7RB2NY6eTflO6sCMD5Waop-JWkVgMme6dZIif7_BKFSZleR2FcVj5wHGm2y76CV66YtdcfAw6kD4pdBKPnpLn9E7AuW5RNLuUitfthkiUhLhpsSA8eVerZv3sfWvZFbsDE9tmTEQS1c/w640-h284/03.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;You can see the I/O spike causing the response time spiking in io_hog container goint up to 1.31 seconds while normal continer being 10 milli seconds.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Resolution:&lt;/b&gt; Setup bulkIO mimits while defining the container, so that the spike doesnt impact guest or host responsiveness. Please reffer to README file for best parctices and more ways to handle the issue.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;04.&amp;nbsp;DNS Resolution Failure Inside Containers&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;Containers fail to resolve hostnames — either external domains (e.g., `google.com`) or internal service names (e.g., `db`, `redis`). This causes connection errors, timeouts, and application failures. Common causes include: wrong DNS server configured, `/etc/resolv.conf` issues, broken Docker network DNS, SELinux/firewall blocking DNS traffic, or systemd-resolved conflicts.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-Sd8WnK2VgRAcsMyCFHgR4Ts5GkYfoFICR7MxLBWVFDfs2RqtkTuvATfccXIl-A-BgavhVtnXUBcK3TS-47Fughz4INMl3UrqkDIs7cUTuc4fMJSUfEYcWS4K40DRYKoo_lFd0qkricyXwL7uEQudHBVMCwMWcXv5zVAXPG4GqJUnnG0uDgDG7v0VItw/s2620/04.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1284&quot; data-original-width=&quot;2620&quot; height=&quot;314&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-Sd8WnK2VgRAcsMyCFHgR4Ts5GkYfoFICR7MxLBWVFDfs2RqtkTuvATfccXIl-A-BgavhVtnXUBcK3TS-47Fughz4INMl3UrqkDIs7cUTuc4fMJSUfEYcWS4K40DRYKoo_lFd0qkricyXwL7uEQudHBVMCwMWcXv5zVAXPG4GqJUnnG0uDgDG7v0VItw/w640-h314/04.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;DNS settings arew rongly set in resolv.conf.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Issue 1&lt;/b&gt;: Ext servers are configured to 192.0.2.1 whch is a fake TEST-NET address in broken container, while it was set to 8.8.8.8 which is google.com in working one.&lt;/div&gt;&lt;div&gt;&lt;b&gt;Issue 2:&lt;/b&gt; search is configured to internal.example.com on broken container. This would have worked if we have local domain setup with that name. But its not the case here, so it doesnt work and i cannot reach any other apps like DB, deployed on this container. The DNS is corrcet on working container so it can reach google.com or the localy deployed DB instance successfully.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;05.&amp;nbsp;Volume Permission Denied — Container Cannot Write to Mounted Volume&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;&lt;div&gt;Containers fail with `Permission denied` when accessing bind-mounted directories. On RHEL 10, this is almost always caused by:&lt;/div&gt;&lt;div&gt;1. **SELinux label mismatch** — host directory has wrong security context&lt;/div&gt;&lt;div&gt;2. **UID/GID mismatch** — container process user doesn&#39;t match host directory owner&lt;/div&gt;&lt;div&gt;3. **Host directory permissions** — too restrictive (e.g., mode 700)&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step1&lt;/b&gt;: creating necessary mount points on host.&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjJjS2AYqdnBQ8lM95sEbf94pAJka2-kjO37q22_7stzvSrewxKt6rg-vVD2117bi7rcyhBF7cEN7OEjvPpKC5wACDnFqAoUblSoFCD_LVBKbbuXXMDuQ47wtw9Z9g_5rwJ1tc2mDWst1ctU17j_3peOHHPZVmp-t29TK_7F1aXLW79xs6wFs2FxG52nQQ&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;180&quot; data-original-width=&quot;981&quot; height=&quot;118&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjJjS2AYqdnBQ8lM95sEbf94pAJka2-kjO37q22_7stzvSrewxKt6rg-vVD2117bi7rcyhBF7cEN7OEjvPpKC5wACDnFqAoUblSoFCD_LVBKbbuXXMDuQ47wtw9Z9g_5rwJ1tc2mDWst1ctU17j_3peOHHPZVmp-t29TK_7F1aXLW79xs6wFs2FxG52nQQ=w640-h118&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;but remeber that we are creating the mount points as root and nginx-data-nolabel has both r-x permissions for user and app-data-root has all access to only root.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now run &quot;docker compose up -d&quot; and check the logs.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj2G4_fkd90X177PSWb7_TVi01RKWgmt12mPjv2XlgUN21PsmSYMNl63-bYvV3mP-BmF1lMifGj88s63Unyc3fA3TZ3j2Av7TPKr_glXtalBD8F7fchtfowFbm7iYef6iHFn8ABRGpoXyCpjMUnTHAsPSWMp_w7NsI_NCjNNaS1vjyQTR2TQ0mE8Y4FjaY&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;1504&quot; data-original-width=&quot;2632&quot; height=&quot;366&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj2G4_fkd90X177PSWb7_TVi01RKWgmt12mPjv2XlgUN21PsmSYMNl63-bYvV3mP-BmF1lMifGj88s63Unyc3fA3TZ3j2Av7TPKr_glXtalBD8F7fchtfowFbm7iYef6iHFn8ABRGpoXyCpjMUnTHAsPSWMp_w7NsI_NCjNNaS1vjyQTR2TQ0mE8Y4FjaY=w640-h366&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;We hosted the containers app-uid-mismatch and app-correct with UID 1001, where as the mounts has only no write permissions for user. Thus both of them get PERMISSION DENIED error while writing the files.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Resolution: &lt;/b&gt;Correct the mermissions for the mount points , use 644 instead of 755 and 700 for the mount points. Also make sure you dint mount those on caontainer with :ro (read-only) access. Its a best practice to mount the volumes with :z for shared mounts and :Zif you want to isolate the volumes for just one container. Please reffer to README file for best parctices and more ways to handle the issue.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;06.&amp;nbsp;Port Binding Conflicts — Container Fails to Start (Address Already in Use)&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;A container fails to start because another process or container is already listening on the same host port. This produces the error: `bind: address already in use`. Extremely common in production when deploying multiple versions, after a failed deploy leaves a zombie container, or when system services use the same port.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Run &quot;docker compose up -d&quot; and you see below error.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjM4Q7XegeB0LT86DY6F__rc-5Qa1D40AJD5po9hIBkMDmqOPTJT7b31SueU5UHSTOSjyQ-C8bOxWsf1hM07ofTZBgTwlzcRiM5KC-CUaqH5KlmGTzvzrPIjgV1deeTfW6ucsOtcLrpmykNXiUJvgdzk9Uwnybl6otbJRhikuCKHSTE3YFcbsv24vFAFpA&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;405&quot; data-original-width=&quot;3555&quot; height=&quot;72&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjM4Q7XegeB0LT86DY6F__rc-5Qa1D40AJD5po9hIBkMDmqOPTJT7b31SueU5UHSTOSjyQ-C8bOxWsf1hM07ofTZBgTwlzcRiM5KC-CUaqH5KlmGTzvzrPIjgV1deeTfW6ucsOtcLrpmykNXiUJvgdzk9Uwnybl6otbJRhikuCKHSTE3YFcbsv24vFAFpA=w640-h72&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Instance 2 failed to start because the host port is already used for one of the other instance.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Resolution:&lt;/b&gt; Make sure you use seperate host ports in docker container definitions. Please reffer to README file for best parctices and more ways to handle the issue.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;07.&amp;nbsp;Health Check Failures &amp;amp; Container Restart Loops&lt;/h3&gt;&lt;div&gt;Containers enter a restart loop when health checks consistently fail. This can happen due to: incorrect health check commands, endpoints not responding, insufficient `start_period` for slow-starting apps, or actual application failures. Restart loops waste resources, generate noise in logs, and can cascade into broader failures.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Run &quot;docker compose up&quot;, you see&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjIt_r6CLpI8KhsiQp5rqqjE5Mxg-9tU1O2UhYHURgBRBZXtH-E8w3cGszULcBqPSsyNbcVWcoUWP5tXCLag2G7aQ_-FamLehMgDbJehBGQnDKsmPJGaaCQ3MGGI2Wi7oBYY3bS0fMjAXR42mLFlSmMwjFc9WQBIpgUNX9Eo3_3Y-_hWv-TIwerx8Yu-T0&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;1279&quot; data-original-width=&quot;2334&quot; height=&quot;350&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjIt_r6CLpI8KhsiQp5rqqjE5Mxg-9tU1O2UhYHURgBRBZXtH-E8w3cGszULcBqPSsyNbcVWcoUWP5tXCLag2G7aQ_-FamLehMgDbJehBGQnDKsmPJGaaCQ3MGGI2Wi7oBYY3bS0fMjAXR42mLFlSmMwjFc9WQBIpgUNX9Eo3_3Y-_hWv-TIwerx8Yu-T0=w640-h350&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;We intentionally made the unhealthy_app contianer send a fault 8 out of 10 chances, thus causing the faulty health check. Slow_app will start after a delay of 30 seconds, but the health check is set to start after 5 seconds, thus following health checks will mark it as unhealthy, eventhogh the conatiner is healthy.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgyx2jpnLJQRvpzOUgk1slfsros84OBeEsaFtMhvcdsIMc1Xg2Y6pcaWScAutbDRiIBO-GBVT5-cB3bEmSfVGjvN1R91vdNMR5OCsUYQxCwcklbmwzh432FCLK_BiL0C8qTzwznR20sbBWi2n7R2W8QMh6NeJmh0LP-T1FSIxkgvlvSC9SdFnWrYFt1r7w&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;292&quot; data-original-width=&quot;3550&quot; height=&quot;52&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgyx2jpnLJQRvpzOUgk1slfsros84OBeEsaFtMhvcdsIMc1Xg2Y6pcaWScAutbDRiIBO-GBVT5-cB3bEmSfVGjvN1R91vdNMR5OCsUYQxCwcklbmwzh432FCLK_BiL0C8qTzwznR20sbBWi2n7R2W8QMh6NeJmh0LP-T1FSIxkgvlvSC9SdFnWrYFt1r7w=w640-h52&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;see, the health check was coming bac with 200 for slow_start_app, but the health check meanwhile marked as unhealthy.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Resolution:&lt;/b&gt; Choose the start period and intervals appropriately , so that your health checks kick-in before the container is ready to serve. Please reffer to README file for best parctices and more ways to handle the issue.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;08.&amp;nbsp;Docker Socket Exposure — Critical Container Security Vulnerability&lt;/h3&gt;&lt;div&gt;Mounting `/var/run/docker.sock` into a container gives that container **full, unrestricted root-level access to the host**. Any process in the container can start new containers, mount host directories, execute commands as root on the host, and escape the container entirely. This is one of the most severe container security misconfigurations in production.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;move to 08 folder and run &quot;docker compose up -d&quot;&lt;/div&gt;&lt;div&gt;and then follow the comands as shown below.&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEg78tdgdc30Xtrk_NozwIOB95EJtSweCijbwNDBqsdSRPaV--K9sR-kI-dY2E_-W2eI9yV9oPSpRYYA-YSX6YTo3IrMVYEgRFFU5uuVPt21FLuVME8aSmJmLW8W5GF9vArO-DyFR6bVMpIEwtydCrJ-9QgtneOSOn_QmiFj4Lu6WE030TjQgKY_jn0y9QA&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;793&quot; data-original-width=&quot;2805&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEg78tdgdc30Xtrk_NozwIOB95EJtSweCijbwNDBqsdSRPaV--K9sR-kI-dY2E_-W2eI9yV9oPSpRYYA-YSX6YTo3IrMVYEgRFFU5uuVPt21FLuVME8aSmJmLW8W5GF9vArO-DyFR6bVMpIEwtydCrJ-9QgtneOSOn_QmiFj4Lu6WE030TjQgKY_jn0y9QA=w640-h180&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;From socker_exposed_app container, guest has un restricted access to host root namespace. Guest can check other containers, mount volumes at thier will and can perform any malacious actions.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Resolution:&lt;/b&gt; Be very cautious of socket exposure. Altenratively use dind_alternative runs &quot; docker inside a docker &quot; image where an privelaged guest container cannot see host containers and environment.&lt;/div&gt;&lt;div&gt;Please reffer to README file for best parctices and more ways to handle the issue.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;10.&amp;nbsp;Log Flooding — Container Logs Exhausting Host Disk Space&lt;/h3&gt;&lt;div&gt;By default, Docker stores container logs in JSON files at `/var/lib/docker/containers/&amp;lt;id&amp;gt;/&amp;lt;id&amp;gt;-json.log` with **no size limit**. A single verbose container can fill the entire host disk, causing all containers to fail, the host to become unresponsive, and data corruption. This is a silent killer in production — systems run fine for weeks then suddenly all fail simultaneously.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;cd 10 folder, run &quot;docker compose up -d log-flooder&quot;, wait for 2 mins and then run &quot;docker exec log_flooder df -h /var&quot; command.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh3D_2OzQ8yd4XlV8JdhbidwAvtTJc8odFJgTP3b15zCpxBR5rRUjrHsHczH9grZmbhdvKPR9tkIqu-Ds6P7uyjAdZcSfegfYUcoxlGTozIRtqBWnGIB4nNB-9vYrcTIBlGxiiWGGs_IF125JA9fKZkGFlGTRuXZk5VAdkdAzLFLowMwqaT2nIwPxW6sKs&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;450&quot; data-original-width=&quot;2650&quot; height=&quot;108&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh3D_2OzQ8yd4XlV8JdhbidwAvtTJc8odFJgTP3b15zCpxBR5rRUjrHsHczH9grZmbhdvKPR9tkIqu-Ds6P7uyjAdZcSfegfYUcoxlGTozIRtqBWnGIB4nNB-9vYrcTIBlGxiiWGGs_IF125JA9fKZkGFlGTRuXZk5VAdkdAzLFLowMwqaT2nIwPxW6sKs=w640-h108&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;you will see already 41% of space is flooded with logs, if we dint stop it in time, it will fully flood /var/ and that will create issues like user cannot login, nor sudo.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Resolution:&lt;/b&gt;&amp;nbsp; Setup log-rotation options in the container definition. Please reffer to README file for best parctices and more ways to handle the issue.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj3_yxf5EoENJVvZGX5T-QI44MqojW2inymnXqSLUe4oLQRV25gcvn-aQjAJElpztP_zOiPJ7CD82-EeR9Z-TgtNWH3-kvuTNZApHV-bWY1vM5Plx8471o6Efv5T36dKqrd-1o3_IF6NL_sD_KQ1bNFJkbJprHiK2fGLxIfYP8cMYG9TsxXTIHfGwnENLY&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;250&quot; data-original-width=&quot;964&quot; height=&quot;104&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj3_yxf5EoENJVvZGX5T-QI44MqojW2inymnXqSLUe4oLQRV25gcvn-aQjAJElpztP_zOiPJ7CD82-EeR9Z-TgtNWH3-kvuTNZApHV-bWY1vM5Plx8471o6Efv5T36dKqrd-1o3_IF6NL_sD_KQ1bNFJkbJprHiK2fGLxIfYP8cMYG9TsxXTIHfGwnENLY=w400-h104&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;12.&amp;nbsp;Environment Variable Secret Leakage&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Storing secrets (passwords, API keys, tokens) in environment variables is a **critical security anti-pattern**. Secrets in env vars are exposed via:&lt;/div&gt;&lt;div&gt;- `docker inspect` — any user with Docker socket access can read them&lt;/div&gt;&lt;div&gt;- `/proc/&amp;lt;pid&amp;gt;/environ` — readable by root and container processes&lt;/div&gt;&lt;div&gt;- Docker Hub/registry if baked into images via `Dockerfile ENV`&lt;/div&gt;&lt;div&gt;- Log files if accidentally printed to stdout&lt;/div&gt;&lt;div&gt;- CI/CD system logs if echoed during debugging&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;cd 12 folder, run below commands as shown&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjuem6DxdqCI3mNvnxA-Usz7ltCW-njlP2l2gsBw94kk7x5URA0hmwOAzzIAgRE7NhLkmDDXXf3hzbvhdnzNWiZkx1hGUrUUYSlnE3ABbQipRWsoExiR_PNpoZlc3cnmlzBVk50u1G7FW_HKoNGsaQgaUAET9YFv3rwgDbpvAfNFQUAW147o4SrOwVfeGc&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;543&quot; data-original-width=&quot;3199&quot; height=&quot;108&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjuem6DxdqCI3mNvnxA-Usz7ltCW-njlP2l2gsBw94kk7x5URA0hmwOAzzIAgRE7NhLkmDDXXf3hzbvhdnzNWiZkx1hGUrUUYSlnE3ABbQipRWsoExiR_PNpoZlc3cnmlzBVk50u1G7FW_HKoNGsaQgaUAET9YFv3rwgDbpvAfNFQUAW147o4SrOwVfeGc=w640-h108&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;you can see the secret values like passwords are visible in clear text when you used insecure way of storing the secrets in the container definition.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Resolution:&amp;nbsp;&lt;/b&gt; you can use a seperate secrets file and not make it part of container definition, thus the secrets wont be visible in docker inspect.&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhdRTWJIPl0TJIrACYkwPJlUeBoZdXGYqU-LsqsCzEParnBaKkebWvBEruET9LeO-K5uA5GFIp5tXWy5sukD-gUcgccN7G64HaCymH18cKr8wVf6zOl6ggiqTUAVR872ngXda4Qe6Kn9iMukNymVaqxmsaOXecTS0xmKlqab9wockjzO3Lkg4SYZFnMdCE&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;354&quot; data-original-width=&quot;1194&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhdRTWJIPl0TJIrACYkwPJlUeBoZdXGYqU-LsqsCzEParnBaKkebWvBEruET9LeO-K5uA5GFIp5tXWy5sukD-gUcgccN7G64HaCymH18cKr8wVf6zOl6ggiqTUAVR872ngXda4Qe6Kn9iMukNymVaqxmsaOXecTS0xmKlqab9wockjzO3Lkg4SYZFnMdCE=w640-h190&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Please try the rest of scenarios and follow the README file for the steps to debug and remediate the issues by yourself.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Github Repo : &lt;a href=&quot;https://github.com/pratappilaka24/Top-15-Docker-Runtime-Issues&quot;&gt;https://github.com/pratappilaka24/Top-15-Docker-Runtime-Issues&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/5873788030530218528/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2026/06/top-15-docker-runtime-issues-reproduce.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/5873788030530218528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/5873788030530218528'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2026/06/top-15-docker-runtime-issues-reproduce.html' title='Top 15 Docker Runtime Issues - Reproduce - Resolve'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi89ju0dpwdcX9Yt4hVfZlGaa_12Z6GM-N32BYdRagPB3TkG1jhkTZRYArYwV9TGiblqrO3GLamCqRweU87un_2aMBDsZckRv_zOr6gAkLAJnQK1ezZrSZxg5KbR1vK7JVhPMcCXDwldktpGXrhAcOiQs9BkOx2_wuU5oGyAVptJwtayRaIEc1sVr8p0xU/s72-w640-h80-c/Base.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-8613172326057292777</id><published>2026-05-11T03:06:00.000-07:00</published><updated>2026-05-11T03:18:36.071-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><title type='text'>Azure Disk Encryption Is Retiring in 2028 — Everything You Need to Know</title><content type='html'>&lt;p&gt;&lt;strong&gt;The Big Picture&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Azure gives you five overlapping ways to encrypt VM disk data. They sound similar, use some of the same terminology, and the Azure portal mixes them all together in the &quot;Encryption&quot; blade — which makes choosing correctly genuinely confusing. Then in late 2025, Microsoft announced that one of the most commonly used options — &lt;strong&gt;Azure Disk Encryption (ADE)&lt;/strong&gt; — is being retired. If you have ADE-encrypted VMs and you do nothing before &lt;strong&gt;September 15, 2028&lt;/strong&gt;, your disks will fail to unlock after any reboot.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Retirement alert: Azure Disk Encryption&lt;/strong&gt; After September 15, 2028, ADE-enabled workloads will continue to run — but encrypted disks will fail to unlock after VM reboots, causing service disruption. All ADE-enabled VMs (including backups) must migrate before this date. There is &lt;em&gt;no in-place migration path&lt;/em&gt;; you must rebuild the VM.&lt;/p&gt;
&lt;p&gt;This article covers what each option actually does, where it operates in the stack, detailed pros and cons, and a clear decision guide — plus the full migration picture.&lt;/p&gt;
&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;
&lt;p&gt;&lt;strong&gt;Diagram 1&lt;/strong&gt; shows where each encryption option operates in the Azure stack.&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;svg viewBox=&quot;0 0 760 530&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; aria-label=&quot;Azure disk encryption options by layer&quot;&gt;
    &lt;defs&gt;
      &lt;marker id=&quot;arr1&quot; viewBox=&quot;0 0 10 10&quot; refX=&quot;8&quot; refY=&quot;5&quot; markerWidth=&quot;6&quot; markerHeight=&quot;6&quot; orient=&quot;auto-start-reverse&quot;&gt;
        &lt;path d=&quot;M2 1L8 5L2 9&quot; fill=&quot;none&quot; stroke=&quot;#8fa3c0&quot; stroke-width=&quot;1.5&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;/&gt;
      &lt;/marker&gt;
    &lt;/defs&gt;
    &lt;text x=&quot;12&quot; y=&quot;112&quot; class=&quot;d-text-muted&quot; font-size=&quot;11&quot; font-weight=&quot;600&quot; text-anchor=&quot;start&quot;&gt;OS LAYER&lt;/text&gt;
    &lt;text x=&quot;12&quot; y=&quot;126&quot; class=&quot;d-text-muted&quot; font-size=&quot;10&quot;&gt;Inside the VM&lt;/text&gt;
    &lt;text x=&quot;12&quot; y=&quot;228&quot; class=&quot;d-text-muted&quot; font-size=&quot;11&quot; font-weight=&quot;600&quot; text-anchor=&quot;start&quot;&gt;HOST LAYER&lt;/text&gt;
    &lt;text x=&quot;12&quot; y=&quot;242&quot; class=&quot;d-text-muted&quot; font-size=&quot;10&quot;&gt;Azure phys. server&lt;/text&gt;
    &lt;text x=&quot;12&quot; y=&quot;348&quot; class=&quot;d-text-muted&quot; font-size=&quot;11&quot; font-weight=&quot;600&quot; text-anchor=&quot;start&quot;&gt;STORAGE LAYER&lt;/text&gt;
    &lt;text x=&quot;12&quot; y=&quot;362&quot; class=&quot;d-text-muted&quot; font-size=&quot;10&quot;&gt;Managed disk cluster&lt;/text&gt;
    &lt;rect x=&quot;120&quot; y=&quot;80&quot; width=&quot;610&quot; height=&quot;84&quot; rx=&quot;12&quot; fill=&quot;#fce4ec&quot; stroke=&quot;#f48fb1&quot; stroke-width=&quot;0.75&quot;/&gt;
    &lt;rect x=&quot;300&quot; y=&quot;92&quot; width=&quot;300&quot; height=&quot;60&quot; rx=&quot;8&quot; fill=&quot;#e53935&quot; stroke=&quot;#b71c1c&quot; stroke-width=&quot;0.5&quot;/&gt;
    &lt;text x=&quot;450&quot; y=&quot;116&quot; class=&quot;d-text-primary&quot; font-size=&quot;14&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot; fill=&quot;#fff&quot;&gt;Azure Disk Encryption (ADE)&lt;/text&gt;
    &lt;text x=&quot;450&quot; y=&quot;135&quot; font-size=&quot;12&quot; text-anchor=&quot;middle&quot; fill=&quot;#ffcdd2&quot; font-family=&quot;&#39;Segoe UI&#39;,sans-serif&quot;&gt;BitLocker (Win) / dm-crypt (Linux)  ·  ⚠ Retiring Sep 2028&lt;/text&gt;
    &lt;text x=&quot;175&quot; y=&quot;116&quot; class=&quot;d-text-red&quot; font-size=&quot;13&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot;&gt;OS&lt;/text&gt;
    &lt;text x=&quot;175&quot; y=&quot;133&quot; class=&quot;d-text-red&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;encryption&lt;/text&gt;
    &lt;rect x=&quot;120&quot; y=&quot;196&quot; width=&quot;610&quot; height=&quot;84&quot; rx=&quot;12&quot; fill=&quot;#ede7f6&quot; stroke=&quot;#b39ddb&quot; stroke-width=&quot;0.75&quot;/&gt;
    &lt;rect x=&quot;300&quot; y=&quot;208&quot; width=&quot;300&quot; height=&quot;60&quot; rx=&quot;8&quot; fill=&quot;#512da8&quot; stroke=&quot;#311b92&quot; stroke-width=&quot;0.5&quot;/&gt;
    &lt;text x=&quot;450&quot; y=&quot;232&quot; font-size=&quot;14&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot; fill=&quot;#fff&quot; font-family=&quot;&#39;Segoe UI&#39;,sans-serif&quot;&gt;Encryption at Host&lt;/text&gt;
    &lt;text x=&quot;450&quot; y=&quot;251&quot; font-size=&quot;12&quot; text-anchor=&quot;middle&quot; fill=&quot;#ce93d8&quot; font-family=&quot;&#39;Segoe UI&#39;,sans-serif&quot;&gt;Temp disk + disk caches + transit  ·  ✓ Recommended&lt;/text&gt;
    &lt;text x=&quot;175&quot; y=&quot;232&quot; class=&quot;d-text-purple&quot; font-size=&quot;13&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot;&gt;Host&lt;/text&gt;
    &lt;text x=&quot;175&quot; y=&quot;249&quot; class=&quot;d-text-purple&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;encryption&lt;/text&gt;
    &lt;rect x=&quot;120&quot; y=&quot;312&quot; width=&quot;610&quot; height=&quot;84&quot; rx=&quot;12&quot; fill=&quot;#e0f2f1&quot; stroke=&quot;#80cbc4&quot; stroke-width=&quot;0.75&quot;/&gt;
    &lt;rect x=&quot;300&quot; y=&quot;324&quot; width=&quot;140&quot; height=&quot;60&quot; rx=&quot;8&quot; fill=&quot;#00695c&quot; stroke=&quot;#004d40&quot; stroke-width=&quot;0.5&quot;/&gt;
    &lt;text x=&quot;370&quot; y=&quot;348&quot; font-size=&quot;13&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot; fill=&quot;#fff&quot; font-family=&quot;&#39;Segoe UI&#39;,sans-serif&quot;&gt;SSE + PMK&lt;/text&gt;
    &lt;text x=&quot;370&quot; y=&quot;367&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot; fill=&quot;#b2dfdb&quot; font-family=&quot;&#39;Segoe UI&#39;,sans-serif&quot;&gt;Default · always on&lt;/text&gt;
    &lt;rect x=&quot;460&quot; y=&quot;324&quot; width=&quot;140&quot; height=&quot;60&quot; rx=&quot;8&quot; fill=&quot;#00897b&quot; stroke=&quot;#004d40&quot; stroke-width=&quot;0.5&quot;/&gt;
    &lt;text x=&quot;530&quot; y=&quot;348&quot; font-size=&quot;13&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot; fill=&quot;#fff&quot; font-family=&quot;&#39;Segoe UI&#39;,sans-serif&quot;&gt;SSE + CMK&lt;/text&gt;
    &lt;text x=&quot;530&quot; y=&quot;367&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot; fill=&quot;#b2dfdb&quot; font-family=&quot;&#39;Segoe UI&#39;,sans-serif&quot;&gt;+ Disk Encryption Set&lt;/text&gt;
    &lt;text x=&quot;175&quot; y=&quot;348&quot; class=&quot;d-text-teal&quot; font-size=&quot;13&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot;&gt;Storage&lt;/text&gt;
    &lt;text x=&quot;175&quot; y=&quot;365&quot; class=&quot;d-text-teal&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;encryption&lt;/text&gt;
    &lt;line x1=&quot;450&quot; y1=&quot;164&quot; x2=&quot;450&quot; y2=&quot;194&quot; class=&quot;d-arr&quot; marker-end=&quot;url(#arr1)&quot;/&gt;
    &lt;line x1=&quot;450&quot; y1=&quot;280&quot; x2=&quot;450&quot; y2=&quot;310&quot; class=&quot;d-arr&quot; marker-end=&quot;url(#arr1)&quot;/&gt;
    &lt;rect x=&quot;120&quot; y=&quot;424&quot; width=&quot;610&quot; height=&quot;88&quot; rx=&quot;10&quot; fill=&quot;#f8f9fc&quot; stroke=&quot;#dde2ed&quot; stroke-width=&quot;0.75&quot; stroke-dasharray=&quot;5 3&quot;/&gt;
    &lt;text x=&quot;140&quot; y=&quot;446&quot; class=&quot;d-text-muted&quot; font-size=&quot;11&quot; font-weight=&quot;600&quot;&gt;COVERAGE COMPARISON&lt;/text&gt;
    &lt;text x=&quot;310&quot; y=&quot;464&quot; class=&quot;d-text-muted&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;SSE+PMK&lt;/text&gt;
    &lt;text x=&quot;400&quot; y=&quot;464&quot; class=&quot;d-text-muted&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;SSE+CMK&lt;/text&gt;
    &lt;text x=&quot;490&quot; y=&quot;464&quot; class=&quot;d-text-muted&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;Enc@Host&lt;/text&gt;
    &lt;text x=&quot;590&quot; y=&quot;464&quot; class=&quot;d-text-muted&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;ADE ⚠&lt;/text&gt;
    &lt;text x=&quot;140&quot; y=&quot;482&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot;&gt;OS + data disk&lt;/text&gt;
    &lt;text x=&quot;140&quot; y=&quot;500&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot;&gt;Temp disk + cache + transit&lt;/text&gt;
    &lt;text x=&quot;140&quot; y=&quot;518&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot;&gt;Customer key control&lt;/text&gt;
    &lt;text x=&quot;310&quot; y=&quot;482&quot; font-size=&quot;13&quot; text-anchor=&quot;middle&quot; fill=&quot;#2e7d32&quot;&gt;✓&lt;/text&gt;
    &lt;text x=&quot;310&quot; y=&quot;500&quot; font-size=&quot;13&quot; text-anchor=&quot;middle&quot; fill=&quot;#c62828&quot;&gt;✗&lt;/text&gt;
    &lt;text x=&quot;310&quot; y=&quot;518&quot; font-size=&quot;13&quot; text-anchor=&quot;middle&quot; fill=&quot;#c62828&quot;&gt;✗&lt;/text&gt;
    &lt;text x=&quot;400&quot; y=&quot;482&quot; font-size=&quot;13&quot; text-anchor=&quot;middle&quot; fill=&quot;#2e7d32&quot;&gt;✓&lt;/text&gt;
    &lt;text x=&quot;400&quot; y=&quot;500&quot; font-size=&quot;13&quot; text-anchor=&quot;middle&quot; fill=&quot;#c62828&quot;&gt;✗&lt;/text&gt;
    &lt;text x=&quot;400&quot; y=&quot;518&quot; font-size=&quot;13&quot; text-anchor=&quot;middle&quot; fill=&quot;#2e7d32&quot;&gt;✓&lt;/text&gt;
    &lt;text x=&quot;490&quot; y=&quot;482&quot; font-size=&quot;13&quot; text-anchor=&quot;middle&quot; fill=&quot;#2e7d32&quot;&gt;✓&lt;/text&gt;
    &lt;text x=&quot;490&quot; y=&quot;500&quot; font-size=&quot;13&quot; text-anchor=&quot;middle&quot; fill=&quot;#2e7d32&quot;&gt;✓&lt;/text&gt;
    &lt;text x=&quot;490&quot; y=&quot;518&quot; font-size=&quot;13&quot; text-anchor=&quot;middle&quot; fill=&quot;#2e7d32&quot;&gt;✓&lt;/text&gt;
    &lt;text x=&quot;590&quot; y=&quot;482&quot; font-size=&quot;13&quot; text-anchor=&quot;middle&quot; fill=&quot;#2e7d32&quot;&gt;✓&lt;/text&gt;
    &lt;text x=&quot;590&quot; y=&quot;500&quot; font-size=&quot;13&quot; text-anchor=&quot;middle&quot; fill=&quot;#2e7d32&quot;&gt;✓&lt;/text&gt;
    &lt;text x=&quot;590&quot; y=&quot;518&quot; font-size=&quot;13&quot; text-anchor=&quot;middle&quot; fill=&quot;#c62828&quot;&gt;✗&lt;/text&gt;
  &lt;/svg&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;p&gt;&lt;strong&gt;SSE with PMK&lt;/strong&gt; is the Azure default. Azure manages the key lifecycle and encryption happens at the storage cluster level after data leaves the VM and host. It uses AES-256 on every managed disk, snapshot, and image. It is transparent and cannot be turned off.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt; zero configuration, no cost overhead, Microsoft handles key rotation and lifecycle, works with every disk type including Ultra Disk and Premium SSD v2, and no operational burden. &lt;br /&gt;&lt;strong&gt;Cons:&lt;/strong&gt; Microsoft holds the keys, no customer control, no audit trail of key access, does not satisfy compliance requirements needing key control, temp disks and disk caches are not encrypted, and data is unencrypted in transit between VM host and storage cluster.&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;&lt;strong&gt;SSE with CMK&lt;/strong&gt; is the option when you want to supply and manage your own keys. You store a key in Azure Key Vault and create a Disk Encryption Set (DES) that links the key to managed disks. Azure generates a unique Data Encryption Key (DEK) per disk, wraps it with your CMK, stores the wrapped DEK with the disk, and unwraps it on access. Revoking the CMK locks all linked disks.&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;&lt;strong&gt;Diagram 2&lt;/strong&gt; shows SSE with CMK and Disk Encryption Set architecture.&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;svg viewBox=&quot;0 0 760 340&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; aria-label=&quot;CMK and Disk Encryption Set key chain architecture&quot;&gt;
    &lt;defs&gt;
      &lt;marker id=&quot;arr2&quot; viewBox=&quot;0 0 10 10&quot; refX=&quot;8&quot; refY=&quot;5&quot; markerWidth=&quot;6&quot; markerHeight=&quot;6&quot; orient=&quot;auto-start-reverse&quot;&gt;
        &lt;path d=&quot;M2 1L8 5L2 9&quot; fill=&quot;none&quot; stroke=&quot;#8fa3c0&quot; stroke-width=&quot;1.5&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;/&gt;
      &lt;/marker&gt;
    &lt;/defs&gt;
    &lt;rect x=&quot;30&quot; y=&quot;50&quot; width=&quot;160&quot; height=&quot;80&quot; rx=&quot;10&quot; fill=&quot;#fff8e1&quot; stroke=&quot;#ffe082&quot; stroke-width=&quot;1&quot;/&gt;
    &lt;text x=&quot;110&quot; y=&quot;80&quot; class=&quot;d-text-amber&quot; font-size=&quot;14&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot;&gt;Azure Key Vault&lt;/text&gt;
    &lt;text x=&quot;110&quot; y=&quot;98&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;Your RSA key (CMK)&lt;/text&gt;
    &lt;text x=&quot;110&quot; y=&quot;114&quot; class=&quot;d-text-muted&quot; font-size=&quot;10&quot; text-anchor=&quot;middle&quot;&gt;Owned &amp;amp; controlled by you&lt;/text&gt;
    &lt;line x1=&quot;190&quot; y1=&quot;90&quot; x2=&quot;248&quot; y2=&quot;90&quot; fill=&quot;none&quot; stroke=&quot;#8fa3c0&quot; stroke-width=&quot;1.5&quot; marker-end=&quot;url(#arr2)&quot;/&gt;
    &lt;text x=&quot;220&quot; y=&quot;80&quot; class=&quot;d-text-muted&quot; font-size=&quot;10&quot; text-anchor=&quot;middle&quot;&gt;wraps DEK&lt;/text&gt;
    &lt;rect x=&quot;250&quot; y=&quot;50&quot; width=&quot;180&quot; height=&quot;80&quot; rx=&quot;10&quot; fill=&quot;#ede7f6&quot; stroke=&quot;#b39ddb&quot; stroke-width=&quot;1&quot;/&gt;
    &lt;text x=&quot;340&quot; y=&quot;80&quot; class=&quot;d-text-purple&quot; font-size=&quot;14&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot;&gt;Disk Encryption Set&lt;/text&gt;
    &lt;text x=&quot;340&quot; y=&quot;98&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;Links CMK → disks&lt;/text&gt;
    &lt;text x=&quot;340&quot; y=&quot;114&quot; class=&quot;d-text-muted&quot; font-size=&quot;10&quot; text-anchor=&quot;middle&quot;&gt;Azure ARM resource&lt;/text&gt;
    &lt;line x1=&quot;430&quot; y1=&quot;90&quot; x2=&quot;488&quot; y2=&quot;70&quot; fill=&quot;none&quot; stroke=&quot;#8fa3c0&quot; stroke-width=&quot;1.5&quot; marker-end=&quot;url(#arr2)&quot;/&gt;
    &lt;line x1=&quot;430&quot; y1=&quot;90&quot; x2=&quot;488&quot; y2=&quot;110&quot; fill=&quot;none&quot; stroke=&quot;#8fa3c0&quot; stroke-width=&quot;1.5&quot; marker-end=&quot;url(#arr2)&quot;/&gt;
    &lt;text x=&quot;460&quot; y=&quot;82&quot; class=&quot;d-text-muted&quot; font-size=&quot;10&quot;&gt;assigned to&lt;/text&gt;
    &lt;rect x=&quot;490&quot; y=&quot;38&quot; width=&quot;130&quot; height=&quot;50&quot; rx=&quot;8&quot; fill=&quot;#e0f2f1&quot; stroke=&quot;#80cbc4&quot; stroke-width=&quot;0.75&quot;/&gt;
    &lt;text x=&quot;555&quot; y=&quot;66&quot; class=&quot;d-text-teal&quot; font-size=&quot;13&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot;&gt;OS disk&lt;/text&gt;
    &lt;rect x=&quot;490&quot; y=&quot;100&quot; width=&quot;130&quot; height=&quot;50&quot; rx=&quot;8&quot; fill=&quot;#e0f2f1&quot; stroke=&quot;#80cbc4&quot; stroke-width=&quot;0.75&quot;/&gt;
    &lt;text x=&quot;555&quot; y=&quot;128&quot; class=&quot;d-text-teal&quot; font-size=&quot;13&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot;&gt;Data disk(s)&lt;/text&gt;
    &lt;rect x=&quot;490&quot; y=&quot;164&quot; width=&quot;130&quot; height=&quot;40&quot; rx=&quot;8&quot; fill=&quot;none&quot; stroke=&quot;#dde2ed&quot; stroke-width=&quot;1&quot; stroke-dasharray=&quot;5 3&quot;/&gt;
    &lt;text x=&quot;555&quot; y=&quot;188&quot; class=&quot;d-text-muted&quot; font-size=&quot;12&quot; text-anchor=&quot;middle&quot;&gt;Virtual Machine&lt;/text&gt;
    &lt;line x1=&quot;555&quot; y1=&quot;150&quot; x2=&quot;555&quot; y2=&quot;163&quot; fill=&quot;none&quot; stroke=&quot;#dde2ed&quot; stroke-width=&quot;0.75&quot; stroke-dasharray=&quot;3 2&quot;/&gt;
    &lt;rect x=&quot;30&quot; y=&quot;168&quot; width=&quot;440&quot; height=&quot;148&quot; rx=&quot;10&quot; fill=&quot;#f8f9fc&quot; stroke=&quot;#dde2ed&quot; stroke-width=&quot;0.75&quot;/&gt;
    &lt;text x=&quot;50&quot; y=&quot;192&quot; class=&quot;d-text-muted&quot; font-size=&quot;11&quot; font-weight=&quot;600&quot;&gt;HOW ENVELOPE ENCRYPTION WORKS AT REST&lt;/text&gt;
    &lt;text x=&quot;50&quot; y=&quot;214&quot; class=&quot;d-text-secondary&quot; font-size=&quot;12&quot;&gt;1.  Azure generates a unique Data Encryption Key (DEK) per disk&lt;/text&gt;
    &lt;text x=&quot;50&quot; y=&quot;234&quot; class=&quot;d-text-secondary&quot; font-size=&quot;12&quot;&gt;2.  DEK is wrapped (encrypted) using your CMK from Key Vault&lt;/text&gt;
    &lt;text x=&quot;50&quot; y=&quot;254&quot; class=&quot;d-text-secondary&quot; font-size=&quot;12&quot;&gt;3.  Wrapped DEK is stored alongside the disk metadata&lt;/text&gt;
    &lt;text x=&quot;50&quot; y=&quot;274&quot; class=&quot;d-text-secondary&quot; font-size=&quot;12&quot;&gt;4.  On read, Azure calls Key Vault to unwrap DEK → decrypt data&lt;/text&gt;
    &lt;text x=&quot;50&quot; y=&quot;294&quot; class=&quot;d-text-red&quot; font-size=&quot;12&quot; font-weight=&quot;600&quot;&gt;5.  Revoke CMK = instant access denial to ALL linked disks&lt;/text&gt;
  &lt;/svg&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt; full key lifecycle control, satisfies HIPAA/PCI-DSS/ISO 27001/FedRAMP key control needs, Key Vault audit logs give a complete access trail, instant access revocation is possible, supports BYOK, works with Ultra Disk and Premium SSD v2, and is compatible with Encryption at Host. &lt;br /&gt;&lt;strong&gt;Cons:&lt;/strong&gt; temp disks and disk caches are still not encrypted without Encryption at Host, transit between host and storage is not encrypted, switching to CMK is one-way, VMs must be deallocated to assign disks to a DES, Key Vault setup adds operational overhead, and Key Vault availability is now in the critical path for VM operations.&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;&lt;strong&gt;Encryption at Host&lt;/strong&gt; is the recommended long-term option. It encrypts at the VM host level, covering temp disks, OS/data disk caches, and the transit channel from host to storage. It does this in host hardware, so there is no measurable CPU impact on the VM. It can work with either PMK or CMK.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Feature registration required:&lt;/strong&gt; register the EncryptionAtHost feature on your subscription with Azure before enabling it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt; true end-to-end encryption, zero VM CPU overhead, works with PMK and CMK, supports Ultra Disk and Premium SSD v2, Microsoft recommended replacement for ADE, supported on most current VM sizes, and can be enabled at VM creation or after deallocation. &lt;br /&gt;&lt;strong&gt;Cons:&lt;/strong&gt; requires subscription-level feature registration, not supported on all older VM SKUs, cannot be combined with ADE, and not available for VMs that have ever had ADE enabled.&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;&lt;strong&gt;Azure Disk Encryption (ADE)&lt;/strong&gt; encrypts at the OS layer using BitLocker on Windows or dm-crypt on Linux. That means the OS performs encryption and the encrypted data path extends from the VM through storage. ADE was attractive for some compliance scenarios because it gave OS-layer encryption that appeared to cover transit before data left the VM.&lt;/p&gt;
&lt;p&gt;The problem is the complexity. ADE requires the VM to be running to enable it. It conflicts with SSE+CMK. It cannot be used with Encryption at Host. It does not support newer disk types like Ultra Disk or Premium SSD v2. It imposes CPU overhead on the VM. It creates a UDE metadata flag on disks that persists after ADE is disabled, which makes migration more involved than a simple switch.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Do not enable ADE on any new VM.&lt;/strong&gt; Microsoft says use Encryption at Host for new deployments. ADE should only remain in use on existing VMs that have not yet migrated, and only until September 15, 2028.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pros (historical):&lt;/strong&gt; full data path encryption including OS-layer transit, BitLocker/dm-crypt are well understood and auditable technologies, encrypts temp disk when VolumeType=All is set, and satisfied strict in-transit compliance requirements. &lt;br /&gt;&lt;strong&gt;Cons:&lt;/strong&gt; retiring September 15, 2028, incompatible with SSE+CMK and Encryption at Host, does not support Ultra Disk or Premium SSD v2, not supported on Basic/A-series/v6+ VM sizes, VM must be running to enable it, UDE flag persists after decryption, cannot encrypt failover cluster VMs, significant VM CPU overhead, and there is no in-place migration path to Encryption at Host.&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;&lt;strong&gt;The Retirement&lt;/strong&gt; means that ADE-enabled workloads will continue to run, but encrypted disks will fail to unlock after VM reboots. That means any planned or unplanned reboot after September 15, 2028, will leave disks locked and VMs unable to start. This is a hard service disruption on a known date, not a soft deprecation.&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;&lt;strong&gt;Diagram 3&lt;/strong&gt; shows the ADE retirement timeline and migration path.&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;svg viewBox=&quot;0 0 760 430&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; aria-label=&quot;ADE retirement timeline and migration steps&quot;&gt;
    &lt;defs&gt;
      &lt;marker id=&quot;arr3&quot; viewBox=&quot;0 0 10 10&quot; refX=&quot;8&quot; refY=&quot;5&quot; markerWidth=&quot;6&quot; markerHeight=&quot;6&quot; orient=&quot;auto-start-reverse&quot;&gt;
        &lt;path d=&quot;M2 1L8 5L2 9&quot; fill=&quot;none&quot; stroke=&quot;#8fa3c0&quot; stroke-width=&quot;1.5&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;/&gt;
      &lt;/marker&gt;
    &lt;/defs&gt;
    &lt;rect x=&quot;60&quot; y=&quot;108&quot; width=&quot;640&quot; height=&quot;8&quot; rx=&quot;4&quot; fill=&quot;#e5e9f0&quot;/&gt;
    &lt;rect x=&quot;100&quot; y=&quot;108&quot; width=&quot;420&quot; height=&quot;8&quot; rx=&quot;3&quot; fill=&quot;#ffe082&quot; opacity=&quot;0.8&quot;/&gt;
    &lt;line x1=&quot;100&quot; y1=&quot;86&quot; x2=&quot;100&quot; y2=&quot;128&quot; stroke=&quot;#1565c0&quot; stroke-width=&quot;2&quot;/&gt;
    &lt;circle cx=&quot;100&quot; cy=&quot;112&quot; r=&quot;6&quot; fill=&quot;#fff&quot; stroke=&quot;#1565c0&quot; stroke-width=&quot;2&quot;/&gt;
    &lt;text x=&quot;100&quot; y=&quot;78&quot; class=&quot;d-text-blue&quot; font-size=&quot;12&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot;&gt;NOW (2026)&lt;/text&gt;
    &lt;text x=&quot;100&quot; y=&quot;148&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;ADE still works&lt;/text&gt;
    &lt;text x=&quot;310&quot; y=&quot;78&quot; fill=&quot;#e65100&quot; font-size=&quot;12&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot; font-family=&quot;&#39;Segoe UI&#39;,sans-serif&quot;&gt;⚠  Plan and migrate now — do not wait&lt;/text&gt;
    &lt;line x1=&quot;520&quot; y1=&quot;68&quot; x2=&quot;520&quot; y2=&quot;134&quot; stroke=&quot;#e53935&quot; stroke-width=&quot;2.5&quot;/&gt;
    &lt;circle cx=&quot;520&quot; cy=&quot;112&quot; r=&quot;7&quot; fill=&quot;#e53935&quot;/&gt;
    &lt;text x=&quot;520&quot; y=&quot;58&quot; fill=&quot;#b71c1c&quot; font-size=&quot;13&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot; font-family=&quot;&#39;Segoe UI&#39;,sans-serif&quot;&gt;Sep 15, 2028&lt;/text&gt;
    &lt;text x=&quot;520&quot; y=&quot;148&quot; fill=&quot;#b71c1c&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot; font-family=&quot;&#39;Segoe UI&#39;,sans-serif&quot;&gt;ADE retires&lt;/text&gt;
    &lt;line x1=&quot;680&quot; y1=&quot;86&quot; x2=&quot;680&quot; y2=&quot;128&quot; stroke=&quot;#e53935&quot; stroke-width=&quot;1.5&quot;/&gt;
    &lt;circle cx=&quot;680&quot; cy=&quot;112&quot; r=&quot;6&quot; fill=&quot;#e53935&quot; opacity=&quot;0.5&quot;/&gt;
    &lt;text x=&quot;680&quot; y=&quot;78&quot; fill=&quot;#b71c1c&quot; font-size=&quot;12&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot; font-family=&quot;&#39;Segoe UI&#39;,sans-serif&quot;&gt;Post-2028&lt;/text&gt;
    &lt;text x=&quot;680&quot; y=&quot;148&quot; fill=&quot;#b71c1c&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot; font-family=&quot;&#39;Segoe UI&#39;,sans-serif&quot;&gt;Disks lock on reboot&lt;/text&gt;
    &lt;rect x=&quot;30&quot; y=&quot;186&quot; width=&quot;148&quot; height=&quot;70&quot; rx=&quot;8&quot; fill=&quot;#f1f3f8&quot; stroke=&quot;#c5cde0&quot; stroke-width=&quot;0.75&quot;/&gt;
    &lt;text x=&quot;104&quot; y=&quot;212&quot; class=&quot;d-text-primary&quot; font-size=&quot;13&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot;&gt;1. Inventory&lt;/text&gt;
    &lt;text x=&quot;104&quot; y=&quot;229&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;Find all ADE VMs&lt;/text&gt;
    &lt;text x=&quot;104&quot; y=&quot;245&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;including backups&lt;/text&gt;
    &lt;line x1=&quot;178&quot; y1=&quot;221&quot; x2=&quot;196&quot; y2=&quot;221&quot; fill=&quot;none&quot; stroke=&quot;#8fa3c0&quot; stroke-width=&quot;1.5&quot; marker-end=&quot;url(#arr3)&quot;/&gt;
    &lt;rect x=&quot;198&quot; y=&quot;186&quot; width=&quot;148&quot; height=&quot;70&quot; rx=&quot;8&quot; fill=&quot;#fff8e1&quot; stroke=&quot;#ffe082&quot; stroke-width=&quot;0.75&quot;/&gt;
    &lt;text x=&quot;272&quot; y=&quot;212&quot; class=&quot;d-text-amber&quot; font-size=&quot;13&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot;&gt;2. Disable ADE&lt;/text&gt;
    &lt;text x=&quot;272&quot; y=&quot;229&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;Wait for full OS-level&lt;/text&gt;
    &lt;text x=&quot;272&quot; y=&quot;245&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;decryption to complete&lt;/text&gt;
    &lt;line x1=&quot;346&quot; y1=&quot;221&quot; x2=&quot;364&quot; y2=&quot;221&quot; fill=&quot;none&quot; stroke=&quot;#8fa3c0&quot; stroke-width=&quot;1.5&quot; marker-end=&quot;url(#arr3)&quot;/&gt;
    &lt;rect x=&quot;366&quot; y=&quot;186&quot; width=&quot;148&quot; height=&quot;70&quot; rx=&quot;8&quot; fill=&quot;#fff8e1&quot; stroke=&quot;#ffe082&quot; stroke-width=&quot;0.75&quot;/&gt;
    &lt;text x=&quot;440&quot; y=&quot;210&quot; class=&quot;d-text-amber&quot; font-size=&quot;13&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot;&gt;3. New disk&lt;/text&gt;
    &lt;text x=&quot;440&quot; y=&quot;228&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;Upload VHD blob to create&lt;/text&gt;
    &lt;text x=&quot;440&quot; y=&quot;244&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;disk without UDE flag&lt;/text&gt;
    &lt;line x1=&quot;514&quot; y1=&quot;221&quot; x2=&quot;532&quot; y2=&quot;221&quot; fill=&quot;none&quot; stroke=&quot;#8fa3c0&quot; stroke-width=&quot;1.5&quot; marker-end=&quot;url(#arr3)&quot;/&gt;
    &lt;rect x=&quot;534&quot; y=&quot;186&quot; width=&quot;196&quot; height=&quot;70&quot; rx=&quot;8&quot; fill=&quot;#e0f2f1&quot; stroke=&quot;#80cbc4&quot; stroke-width=&quot;0.75&quot;/&gt;
    &lt;text x=&quot;632&quot; y=&quot;210&quot; class=&quot;d-text-teal&quot; font-size=&quot;13&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot;&gt;4. New VM&lt;/text&gt;
    &lt;text x=&quot;632&quot; y=&quot;228&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;Enable Encryption at Host&lt;/text&gt;
    &lt;text x=&quot;632&quot; y=&quot;244&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;on the new VM&lt;/text&gt;
    &lt;rect x=&quot;30&quot; y=&quot;284&quot; width=&quot;700&quot; height=&quot;120&quot; rx=&quot;10&quot; fill=&quot;#ffebee&quot; stroke=&quot;#ef9a9a&quot; stroke-width=&quot;0.75&quot;/&gt;
    &lt;text x=&quot;50&quot; y=&quot;308&quot; class=&quot;d-text-red&quot; font-size=&quot;12&quot; font-weight=&quot;700&quot;&gt;KEY MIGRATION CAVEATS&lt;/text&gt;
    &lt;text x=&quot;50&quot; y=&quot;328&quot; class=&quot;d-text-red&quot; font-size=&quot;11&quot;&gt;⚠  No in-place migration — you must create new disks and rebuild the VM&lt;/text&gt;
    &lt;text x=&quot;50&quot; y=&quot;348&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot;&gt;•  Linux OS disks: ADE disable is unsupported — you must create an entirely new VM with a new OS disk&lt;/text&gt;
    &lt;text x=&quot;50&quot; y=&quot;366&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot;&gt;•  Windows: can only encrypt OS-only or OS+all disks — not data disks alone&lt;/text&gt;
    &lt;text x=&quot;50&quot; y=&quot;384&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot;&gt;•  Snapshots and disk copies retain the UDE flag — use the Upload method, not Copy&lt;/text&gt;
    &lt;text x=&quot;50&quot; y=&quot;402&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot;&gt;•  Domain-joined VMs require additional steps: remove from domain before deleting the original VM&lt;/text&gt;
  &lt;/svg&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;p&gt;&lt;strong&gt;Decision guide:&lt;/strong&gt; For new VM deployments, if you do not need customer-controlled keys then SSE + PMK is the simplest default. If compliance needs customer key control, use SSE + CMK with Disk Encryption Set. If you need true end-to-end coverage for temp disk, cache, and transit, choose Encryption at Host. Never enable ADE on new VMs; it is retiring and has no new-workload path.&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;&lt;strong&gt;Diagram 4&lt;/strong&gt; helps choose the right Azure disk encryption option for your situation.&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;svg viewBox=&quot;0 0 760 520&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; aria-label=&quot;Decision flowchart for Azure disk encryption option selection&quot;&gt;
    &lt;defs&gt;
      &lt;marker id=&quot;arr4&quot; viewBox=&quot;0 0 10 10&quot; refX=&quot;8&quot; refY=&quot;5&quot; markerWidth=&quot;6&quot; markerHeight=&quot;6&quot; orient=&quot;auto-start-reverse&quot;&gt;
        &lt;path d=&quot;M2 1L8 5L2 9&quot; fill=&quot;none&quot; stroke=&quot;#8fa3c0&quot; stroke-width=&quot;1.5&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;/&gt;
      &lt;/marker&gt;
    &lt;/defs&gt;
    &lt;rect x=&quot;260&quot; y=&quot;20&quot; width=&quot;200&quot; height=&quot;46&quot; rx=&quot;23&quot; fill=&quot;#0f3460&quot; stroke=&quot;#0d47a1&quot; stroke-width=&quot;0.5&quot;/&gt;
    &lt;text x=&quot;360&quot; y=&quot;47&quot; font-size=&quot;14&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot; fill=&quot;#fff&quot; font-family=&quot;&#39;Segoe UI&#39;,sans-serif&quot;&gt;New VM deployment?&lt;/text&gt;
    &lt;line x1=&quot;460&quot; y1=&quot;43&quot; x2=&quot;548&quot; y2=&quot;43&quot; fill=&quot;none&quot; stroke=&quot;#8fa3c0&quot; stroke-width=&quot;1.5&quot; marker-end=&quot;url(#arr4)&quot;/&gt;
    &lt;text x=&quot;502&quot; y=&quot;33&quot; class=&quot;d-text-muted&quot; font-size=&quot;10&quot; text-anchor=&quot;middle&quot;&gt;existing&lt;/text&gt;
    &lt;rect x=&quot;550&quot; y=&quot;20&quot; width=&quot;180&quot; height=&quot;46&quot; rx=&quot;8&quot; fill=&quot;#ffebee&quot; stroke=&quot;#ef9a9a&quot; stroke-width=&quot;1&quot;/&gt;
    &lt;text x=&quot;640&quot; y=&quot;38&quot; fill=&quot;#b71c1c&quot; font-size=&quot;13&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot; font-family=&quot;&#39;Segoe UI&#39;,sans-serif&quot;&gt;⚠  Using ADE?&lt;/text&gt;
    &lt;text x=&quot;640&quot; y=&quot;56&quot; fill=&quot;#b71c1c&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot; font-family=&quot;&#39;Segoe UI&#39;,sans-serif&quot;&gt;Migrate before Sep 2028&lt;/text&gt;
    &lt;line x1=&quot;360&quot; y1=&quot;66&quot; x2=&quot;360&quot; y2=&quot;110&quot; fill=&quot;none&quot; stroke=&quot;#8fa3c0&quot; stroke-width=&quot;1.5&quot; marker-end=&quot;url(#arr4)&quot;/&gt;
    &lt;text x=&quot;370&quot; y=&quot;92&quot; class=&quot;d-text-muted&quot; font-size=&quot;10&quot;&gt;new&lt;/text&gt;
    &lt;rect x=&quot;190&quot; y=&quot;112&quot; width=&quot;340&quot; height=&quot;52&quot; rx=&quot;10&quot; fill=&quot;#f1f3f8&quot; stroke=&quot;#c5cde0&quot; stroke-width=&quot;0.75&quot;/&gt;
    &lt;text x=&quot;360&quot; y=&quot;133&quot; class=&quot;d-text-primary&quot; font-size=&quot;13&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot;&gt;Compliance requires customer key control?&lt;/text&gt;
    &lt;text x=&quot;360&quot; y=&quot;152&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;(HIPAA, PCI-DSS, FedRAMP, ISO 27001)&lt;/text&gt;
    &lt;line x1=&quot;190&quot; y1=&quot;138&quot; x2=&quot;138&quot; y2=&quot;138&quot; fill=&quot;none&quot; stroke=&quot;#8fa3c0&quot; stroke-width=&quot;1.5&quot; marker-end=&quot;url(#arr4)&quot;/&gt;
    &lt;text x=&quot;162&quot; y=&quot;128&quot; class=&quot;d-text-muted&quot; font-size=&quot;10&quot; text-anchor=&quot;middle&quot;&gt;No&lt;/text&gt;
    &lt;rect x=&quot;20&quot; y=&quot;112&quot; width=&quot;116&quot; height=&quot;52&quot; rx=&quot;8&quot; fill=&quot;#e0f2f1&quot; stroke=&quot;#80cbc4&quot; stroke-width=&quot;0.75&quot;/&gt;
    &lt;text x=&quot;78&quot; y=&quot;133&quot; class=&quot;d-text-teal&quot; font-size=&quot;13&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot;&gt;SSE + PMK&lt;/text&gt;
    &lt;text x=&quot;78&quot; y=&quot;152&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;Default · done&lt;/text&gt;
    &lt;line x1=&quot;360&quot; y1=&quot;164&quot; x2=&quot;360&quot; y2=&quot;210&quot; fill=&quot;none&quot; stroke=&quot;#8fa3c0&quot; stroke-width=&quot;1.5&quot; marker-end=&quot;url(#arr4)&quot;/&gt;
    &lt;text x=&quot;370&quot; y=&quot;192&quot; class=&quot;d-text-muted&quot; font-size=&quot;10&quot;&gt;Yes&lt;/text&gt;
    &lt;rect x=&quot;160&quot; y=&quot;212&quot; width=&quot;400&quot; height=&quot;52&quot; rx=&quot;10&quot; fill=&quot;#f1f3f8&quot; stroke=&quot;#c5cde0&quot; stroke-width=&quot;0.75&quot;/&gt;
    &lt;text x=&quot;360&quot; y=&quot;233&quot; class=&quot;d-text-primary&quot; font-size=&quot;13&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot;&gt;Need end-to-end encryption?&lt;/text&gt;
    &lt;text x=&quot;360&quot; y=&quot;252&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;(temp disk + caches + transit all covered)&lt;/text&gt;
    &lt;line x1=&quot;160&quot; y1=&quot;238&quot; x2=&quot;138&quot; y2=&quot;238&quot; fill=&quot;none&quot; stroke=&quot;#8fa3c0&quot; stroke-width=&quot;1.5&quot; marker-end=&quot;url(#arr4)&quot;/&gt;
    &lt;text x=&quot;148&quot; y=&quot;228&quot; class=&quot;d-text-muted&quot; font-size=&quot;10&quot; text-anchor=&quot;middle&quot;&gt;No&lt;/text&gt;
    &lt;rect x=&quot;20&quot; y=&quot;210&quot; width=&quot;116&quot; height=&quot;56&quot; rx=&quot;8&quot; fill=&quot;#ede7f6&quot; stroke=&quot;#b39ddb&quot; stroke-width=&quot;0.75&quot;/&gt;
    &lt;text x=&quot;78&quot; y=&quot;231&quot; class=&quot;d-text-purple&quot; font-size=&quot;13&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot;&gt;SSE + CMK&lt;/text&gt;
    &lt;text x=&quot;78&quot; y=&quot;249&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;+ Disk&lt;/text&gt;
    &lt;text x=&quot;78&quot; y=&quot;265&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;Encryption Set&lt;/text&gt;
    &lt;line x1=&quot;360&quot; y1=&quot;264&quot; x2=&quot;360&quot; y2=&quot;310&quot; fill=&quot;none&quot; stroke=&quot;#8fa3c0&quot; stroke-width=&quot;1.5&quot; marker-end=&quot;url(#arr4)&quot;/&gt;
    &lt;text x=&quot;370&quot; y=&quot;292&quot; class=&quot;d-text-muted&quot; font-size=&quot;10&quot;&gt;Yes&lt;/text&gt;
    &lt;rect x=&quot;160&quot; y=&quot;312&quot; width=&quot;400&quot; height=&quot;52&quot; rx=&quot;10&quot; fill=&quot;#f1f3f8&quot; stroke=&quot;#c5cde0&quot; stroke-width=&quot;0.75&quot;/&gt;
    &lt;text x=&quot;360&quot; y=&quot;333&quot; class=&quot;d-text-primary&quot; font-size=&quot;13&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot;&gt;Confidential computing workload?&lt;/text&gt;
    &lt;text x=&quot;360&quot; y=&quot;352&quot; class=&quot;d-text-secondary&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot;&gt;(needs hardware-attested isolation)&lt;/text&gt;
    &lt;line x1=&quot;360&quot; y1=&quot;364&quot; x2=&quot;360&quot; y2=&quot;408&quot; fill=&quot;none&quot; stroke=&quot;#8fa3c0&quot; stroke-width=&quot;1.5&quot; marker-end=&quot;url(#arr4)&quot;/&gt;
    &lt;text x=&quot;370&quot; y=&quot;392&quot; class=&quot;d-text-muted&quot; font-size=&quot;10&quot;&gt;No&lt;/text&gt;
    &lt;rect x=&quot;180&quot; y=&quot;410&quot; width=&quot;360&quot; height=&quot;56&quot; rx=&quot;10&quot; fill=&quot;#1565c0&quot; stroke=&quot;#0d47a1&quot; stroke-width=&quot;0.75&quot;/&gt;
    &lt;text x=&quot;360&quot; y=&quot;432&quot; font-size=&quot;14&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot; fill=&quot;#fff&quot; font-family=&quot;&#39;Segoe UI&#39;,sans-serif&quot;&gt;Encryption at Host + CMK&lt;/text&gt;
    &lt;text x=&quot;360&quot; y=&quot;452&quot; font-size=&quot;11&quot; text-anchor=&quot;middle&quot; fill=&quot;#bbdefb&quot; font-family=&quot;&#39;Segoe UI&#39;,sans-serif&quot;&gt;Full end-to-end · Microsoft recommended&lt;/text&gt;
    &lt;line x1=&quot;560&quot; y1=&quot;338&quot; x2=&quot;618&quot; y2=&quot;338&quot; fill=&quot;none&quot; stroke=&quot;#8fa3c0&quot; stroke-width=&quot;1.5&quot; marker-end=&quot;url(#arr4)&quot;/&gt;
    &lt;text x=&quot;588&quot; y=&quot;328&quot; class=&quot;d-text-muted&quot; font-size=&quot;10&quot; text-anchor=&quot;middle&quot;&gt;Yes&lt;/text&gt;
    &lt;rect x=&quot;620&quot; y=&quot;310&quot; width=&quot;120&quot; height=&quot;60&quot; rx=&quot;8&quot; fill=&quot;#ede7f6&quot; stroke=&quot;#b39ddb&quot; stroke-width=&quot;0.75&quot;/&gt;
    &lt;text x=&quot;680&quot; y=&quot;332&quot; class=&quot;d-text-purple&quot; font-size=&quot;12&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot;&gt;Confidential&lt;/text&gt;
    &lt;text x=&quot;680&quot; y=&quot;350&quot; class=&quot;d-text-purple&quot; font-size=&quot;12&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot;&gt;VM sizes&lt;/text&gt;
    &lt;text x=&quot;680&quot; y=&quot;366&quot; class=&quot;d-text-secondary&quot; font-size=&quot;10&quot; text-anchor=&quot;middle&quot;&gt;+ OS disk enc.&lt;/text&gt;
    &lt;rect x=&quot;30&quot; y=&quot;486&quot; width=&quot;700&quot; height=&quot;26&quot; rx=&quot;6&quot; fill=&quot;#ffebee&quot; stroke=&quot;#ef9a9a&quot; stroke-width=&quot;0.75&quot;/&gt;
    &lt;text x=&quot;380&quot; y=&quot;502&quot; fill=&quot;#b71c1c&quot; font-size=&quot;12&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot; font-family=&quot;&#39;Segoe UI&#39;,sans-serif&quot;&gt;⚠  Do NOT enable ADE on any new VM. Retirement: September 15, 2028.&lt;/text&gt;
  &lt;/svg&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;p&gt;&lt;strong&gt;Full comparison summary&lt;/strong&gt; SSE + PMK is the default and low-cost option with no VM CPU overhead, but it does not offer customer key control and it leaves temp disk, cache, and host-to-storage transit unencrypted. SSE + CMK adds customer key control through a Disk Encryption Set, though it still does not encrypt temp disk, cache, or transit. Encryption at Host provides true end-to-end coverage and can work with PMK or CMK. ADE covers OS and data disk encryption but is retiring, incompatible with SSE + CMK and Encryption at Host, and has significant VM overhead.&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;&lt;strong&gt;Migration steps&lt;/strong&gt; from ADE to Encryption at Host cannot be done in place. Back up all data and document VM configuration. Disable ADE and wait for full OS-level decryption to complete before proceeding. Create new disk objects using the Upload method instead of Copy so you do not keep the UDE flag. Build a new VM with Encryption at Host enabled and attach the clean disks. For Linux OS disks, ADE disable is unsupported; you must create a fresh VM with a clean OS disk and migrate data disks separately.&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;&lt;strong&gt;The bottom line&lt;/strong&gt; For new VMs, use Encryption at Host + CMK for full end-to-end coverage with customer key control. If you do not need CMK, Encryption at Host with PMK still gives complete coverage with minimal operational overhead. For existing ADE VMs, start planning your migration now. The rebuild requirement means this is a multi-sprint project for large VM estates, not a one-day task.&lt;/p&gt;

</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/8613172326057292777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2026/05/azure-disk-encryption-is-retiring-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/8613172326057292777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/8613172326057292777'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2026/05/azure-disk-encryption-is-retiring-in.html' title='Azure Disk Encryption Is Retiring in 2028 — Everything You Need to Know'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-1618879376641558715</id><published>2026-05-02T16:55:00.000-07:00</published><updated>2026-05-02T17:16:36.480-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Docker"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Docker Containers Troubleshooting - Debug , Fix , Run , Scale</title><content type='html'>&lt;p&gt;Yeah i know, I will ask my Gen AI agent to write , debug, fix my code.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thats what many of us think now a days. What if your AI agent dint see some issue before hand and you need to fix its mistakes. What if you need to review the fix before you roll out to prod environment.&lt;/p&gt;&lt;p&gt;Being a developer never stops, may that be working with your old school IDEs writing your own code, or working with your code writen by a Gen AI agent. Always you should know what you are doing.&lt;/p&gt;&lt;p&gt;Just like everyone else i asked Claude to create me a sample Docker compose project and it did a great job.&lt;/p&gt;&lt;p&gt;It started with a simple arhcitecture diagram, explined me what different components are doing.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgZ6BEQWP7LNPdW-Pnhg_3yfPG3rQOtPmNN0uX0xXqqiL-_GiPw5GgAo_B5CizPwha1Tj5ay7mAyKelQLVtB6juvDCyfn0FHzXaaKBzPp1naVz4XVkCPT10KhICL3K7W7B97-o9xdA8-gnFlefLHxOq_kikm9-HShn2G-tlm_l7EHeEbEEjRaQQL2QA7Cw&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;604&quot; data-original-width=&quot;1006&quot; height=&quot;384&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgZ6BEQWP7LNPdW-Pnhg_3yfPG3rQOtPmNN0uX0xXqqiL-_GiPw5GgAo_B5CizPwha1Tj5ay7mAyKelQLVtB6juvDCyfn0FHzXaaKBzPp1naVz4XVkCPT10KhICL3K7W7B97-o9xdA8-gnFlefLHxOq_kikm9-HShn2G-tlm_l7EHeEbEEjRaQQL2QA7Cw=w640-h384&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Then it spit out the code , and in first glance it all looks so perfect. I moved the code to my RHEL10 VM on Virtualbox to test it out.&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhAlrFq3w8zCCueM2yWESIIZwMpYu086sX7I8ISaPSrk5isVvjHpj63ES5ziNwi2XSw1q35Zrbebf7PCnwiNSfjTOkDmiPfGi2uUhnawGCL7JWAWveZ7kFYxA2KFVy9BKpJl7EHRA171LCQ4wXzTwhejk9IIh-FfLBPOodjOyewxRm4bbAAvN3BHmvplAU&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;322&quot; data-original-width=&quot;651&quot; height=&quot;317&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhAlrFq3w8zCCueM2yWESIIZwMpYu086sX7I8ISaPSrk5isVvjHpj63ES5ziNwi2XSw1q35Zrbebf7PCnwiNSfjTOkDmiPfGi2uUhnawGCL7JWAWveZ7kFYxA2KFVy9BKpJl7EHRA171LCQ4wXzTwhejk9IIh-FfLBPOodjOyewxRm4bbAAvN3BHmvplAU=w640-h317&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;If you wanna try it by your self, here is the code hosted on Github.&amp;nbsp;&lt;a href=&quot;https://github.com/pratappilaka24/Docker-Compose-Troubleshooting&quot;&gt;https://github.com/pratappilaka24/Docker-Compose-Troubleshooting&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I am excited and ran it. It started fine&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjkjMMvd2XbNLm639tPVGv09BXqi3jPkhOKCYOv2q9h34utl8ltOxCCXRp7LB3_mhD2e65jC-fZXyfKdJ4boWu_nAkYzu2_oeQG_dhdfvpc9RQ_A2D-TkmOwzl7MVL6Txw-eu74ph3-kudYWrEWE0X-dorQyPzUuBBkrtkIozsvLsHxB5rn0o-QYTz7hYE&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;202&quot; data-original-width=&quot;814&quot; height=&quot;158&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjkjMMvd2XbNLm639tPVGv09BXqi3jPkhOKCYOv2q9h34utl8ltOxCCXRp7LB3_mhD2e65jC-fZXyfKdJ4boWu_nAkYzu2_oeQG_dhdfvpc9RQ_A2D-TkmOwzl7MVL6Txw-eu74ph3-kudYWrEWE0X-dorQyPzUuBBkrtkIozsvLsHxB5rn0o-QYTz7hYE=w640-h158&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;then this happened.&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjgqfTumHVEmqiVtDuGD0GcinUkzKvlLi-ZMvorYXoY8_R3n15vKUAlb1cr-Qn7P7--qBt4otFUU8dIrb2O8TXKLafFuM5iQmKzvLobvYNutOFTouLdDraSg8YpT7-RTYs5boDlSfDAO4t8hv3XvHt9dKOny-Mo38WJ4QuRDRke91jpMzzYNXBFIG9ND5c&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;286&quot; data-original-width=&quot;850&quot; height=&quot;216&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjgqfTumHVEmqiVtDuGD0GcinUkzKvlLi-ZMvorYXoY8_R3n15vKUAlb1cr-Qn7P7--qBt4otFUU8dIrb2O8TXKLafFuM5iQmKzvLobvYNutOFTouLdDraSg8YpT7-RTYs5boDlSfDAO4t8hv3XvHt9dKOny-Mo38WJ4QuRDRke91jpMzzYNXBFIG9ND5c=w640-h216&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;My App container provisioning failed its health check. Its showing unhealthy&amp;nbsp;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj1PdPDXXW47rbrWcj5bdhdPkiSz7o65wyCJkuX-9X6sz4Sbk9mRd8bguP_8S5u9cunK8inTqykiPLz1RrcDM_dYuA3WNhs9aRpzstoCyoTJrleG_IFSUWYjFKZrNvmgEshJmeI-Jx56KdWn3zOi0hpjTbUc5om4cRpyi-d_TWesShHDmBFSlqBWwad2Jo&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;175&quot; data-original-width=&quot;1612&quot; height=&quot;70&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj1PdPDXXW47rbrWcj5bdhdPkiSz7o65wyCJkuX-9X6sz4Sbk9mRd8bguP_8S5u9cunK8inTqykiPLz1RrcDM_dYuA3WNhs9aRpzstoCyoTJrleG_IFSUWYjFKZrNvmgEshJmeI-Jx56KdWn3zOi0hpjTbUc5om4cRpyi-d_TWesShHDmBFSlqBWwad2Jo=w640-h70&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;Checked the logs and logs seems fine.&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi3JS2DPy2XTLMH8XtWybOl6NBaASx9MiKiVEvH75S9DSjJ9mRHW24kd4z7NlaWwzN9r2wP2B8BuBkCaUtv_g6IQKTTp93-RFCNxEl-DmfLXVVSbd2tRWvjbF8D5NuK9O9hdp03suJvXBEAV5QPY2acwBj3SmcyR79ybsC1Y03I2PlCDpjQgN1g0OnqaFo&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;184&quot; data-original-width=&quot;1260&quot; height=&quot;94&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi3JS2DPy2XTLMH8XtWybOl6NBaASx9MiKiVEvH75S9DSjJ9mRHW24kd4z7NlaWwzN9r2wP2B8BuBkCaUtv_g6IQKTTp93-RFCNxEl-DmfLXVVSbd2tRWvjbF8D5NuK9O9hdp03suJvXBEAV5QPY2acwBj3SmcyR79ybsC1Y03I2PlCDpjQgN1g0OnqaFo=w640-h94&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Next step is to inspect the container to see why the health check is failing.&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgA0AvJojE-eC-alXHfHX7qhiWRGROga6LUlH2mtSanTTdEPvD4JKUGwKkzVuJpt7f_a9HAm7P4mWixfO2FjvwVM8yy3vSFAtY_JfQdsGCoNtm9HZ94xu5brSVsxaovMjm0KZTWmYz8eRaaAmxsKkI4FhmuXnPcvSjliJjcuZI3oRjYLV6pFmkdgMZH7nQ&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;345&quot; data-original-width=&quot;1213&quot; height=&quot;182&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgA0AvJojE-eC-alXHfHX7qhiWRGROga6LUlH2mtSanTTdEPvD4JKUGwKkzVuJpt7f_a9HAm7P4mWixfO2FjvwVM8yy3vSFAtY_JfQdsGCoNtm9HZ94xu5brSVsxaovMjm0KZTWmYz8eRaaAmxsKkI4FhmuXnPcvSjliJjcuZI3oRjYLV6pFmkdgMZH7nQ=w640-h182&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Here is the issue. Claude suggested i use &quot;python:3.12-slim&quot; image to run my app container, but dint realized, it dint come with curl installed. From above inspect command we find the missing dependency.&lt;p&gt;&lt;/p&gt;&lt;p&gt;Let me fix it by adding the curl installation in Dockerfile.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgTq_6Uq5jNc-I9J4LjT1YbeYNY3ZfGNgqBHZ8ajLYlcH0EyYqMp1rEd5QZ-YZzx9uuddg-vFKIJzrfxgrAI9aV9BL6vkvlFUZso0X-z9jZFbIkPbHSqa-XnTh99nFG8MRqKEuejCWuZKUmGk75IS94W2LummkJv6gwPgyUzABpK9Bx6WFOriG9GqSpvxM&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;430&quot; data-original-width=&quot;999&quot; height=&quot;276&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgTq_6Uq5jNc-I9J4LjT1YbeYNY3ZfGNgqBHZ8ajLYlcH0EyYqMp1rEd5QZ-YZzx9uuddg-vFKIJzrfxgrAI9aV9BL6vkvlFUZso0X-z9jZFbIkPbHSqa-XnTh99nFG8MRqKEuejCWuZKUmGk75IS94W2LummkJv6gwPgyUzABpK9Bx6WFOriG9GqSpvxM=w640-h276&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;We chnaged the definition of our App container image.&lt;p&gt;&lt;/p&gt;&lt;p&gt;For this to work, you need to stop app container, remove app container and remove app image.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhQO_gitckiryyutkiXQPXb63pXhNYUr17imzxjDZHxcZuisGWUonCwrHFJOl4r1n3zlwe1SRVy7vrlqHQWbf7agiZdoeYlF1384w8oSnma2JUPZekH-39HaeQqizpMJYqa-M4XGRFin2L3P7qbSaWHQNEZdac0HOWfRzksIb1Z5v0tMSecs0GY1RzybKo&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;166&quot; data-original-width=&quot;988&quot; height=&quot;108&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhQO_gitckiryyutkiXQPXb63pXhNYUr17imzxjDZHxcZuisGWUonCwrHFJOl4r1n3zlwe1SRVy7vrlqHQWbf7agiZdoeYlF1384w8oSnma2JUPZekH-39HaeQqizpMJYqa-M4XGRFin2L3P7qbSaWHQNEZdac0HOWfRzksIb1Z5v0tMSecs0GY1RzybKo=w640-h108&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Thus next compose run, docker will recreate new image based on updated definition, and create app container based on it.&lt;/p&gt;&lt;p&gt;Here we go again.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgt-fjlfy3jVAad-vYw1-FKLn5tv_-SIXN7EB0ReggfALNvhl6GMKBm2MGDUznLYTr5dd9B6BGuISwVFQZJgO7epSOB2PLSJN3ltkyH49J7NBD8OckHBE5gn0tO8_fWvGJF4evNRCTReHYVN-Ndn5U-Tz5s-CZHRrcS7fYg8lPlf-5Ax546BLLEfzOQaXc&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;301&quot; data-original-width=&quot;1917&quot; height=&quot;100&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgt-fjlfy3jVAad-vYw1-FKLn5tv_-SIXN7EB0ReggfALNvhl6GMKBm2MGDUznLYTr5dd9B6BGuISwVFQZJgO7epSOB2PLSJN3ltkyH49J7NBD8OckHBE5gn0tO8_fWvGJF4evNRCTReHYVN-Ndn5U-Tz5s-CZHRrcS7fYg8lPlf-5Ax546BLLEfzOQaXc=w640-h100&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;My app container failed to start again. What AI dint know is that i am already running httpd service on my RHEL vm, where posrts 80 and 443 are pre allocated.&amp;nbsp;&lt;p&gt;&lt;/p&gt;&lt;p&gt;So now we change nginx.conf and docker-compose files to run the app on a different port.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj8pdsRDfb8h-IDKwvhSrYBZikpI2n4_2qmTLl-YGHW6qXybDK9COdgsNLy7kiRZBLx-95_QuKfgbXQ49Z_tg3l8WWica8i37lKdmkLnfhsrh16teeYVNjZqZev9WzcSylgx4ZInWzv3HbuVag82klsblOfxnrzlxGT3z2zl0W70izAkhANGOZC8v8DMN0&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;570&quot; data-original-width=&quot;918&quot; height=&quot;398&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj8pdsRDfb8h-IDKwvhSrYBZikpI2n4_2qmTLl-YGHW6qXybDK9COdgsNLy7kiRZBLx-95_QuKfgbXQ49Z_tg3l8WWica8i37lKdmkLnfhsrh16teeYVNjZqZev9WzcSylgx4ZInWzv3HbuVag82klsblOfxnrzlxGT3z2zl0W70izAkhANGOZC8v8DMN0=w640-h398&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;After all these fixes, we were able to deploy all App, DB, Redis and DB containers successfully.&amp;nbsp;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgv-QLKcwqSt1S31OPyBc-lYzmCg9N6gzGUdIfrLJqu3rf2pvukk_pCeuY0kMTWvAaVFG2J6zLMU63Zxzeoguj-3pqHtsh3p6ToPS07YJ60dcNsxuBAe4JWUWwoXjFcNbwzcCxOl1YR_xylbb6KeeSlnljJMWapf3cWEMFtsb0Q99zkXqvCvaF2EVEEDww&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;172&quot; data-original-width=&quot;874&quot; height=&quot;126&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgv-QLKcwqSt1S31OPyBc-lYzmCg9N6gzGUdIfrLJqu3rf2pvukk_pCeuY0kMTWvAaVFG2J6zLMU63Zxzeoguj-3pqHtsh3p6ToPS07YJ60dcNsxuBAe4JWUWwoXjFcNbwzcCxOl1YR_xylbb6KeeSlnljJMWapf3cWEMFtsb0Q99zkXqvCvaF2EVEEDww=w640-h126&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Testing the app by curl http://localhost.&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi2GO8mWoJbjPbwT6cuDc4jOUN_ROcJbMJ988NR4Xxbdo4btaqtwKBOJHYtqFd62JdYa3vnzoiEdk7tAtYZIvENKXwqyRvzga9GkGPCpjIcJ9VDqDRGJOWB3ydjFQn0Rpf-mSkdDNkCktQJbhZ91XSahgA2tYvG6gQKxlG2gDE_QI9DwTpCXgaMx-lNEqY&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;196&quot; data-original-width=&quot;1915&quot; height=&quot;66&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi2GO8mWoJbjPbwT6cuDc4jOUN_ROcJbMJ988NR4Xxbdo4btaqtwKBOJHYtqFd62JdYa3vnzoiEdk7tAtYZIvENKXwqyRvzga9GkGPCpjIcJ9VDqDRGJOWB3ydjFQn0Rpf-mSkdDNkCktQJbhZ91XSahgA2tYvG6gQKxlG2gDE_QI9DwTpCXgaMx-lNEqY=w640-h66&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Its an 500 internal service error. Something to do with our code. Lets check the logs.&lt;p&gt;&lt;/p&gt;&lt;p&gt;Lets start with nginx container logs. this doesnt show much information apart form there is a 500 internal server error. this means app is crashing.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEia_Wo6AKa6gwGrEAsSelS4tSYeppKuT1nLBLY9StFTix87qYiT3ke_5oaslTKD11_ejyHczP41ihCQ2uJDZ_lI6sr8KkV9igOc1Qv4KjhUUERRi0bhVhK3ph-LthZvI8OceCHt5Jh6lK4SHWes4_xN1CZGPg3PI-judEgKMlebLdg_jRKZbUcgWKqM8mw&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;271&quot; data-original-width=&quot;1324&quot; height=&quot;130&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEia_Wo6AKa6gwGrEAsSelS4tSYeppKuT1nLBLY9StFTix87qYiT3ke_5oaslTKD11_ejyHczP41ihCQ2uJDZ_lI6sr8KkV9igOc1Qv4KjhUUERRi0bhVhK3ph-LthZvI8OceCHt5Jh6lK4SHWes4_xN1CZGPg3PI-judEgKMlebLdg_jRKZbUcgWKqM8mw=w640-h130&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Next step is to check app container logs.&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhCXzSFrkV5qFoCYfYpPVdimb4wRbi4hGBWHyRg1F3-sBvQvlzBKUe7s2pPRQ9yydbuVYqqFbsMKUOJNjIJQG1C3yN6nFTkrDwOkJ2-b6GT5pazeDjoqRdFGr54apRLO4KOC4T9fzxUoURX76h0e3yDJxec4IKnAxd7ZBriZ3O8YzfCCvxf_VkL7AO8ggA&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;573&quot; data-original-width=&quot;1405&quot; height=&quot;262&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhCXzSFrkV5qFoCYfYpPVdimb4wRbi4hGBWHyRg1F3-sBvQvlzBKUe7s2pPRQ9yydbuVYqqFbsMKUOJNjIJQG1C3yN6nFTkrDwOkJ2-b6GT5pazeDjoqRdFGr54apRLO4KOC4T9fzxUoURX76h0e3yDJxec4IKnAxd7ZBriZ3O8YzfCCvxf_VkL7AO8ggA=w640-h262&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Wait a second, why does app container logs says Visits table in postgres db doesnot exists.&lt;p&gt;&lt;/p&gt;&lt;p&gt;But if you check in our code , db-init.sql script is creating the table when postgres db container is provisioned.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi3xZJ2h4iQlXk1X3VJ-M9M93-FktIOieFaVPSp4jDibeHG2aO2GY_Ds_M5aBlVYs2GBNITBIF-CR4hx-prM8caNQSaQ0dMAAMTG3tAqj6e64Yvm62diHbWWQKllI6icpFGl7xNFAyH8dj2lPoLXqUi42h6RzUZm50a0Ac_7chVwOrHr0LMClax9WHwAIY&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;252&quot; data-original-width=&quot;801&quot; height=&quot;202&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi3xZJ2h4iQlXk1X3VJ-M9M93-FktIOieFaVPSp4jDibeHG2aO2GY_Ds_M5aBlVYs2GBNITBIF-CR4hx-prM8caNQSaQ0dMAAMTG3tAqj6e64Yvm62diHbWWQKllI6icpFGl7xNFAyH8dj2lPoLXqUi42h6RzUZm50a0Ac_7chVwOrHr0LMClax9WHwAIY=w640-h202&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;After some research , found out the db-init.sql, also called seed script runs only once when the volume is created. but when we decomissioned containers , the voulme is left behind.&amp;nbsp;&lt;p&gt;&lt;/p&gt;&lt;p&gt;When we run Docker compose again, the containers were recreated and due to existing volume , the seed script never ran, thus failing to run the seed script creating the required postgres table.&lt;/p&gt;&lt;p&gt;So this time we take down all the containers including the volume.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEieTUnSvtENzi4bigEP41ylJltZMzqmE4lwnNDKrlff1tFHkr3jvfltc8-Gg13JM8t62DPhXos6SQSLL155lPGIPPfBg7vPAJFn8spPtUrKf4KgHq--OyyS1W6NtPKTHDmSomtI2VqGOLXWuXcwJRH3B3FzPgLPHnmpH2QJ77iMGVKVi5DLFJKsR1ltU9k&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;190&quot; data-original-width=&quot;898&quot; height=&quot;136&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEieTUnSvtENzi4bigEP41ylJltZMzqmE4lwnNDKrlff1tFHkr3jvfltc8-Gg13JM8t62DPhXos6SQSLL155lPGIPPfBg7vPAJFn8spPtUrKf4KgHq--OyyS1W6NtPKTHDmSomtI2VqGOLXWuXcwJRH3B3FzPgLPHnmpH2QJ77iMGVKVi5DLFJKsR1ltU9k=w640-h136&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now we will recreate the contianers using docker compose and test our app.&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEidLAet9xwKm_5-gzTDO1xKUXOTXaq7k6OYrMKILnR-bFRFzyCtgBd_Says3EtH6QjfLPfz2pvH2CmQztzrKI3_z4-fV9iYKWJeeN5dL86OSW8R43Y9xJ4o020jyFtlstO-J2HhlS-JmhSvDvCCjh14R6PHRM-dCtipDu0n7L0dTBEwVdYTcrqEwHW0bNE&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;304&quot; data-original-width=&quot;886&quot; height=&quot;220&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEidLAet9xwKm_5-gzTDO1xKUXOTXaq7k6OYrMKILnR-bFRFzyCtgBd_Says3EtH6QjfLPfz2pvH2CmQztzrKI3_z4-fV9iYKWJeeN5dL86OSW8R43Y9xJ4o020jyFtlstO-J2HhlS-JmhSvDvCCjh14R6PHRM-dCtipDu0n7L0dTBEwVdYTcrqEwHW0bNE=w640-h220&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Vallah , the containers deployed and the user hits on the app and the db is registering the user hits, and redis is caching the count.&amp;nbsp; If you look at the output, you can see the count is being fetched from cache for cuncurrent hits.&amp;nbsp;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Now look at how we can scale up the app containers. Initial Docker compose ps shows 1 of app, db, nginx and redis containers. Now scale up app to 3 and you can see 3 app containers serving the user hits in union.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj_hc4oLJ-Ef9aFcNMktU6S7eov0vWunmWWGJrJVzal3eKVSSKVcmL5GRDzwdn-ejgc0zYpw9EMmFhUN_R_XJBQZArQyu_UsKf1C888NsVoIucKh1yTUJ0idGN8rtRAyZMsdf_KaG95qYoPSA0LZHFN6JYAO5zOayZgqvsCGqgxU_d1ofZfwZmPpoaI1pU&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;474&quot; data-original-width=&quot;1875&quot; height=&quot;162&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj_hc4oLJ-Ef9aFcNMktU6S7eov0vWunmWWGJrJVzal3eKVSSKVcmL5GRDzwdn-ejgc0zYpw9EMmFhUN_R_XJBQZArQyu_UsKf1C888NsVoIucKh1yTUJ0idGN8rtRAyZMsdf_KaG95qYoPSA0LZHFN6JYAO5zOayZgqvsCGqgxU_d1ofZfwZmPpoaI1pU=w640-h162&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now scaling down one app container.&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEguRHUlUNmET1mDLUvSvOHQ6SOdr9t9ohxDp1ykBDty63S06MVLH4e58D7z98fOvPU-xzKq8P94xbm-0oH9IYv6PV5DZZvN1__UDkbx6TQCTFxOQ5U4h5ugYko1BFBRmLtGXHFqpWn0CBk2yiyZv3Ipa7s-CW4FBroytjonkttu9DxvSMIgpIKj7QhQnQQ&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;192&quot; data-original-width=&quot;1057&quot; height=&quot;116&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEguRHUlUNmET1mDLUvSvOHQ6SOdr9t9ohxDp1ykBDty63S06MVLH4e58D7z98fOvPU-xzKq8P94xbm-0oH9IYv6PV5DZZvN1__UDkbx6TQCTFxOQ5U4h5ugYko1BFBRmLtGXHFqpWn0CBk2yiyZv3Ipa7s-CW4FBroytjonkttu9DxvSMIgpIKj7QhQnQQ=w640-h116&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;At last by digging through the logs and figuring out issues and fixing things is what makes us Engineers and Developers, not just writing code.&amp;nbsp;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/1618879376641558715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2026/05/docker-containers-troubleshooting-debug.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/1618879376641558715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/1618879376641558715'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2026/05/docker-containers-troubleshooting-debug.html' title='Docker Containers Troubleshooting - Debug , Fix , Run , Scale'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEgZ6BEQWP7LNPdW-Pnhg_3yfPG3rQOtPmNN0uX0xXqqiL-_GiPw5GgAo_B5CizPwha1Tj5ay7mAyKelQLVtB6juvDCyfn0FHzXaaKBzPp1naVz4XVkCPT10KhICL3K7W7B97-o9xdA8-gnFlefLHxOq_kikm9-HShn2G-tlm_l7EHeEbEEjRaQQL2QA7Cw=s72-w640-h384-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-1900283423843461349</id><published>2026-04-02T21:32:00.000-07:00</published><updated>2026-04-03T00:48:50.820-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><category scheme="http://www.blogger.com/atom/ns#" term="Open AI"/><title type='text'>Authenticating Azure Foundry OpenAI Using Managed Identity</title><content type='html'>&lt;p&gt;In earlier post we have tested 30+ features of various Azure Foundry Open AI services.&lt;/p&gt;

&lt;p&gt;Post: &lt;a href=&quot;https://pratapreddypilaka.blogspot.com/2026/04/azure-ai-services-complete-guide-to.html&quot;&gt;https://pratapreddypilaka.blogspot.com/2026/04/azure-ai-services-complete-guide-to.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most of the code have saved all the Open AI service keys in an environment file following Python best practice. But this is done only for practice purpose, just to get familiar with Open AI services and how to access those services using Python code.&lt;/p&gt;

&lt;p&gt;Saving the Access keys in code is the worst possible security blunder you can do. Access keys will completely bypass all the RBAC controls and give complete access to anyone.&lt;/p&gt;

&lt;h3&gt;What are the ways to authenticate Azure Open AI services without exposing the keys?&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;System Assigned Managed Identity&lt;/strong&gt; — Auto-created identity tied to an Azure resource (VM, App Service, Functions)&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;User Assigned Managed Identity&lt;/strong&gt; — Standalone identity you create and attach to one or more Azure resources&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Service Principal + Client Secret&lt;/strong&gt; — App registration with a secret, works anywhere including on-prem&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Service Principal + Certificate&lt;/strong&gt; — Same as above but uses a certificate instead of secret, more secure&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Azure CLI Credential&lt;/strong&gt; — Uses the logged-in &lt;code&gt;az login&lt;/code&gt; identity, ideal for local dev/testing&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Interactive Browser Credential&lt;/strong&gt; — Pops a browser login window, good for desktop tools&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Device Code Credential&lt;/strong&gt; — Prints a code to enter at a URL, useful for headless servers&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;DefaultAzureCredential&lt;/strong&gt; — Tries multiple methods automatically in order, recommended for most cases&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Workload Identity&lt;/strong&gt; — Federated keyless auth for pods running in Azure Kubernetes Service (AKS)&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Federated Identity Credential&lt;/strong&gt; — Allows external IdPs like GitHub Actions or GitLab to authenticate without any secrets&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Managed Identity is the preferred method for Azure workloads to access Open AI services.&lt;/p&gt;

&lt;p&gt;In this article we will have a look at how we can authenticate using Managed Identity.&lt;/p&gt;

&lt;p&gt;For this we need a VM up on which we will enable system managed Identity.&lt;/p&gt;

&lt;p&gt;I created a Linux VM, and enabled the managed identity.&lt;/p&gt;

&lt;div style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6Q1X4mdhQmwl6C65EeH-420nMm1KvOBLoLA1rnGKkJtnNhvP3iCpqqFYn34colnykU5fhYDdtOt80rFiWXLf02TFQFTkwrshALRQpYdde7T0TyQ1I32LXxEYTMsrjRC0CBbaVzTwBAKzS4FOptbyBTNRmFmi3Ssj0x3rA-T9z9Jx45u5q78_G4a1iazk/s730/02.png&quot;&gt;
    &lt;img border=&quot;0&quot; data-original-height=&quot;621&quot; data-original-width=&quot;730&quot; height=&quot;340&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6Q1X4mdhQmwl6C65EeH-420nMm1KvOBLoLA1rnGKkJtnNhvP3iCpqqFYn34colnykU5fhYDdtOt80rFiWXLf02TFQFTkwrshALRQpYdde7T0TyQ1I32LXxEYTMsrjRC0CBbaVzTwBAKzS4FOptbyBTNRmFmi3Ssj0x3rA-T9z9Jx45u5q78_G4a1iazk/w400-h340/02.png&quot; width=&quot;400&quot; alt=&quot;Linux VM with Managed Identity enabled&quot; /&gt;
  &lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;Now, go to Foundry, go to Access control, and Add a new role assignment for the managed identity we created earlier with role being &quot;Cognitive Services OpenAI User&quot;.&lt;/p&gt;

&lt;div style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuN0iOmVABkGY-wIxEgnT3Ay8A0OF3_dLPBMNBmq-7rnNYnpGDqz-AfeZpeImnWYUOaitY4_lPmh_Utr6kRrMCk1uaIhefiC9mVwZ50t2JN33j7a-CQThF-RBHiecRECBz6kwMDjvBhyMgr5qxPG6KE4j_-4r_VBrlkLlWu7CKFH5Jlu2HkGr51EfsLPA/s1369/01.png&quot;&gt;
    &lt;img border=&quot;0&quot; data-original-height=&quot;498&quot; data-original-width=&quot;1369&quot; height=&quot;232&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuN0iOmVABkGY-wIxEgnT3Ay8A0OF3_dLPBMNBmq-7rnNYnpGDqz-AfeZpeImnWYUOaitY4_lPmh_Utr6kRrMCk1uaIhefiC9mVwZ50t2JN33j7a-CQThF-RBHiecRECBz6kwMDjvBhyMgr5qxPG6KE4j_-4r_VBrlkLlWu7CKFH5Jlu2HkGr51EfsLPA/w640-h232/01.png&quot; width=&quot;640&quot; alt=&quot;Role assignment in Azure Foundry&quot; /&gt;
  &lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;Now create the rules for NSG to open the communication between OpenAI services. This is necessary if you are using a private endpoint for the OpenAI instance.&lt;/p&gt;

&lt;p&gt;Login to your virtual machine.&lt;/p&gt;

&lt;p&gt;Now in order to test the connectivity, I am installing Python and Azure-Identity.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Python &amp;amp; pip
sudo apt update &amp;amp;&amp;amp; sudo apt install python3-pip -y

# Required packages
pip3 install openai azure-identity
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Once all the dependencies are installed, we will create a file with the below code.&lt;/p&gt;

&lt;div style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiBupQtZytxCz-kHKstvA3UFgvKoxgsmWD11NlE6cG3DbGwec4z-B7UljasMYyjldHZU-yJGKZmUPuU7mj2Q_8YZuqzHWjut1ujZUUOetzvQJskROL-ZJQJpk9eqSj4QW72fyJ0wHo6vhznfTG_jZaGcMM5_fUIynLSJ5Vn2EAxeIxuF4i6MzRT3c7v1HY&quot;&gt;
    &lt;img alt=&quot;Python code screenshot&quot; data-original-height=&quot;943&quot; data-original-width=&quot;1593&quot; height=&quot;378&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiBupQtZytxCz-kHKstvA3UFgvKoxgsmWD11NlE6cG3DbGwec4z-B7UljasMYyjldHZU-yJGKZmUPuU7mj2Q_8YZuqzHWjut1ujZUUOetzvQJskROL-ZJQJpk9eqSj4QW72fyJ0wHo6vhznfTG_jZaGcMM5_fUIynLSJ5Vn2EAxeIxuF4i6MzRT3c7v1HY=w640-h378&quot; width=&quot;640&quot; /&gt;
  &lt;/a&gt;
&lt;/div&gt;

&lt;pre&gt;&lt;code&gt;from azure.identity import ManagedIdentityCredential
from openai import AzureOpenAI
import os

# ── Config ──────────────────────────────────────────────
AZURE_OPENAI_ENDPOINT = &quot;https://prata-mhl58p7n-eastus2.cognitiveservices.azure.com/&quot;
DEPLOYMENT_NAME       = &quot;gpt-5-chat&quot;   # e.g. gpt-4o
API_VERSION           = &quot;2024-02-01&quot;
# ────────────────────────────────────────────────────────

# 1. Obtain a token via Managed Identity (no keys!)
credential = ManagedIdentityCredential()
token       = credential.get_token(&quot;https://cognitiveservices.azure.com/.default&quot;)

# 2. Build AzureOpenAI client using the bearer token
client = AzureOpenAI(
    azure_endpoint = AZURE_OPENAI_ENDPOINT,
    api_version    = API_VERSION,
    azure_ad_token = token.token,       # &amp;lt;-- token-based, not key-based
)

# 3. Call the model
response = client.chat.completions.create(
    model    = DEPLOYMENT_NAME,
    messages = [
        {&quot;role&quot;: &quot;system&quot;, &quot;content&quot;: &quot;You are a helpful assistant.&quot;},
        {&quot;role&quot;: &quot;user&quot;,   &quot;content&quot;: &quot;Hello! Tell me more about Managed identity authentication without using access keys for Azure Open AI&quot;}
    ]
)

print(&quot;✅ Response:&quot;, response.choices[0].message.content)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now run the python file &lt;code&gt;python3 chat.py&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You will get the response from your gpt-5-chat model, without using access keys.&lt;/p&gt;

&lt;div style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiEvCdPFzMTQKBCIbo8NTLATwM6vzigqYAmwyf9SlshpUgXBH8PsuIgGHedd0EYr4qwlieuWEZPUg_1DefKVmenWso63KZnwum6dMApwshjG7U83HY5MwAdB_ZBb6jjHGzPChs7w5xW1IfDz6AK_g134LuBHXmHwTsxWBt6bTY1vygSe7nTh5GNDyx2H-I&quot;&gt;
    &lt;img alt=&quot;Terminal output showing successful response&quot; data-original-height=&quot;1096&quot; data-original-width=&quot;1744&quot; height=&quot;402&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiEvCdPFzMTQKBCIbo8NTLATwM6vzigqYAmwyf9SlshpUgXBH8PsuIgGHedd0EYr4qwlieuWEZPUg_1DefKVmenWso63KZnwum6dMApwshjG7U83HY5MwAdB_ZBb6jjHGzPChs7w5xW1IfDz6AK_g134LuBHXmHwTsxWBt6bTY1vygSe7nTh5GNDyx2H-I=w640-h402&quot; width=&quot;640&quot; /&gt;
  &lt;/a&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/1900283423843461349/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2026/04/authenticating-azure-foundry-openai.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/1900283423843461349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/1900283423843461349'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2026/04/authenticating-azure-foundry-openai.html' title='Authenticating Azure Foundry OpenAI Using Managed Identity'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6Q1X4mdhQmwl6C65EeH-420nMm1KvOBLoLA1rnGKkJtnNhvP3iCpqqFYn34colnykU5fhYDdtOt80rFiWXLf02TFQFTkwrshALRQpYdde7T0TyQ1I32LXxEYTMsrjRC0CBbaVzTwBAKzS4FOptbyBTNRmFmi3Ssj0x3rA-T9z9Jx45u5q78_G4a1iazk/s72-w400-h340-c/02.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-2650165499223806319</id><published>2026-04-02T15:45:00.000-07:00</published><updated>2026-04-02T15:55:34.842-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><category scheme="http://www.blogger.com/atom/ns#" term="Open AI"/><title type='text'>Azure AI Services - A Complete Guide to Building Intelligent Applications with Azure AI Foundry</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;A while ago i started exploring Azure AI Foundry and ended up going down a rabbit hole of 30+ implementations covering everything from GPT-5 chat to live speech transcription. In this post i will walk you through all the major Azure AI services, what they do, how to implement them, and when to use them — so you don&#39;t have to figure it all out the hard way like i did.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;You can download git repo and start embedding your Azure OpenAI Service keys in.env file and start executing them as we go along.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot; target=&quot;_blank&quot;&gt;README:&amp;nbsp;&lt;a href=&quot;https://github.com/pratappilaka24/Azure-Foundry-Samples?tab=readme-ov-file#readme&quot; target=&quot;_blank&quot;&gt;https://github.com/pratappilaka24/Azure-Foundry-Samples?tab=readme-ov-file#readme&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;REPO:&amp;nbsp;&lt;a href=&quot;https://github.com/pratappilaka24/Azure-Foundry-Samples&quot; target=&quot;_blank&quot;&gt;https://github.com/pratappilaka24/Azure-Foundry-Samples&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Our objective is to understand the complete Azure AI Services ecosystem and how you can combine them to build enterprise-grade intelligent applications.&lt;/p&gt;&lt;hr /&gt;&lt;h3&gt;Azure OpenAI - GPT-5 Chat, Vision and Code&lt;/h3&gt;&lt;p&gt;This is where most people start, and for good reason. Azure OpenAI gives you access to GPT-5 with enterprise-grade security, regional deployment and SLAs — unlike calling OpenAI directly.&lt;/p&gt;&lt;p&gt;The basic setup is straightforward. You initialize an &lt;code&gt;AzureOpenAI&lt;/code&gt; client with your endpoint and API key, define a system role (something like &quot;you are a helpful travel assistant&quot;), pass in user messages and configure temperature and top_p for response behavior. That&#39;s it, you are doing conversational AI.&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;from openai import AzureOpenAI
from azure.core.credentials import AzureKeyCredential
from dotenv import load_dotenv
import os

load_dotenv()
client = AzureOpenAI(
    azure_endpoint=os.getenv(&quot;AZURE_OPENAI_ENDPOINT&quot;),
    api_key=os.getenv(&quot;AZURE_OPENAI_KEY&quot;),
    api_version=&quot;2024-12-01-preview&quot;
)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;What makes it more interesting is Vision. You can encode an image to base64, pass it as &lt;code&gt;image_url&lt;/code&gt; in the message content, and GPT-5 will analyze and explain it — diagrams, screenshots, anything. I used this for code explanation too. Point it at a source file with a &quot;you are a teacher&quot; system prompt and let it stream the explanation back. Really useful for documentation generation and code reviews.&lt;/p&gt;&lt;p&gt;Chat Output:&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRzX0PP1YQ7EcdkbBdYzZBatErgnCnSMV1uonZ4MPWmPcPtgmakqubEVVWVDFeJy3K2GvpVPKX-VguyNSIbzepWAgBNpGKodJVCK14Ca6NXhsPZovKyVxFkDS1Hqf77XtXYAK_qMGSx5AX5DNQABnoLmgdrJ0V2BfEQJc7312uQqrgSHjncDdTf4SI41Y/s1014/01.gpt%20chat%20output.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;502&quot; data-original-width=&quot;1014&quot; height=&quot;317&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRzX0PP1YQ7EcdkbBdYzZBatErgnCnSMV1uonZ4MPWmPcPtgmakqubEVVWVDFeJy3K2GvpVPKX-VguyNSIbzepWAgBNpGKodJVCK14Ca6NXhsPZovKyVxFkDS1Hqf77XtXYAK_qMGSx5AX5DNQABnoLmgdrJ0V2BfEQJc7312uQqrgSHjncDdTf4SI41Y/w640-h317/01.gpt%20chat%20output.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;Image Reading Output:&lt;div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilCFg6GBDQIhalc4nn7DEwg4HodvrWcsfJf91ieFIhN0-3Q5b01eD583FZ1D9pSWiObkkfAKv9lOTJM_3ybtRXp0gnGnTySkXLfa_UhyltehVHG5cYDB8rVuGMKbeNiamy1u-1LsaRGbPRvSl1qYK5ydTlTNjjk7izoOV6mJmu0EK2FuLvJWGyyrbIiWA/s1236/02.%20Image%20Reading.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;925&quot; data-original-width=&quot;1236&quot; height=&quot;478&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilCFg6GBDQIhalc4nn7DEwg4HodvrWcsfJf91ieFIhN0-3Q5b01eD583FZ1D9pSWiObkkfAKv9lOTJM_3ybtRXp0gnGnTySkXLfa_UhyltehVHG5cYDB8rVuGMKbeNiamy1u-1LsaRGbPRvSl1qYK5ydTlTNjjk7izoOV6mJmu0EK2FuLvJWGyyrbIiWA/w640-h478/02.%20Image%20Reading.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3&gt;DALL-E 3 - Generating Images from Text&lt;/h3&gt;&lt;p&gt;This one is fun. DALL-E 3 connects to a separate Azure endpoint and lets you describe an image in plain English and get back a 1024x1024 image in seconds. Just provide a detailed text prompt, set your quality and size parameters and download the result.&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;result = client.images.generate(
    model=&quot;dall-e-3&quot;,
    prompt=&quot;A futuristic cityscape at sunset with Azure cloud symbols&quot;,
    size=&quot;1024x1024&quot;,
    quality=&quot;standard&quot;,
    n=1
)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Good for marketing materials, UI mockups, design concepts. The more detailed your prompt, the better the output.&lt;/p&gt;&lt;p&gt;Image Generation Output:&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf4Ub5xfzgv_yAH4PyA2WQ4kZWE-ChJ3nIFHQpwBSX6JsSWuNQt8YByPm16OpsA2glWJ4rwrjThK8N0jBumy1-6qjvucXYdoLZJCiDnYUQOq9TaRF3UC4XHjCQLm6fSEQaooY6jsTLq8bKXAbDC2BxNXFfVBAgRCH419BbGAP8mQKhEQIXcl_1-GTvz14/s1219/03.%20Image%20Gen.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;559&quot; data-original-width=&quot;1219&quot; height=&quot;294&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf4Ub5xfzgv_yAH4PyA2WQ4kZWE-ChJ3nIFHQpwBSX6JsSWuNQt8YByPm16OpsA2glWJ4rwrjThK8N0jBumy1-6qjvucXYdoLZJCiDnYUQOq9TaRF3UC4XHjCQLm6fSEQaooY6jsTLq8bKXAbDC2BxNXFfVBAgRCH419BbGAP8mQKhEQIXcl_1-GTvz14/w640-h294/03.%20Image%20Gen.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3&gt;Structured Output - Extracting JSON from Documents&lt;/h3&gt;&lt;p&gt;This one is underrated. Using OpenAI&#39;s function calling capability, you can take something like an unstructured invoice and get back perfectly structured JSON — invoice number, date, vendor, line items, totals, payment method. All of it.&lt;/p&gt;&lt;p&gt;You define a function schema with your properties, pass the function definitions to the chat completion API and the model returns data that matches your schema exactly. No hallucination, no parsing headaches. Perfect for financial processing and form automation workflows.&lt;/p&gt;&lt;hr /&gt;&lt;h3&gt;Azure Computer Vision - OCR, Object Detection and Brand Recognition&lt;/h3&gt;&lt;p&gt;Computer Vision gives you deep image understanding without training any models yourself. You load an image as binary content, initialize &lt;code&gt;ImageAnalysisClient&lt;/code&gt; and specify which visual features you want — READ for text extraction (OCR), TAGS for classification, CAPTION for description, OBJECTS, PEOPLE, SMART_CROPS.&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;from azure.ai.vision.imageanalysis import ImageAnalysisClient
from azure.ai.vision.imageanalysis.models import VisualFeatures

client = ImageAnalysisClient(endpoint=endpoint, credential=credential)
result = client.analyze(
    image_data=image_data,
    visual_features=[VisualFeatures.READ, VisualFeatures.TAGS, VisualFeatures.CAPTION]
)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;There is also a Brand Recognition mode specifically for detecting logos in images — it returns the brand name and a confidence score. Great for marketing analytics, competitive intelligence and shelf monitoring in retail.&lt;/p&gt;&lt;p&gt;Object detection Output:&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9mUaN1-FRxEp15W3Er3Rg_AEfx8L3d_kCmNkVJwgR58F8yyoLxxVX3wC9vc6bTmpZ0MNIW8mgzds41OBn13KQ_iom7eJY5hrjaeusk8UkC_lOd-23x82oIdlRJ0KnaHc0r1Aysf3qmiGKvYq6pu85e-RhGIgwA1qfOOlQtW5oqUFciZPYaIU7F9_Yl48/s1195/07.object%20detection.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;613&quot; data-original-width=&quot;1195&quot; height=&quot;328&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9mUaN1-FRxEp15W3Er3Rg_AEfx8L3d_kCmNkVJwgR58F8yyoLxxVX3wC9vc6bTmpZ0MNIW8mgzds41OBn13KQ_iom7eJY5hrjaeusk8UkC_lOd-23x82oIdlRJ0KnaHc0r1Aysf3qmiGKvYq6pu85e-RhGIgwA1qfOOlQtW5oqUFciZPYaIU7F9_Yl48/w640-h328/07.object%20detection.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Brand Recognition Output:&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJqDmsyRN7Xld5Y8rQ4EoM4RHfM7AC10CwvhkY0M0TAV3oIKE9lUBEmpqDmsc3B8zItMNzNmgVscQIv_-NsAcO4pyBUse4eKhyphenhyphen07xjDYHh6CGw9oynBVulfpG6CqfVFJqbMfq7k5Hcs_jdDEL9XNY8gx_emKWRGwFloKcl-LVZkPc6YvXpTR1cgoAW1hg/s1252/05.Brand%20Recognition.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;655&quot; data-original-width=&quot;1252&quot; height=&quot;334&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJqDmsyRN7Xld5Y8rQ4EoM4RHfM7AC10CwvhkY0M0TAV3oIKE9lUBEmpqDmsc3B8zItMNzNmgVscQIv_-NsAcO4pyBUse4eKhyphenhyphen07xjDYHh6CGw9oynBVulfpG6CqfVFJqbMfq7k5Hcs_jdDEL9XNY8gx_emKWRGwFloKcl-LVZkPc6YvXpTR1cgoAW1hg/w640-h334/05.Brand%20Recognition.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3&gt;Azure Face API - Facial Detection and Attributes&lt;/h3&gt;&lt;p&gt;The Face API detects human faces in images and extracts attributes like head pose, whether the person is wearing glasses, exposure levels and more. You pass in your image, specify which features you want detected, and get back structured facial attribute data.&lt;/p&gt;&lt;p&gt;Use cases range from access control and security to retail analytics and media analysis. The API generates face IDs in a privacy-respecting way and supports batch processing.&lt;/p&gt;&lt;br /&gt;&lt;hr /&gt;&lt;h3&gt;Azure Custom Vision - Train Your Own Classifier&lt;/h3&gt;&lt;p&gt;This is where it gets really powerful for domain-specific problems. Custom Vision lets you train your own image classification model without needing any deep ML expertise. You collect images, tag them in the Custom Vision portal, train the model, deploy it to a prediction endpoint, and then call it from your code.&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;from azure.cognitiveservices.vision.customvision.prediction import CustomVisionPredictionClient

predictor = CustomVisionPredictionClient(endpoint, credentials)
results = predictor.classify_image(project_id, model_name, image_data)

for prediction in results.predictions:
    if prediction.probability &amp;gt; 0.90:
        print(f&quot;{prediction.tag_name}: {prediction.probability:.2%}&quot;)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I tested this with a pet classification model and a food/object model. With enough good training images you can hit 95%+ accuracy and sub-100ms inference. No infrastructure to manage, just train and deploy.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidRrhl1VJWj6lfQ7AW7g4XLlxs83TmPgRC2GLaT3ceAJCqPwvhyphenhyphen9RRWZ1TY8iYyXDOckYU_mFs0EdxuUP97m4IdmYPrkRvA6PfjknkTHpInvv13M-iLZ_52TQ_FPEW4LKCVTpQ-ZQZfW7-rVqe0h-pzhmrBL1ztw7Ew4MY4lRtWYiq4okmep1JtdLf9h8/s1021/06.%20Custom%20Vision.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;661&quot; data-original-width=&quot;1021&quot; height=&quot;414&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidRrhl1VJWj6lfQ7AW7g4XLlxs83TmPgRC2GLaT3ceAJCqPwvhyphenhyphen9RRWZ1TY8iYyXDOckYU_mFs0EdxuUP97m4IdmYPrkRvA6PfjknkTHpInvv13M-iLZ_52TQ_FPEW4LKCVTpQ-ZQZfW7-rVqe0h-pzhmrBL1ztw7Ew4MY4lRtWYiq4okmep1JtdLf9h8/w640-h414/06.%20Custom%20Vision.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3&gt;Azure Document Intelligence - Invoice and Receipt Processing&lt;/h3&gt;&lt;p&gt;This is a game changer for anyone doing document processing. Document Intelligence has pre-built models for invoices, receipts and other document types. You point it at a document URL, it processes it asynchronously, and you get back structured field-level data — vendor name, invoice number, line items, tax, totals — all of it.&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;from azure.ai.documentintelligence import DocumentIntelligenceClient

client = DocumentIntelligenceClient(endpoint=endpoint, credential=credential)
poller = client.begin_analyze_document(&quot;prebuilt-invoice&quot;, document_url)
result = poller.result()
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;95%+ extraction accuracy on standard invoice formats. This kind of thing used to take weeks to build, now you are up and running in an afternoon.&lt;/p&gt;&lt;p&gt;Document Intelligence Output:&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk49d504gpNMXXfD-JTVkm7uSDtmtrpsDjsYvkYl2GnSL9mtMqkKkLT0YiUkEwDJp8Jj12ppnVPYL4rMj3pFBGo1eVcldAtFN3IHH3eGQNS_0-RK9zrH27wbdddKYryDRB3ilm3sZLoHw7saOho41WhcoeJHxQWHHI0B079fCJCcXQ9wSux9kHS895GVg/s1228/04.%20OCR%20.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;940&quot; data-original-width=&quot;1228&quot; height=&quot;490&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk49d504gpNMXXfD-JTVkm7uSDtmtrpsDjsYvkYl2GnSL9mtMqkKkLT0YiUkEwDJp8Jj12ppnVPYL4rMj3pFBGo1eVcldAtFN3IHH3eGQNS_0-RK9zrH27wbdddKYryDRB3ilm3sZLoHw7saOho41WhcoeJHxQWHHI0B079fCJCcXQ9wSux9kHS895GVg/w640-h490/04.%20OCR%20.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3&gt;Azure Language Service - Text Intelligence&lt;/h3&gt;&lt;p&gt;The Language Service is a whole suite of NLP capabilities under one client.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Language Detection&lt;/strong&gt; identifies which of 120+ languages your text is in. Useful for multi-language applications and routing pipelines.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Key Phrase Extraction&lt;/strong&gt; pulls out the main topics from any text. Feed it an article and it tells you the key concepts. Good for SEO, content categorization and trend analysis.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Sentiment Analysis&lt;/strong&gt; goes beyond just positive/negative. It does sentence-level breakdown, opinion mining, and returns confidence scores per sentiment category. You can even do aspect-based sentiment — so for a restaurant review you can get separate sentiment scores for food, service and ambience.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Entity Extraction&lt;/strong&gt; identifies people, places, organisations, dates, amounts, and job titles in your text. Great for populating CRM data from unstructured sources or building advanced search.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Conversational Language Understanding&lt;/strong&gt; lets you define custom intents and entities, train a model, and then extract structured information from conversational input. For example:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;Utterance: &quot;I need to book a flight from London to Bangalore on 10th December for 4 adults in economy&quot;

Extracted:
- Intent: BookFlight
- From: London
- To: Bangalore  
- Date: 10th December
- Passengers: 4
- Class: Economy
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This is the backbone of any chatbot or voice assistant workflow.&lt;/p&gt;&lt;p&gt;Sentiment Analysis Output:&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9xJMKBrPzcOga3fVuY7gLeT3es0pv69H6wdZKurTp9D3IgDH3_Gv4foQKOSmY2gNhcoWtbrrGl9RAbgKvYan5CNUgvkjMVtFg97BDaoJdn1d8B_QH5IwdUG6p9rkTKwQnZ08MO1tI7i3U0YtH5alIHutZ68KPftpZuD6ZbbLyvSJFfQFWS3j5V97TjRU/s1144/08.Sentiment.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;643&quot; data-original-width=&quot;1144&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9xJMKBrPzcOga3fVuY7gLeT3es0pv69H6wdZKurTp9D3IgDH3_Gv4foQKOSmY2gNhcoWtbrrGl9RAbgKvYan5CNUgvkjMVtFg97BDaoJdn1d8B_QH5IwdUG6p9rkTKwQnZ08MO1tI7i3U0YtH5alIHutZ68KPftpZuD6ZbbLyvSJFfQFWS3j5V97TjRU/w640-h360/08.Sentiment.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3&gt;Azure Translator - 100+ Languages&lt;/h3&gt;&lt;p&gt;The Translator service is simple and incredibly powerful. One API call, multiple target languages, done.&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;documents = [InputTextItem(text=&quot;早上好，你好吗?&quot;)]
response = client.translate(content=documents, to=[&quot;en&quot;, &quot;it&quot;, &quot;fr&quot;], from_parameter=&quot;zh-Hans&quot;)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Supports 100+ languages, auto-detection, transliteration and custom terminology for enterprise use. If you are building a global application this is the fastest path to multilingual support.&lt;/p&gt;&lt;p&gt;Translation Output:&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmFv8QK5vPrzJm92cBAtGTEVLUj4zIKxqJemHF48smj2dHsvQgPL9VuB5YM3ZeDJL5ENunAI1TTXCynaccQTqrR2OWFIzHZm5RIDWX2gatY-JRalZqEG6Wvr6bpweafz3yuRBchMGVTDj9uZz3QNg2fD0Wg1WIAIKrmcLyCfOSck0H7GG3pVlrGMu0mpo/s613/09.Translation.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;586&quot; data-original-width=&quot;613&quot; height=&quot;612&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmFv8QK5vPrzJm92cBAtGTEVLUj4zIKxqJemHF48smj2dHsvQgPL9VuB5YM3ZeDJL5ENunAI1TTXCynaccQTqrR2OWFIzHZm5RIDWX2gatY-JRalZqEG6Wvr6bpweafz3yuRBchMGVTDj9uZz3QNg2fD0Wg1WIAIKrmcLyCfOSck0H7GG3pVlrGMu0mpo/w640-h612/09.Translation.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3&gt;Azure Speech Service - TTS, STT and Live Transcription&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Text-to-Speech&lt;/strong&gt; uses neural voice synthesis to convert text to natural-sounding audio. You pick a voice (there are 400+ across 140+ languages), configure your speech settings and call it. The &lt;code&gt;en-US-AndrewMultilingualNeural&lt;/code&gt; voice is surprisingly natural.&lt;/p&gt;&lt;p&gt;For even more control you use &lt;strong&gt;SSML (Speech Synthesis Markup Language)&lt;/strong&gt; — this lets you control pitch, rate, volume, add pauses, set speaking style (cheerful, professional, etc.) and even specify phoneme-level pronunciation. Full studio-quality control.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Speech-to-Text&lt;/strong&gt; goes the other direction — audio file in, transcribed text out. Under 5% word error rate on clean audio. Supports real-time recognition and continuous recognition for ongoing streams.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Live Transcription&lt;/strong&gt; is continuous speech recognition in real time — low latency, partial results as you speak, final results on pause. Good for live captioning, accessibility and interactive voice applications.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3&gt;Azure Content Safety - Moderation at Scale&lt;/h3&gt;&lt;p&gt;Content Safety detects harmful content in both images and text. It covers four categories — self-harm, violence, hate speech and sexual content — and returns a severity score for each. You set your own threshold and build your moderation workflow from there.&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;request = AnalyzeImageOptions(image=ImageData(content=image_file.read()))
response = safetyClient.analyze_image(request)

request = AnalyzeTextOptions(text=input_text)
response = safetyClient.analyze_text(request)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For any platform dealing with user-generated content this is essential. Reduces manual moderation load significantly.&lt;/p&gt;&lt;p&gt;Content Saftey Output:&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAwBJS54IKuqUWfCAsOdkJ4bCJu1oFQjL6RETY8yJAqIkChnFBr2jfQDu9Rt9XNzRlYezpfBa9zpeBskAvl-JfgtwligsUmsSJSdtIoylbeMSf9amykilcBjeRNRkEgEQ4SoN9VB-IBlf4iYrzi7M8Ex5z2Zw8QfYO-HKEd2fDTh-_S2bL0Kon9UU4_b8/s1242/10.Saftey.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;526&quot; data-original-width=&quot;1242&quot; height=&quot;272&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAwBJS54IKuqUWfCAsOdkJ4bCJu1oFQjL6RETY8yJAqIkChnFBr2jfQDu9Rt9XNzRlYezpfBa9zpeBskAvl-JfgtwligsUmsSJSdtIoylbeMSf9amykilcBjeRNRkEgEQ4SoN9VB-IBlf4iYrzi7M8Ex5z2Zw8QfYO-HKEd2fDTh-_S2bL0Kon9UU4_b8/w640-h272/10.Saftey.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3&gt;Putting It All Together&lt;/h3&gt;&lt;p&gt;The real power of Azure AI Services is in combining them. A simple example: Speech → Text → Language Understanding → Trigger Workflow. That is a fully voice-driven automation pipeline built entirely from managed services with no ML infrastructure.&lt;/p&gt;&lt;p&gt;Authentication across all services follows the same pattern:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;from azure.core.credentials import AzureKeyCredential
from dotenv import load_dotenv
import os

load_dotenv()
endpoint = os.getenv(&quot;AZURE_SERVICE_ENDPOINT&quot;)
key = os.getenv(&quot;AZURE_SERVICE_KEY&quot;)
credential = AzureKeyCredential(key)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Always store keys in .env files, never hardcode them. In production use managed identities instead of API keys altogether.&lt;/p&gt;&lt;p&gt;The 30+ implementations i built in this AIFoundry project cover all of the above end to end. Everything is pay-per-use, auto-scales, no infrastructure to manage and all come with 99.9% SLA. The recommended approach is to start with Azure OpenAI for your foundational needs, layer on the specialised services as required, and combine them for compound intelligence workflows.&lt;/p&gt;&lt;p&gt;Learning and Sharing !&lt;/p&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/2650165499223806319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2026/04/azure-ai-services-complete-guide-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/2650165499223806319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/2650165499223806319'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2026/04/azure-ai-services-complete-guide-to.html' title='Azure AI Services - A Complete Guide to Building Intelligent Applications with Azure AI Foundry'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRzX0PP1YQ7EcdkbBdYzZBatErgnCnSMV1uonZ4MPWmPcPtgmakqubEVVWVDFeJy3K2GvpVPKX-VguyNSIbzepWAgBNpGKodJVCK14Ca6NXhsPZovKyVxFkDS1Hqf77XtXYAK_qMGSx5AX5DNQABnoLmgdrJ0V2BfEQJc7312uQqrgSHjncDdTf4SI41Y/s72-w640-h317-c/01.gpt%20chat%20output.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-5603380502498619715</id><published>2023-11-27T02:08:00.000-08:00</published><updated>2023-11-27T02:09:49.203-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><category scheme="http://www.blogger.com/atom/ns#" term="Azure DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Azure FinOps"/><category scheme="http://www.blogger.com/atom/ns#" term="CloudDevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><title type='text'>Azure FinOps using Terraform and Infracost - Finding the hourly or monthly cost before Azure DevOps Deployments</title><content type='html'>A while ago i created a demo for Azure VWAN using&amp;nbsp; terraform and Azure DevOps. I dive headfirst without realizing that i am using premium SKU for firewalls and my Dev teant is shutdown for a month in few days due to my billing cap of 230 NZD.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Next time when i create a demo for APIM instances, i dint realize Premium SKU costs 7500 NZD/month. Even before i finish my POC, the teant again shutdown in few hours this time.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Our objective is to find the cost of the IAC we are deploying even before we deploy.&amp;nbsp;&lt;/div&gt;&lt;div&gt;In this post i will show how we can utilize Infracost a opensource plugin in both VSCode and how we can make it part of our Azure DevOps pipelines to manage cost of the resources we are going to deploy.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Like this :&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9yjOhjkQf_fCmIIFeOJmwb3NOtwLa8sy1kthdWomuDKaLqsUktGKeh-Lf5T7Wcc4M-70gUI9AnVZEhctNJc5_2Zt7AOr2C9lmP7r93VKQz5KN3Xe_6imOeZ7a9sMJ-51uUzfZPAjLbBhOYq23OeVhQVWitKwbbTIF15-xukdnaC9fhSIABQ129uibt_c/s1567/1.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;937&quot; data-original-width=&quot;1567&quot; height=&quot;382&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9yjOhjkQf_fCmIIFeOJmwb3NOtwLa8sy1kthdWomuDKaLqsUktGKeh-Lf5T7Wcc4M-70gUI9AnVZEhctNJc5_2Zt7AOr2C9lmP7r93VKQz5KN3Xe_6imOeZ7a9sMJ-51uUzfZPAjLbBhOYq23OeVhQVWitKwbbTIF15-xukdnaC9fhSIABQ129uibt_c/w640-h382/1.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;or like this:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRupoBBPc5oltmhtmlqnezWS4Iq-AlwErvhzTM-z9cDE7qVEk0thVPm5KaJy7peAJ0xkSbfI3U2cuRRd1nHx1z1ISXl4qZetBDJWIVX2MZV-___ZBB0vEFWTVF5rgSlpd-a9B7F5P_iZ3yj8rn-gLrcRz7-DeobXN9oIBWSp4GRQsCQZlCaIpFkDgpi8U/s1033/2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;670&quot; data-original-width=&quot;1033&quot; height=&quot;416&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRupoBBPc5oltmhtmlqnezWS4Iq-AlwErvhzTM-z9cDE7qVEk0thVPm5KaJy7peAJ0xkSbfI3U2cuRRd1nHx1z1ISXl4qZetBDJWIVX2MZV-___ZBB0vEFWTVF5rgSlpd-a9B7F5P_iZ3yj8rn-gLrcRz7-DeobXN9oIBWSp4GRQsCQZlCaIpFkDgpi8U/w640-h416/2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;VS Code:&lt;/h3&gt;&lt;div&gt;To use Infracost in VSCode, go to &lt;a href=&quot;http://infracost.io&quot;&gt;infracost.io&lt;/a&gt; and download the Infracost.exe and place it in c:\windows folder.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As soon as you did above step, reopen your VS Code and you can start seing the cost of individual components as shown above. But we want to see the cost of the whole deployment, not just resource by resource.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now either use your own code base, or you can download my &lt;a href=&quot;https://github.com/pratappilaka24/Azure-VWAN&quot; target=&quot;_blank&quot;&gt;AzureVWAN&lt;/a&gt; codebase from my GitRepo. Dont worry i chnaged the SKUs to basic and we are not deploying anything. Our objective is to find cost even before deploying.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Open your TF source code in VS Code and open terminal and runn your tfplan command as shown below:&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMCLGq9e-uQ6XntF3UMk_PsIg9T6wqW-XlZrC-GNcqu_Gm-z_dg1C9pQcSybuvRlazDODco1tYWyc_JchoKTZl3urk1M7_o4GW4-b20xhnmDqcWcDkYbj2lQHKgS-G26nL6IFnso1mPdAzDVffwfgXoYqLBcWqGLKr2tAmQ4K7Z0aYnWJZbkeXhjegdns/s978/4.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;55&quot; data-original-width=&quot;978&quot; height=&quot;36&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMCLGq9e-uQ6XntF3UMk_PsIg9T6wqW-XlZrC-GNcqu_Gm-z_dg1C9pQcSybuvRlazDODco1tYWyc_JchoKTZl3urk1M7_o4GW4-b20xhnmDqcWcDkYbj2lQHKgS-G26nL6IFnso1mPdAzDVffwfgXoYqLBcWqGLKr2tAmQ4K7Z0aYnWJZbkeXhjegdns/w640-h36/4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;We need tfplan output into a file, because in VS Code the cost is generated based on the plan. Above command will generate the plan output into a file in current working folder.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now run below command to authenticate InfraCost.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiulrIhyn6HcJnznjTVEgD_TSjzMX14B5m35PVPqqIZR-cAXvHred6EN_qiaJRPB8Jm3pDKfGyG3VHcKRIWb_JodLI6FWuaTjDhZJyCF9-V6FQc45zeFgINVzGYdIvvUwNujk2Q9sybMFEOA4Tpj0RquhcSjL0TFq5-4iWf1rn6bEPeJ0cyy60dzLXO95Q/s315/5.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;70&quot; data-original-width=&quot;315&quot; height=&quot;70&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiulrIhyn6HcJnznjTVEgD_TSjzMX14B5m35PVPqqIZR-cAXvHred6EN_qiaJRPB8Jm3pDKfGyG3VHcKRIWb_JodLI6FWuaTjDhZJyCF9-V6FQc45zeFgINVzGYdIvvUwNujk2Q9sybMFEOA4Tpj0RquhcSjL0TFq5-4iWf1rn6bEPeJ0cyy60dzLXO95Q/s1600/5.png&quot; width=&quot;315&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;This will open the web browser for authentication with your Infracost account. This will autamtically get the API token from Infracost and save it in VScode settings.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now run below command :&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF7WYxed1ALyso1smDDJUMxjsqcLlrPlPbDaO8e_aitKRYWwTG9uPpD05nGRZm2OhcG9fAIS9UfXW-CS41869TAp7Ue0HGFhnmwFreEzC0l9QG0g-x3pitIPW_Pi5DpN4JarIuJ2WUvAJUTNomemcopKJC8-M2tBJ2OdTMApq1D0P1U0wuqSMMmxQgoo4/s403/6.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;46&quot; data-original-width=&quot;403&quot; height=&quot;37&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF7WYxed1ALyso1smDDJUMxjsqcLlrPlPbDaO8e_aitKRYWwTG9uPpD05nGRZm2OhcG9fAIS9UfXW-CS41869TAp7Ue0HGFhnmwFreEzC0l9QG0g-x3pitIPW_Pi5DpN4JarIuJ2WUvAJUTNomemcopKJC8-M2tBJ2OdTMApq1D0P1U0wuqSMMmxQgoo4/s320/6.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;This will utilize the plan file generated earlier and will give you cost of each component and final mothly cost of your deployment as shown below.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXQ4LCFZYHOGKgbUUDQaQeqhPJI8faSc4GLxI9ZWMtxrnTAD3sI0EjJPThmAcEXc1ITvtWUzngrsjPgaZHQk6up5bSmGnmm52n35UkyOX4aCkNziBNJjZuvAl34h4_93S8dsSLjHwMOoC8wcx2eublYzjwPTcDdlRf4hmOL2dfuQzjlJMmYEIgLqTNNgk/s1567/1.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;937&quot; data-original-width=&quot;1567&quot; height=&quot;382&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXQ4LCFZYHOGKgbUUDQaQeqhPJI8faSc4GLxI9ZWMtxrnTAD3sI0EjJPThmAcEXc1ITvtWUzngrsjPgaZHQk6up5bSmGnmm52n35UkyOX4aCkNziBNJjZuvAl34h4_93S8dsSLjHwMOoC8wcx2eublYzjwPTcDdlRf4hmOL2dfuQzjlJMmYEIgLqTNNgk/w640-h382/1.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;When you are doing a multiple versions of build, you can use below command to find the difference of the costs based on your base build. &lt;a href=&quot;https://www.infracost.io/docs/#4-show-cost-estimate-diff&quot; target=&quot;_blank&quot;&gt;More on this here&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglg7fEaSN4slU-XzhRmh8BepcLAOa7r2Upz4HPK2ndG2KxH0mdnpCjZROzkChm-Bl0sUWxGctoBfW3DTHaqp-IosjOhUhHZzjzNNxg2ccIKeGPHpi6q8HEAZSF4HIahQOZ_q7A9_7-Z7tN_nZx7GA1y2poOlq4kYnV7N0jesC2Cwcz-V26sR8xa0lzVK4/s709/7.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;73&quot; data-original-width=&quot;709&quot; height=&quot;41&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglg7fEaSN4slU-XzhRmh8BepcLAOa7r2Upz4HPK2ndG2KxH0mdnpCjZROzkChm-Bl0sUWxGctoBfW3DTHaqp-IosjOhUhHZzjzNNxg2ccIKeGPHpi6q8HEAZSF4HIahQOZ_q7A9_7-Z7tN_nZx7GA1y2poOlq4kYnV7N0jesC2Cwcz-V26sR8xa0lzVK4/w400-h41/7.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Azure DevOps Pipeline&lt;/h3&gt;&lt;div&gt;Unlike we cannot use interactive authentication in middle of your devOps pieline execution, we need a API token to authenticate Infracost API.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Once you done with Infracost.exe, signup on Infracost.io using your Github account or gmail account. Its free, opensource. Finishing signup it will send a Access token(Infracostaccesstoken) to your email Else log onto InfraCost.io and go to Organization settings and you can reteive your API key.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Go to your Azure DevOps organization settings and install InfraCost extension. If it is not installed earlier, go to &quot;Browse marketplace&quot;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaiKb29p0Pxtvsi1KsSxaTk8e14e53E1WoN6SwNk5oiFoxmVemJA8CofraVpDrdVrkUkr-QC-G6dHZsOdoAmEsMgEwQwZ03AANuDm7YsAHeZJWjQ4zD39uxQwr0MjgHfK3ElCKUwoLcaEV8YoMeUbUvzAeDPNTLJ9744YnH2ONyWzvz2XMLrVoqN0zcBo/s1654/8.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;762&quot; data-original-width=&quot;1654&quot; height=&quot;294&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaiKb29p0Pxtvsi1KsSxaTk8e14e53E1WoN6SwNk5oiFoxmVemJA8CofraVpDrdVrkUkr-QC-G6dHZsOdoAmEsMgEwQwZ03AANuDm7YsAHeZJWjQ4zD39uxQwr0MjgHfK3ElCKUwoLcaEV8YoMeUbUvzAeDPNTLJ9744YnH2ONyWzvz2XMLrVoqN0zcBo/w640-h294/8.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;then&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjty-wRRC3ToE9Mnaf79nMY0SmL0fLcWkXv6bLRTpQYDiHQzMWUcDOctHbtJbhSv0qfZI5bNPnDtkkyq6o2tVRnanZb7tQu26zfG6Fbo1Y88xvLOpHpWOZETzEba1-Nq4EVXO4v_Y83tPfnGc4PR1XqIGT_YZmaRcHybvuU2obq8Gvs5V9uEcFzLOTF3l0/s1042/9.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;745&quot; data-original-width=&quot;1042&quot; height=&quot;458&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjty-wRRC3ToE9Mnaf79nMY0SmL0fLcWkXv6bLRTpQYDiHQzMWUcDOctHbtJbhSv0qfZI5bNPnDtkkyq6o2tVRnanZb7tQu26zfG6Fbo1Y88xvLOpHpWOZETzEba1-Nq4EVXO4v_Y83tPfnGc4PR1XqIGT_YZmaRcHybvuU2obq8Gvs5V9uEcFzLOTF3l0/w640-h458/9.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now take any existing Repo on Azure Devops, I am using the same AzureVWAN project on my devops repos.&lt;/div&gt;&lt;div&gt;Create a new pipeline =&amp;gt; Azure repos Git =&amp;gt; select current project =&amp;gt;&amp;nbsp; Starter Pipeline.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Copy paste below code:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: #fffffe; color: #007200; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;#&amp;nbsp;Starter&amp;nbsp;pipeline&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #007200;&quot;&gt;#&amp;nbsp;Start&amp;nbsp;with&amp;nbsp;a&amp;nbsp;minimal&amp;nbsp;pipeline&amp;nbsp;that&amp;nbsp;you&amp;nbsp;can&amp;nbsp;customize&amp;nbsp;to&amp;nbsp;build&amp;nbsp;and&amp;nbsp;deploy&amp;nbsp;your&amp;nbsp;code.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #007200;&quot;&gt;#&amp;nbsp;Add&amp;nbsp;steps&amp;nbsp;that&amp;nbsp;build,&amp;nbsp;run&amp;nbsp;tests,&amp;nbsp;deploy,&amp;nbsp;and&amp;nbsp;more:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #007200;&quot;&gt;#&amp;nbsp;https://aka.ms/yaml&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: teal;&quot;&gt;trigger&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;-&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;main&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: teal;&quot;&gt;pool&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;vmImage&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;ubuntu-latest&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: teal;&quot;&gt;stages&lt;/span&gt;:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #007200;&quot;&gt;###########&amp;nbsp;Prod&amp;nbsp;Deployment&amp;nbsp;###########&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;stage&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;terraform_cost_plan&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;displayName&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;terraform-cost-plan&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;jobs&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;job&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;infracost&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;displayName&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;Run&amp;nbsp;Infracost&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;steps&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007200;&quot;&gt;#&amp;nbsp;If&amp;nbsp;you&amp;nbsp;use&amp;nbsp;private&amp;nbsp;modules,&amp;nbsp;add&amp;nbsp;a&amp;nbsp;base&amp;nbsp;64&amp;nbsp;encoded&amp;nbsp;secret&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007200;&quot;&gt;#&amp;nbsp;called&amp;nbsp;gitSshKeyBase64&amp;nbsp;with&amp;nbsp;your&amp;nbsp;private&amp;nbsp;key,&amp;nbsp;so&amp;nbsp;Infracost&amp;nbsp;can&amp;nbsp;access&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007200;&quot;&gt;#&amp;nbsp;private&amp;nbsp;repositories&amp;nbsp;(similar&amp;nbsp;to&amp;nbsp;how&amp;nbsp;Terraform/Terragrunt&amp;nbsp;does).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007200;&quot;&gt;#&amp;nbsp;-&amp;nbsp;bash:&amp;nbsp;|&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007200;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ssh-agent&amp;nbsp;-a&amp;nbsp;$(SSH_AUTH_SOCK)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007200;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mkdir&amp;nbsp;-p&amp;nbsp;~/.ssh&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007200;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;&quot;$(echo&amp;nbsp;$GIT_SSH_KEY_BASE_64&amp;nbsp;|&amp;nbsp;base64&amp;nbsp;-d)&quot;&amp;nbsp;|&amp;nbsp;tr&amp;nbsp;-d&amp;nbsp;&#39;\r&#39;&amp;nbsp;|&amp;nbsp;ssh-add&amp;nbsp;-&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007200;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;Update&amp;nbsp;this&amp;nbsp;to&amp;nbsp;github.com,&amp;nbsp;gitlab.com,&amp;nbsp;bitbucket.org,&amp;nbsp;ssh.dev.azure.com&amp;nbsp;or&amp;nbsp;your&amp;nbsp;source&amp;nbsp;control&amp;nbsp;server&#39;s&amp;nbsp;domain&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007200;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ssh-keyscan&amp;nbsp;github.com&amp;nbsp;&amp;gt;&amp;gt;&amp;nbsp;~/.ssh/known_hosts&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007200;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;displayName:&amp;nbsp;Add&amp;nbsp;GIT_SSH_KEY&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007200;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;env:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007200;&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;GIT_SSH_KEY_BASE_64:&amp;nbsp;$(gitSshKeyBase64)&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007200;&quot;&gt;#&amp;nbsp;Install&amp;nbsp;the&amp;nbsp;Infracost&amp;nbsp;CLI,&amp;nbsp;see&amp;nbsp;https://github.com/infracost/infracost-azure-devops#infracostsetup&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007200;&quot;&gt;#&amp;nbsp;for&amp;nbsp;other&amp;nbsp;inputs&amp;nbsp;such&amp;nbsp;as&amp;nbsp;version,&amp;nbsp;and&amp;nbsp;pricingApiEndpoint&amp;nbsp;(for&amp;nbsp;self-hosted&amp;nbsp;users).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;task&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;InfracostSetup@2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;displayName&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;Setup&amp;nbsp;Infracost&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;inputs&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;apiKey&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;$(infracostApiKey)&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007200;&quot;&gt;#&amp;nbsp;Clone&amp;nbsp;the&amp;nbsp;base&amp;nbsp;branch&amp;nbsp;of&amp;nbsp;the&amp;nbsp;pull&amp;nbsp;request&amp;nbsp;(e.g.&amp;nbsp;main/master)&amp;nbsp;into&amp;nbsp;a&amp;nbsp;temp&amp;nbsp;directory.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;bash&lt;/span&gt;:&amp;nbsp;|&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #0451a5;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;branch=$(System.PullRequest.TargetBranch)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #0451a5;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;branch=${branch#refs/heads/}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #0451a5;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;git&amp;nbsp;clone&amp;nbsp;$(Build.Repository.Uri)&amp;nbsp;--branch=&quot;main&quot;&amp;nbsp;--single-branch&amp;nbsp;/tmp/base&amp;nbsp;--config&amp;nbsp;http.extraheader=&quot;AUTHORIZATION:&amp;nbsp;bearer&amp;nbsp;$(System.AccessToken)&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;displayName&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;Checkout&amp;nbsp;base&amp;nbsp;branch&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007200;&quot;&gt;#&amp;nbsp;Generate&amp;nbsp;an&amp;nbsp;Infracost&amp;nbsp;cost&amp;nbsp;estimate&amp;nbsp;baseline&amp;nbsp;from&amp;nbsp;the&amp;nbsp;comparison&amp;nbsp;branch,&amp;nbsp;so&amp;nbsp;that&amp;nbsp;Infracost&amp;nbsp;can&amp;nbsp;compare&amp;nbsp;the&amp;nbsp;cost&amp;nbsp;difference.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;bash&lt;/span&gt;:&amp;nbsp;|&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #0451a5;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;infracost&amp;nbsp;breakdown&amp;nbsp;--path=/tmp/base/$(TF_ROOT)&amp;nbsp;\&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;--format=json&amp;nbsp;\&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;--out-file=/tmp/infracost-base.json&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;displayName&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;Generate&amp;nbsp;Infracost&amp;nbsp;cost&amp;nbsp;estimate&amp;nbsp;baseline&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;bash&lt;/span&gt;:&amp;nbsp;|&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #0451a5;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sudo&amp;nbsp;apt&amp;nbsp;install&amp;nbsp;jq&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;displayName&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;Installing&amp;nbsp;JQ&amp;nbsp;to&amp;nbsp;prettyfy&amp;nbsp;output&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;bash&lt;/span&gt;:&amp;nbsp;|&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #0451a5;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;jq&amp;nbsp;.&amp;nbsp;/tmp/infracost-base.json&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;displayName&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;Printing&amp;nbsp;Baseline&amp;nbsp;cost&amp;nbsp;estimate&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007200;&quot;&gt;#&amp;nbsp;Generate&amp;nbsp;an&amp;nbsp;Infracost&amp;nbsp;diff&amp;nbsp;and&amp;nbsp;save&amp;nbsp;it&amp;nbsp;to&amp;nbsp;a&amp;nbsp;JSON&amp;nbsp;file.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;bash&lt;/span&gt;:&amp;nbsp;|&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #0451a5;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;infracost&amp;nbsp;diff&amp;nbsp;--path=$(TF_ROOT)&amp;nbsp;\&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;--format=json&amp;nbsp;\&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;--compare-to=/tmp/infracost-base.json&amp;nbsp;\&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;--out-file=/tmp/infracost.json&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;displayName&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;Generate&amp;nbsp;Infracost&amp;nbsp;diff&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;bash&lt;/span&gt;:&amp;nbsp;|&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #0451a5;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;jq&amp;nbsp;.&amp;nbsp;/tmp/infracost-base.json&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;tt&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #fffffe; color: teal; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;displayName&lt;/span&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #fffffe; color: #0451a5; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;Printing&amp;nbsp;cost&amp;nbsp;difference&amp;nbsp;estimate&lt;/span&gt;&lt;/tt&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Before you save the pipeline, click varaibles button on top right corner and add a variable with name &quot;infracostapikey&quot; and the value should be the API key you saved/generated/copied earlier from infracost organization settings.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now save and run the pipeline.&lt;/div&gt;&lt;div&gt;Boom:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiet2cihOttqLBrRi7UolgGXK9owKmASIOGTemoN5SDQCOzN4Imd3aPhMDJBk47eVqEiyjw8YamTZZlGakY7KnlOh402rAjqfRMI-c7PZmRmL3RJVvBcjK1qqAbMV7ymJLA7UoyMvAIT8ePDzpL8uq_WgfGlXwD0pML_8SlQ9LKZ61TKmRAp2gXRjsQsfE/s1770/10.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1330&quot; data-original-width=&quot;1770&quot; height=&quot;480&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiet2cihOttqLBrRi7UolgGXK9owKmASIOGTemoN5SDQCOzN4Imd3aPhMDJBk47eVqEiyjw8YamTZZlGakY7KnlOh402rAjqfRMI-c7PZmRmL3RJVvBcjK1qqAbMV7ymJLA7UoyMvAIT8ePDzpL8uq_WgfGlXwD0pML_8SlQ9LKZ61TKmRAp2gXRjsQsfE/w640-h480/10.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;I have even embedded the code to give you the diff next time when you run with chnages to your build.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can make this pipeline as a one of the build validation task everytime when main or master branch was updated and can create chnage management / goverance / FinOps arround your Azure DevOps deployments.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/5603380502498619715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2023/11/azure-finops-using-terraform-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/5603380502498619715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/5603380502498619715'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2023/11/azure-finops-using-terraform-and.html' title='Azure FinOps using Terraform and Infracost - Finding the hourly or monthly cost before Azure DevOps Deployments'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9yjOhjkQf_fCmIIFeOJmwb3NOtwLa8sy1kthdWomuDKaLqsUktGKeh-Lf5T7Wcc4M-70gUI9AnVZEhctNJc5_2Zt7AOr2C9lmP7r93VKQz5KN3Xe_6imOeZ7a9sMJ-51uUzfZPAjLbBhOYq23OeVhQVWitKwbbTIF15-xukdnaC9fhSIABQ129uibt_c/s72-w640-h382-c/1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-4850905955711566009</id><published>2023-07-16T01:11:00.005-07:00</published><updated>2023-07-16T01:31:15.203-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><category scheme="http://www.blogger.com/atom/ns#" term="Azure DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="IAC"/><category scheme="http://www.blogger.com/atom/ns#" term="Terraform"/><title type='text'>Azure DevOps Self-Hosted Agents Automation Using Packer and Terrafrom</title><content type='html'>&lt;div&gt;&lt;div&gt;In Azure DevOps, &quot;self-hosted agents&quot; refer to agent machines that you set up and manage yourself, instead of using Microsoft-hosted agents. These self-hosted agents can be beneficial in various scenarios:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Security and Compliance:&lt;/b&gt; In some organizations, data security and compliance policies may require running build and deployment processes on infrastructure managed within their own network.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Access to Internal Resources:&lt;/b&gt; Your build and deployment processes may require access to internal resources (databases, network drives, etc.) that are not accessible from external Microsoft-hosted agents.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Performance and Customization: &lt;/b&gt;Self-hosted agents can be tailored to specific hardware configurations, which might be necessary for resource-intensive builds or specialized build environments.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Cost Management:&lt;/b&gt; Azure DevOps provides a certain number of free Microsoft-hosted parallel jobs, but if you have large-scale or resource-intensive projects, self-hosted agents can be more cost-effective in the long run.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Reducing Build Queue Times:&lt;/b&gt; When using Microsoft-hosted agents, you share resources with other users, which might result in longer build queue times. Self-hosted agents allow you to control the resources dedicated to your builds, potentially reducing waiting times.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Offline Environments:&lt;/b&gt; If you have environments without continuous internet access, self-hosted agents can be used to facilitate builds and deployments within those isolated networks.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In this post i will be:&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Generating a Managed VM Image using Packer.&lt;/li&gt;&lt;li&gt;Saving the Managed image to a Image gallery within my tenant.&lt;/li&gt;&lt;li&gt;Create a Virtual Machine Scale Set(VMSS) from the said image.&lt;/li&gt;&lt;li&gt;Register the VMSS as DevOps Self-Hosted agents.&lt;/li&gt;&lt;li&gt;Run a time intensive project using self-hosted pool to see how VMSS will autoscale.&lt;/li&gt;&lt;li&gt;Then update the VM image with new build and see how we can update the existing Self-hosted agents.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX_ffJ7laHrnuFU4q_GfRFvRSV7balOWvQWQWZWm8_fMNPo8gJA4Nv6_jFa_AV0C3MTLduvm7pkYlOh2WGp7RuYQM1slvyOQV4Ljr4fW_vRu3g4OhUTWoFM_D5QJX6rz2A_omdPg3MVVXvVY9u_USgERmzU3DLu1geCg_wIEmU9klkihhR79FF7M2Detk/s1915/1.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;933&quot; data-original-width=&quot;1915&quot; height=&quot;312&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX_ffJ7laHrnuFU4q_GfRFvRSV7balOWvQWQWZWm8_fMNPo8gJA4Nv6_jFa_AV0C3MTLduvm7pkYlOh2WGp7RuYQM1slvyOQV4Ljr4fW_vRu3g4OhUTWoFM_D5QJX6rz2A_omdPg3MVVXvVY9u_USgERmzU3DLu1geCg_wIEmU9klkihhR79FF7M2Detk/w640-h312/1.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;div&gt;&lt;b&gt;Step 1:&lt;/b&gt; Download the code from &lt;a href=&quot;https://github.com/pratappilaka24/SelfHosted-Devops-Agent-TF-and-Packer&quot; style=&quot;color: red;&quot; target=&quot;_blank&quot;&gt;SelfHosted-Devops-Agent-TF-and-Packer&lt;/a&gt;&lt;/div&gt;&lt;div&gt;Please know that the Linux custom Packer Image definition is not part of this repo. but dont worry, it will download all the required packer file and necessary installer scripts and packages automatically when you run the pipeline.&lt;/div&gt;&lt;div&gt;Below image will explain the contents of the repo.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTki2N8MHYuZVV9e1dwIFIhYx54dXUiDA1lbdZmTFWulURfsT4bLDo9wNPR7vkxUl6yo71nmNa5JJsZw5yBbD20dgr33sn8RebqO0mS-_I94MVPPZz7-rWGADzf1vqG5ShJYHNSIzKtl_jHE4nMGUS6qKr1K0qU3gmZ5cZt31CFjhFV-tzcaDrkhnoEyo/s2417/2.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1181&quot; data-original-width=&quot;2417&quot; height=&quot;312&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTki2N8MHYuZVV9e1dwIFIhYx54dXUiDA1lbdZmTFWulURfsT4bLDo9wNPR7vkxUl6yo71nmNa5JJsZw5yBbD20dgr33sn8RebqO0mS-_I94MVPPZz7-rWGADzf1vqG5ShJYHNSIzKtl_jHE4nMGUS6qKr1K0qU3gmZ5cZt31CFjhFV-tzcaDrkhnoEyo/w640-h312/2.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;Step 2: &lt;/b&gt;Update the Suscription id in the Setup.azcli script and run it. The script will give a final out put where you need to create DevOps library variable group based on the output values. More details are there in Readme file. Please fillow the variable names defined in readme file and the values can be found from out put of above setup script.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_GkA1URTLtxiPypCZVDzoVf7YdC1UCj0lUWXwgzsaZ2UG_YLONDoJme_IQSoTiPzKtgKEvxI1E5lLnejbC_UuZoZIPjfSDq_O-3Nh24e5hRa5M5blREY9_hz2TLMDp5em83TXKJ_ALiJ4MNuMqguYE-zHON6_YUxVD-n1OmPQan03ZjfQa9GtjWi8Ilw/s1165/3.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1000&quot; data-original-width=&quot;1165&quot; height=&quot;550&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_GkA1URTLtxiPypCZVDzoVf7YdC1UCj0lUWXwgzsaZ2UG_YLONDoJme_IQSoTiPzKtgKEvxI1E5lLnejbC_UuZoZIPjfSDq_O-3Nh24e5hRa5M5blREY9_hz2TLMDp5em83TXKJ_ALiJ4MNuMqguYE-zHON6_YUxVD-n1OmPQan03ZjfQa9GtjWi8Ilw/w640-h550/3.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;Step 3:&lt;/b&gt; Create Variables with values shown above in your DevOps project&#39;s Variable group.&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPosGEOHtM_C_IixwAgBFm3f1ktko5d4Cyvgt9FBYg8qSYd5Dg8pclZnKV1Yxpx1AzibEiCL3Vye1hMrBEUxBlA6yoNa6iOXlbVagvRnkZ43-4rX4ues0xg1ElVeJNcfY_dXZHakscduv4vSczY27_9ua4mEqb602wFnmitzS-iBBEG6Y661oihAuOwko/s1683/4.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1683&quot; data-original-width=&quot;1630&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPosGEOHtM_C_IixwAgBFm3f1ktko5d4Cyvgt9FBYg8qSYd5Dg8pclZnKV1Yxpx1AzibEiCL3Vye1hMrBEUxBlA6yoNa6iOXlbVagvRnkZ43-4rX4ues0xg1ElVeJNcfY_dXZHakscduv4vSczY27_9ua4mEqb602wFnmitzS-iBBEG6Y661oihAuOwko/w620-h640/4.jpg&quot; width=&quot;620&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;Step 4:&lt;/b&gt; Now create a pipeline and point it to &quot;buildagent-generation-template.yml&quot; and run it.&lt;/div&gt;&lt;div&gt;Please know that i have used only a subset of packages from ones listed in this file &lt;a href=&quot;https://github.com/pratappilaka24/SelfHosted-Devops-Agent-TF-and-Packer/blob/master/helper/List%20of%20Install%20Artifacts.pdf&quot;&gt;LINK&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ususally this subet takes 45 mins to finish. If you want to build VM with full list of installer artifacts, try using&amp;nbsp; &quot;buildagent-generation-template-full.yml&quot; instead. This will take 1.5 hours to finish creating VMSS.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now try running the pipeline, and you will see below prompts.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpYZ4QX3_MDnEdXYl9PQnj4Da5xI8t62tVL_ScB8Y-xSWCsl7YmXr-I-FmIV3qaioAfO8jdns9tscIoFubRv1YPbF5peUaDOdwmMkncH4lgcMOuvhkZWXs1K31cDSeGjLZElS04K3w4lVN4cGCia8TEZhpP1FKc9szmLR3RIPPGKvlfFO7isc9helwP_Y/s1441/5.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1441&quot; data-original-width=&quot;1398&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpYZ4QX3_MDnEdXYl9PQnj4Da5xI8t62tVL_ScB8Y-xSWCsl7YmXr-I-FmIV3qaioAfO8jdns9tscIoFubRv1YPbF5peUaDOdwmMkncH4lgcMOuvhkZWXs1K31cDSeGjLZElS04K3w4lVN4cGCia8TEZhpP1FKc9szmLR3RIPPGKvlfFO7isc9helwP_Y/w620-h640/5.jpg&quot; width=&quot;620&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;Step 5:&lt;/b&gt; Now run it for creating a VMSS and then for Updating existing VMSS based on your packer image build.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;&lt;i&gt;Please note that, in this process a temporary resource group will be created with the build number and a VM with Public IP will be created. Now the Packer will download all the installer artifacts and install them and build the VM to gold standard. Now the .vhd file will be generated and saved to the storage account. Once this process is sucessfully finished, the temporary resource group will be deleted with all the content of it. This is the part reason why we gave SPN contributir access at subscription.&lt;/i&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1IXuZHJPRO7RbWLw9cRmmlEQ2WHT5e9_p5QZvZgC_1rPlBVimZVmpPYv6ZTLGC5O0zZY86zhZpQQFvnZLM0ZNg1li_f5wKUmNbLCEG2XDhKHbtp-WUw_N_y_QAstk1rL4GYGkpRLbY-XIq1ING7Zn7u7QfwJMSmRWDkhFqLXG7L_XeF0iY-qH3edpmmQ/s1744/6.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;847&quot; data-original-width=&quot;1744&quot; height=&quot;310&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1IXuZHJPRO7RbWLw9cRmmlEQ2WHT5e9_p5QZvZgC_1rPlBVimZVmpPYv6ZTLGC5O0zZY86zhZpQQFvnZLM0ZNg1li_f5wKUmNbLCEG2XDhKHbtp-WUw_N_y_QAstk1rL4GYGkpRLbY-XIq1ING7Zn7u7QfwJMSmRWDkhFqLXG7L_XeF0iY-qH3edpmmQ/w640-h310/6.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The resource group hosting VMSS will host other componenets required for VMSS, like a load balancer, a VNET public IP for load balancer and VMSS.&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvO8FkB22n0TjRroLiPjEUXyyq6pWO-S74CbyJ0ZShV9DxSu55B_qYgNjCLh_A5EsYZkV60fQRu5ILc3yM7Blvjnf2thVwYxxWmUDHBF5vLHyRFVhZ-w80-cGbCM70edZS76cfFrr9kztbB21zGjHgzd3XVNx4oy-77ILWtddB7A6mFyGml0ndW52BCiI/s2826/8.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;841&quot; data-original-width=&quot;2826&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvO8FkB22n0TjRroLiPjEUXyyq6pWO-S74CbyJ0ZShV9DxSu55B_qYgNjCLh_A5EsYZkV60fQRu5ILc3yM7Blvjnf2thVwYxxWmUDHBF5vLHyRFVhZ-w80-cGbCM70edZS76cfFrr9kztbB21zGjHgzd3XVNx4oy-77ILWtddB7A6mFyGml0ndW52BCiI/w640-h190/8.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step7:&lt;/b&gt; Now its time to see the VMSS in action. to do that go to DevOps organization settings and navigate to&amp;nbsp; &quot;Agent Pools&quot;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Create a new agent pool and select the pool type as VMSS and authorize the Subscription and select the VMSS we created earlier. In settings i configured to have only 1 instance to be on standby and in case of any new jobs kicked in, the maximum number of instances to be 5. I also configured to shred the extra idle instances after 5 mins. In prod, this will be like 30 mins.&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcTnoNrbB__NuPrNtLja0msv948vv-rIDb2rWfWZeL66ap0tIuApQ8ebNTnv8ND_pmasXgXNvkfGhSHRZ8fHfGWrR60aWjfF_ZC_wD9kUihxE-TWHzz-Mt5w2QoI6G2b0BzaubKlPA_VNzkgSHp1Fvt3A7xTQebtBf46K-xsfYPA8Vais6VhmvjU5T9og/s1072/12.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;783&quot; data-original-width=&quot;1072&quot; height=&quot;468&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcTnoNrbB__NuPrNtLja0msv948vv-rIDb2rWfWZeL66ap0tIuApQ8ebNTnv8ND_pmasXgXNvkfGhSHRZ8fHfGWrR60aWjfF_ZC_wD9kUihxE-TWHzz-Mt5w2QoI6G2b0BzaubKlPA_VNzkgSHp1Fvt3A7xTQebtBf46K-xsfYPA8Vais6VhmvjU5T9og/w640-h468/12.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;Now you will see the VMSS instances in the list of agents. If you couldnt, go to VMSS instances and select the instances and click upgrade.&amp;nbsp; This will automatically run the required bash commands to make these VMSS instances avialable as agents.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0yLwvaqI0EVHTKlFMrAYdhdG2REShyThpULpjzkGaBgGB2JL6szUdelrMLA2PSVoPbWJu3yqdaFYRhmcnybs34ZglykYZ9jNdPcZZSu8-zUDUuZxcvbg755qq8r0xl9C3h-8KCKJf3OmqBaFb0Jqq5HMxPB3hmiecickOgOJW8Q1ZLRJLZFH_ZjkRsnI/s1876/9.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;555&quot; data-original-width=&quot;1876&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0yLwvaqI0EVHTKlFMrAYdhdG2REShyThpULpjzkGaBgGB2JL6szUdelrMLA2PSVoPbWJu3yqdaFYRhmcnybs34ZglykYZ9jNdPcZZSu8-zUDUuZxcvbg755qq8r0xl9C3h-8KCKJf3OmqBaFb0Jqq5HMxPB3hmiecickOgOJW8Q1ZLRJLZFH_ZjkRsnI/w640-h190/9.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now you can see that as per our configuration there will be only one devops agent instance of VMSS available on standby mode.&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyXj0UiQEfk2WQxW9ckRApDSvNwGNqmOyzYmV1sdXMt9otCbtEFykO5mYq6HWsMFM6yr5i1C18jrCmBtWUQrhPnb1E-QamJX1a_XYiyEGUYz6xyWU-ymYMLHzEja7QXj0PnYepIUdMwmwUxTIr7gpJliCATU8Q1XmcrUHGjVrqd2bciTLImiZTSrM0Q0E/s2979/10.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1041&quot; data-original-width=&quot;2979&quot; height=&quot;224&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyXj0UiQEfk2WQxW9ckRApDSvNwGNqmOyzYmV1sdXMt9otCbtEFykO5mYq6HWsMFM6yr5i1C18jrCmBtWUQrhPnb1E-QamJX1a_XYiyEGUYz6xyWU-ymYMLHzEja7QXj0PnYepIUdMwmwUxTIr7gpJliCATU8Q1XmcrUHGjVrqd2bciTLImiZTSrM0Q0E/w640-h224/10.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now we need to put some stress on it to see how it goes.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step8: &lt;/b&gt;Create a dummy project and add a test yaml as shown below.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJyH9xy1gDaChX-LkjE3LgUh-ZMeYXfarOu7piMcHRmq2je_65Gj6j-aUWaX2iAMuDBzp7ahoFTUaE57JQk7qrMlAshkzxYxKKxKyZQlxdpp6ihARTQ2f7rRkqJMPXuOvbOziXVnQbw3EMw9NnK_oVezqkL1NzrHMqx1HSRXhbip5IvtGBPJXqKkXEiLQ/s1717/11.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;790&quot; data-original-width=&quot;1717&quot; height=&quot;294&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJyH9xy1gDaChX-LkjE3LgUh-ZMeYXfarOu7piMcHRmq2je_65Gj6j-aUWaX2iAMuDBzp7ahoFTUaE57JQk7qrMlAshkzxYxKKxKyZQlxdpp6ihARTQ2f7rRkqJMPXuOvbOziXVnQbw3EMw9NnK_oVezqkL1NzrHMqx1HSRXhbip5IvtGBPJXqKkXEiLQ/w640-h294/11.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Just create duplicate Jobs with different job names.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12px; line-height: 16px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;div style=&quot;line-height: 16px;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: teal;&quot;&gt;trigger&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;none&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: teal;&quot;&gt;pool&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;name&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;&#39;self-hosted&#39;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: teal;&quot;&gt;jobs&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;job&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;Job1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;steps&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;script&lt;/span&gt;:&amp;nbsp;|&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #0451a5;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;&quot;Hello&amp;nbsp;from&amp;nbsp;$HOSTNAME&amp;nbsp;[$(date)&amp;nbsp;]&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #0451a5;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;&quot;Sleeping&amp;nbsp;for&amp;nbsp;1&amp;nbsp;min&amp;nbsp;[$(date)&amp;nbsp;]&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #0451a5;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sleep&amp;nbsp;60&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #0451a5;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;&quot;Done&amp;nbsp;with&amp;nbsp;sleep&amp;nbsp;[$(date)&amp;nbsp;]&quot;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;job&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #0451a5;&quot;&gt;Job2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;steps&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;script&lt;/span&gt;:&amp;nbsp;|&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #0451a5;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;&quot;Hello&amp;nbsp;from&amp;nbsp;$HOSTNAME&amp;nbsp;[$(date)&amp;nbsp;]&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #0451a5;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;&quot;Sleeping&amp;nbsp;for&amp;nbsp;1&amp;nbsp;min&amp;nbsp;[$(date)&amp;nbsp;]&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #0451a5;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sleep&amp;nbsp;60&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #0451a5;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;&quot;Done&amp;nbsp;with&amp;nbsp;sleep&amp;nbsp;[$(date)&amp;nbsp;]&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #0451a5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Now if you look carefully at the pieline, the pool: parameter usually have a image:ubuntu-latest. In this case we want to run this pipeline on the self-hosted agent pool we created earlier. so you need to chnage as shown above. Run this pipeline to see our self-hosted agent pool in action.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 9:&amp;nbsp; &lt;/b&gt;I created the test pipeline with 9 jobs which print what self-hosting agent it is running from and wait for a min and then print a message done sleeping with time stamps.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I started the dummy pieline.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5oYTTAPuZPsst3qBaP2WXLxW9uq1UJGUCBzAvxRJIRvmLBvrKl5fSJA4B1QgGF68FWuoNAGs_rUDXyXx7fGkUkbiiASGUN8H9EWkJm6n2RpZ52xV8KLATkT5ClM_vPsVoy2TzG2U-QM169MOtj1ZUWi36Zqjpeq1HlM08bTwPnWgkbrpjpGbBsa3ix9o/s2923/13.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1167&quot; data-original-width=&quot;2923&quot; height=&quot;256&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5oYTTAPuZPsst3qBaP2WXLxW9uq1UJGUCBzAvxRJIRvmLBvrKl5fSJA4B1QgGF68FWuoNAGs_rUDXyXx7fGkUkbiiASGUN8H9EWkJm6n2RpZ52xV8KLATkT5ClM_vPsVoy2TzG2U-QM169MOtj1ZUWi36Zqjpeq1HlM08bTwPnWgkbrpjpGbBsa3ix9o/w640-h256/13.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Now if you look at the VMSS instances , it will change from&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPidY0JSyZ7HHWZAL2nDb80Cm-yHlPc15gvm6OIKt_zs7pqXbMuJRsWb_syKo_1y2C19X7-HKHjHnM3CoTSoL0cgDkk5qFpWvX9R_ruFQZSC6FW6v77r7gi8WAjV7uHR0KbyDPBSsDJyf_Enw4BafVQzkc6GW55GSuD6NDfL1QakUcRCJzvPZK1vOvTgM/s1876/9.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;555&quot; data-original-width=&quot;1876&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPidY0JSyZ7HHWZAL2nDb80Cm-yHlPc15gvm6OIKt_zs7pqXbMuJRsWb_syKo_1y2C19X7-HKHjHnM3CoTSoL0cgDkk5qFpWvX9R_ruFQZSC6FW6v77r7gi8WAjV7uHR0KbyDPBSsDJyf_Enw4BafVQzkc6GW55GSuD6NDfL1QakUcRCJzvPZK1vOvTgM/w640-h190/9.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;to this&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWyMsoYY6_3R_-xBA6vkNY1xyjQPgJChBQTKAi34p-pPWSyBrNFqHp83aLBRAdkdPCBYqYHNkFgDkxiEKEiqiSACiuTeblj3uoX0110UDKX-AEpGZuoS-IG4R1prjGRdch_b1t16L0yh3gO_w8UCr54v5wnE7FA2CLud-s-nIsRR2R_nIQsYuP3v80HXw/s2680/14.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;591&quot; data-original-width=&quot;2680&quot; height=&quot;142&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWyMsoYY6_3R_-xBA6vkNY1xyjQPgJChBQTKAi34p-pPWSyBrNFqHp83aLBRAdkdPCBYqYHNkFgDkxiEKEiqiSACiuTeblj3uoX0110UDKX-AEpGZuoS-IG4R1prjGRdch_b1t16L0yh3gO_w8UCr54v5wnE7FA2CLud-s-nIsRR2R_nIQsYuP3v80HXw/w640-h142/14.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;as soon as the instances were sucessfully provisioned, the number of jobs stated paralelly will also increase based on dependecies.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeGe11Ns8k9IVSeS6edus0XA4oQlxhpaiSAfZG94yFrL8mvh-tPZ15_uaNCdE9QXa_X5gExX1Z9UjnME0Sw6jOzkYZL1WkikSkeowaWV1wgUtbcu6Kcqa687q1-TxLUQY0GwNFZnspr7bN07b_BXhjwvAhgeNmtbo-azcq3G-ETAiWH8V2FqvZQVxNP4Y/s2884/15.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;516&quot; data-original-width=&quot;2884&quot; height=&quot;114&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeGe11Ns8k9IVSeS6edus0XA4oQlxhpaiSAfZG94yFrL8mvh-tPZ15_uaNCdE9QXa_X5gExX1Z9UjnME0Sw6jOzkYZL1WkikSkeowaWV1wgUtbcu6Kcqa687q1-TxLUQY0GwNFZnspr7bN07b_BXhjwvAhgeNmtbo-azcq3G-ETAiWH8V2FqvZQVxNP4Y/w640-h114/15.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;and you can also se the number of agents created in our self-hosted agent pool.&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQkWskhOgaPTvjeimGUr-4bNsSfF2iRhIoLeb4dS3r-Nz5-eS3qhqeKg9n0VYzTYMzHIAYgn2LYNOueFtEH7vIEbAq0ye6bP6OEjEKgIkMObidzPq98wWAPfNERcrPGGeAbIyY_bQvTJ0u_PxlOkJECB8FC0lS3cY-QkqOSu64-gDg9UuCaK1ZQCiH8no/s2385/16.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;699&quot; data-original-width=&quot;2385&quot; height=&quot;188&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQkWskhOgaPTvjeimGUr-4bNsSfF2iRhIoLeb4dS3r-Nz5-eS3qhqeKg9n0VYzTYMzHIAYgn2LYNOueFtEH7vIEbAq0ye6bP6OEjEKgIkMObidzPq98wWAPfNERcrPGGeAbIyY_bQvTJ0u_PxlOkJECB8FC0lS3cY-QkqOSu64-gDg9UuCaK1ZQCiH8no/w640-h188/16.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 10:&lt;/b&gt; Now lets say you have decided to update the artifacts that will be installed on gold image. For this you have updated the packer file and now all you need to do is, run this pipeline by selecting &quot;update vmss&quot; option.&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-1ADlwUD6uWAe7WX8WL3P9fUP1MlVMPoOYsAkWL-yJ3MPlpx366bhep3xDuqiP_JBuYFWbs44SDCa6bAWOPz75DdcJeq7Semi7goDqiu3AH7llVfEeZjFjgEFoO1RWBCIt4JIKojUAPh6tfATdHldSeeyba8n0-uZ5H5IFQdn7J7azx7PjuIKs2UcgSA/s1663/7.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;862&quot; data-original-width=&quot;1663&quot; height=&quot;332&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-1ADlwUD6uWAe7WX8WL3P9fUP1MlVMPoOYsAkWL-yJ3MPlpx366bhep3xDuqiP_JBuYFWbs44SDCa6bAWOPz75DdcJeq7Semi7goDqiu3AH7llVfEeZjFjgEFoO1RWBCIt4JIKojUAPh6tfATdHldSeeyba8n0-uZ5H5IFQdn7J7azx7PjuIKs2UcgSA/w640-h332/7.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;If you look into the yaml file , you can see this repo is fecting the packer file and image dependecies from&amp;nbsp;&lt;span style=&quot;background-color: #1f1f1f; color: #ce9178; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;https://github.com/actions/runner-images.git&lt;/span&gt;&lt;/div&gt;&lt;div&gt;This is the MicroSoft git for runner images. But this is full set and will take 1.5 hours to build the VM image. Instead i made a packer file with subset of installer artifacts and hosted it at&amp;nbsp;&lt;span style=&quot;background-color: #1f1f1f; color: #ce9178; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; white-space: pre;&quot;&gt;https://github.com/pratappilaka24/custom-image.git&lt;/span&gt;&lt;/div&gt;&lt;div&gt;This will only take 35 minutes to build VM and 45 mints to finish end to end deployment of VMSS.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Hope this helps and do let me know in case of any help needed.&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/4850905955711566009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2023/07/azure-devops-self-hosted-agents.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/4850905955711566009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/4850905955711566009'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2023/07/azure-devops-self-hosted-agents.html' title='Azure DevOps Self-Hosted Agents Automation Using Packer and Terrafrom'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX_ffJ7laHrnuFU4q_GfRFvRSV7balOWvQWQWZWm8_fMNPo8gJA4Nv6_jFa_AV0C3MTLduvm7pkYlOh2WGp7RuYQM1slvyOQV4Ljr4fW_vRu3g4OhUTWoFM_D5QJX6rz2A_omdPg3MVVXvVY9u_USgERmzU3DLu1geCg_wIEmU9klkihhR79FF7M2Detk/s72-w640-h312-c/1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-7686712853499112157</id><published>2023-07-07T22:30:00.011-07:00</published><updated>2023-07-19T13:43:35.358-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><category scheme="http://www.blogger.com/atom/ns#" term="Azure DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="IAC"/><title type='text'>Terraform Azure Application Landing Zone - TF AZ Bootstrap</title><content type='html'>&lt;p&gt;&lt;b&gt;Objective:&lt;/b&gt; This post is to provide a kick strat your Azure DevOps journey by providing a Seed Repo for your Azure DevOps organization. Every time when a new application is about to be launched into Azure, you have to go through the provisioning of launchpad and Devops Repo and building the CI/CD pipelines. Below project will address all of those concerns.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Now i want to create similar thing and add couple of more steps and make it avilable for everyone.&lt;/p&gt;&lt;p&gt;Here is what you gona get.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3hWerQ3I4o57VQl2llNFCNDqTYBZyemidUcbS3_8i3KWoZwhxxjHCwbUd6Xr1J1fKHxviC4JkMGmiMjDMyXmviUC_L5mvlJvvJSxwzC4RFrAq0JhEPPZ24T2XhIPgSPOh8ghigoUvbBO4vBtMvuF9sSVwwx0sM9Kjn4zm1V-ffxjza9ptb2aAk-uZP3U/s3840/1.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;2068&quot; data-original-width=&quot;3840&quot; height=&quot;344&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3hWerQ3I4o57VQl2llNFCNDqTYBZyemidUcbS3_8i3KWoZwhxxjHCwbUd6Xr1J1fKHxviC4JkMGmiMjDMyXmviUC_L5mvlJvvJSxwzC4RFrAq0JhEPPZ24T2XhIPgSPOh8ghigoUvbBO4vBtMvuF9sSVwwx0sM9Kjn4zm1V-ffxjza9ptb2aAk-uZP3U/w640-h344/1.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;b&gt;Step 1:&lt;/b&gt; Download the repo from my github repos. &lt;a href=&quot;https://github.com/pratappilaka24/Terraform-Azure-Bootstrap&quot; target=&quot;_blank&quot; style=&quot;color:red&quot;&gt;TF AZ Bootstrap&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Step 2:&lt;/b&gt; Run the AZCLI script and only 2 parameters you need to update are Subscription ID and App anme. Ask your adminstrator or customer to run it in Azure CLI / Bash.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIrOfsV8q2LhEFYxN2wo9ETykNMw1WoVXi-ydJaPTQgrOQWmiKg4ItHd9gvo9TaTwIgWnUospRy0taws13jtQC7l_ezCyxlrXsSRwtf3UCWs3t2lL7eIDV0Jz18prl0xcrKQkh5yifj-eQaYkzYx5gAi42jPA33Lr3B27aosVt_GinZgcKJxXn50pAqGY/s1731/2.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;813&quot; data-original-width=&quot;1731&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIrOfsV8q2LhEFYxN2wo9ETykNMw1WoVXi-ydJaPTQgrOQWmiKg4ItHd9gvo9TaTwIgWnUospRy0taws13jtQC7l_ezCyxlrXsSRwtf3UCWs3t2lL7eIDV0Jz18prl0xcrKQkh5yifj-eQaYkzYx5gAi42jPA33Lr3B27aosVt_GinZgcKJxXn50pAqGY/w640-h300/2.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Step 3:&lt;/b&gt; Now with the script ran, you can see a resource group created with the app name in it and you can see a Keyvault in it. Here is how all the information required for us in piplines is saved in Key Vault.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim7fieINR_tcw-OzwT0IVsT3A1RaTMLo1y-Y4Nv_u6YE6JQAKpiNsRXfvJAzO_gPr2Xi2BrqZVV79IQoQ2VavWoP2pSofEE7Nokm6S76djXkoKfva1HqfMI_vFapU0V0UryfkfyEXEG5Qac9GZKPMhnF8wVPRG9eK_D66XvfjQvt9ju6sOrOY5zBifyxM/s1678/3.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;787&quot; data-original-width=&quot;1678&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim7fieINR_tcw-OzwT0IVsT3A1RaTMLo1y-Y4Nv_u6YE6JQAKpiNsRXfvJAzO_gPr2Xi2BrqZVV79IQoQ2VavWoP2pSofEE7Nokm6S76djXkoKfva1HqfMI_vFapU0V0UryfkfyEXEG5Qac9GZKPMhnF8wVPRG9eK_D66XvfjQvt9ju6sOrOY5zBifyxM/w640-h300/3.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Step 4&lt;/b&gt;: Create a new project in Azure Devops and import the code directly from GitHub link.&lt;/p&gt;&lt;p&gt;Now go to pipelines, and go to library. Add a new Variable group with name &quot;kv_variable_group&quot; and enable Keyvault integration for Variables.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUkuVGhcJ6VoZy8vVILtRF7ZRh7JxCQMNQk_Rz26inxCwM9GK7GNVYJY2fHBrXMQJnqzc3X7v4KWkHPjZaEtFXSTHMptU7rv1OHGHtECSI4IHOrpwall_7C4OtnJT6gve0DNLBYcFTbrzknRcur6FcKx96DlCeP0KdptKTazXP_B7tSUQEdd1FAWKL-VQ/s2233/4.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1851&quot; data-original-width=&quot;2233&quot; height=&quot;530&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUkuVGhcJ6VoZy8vVILtRF7ZRh7JxCQMNQk_Rz26inxCwM9GK7GNVYJY2fHBrXMQJnqzc3X7v4KWkHPjZaEtFXSTHMptU7rv1OHGHtECSI4IHOrpwall_7C4OtnJT6gve0DNLBYcFTbrzknRcur6FcKx96DlCeP0KdptKTazXP_B7tSUQEdd1FAWKL-VQ/w640-h530/4.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;Now all the infomation generated by CLI script ia avilable for pipelines in form of variables and the exact variables names have been configured in the code.&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Step 5:&lt;/b&gt; Go to pipelines, create a new pipeline from Git as source and pick existing YAML file for pipeline. Choose &lt;b&gt;./aure-pipelines/ci.yaml &lt;/b&gt;and name it CI.&lt;/p&gt;&lt;p&gt;Give it a go:&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNX3Jm172BaQrHWzfZI7BpH_E9_l0ek7vFQuV0uZ97E-ZOe_QjAVO_BjC8l6_Jx4mBVguh-UWjTJxeoN1qIOWicegJJg9E-JF_e35c_ZAq_sIS1UTAP8BzVH8q2S33Qm3wtJnEfX2Ci-XedeGHhd4_fg5P7URzd8qglF0U9KEOOjp4cW8fAmmDTbHgsjo/s2073/5.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;963&quot; data-original-width=&quot;2073&quot; height=&quot;298&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNX3Jm172BaQrHWzfZI7BpH_E9_l0ek7vFQuV0uZ97E-ZOe_QjAVO_BjC8l6_Jx4mBVguh-UWjTJxeoN1qIOWicegJJg9E-JF_e35c_ZAq_sIS1UTAP8BzVH8q2S33Qm3wtJnEfX2Ci-XedeGHhd4_fg5P7URzd8qglF0U9KEOOjp4cW8fAmmDTbHgsjo/w640-h298/5.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Step 6:&lt;/b&gt; Now do the same thing for &lt;b&gt;./azure-pipelines/cd.yaml&lt;/b&gt; and giev it a go.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbQqgC6ceCDJWF1egt63hU3j9SNEHwChi9P0Le9wKs2drIQowQDnoTwoyzWhGj6ThQOruxe7uFObdIEWLGQv5q8EGRdL6lorIcRUUusTSMfMcWMiEeYrnpWuaYJN4j8sXAo5vHsSsbfVPB95J6QbKkJjdkeebqg4AVg32Z2nAxf-woh72N6ksSruoNScc/s2157/6.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1146&quot; data-original-width=&quot;2157&quot; height=&quot;340&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbQqgC6ceCDJWF1egt63hU3j9SNEHwChi9P0Le9wKs2drIQowQDnoTwoyzWhGj6ThQOruxe7uFObdIEWLGQv5q8EGRdL6lorIcRUUusTSMfMcWMiEeYrnpWuaYJN4j8sXAo5vHsSsbfVPB95J6QbKkJjdkeebqg4AVg32Z2nAxf-woh72N6ksSruoNScc/w640-h340/6.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;If you run into any troubles, do let me know. I can help.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;- Your fellow developer.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/7686712853499112157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2023/07/terraform-azure-application-landing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/7686712853499112157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/7686712853499112157'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2023/07/terraform-azure-application-landing.html' title='Terraform Azure Application Landing Zone - TF AZ Bootstrap'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3hWerQ3I4o57VQl2llNFCNDqTYBZyemidUcbS3_8i3KWoZwhxxjHCwbUd6Xr1J1fKHxviC4JkMGmiMjDMyXmviUC_L5mvlJvvJSxwzC4RFrAq0JhEPPZ24T2XhIPgSPOh8ghigoUvbBO4vBtMvuF9sSVwwx0sM9Kjn4zm1V-ffxjza9ptb2aAk-uZP3U/s72-w640-h344-c/1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-8986396405078991470</id><published>2023-06-11T00:51:00.003-07:00</published><updated>2023-06-11T14:28:12.283-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><category scheme="http://www.blogger.com/atom/ns#" term="Azure DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Azure Network"/><category scheme="http://www.blogger.com/atom/ns#" term="Terraform"/><title type='text'>Deploying Virtual WAN using Terraform &amp; Azure DevOps </title><content type='html'>&lt;p&gt;&lt;b&gt;Let me summarize Azure networking options based on usecase:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;You need network connectivity between resources across different virtual networks in same region, you need to implement VNet peering.&lt;/li&gt;&lt;li&gt;You need connectivity between resources in virtual networks spanned across different region, you need to implement Global VNet peering.&lt;/li&gt;&lt;li&gt;You need network connectivity between your Organization (On-Prem) and your azure tenant and you are ok to have the secure channels over the internet, You need to implement site to site VPN gateways.&lt;/li&gt;&lt;li&gt;You want network connectivity between your offices to azure tenancy with high throughput and not over internet, you need to implement Express Route.&lt;/li&gt;&lt;li&gt;You need individual users to use services hsoted in your Azure tenant, you will implemnet Point-to-site VPN gateway.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;All the above implementations are different on thier configurations and they each cater for each use case in its own capacity.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Here is why you need to choose Virtual WAN if you are already using more than 2 capabilities mentioned above.&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&amp;nbsp;VWAN brings all of the above network connectivity implemntations under one centralized platform.&lt;/li&gt;&lt;li&gt;VWAN automatically deployes one hub in each choosen region which implements Hub-spoke network design by default.&lt;/li&gt;&lt;li&gt;Site-to-Site VPN gateways supports max of 10, 30 and 100 tunnels in Basic, Standard and HighPerformance SKUs. VWAN supports upto 1000 branch conncetions per VWAN hub, which can throuhput at 20GBps per hub.&lt;/li&gt;&lt;li&gt;Though private communication between VNets in both VNet Peering and VWAN are ecrypted over MS backbone network, Adding additional firewall security is way easier in VWAN comapred to VNet peering.&lt;/li&gt;&lt;li&gt;VWAN has most of the above services deployed across all avilability zones in a given region thus making it more relaible and scalable without any manual intervention.&lt;/li&gt;&lt;li&gt;Virtual WAN provides many functionalities built into a single pane of glass such as site/site-to-site VPN connectivity, User/P2S connectivity, ExpressRoute connectivity, virtual network connectivity, VPN ExpressRoute Interconnectivity, VNet-to-VNet transitive connectivity, Centralized Routing, Azure Firewall and Firewall Manager security, Monitoring, ExpressRoute Encryption, and many other capabilities. Pick and choose what you want.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;More information is available on MS Documentation. All refrence links are provided at the end of the article.&lt;/p&gt;&lt;p&gt;Now the title of artice is no &quot;&lt;b&gt;Why VWAN?&lt;/b&gt;&quot; it says &quot;&lt;b&gt;Deploying VWAN using Terrafrom &amp;amp; Azure Devops&lt;/b&gt;&quot;. So lets jump in to deployment.&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;My objective is to deploy Virtual WAN, VWAN Hubs across 2 different regions, connect 2 Virtual networks in these regions via VWAN Hubs, deploy 2 Linux VMs in these VNets, have a ping from one VM to other one over VNet connectivity of VWAN and Hubs.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRPy-GRMmyo7Q-_nC6kMJ_g2E_U9ScJIkjZbNkGxzGjexWaSSc-rwkyCYyNMTiF0Qvj8rIWhlV4pUzOQzZfbsmq8WJ_zdio85ZT2OsaFhoG0GMs5V_LuIoL3pmPOUqvkamOsrfL2mYaQIdwQcMMi8bgLuZYeIa9xJn0F6mZyVtEW_e3TTEDiL8XHMN/s768/vWAN-DemoLab-Overview.webp&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;612&quot; data-original-width=&quot;768&quot; height=&quot;510&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRPy-GRMmyo7Q-_nC6kMJ_g2E_U9ScJIkjZbNkGxzGjexWaSSc-rwkyCYyNMTiF0Qvj8rIWhlV4pUzOQzZfbsmq8WJ_zdio85ZT2OsaFhoG0GMs5V_LuIoL3pmPOUqvkamOsrfL2mYaQIdwQcMMi8bgLuZYeIa9xJn0F6mZyVtEW_e3TTEDiL8XHMN/w640-h510/vWAN-DemoLab-Overview.webp&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;I have burned heavily while implemnting this , once by deploying Preminum SKU for firewalls, other times deploying the bation services for these VMs , which i dont need for purpose of my POC.&lt;div&gt;&lt;br /&gt;&lt;div&gt;But if you are interested the code is there in terraform files commented. You can uncomment before you deploy.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilMghO5UN7de5LRv2qQzxkGkQwx9CRy5X_GJRlWEvZewk-JiVkxOEpgwrm9Xqqfeujqyc6fbO2JeMY8I34dmhHFMgl8zQIf1fEPDPgQGonP1U8zO-uJEGUIPV1pemM1oPyMZPMO1azTXR_cH4nlHKoUMWh54eVYXgWMYQ5T9B7aniR_6A50qmNpZxh/s1804/1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;919&quot; data-original-width=&quot;1804&quot; height=&quot;326&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilMghO5UN7de5LRv2qQzxkGkQwx9CRy5X_GJRlWEvZewk-JiVkxOEpgwrm9Xqqfeujqyc6fbO2JeMY8I34dmhHFMgl8zQIf1fEPDPgQGonP1U8zO-uJEGUIPV1pemM1oPyMZPMO1azTXR_cH4nlHKoUMWh54eVYXgWMYQ5T9B7aniR_6A50qmNpZxh/w640-h326/1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;So the code i will be deploying no bation services for the VMs and used the standard version of VWAN hub firewall.&amp;nbsp;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Step1&lt;/b&gt;: Create a Storage account with continer to manage your terrafrom state file.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiQyWvpa-UDyEG_VyyD2FQa5jlrYTtqtD-XtCjfwYi1rJSZvwy9GHCtzDdKT04EW0Sv2i8sE3Z19UcIyo_UlTpAUktcdcO2eganlY4CPSI4I15xRoYxMxdCEavbQ8NCTB_7rlolvoHTymDKCNi_heG9u3g-g0VpnkUAmFmYL8mEn_ianOHcYOo0LIW/s1777/2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;747&quot; data-original-width=&quot;1777&quot; height=&quot;270&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiQyWvpa-UDyEG_VyyD2FQa5jlrYTtqtD-XtCjfwYi1rJSZvwy9GHCtzDdKT04EW0Sv2i8sE3Z19UcIyo_UlTpAUktcdcO2eganlY4CPSI4I15xRoYxMxdCEavbQ8NCTB_7rlolvoHTymDKCNi_heG9u3g-g0VpnkUAmFmYL8mEn_ianOHcYOo0LIW/w640-h270/2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Step2&lt;/b&gt;: Download the code from my Git repo.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/pratappilaka24/Azure-VWAN&quot;&gt;https://github.com/pratappilaka24/Azure-VWAN&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Azure DevOps is optional, as you can literally run terrafrom apply. But this needs installing terraform on your machine and AZ CLI or Azure shell for connectiing to your azure tenant.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Step 3&lt;/b&gt;: Create a Project in upload the code to your AZ repo.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlY9YGmrXVVaFnZNWQ0VfAO5im6gYN1lQRLxZs2TZeXP5nBB1c8_b4S1olKUwHsGLt7NhX_fZ91OuU4FL0WdI4VAOBIq1hhaMDOA_J3iYUIDHZcItZIXmKdIByAR0-Zmp8jvwtk2fiapmv0mWLD2N_OEKaoItYTDen9yoHjhdVB6bAFV7b1iMvzHzA/s2173/3.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1096&quot; data-original-width=&quot;2173&quot; height=&quot;322&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlY9YGmrXVVaFnZNWQ0VfAO5im6gYN1lQRLxZs2TZeXP5nBB1c8_b4S1olKUwHsGLt7NhX_fZ91OuU4FL0WdI4VAOBIq1hhaMDOA_J3iYUIDHZcItZIXmKdIByAR0-Zmp8jvwtk2fiapmv0mWLD2N_OEKaoItYTDen9yoHjhdVB6bAFV7b1iMvzHzA/w640-h322/3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Step 4&lt;/b&gt;: Create a 2 release pipelines , one for creating , the other for destroying.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Add Artifacts to depoy by adding the current project as working folder.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAePIjj17iff4GHplyUcH1BakL63_RCjN_f1l6aHR4j8vZetJz9OQUAirNm9dv0St72KT3GOutP2zP3vRaLhN8boQRpOHI42H4JWSHPjN32aX0Qeb_6JObjTKIHw8rUkGJSRz5PTdSk1qhrc6VEkEFmoslC8OLAZ1d-F44hOU5sGXlZpps-2CIGtgI/s2235/5.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1237&quot; data-original-width=&quot;2235&quot; height=&quot;354&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAePIjj17iff4GHplyUcH1BakL63_RCjN_f1l6aHR4j8vZetJz9OQUAirNm9dv0St72KT3GOutP2zP3vRaLhN8boQRpOHI42H4JWSHPjN32aX0Qeb_6JObjTKIHw8rUkGJSRz5PTdSk1qhrc6VEkEFmoslC8OLAZ1d-F44hOU5sGXlZpps-2CIGtgI/w640-h354/5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Step5&lt;/b&gt;: Start editing the stage1 by adding the below shown steps.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgovNpdmZuOgXgmj7gamLKHed4fjJCQ2E8o1KYMPuc-alf2nX_fZZlWxusvxTl9dUbOE-nh7qIRqYlmmc-VA8tij0ZvGZ7sMsdvFbVY71ASLZkNMEPNK-wss7FToOeql_ebhpA6nwqEepSaPZWxRWxYlCsL6-KRY9Uhdsduk1u1rhRRI4wUUMWaYDY7/s1282/4.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;939&quot; data-original-width=&quot;1282&quot; height=&quot;468&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgovNpdmZuOgXgmj7gamLKHed4fjJCQ2E8o1KYMPuc-alf2nX_fZZlWxusvxTl9dUbOE-nh7qIRqYlmmc-VA8tij0ZvGZ7sMsdvFbVY71ASLZkNMEPNK-wss7FToOeql_ebhpA6nwqEepSaPZWxRWxYlCsL6-KRY9Uhdsduk1u1rhRRI4wUUMWaYDY7/w640-h468/4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;The only catch you might have here is that you need to point .tfvars file. It can be done by passing the name of tfvars file as a command line argument for apply and destroy steps.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgC_hkalzrPIccOOwIbPdCZyfs-yDMg6D-G4ZtAHlhC1cpSWpXGYfT8x7RAdHefXOQ6NLuT4L81smeJOekkcLjWbwARIAf8OOSSAU1UhRw3lydWXA0uL-oWV6Zh5joWb09bJtIYRw6N7Q4Um2briP6DvMqlMi_7o-2iWbNKSDY3ksvY4qjgTgVlcb6/s964/6.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;819&quot; data-original-width=&quot;964&quot; height=&quot;544&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgC_hkalzrPIccOOwIbPdCZyfs-yDMg6D-G4ZtAHlhC1cpSWpXGYfT8x7RAdHefXOQ6NLuT4L81smeJOekkcLjWbwARIAf8OOSSAU1UhRw3lydWXA0uL-oWV6Zh5joWb09bJtIYRw6N7Q4Um2briP6DvMqlMi_7o-2iWbNKSDY3ksvY4qjgTgVlcb6/w640-h544/6.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Step 6:&lt;/b&gt; Deploy the apply release pipeline and you will see two resource groups one in AUE and USE regions.&amp;nbsp; I have deployed below components as part of this project:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;2 Resource groups in different regions&lt;/li&gt;&lt;li&gt;2 vnets&lt;/li&gt;&lt;li&gt;2 Linux VMs&amp;nbsp; and supporting NSGs, NICs and OS Disks&lt;/li&gt;&lt;li&gt;1 Virtual WAN&lt;/li&gt;&lt;li&gt;2 VWAN Hubs one for each region&lt;/li&gt;&lt;li&gt;2 firewall policies and firewalls securing 2 HubsVNets&lt;/li&gt;&lt;li&gt;1 Keyvault saving the random password for the Linux VMs&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQh7kfZxpKpBWDupVAORXn_Pgpjr-Wl3LjnoPiRUva_bHyHhSIo0zPLhN0T-hDxkVOWqwd25RYB5rfkx7b20rXt7CHOrmvBRd7KDinbp0VxvajOpiyHvIT_kSu35SQmOUsQ10uBXBX7VSs6j59BJE1Uqr9fe62AhkRBNSDRMFAXQ0B1eYohf50nX8Z/s3612/7.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1750&quot; data-original-width=&quot;3612&quot; height=&quot;310&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQh7kfZxpKpBWDupVAORXn_Pgpjr-Wl3LjnoPiRUva_bHyHhSIo0zPLhN0T-hDxkVOWqwd25RYB5rfkx7b20rXt7CHOrmvBRd7KDinbp0VxvajOpiyHvIT_kSu35SQmOUsQ10uBXBX7VSs6j59BJE1Uqr9fe62AhkRBNSDRMFAXQ0B1eYohf50nX8Z/w640-h310/7.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Please note that the Linux VMs&amp;nbsp; has SSH opened , use pasword login and have PIPs assigned to them, for easy of testing. In production envirment , aslways go for bastion and no open SSH.&lt;/p&gt;&lt;p&gt;Even though we open SSH, the login password (random generated pasword) will be saved to a Keyvault created in AUE resource group.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Step7:&lt;/b&gt; Before we login to VMs, lets check VWAN. You will find it in AUE region as shown above. Open VWAN and you can see the Hubs deployed and supporting firewalls to secure the hubs.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggWITPpq6MET9UavoKxnspA8CtCKdeDw0K-t8ixfHzlZ-dH0BbEWYIOroXUB2GG7_Bae1PnWgUHxKgsNMBCfUNIHI9YaSPxloPxOZLeYFrU1nyE9M_SuxpmE04IVJGDmxmGii4OnamI7yaFi5rIriC5Ll-3skVAO2L5pAwOGrFLoNAsEoUgBh-WlS9/s1894/8.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;883&quot; data-original-width=&quot;1894&quot; height=&quot;298&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggWITPpq6MET9UavoKxnspA8CtCKdeDw0K-t8ixfHzlZ-dH0BbEWYIOroXUB2GG7_Bae1PnWgUHxKgsNMBCfUNIHI9YaSPxloPxOZLeYFrU1nyE9M_SuxpmE04IVJGDmxmGii4OnamI7yaFi5rIriC5Ll-3skVAO2L5pAwOGrFLoNAsEoUgBh-WlS9/w640-h298/8.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Click on the View Topology link in overview to see the whole hub-spoke architecture you just deployed.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdV_JszkcAVPuX2qR46vjwrsNzJt-xXUNQk_PT54g7GF4r1T_rSWlLDGR7KgulsLPvom7wp6eDRtWer3sm-OeffijxxuAVEZOVX47RlZ_NFe8UPlzFtwDqYraCogtgUNUNIdahPfrbxtU2Q75BEk5IR2-VbjneVJa62WFsBHp_DU2lGtoLkoXnraUS/s1887/9.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1447&quot; data-original-width=&quot;1887&quot; height=&quot;490&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdV_JszkcAVPuX2qR46vjwrsNzJt-xXUNQk_PT54g7GF4r1T_rSWlLDGR7KgulsLPvom7wp6eDRtWer3sm-OeffijxxuAVEZOVX47RlZ_NFe8UPlzFtwDqYraCogtgUNUNIdahPfrbxtU2Q75BEk5IR2-VbjneVJa62WFsBHp_DU2lGtoLkoXnraUS/w640-h490/9.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Step 8: &lt;/b&gt;Open Firewall-policy and you can see that these will allow the private communication from IP range of one VNets to other one.&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1Xz9WfqKO4QR0sY6oqzuXVQyvsC9RhzS0Q_VqkBjQ9-sQO5i7doRFsqcuItq0SzlkzA90-83Br6x28dE5YD2wtwdDb4u3GiMlpokob0UCOmF8Glr77ITW-xsu4epB9Cd7mKjRn_TFUF_8XIunNUzRsC0jmvNXQC7IUSUhTnuNZoT4oiQJzUaIU6g4/s2206/10.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;721&quot; data-original-width=&quot;2206&quot; height=&quot;210&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1Xz9WfqKO4QR0sY6oqzuXVQyvsC9RhzS0Q_VqkBjQ9-sQO5i7doRFsqcuItq0SzlkzA90-83Br6x28dE5YD2wtwdDb4u3GiMlpokob0UCOmF8Glr77ITW-xsu4epB9Cd7mKjRn_TFUF_8XIunNUzRsC0jmvNXQC7IUSUhTnuNZoT4oiQJzUaIU6g4/w640-h210/10.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;This means i can define a common set of firewall policies and apply the firewall security to communication over hubs. Now you can centrally control the policies applied to all comms across your network.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Step 9:&lt;/b&gt; Lastly open one of the Hubs and click &quot;Routing Intent and Routing Policies&quot;, here you can control policies applied for the traffic over the internet and the private traffic that runs on MS backbone.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjg03npP1NJhJAY8PbI_2kqdAsWYqdLbqeI86ggFBpxWwIq8e3-diAFfgt7sxzouY_V4s-7qrarDmFv7cYjw59Ryn3rawxL2PTaCJy7E35ErUDqO61TjNG-GY9F7nrM41JvbHYUJ-pWMyYhbKSC8d9dx8QbxNOf6nZBcbG6kao-WwLjVbuaw-obQkK/s1999/11.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;775&quot; data-original-width=&quot;1999&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjg03npP1NJhJAY8PbI_2kqdAsWYqdLbqeI86ggFBpxWwIq8e3-diAFfgt7sxzouY_V4s-7qrarDmFv7cYjw59Ryn3rawxL2PTaCJy7E35ErUDqO61TjNG-GY9F7nrM41JvbHYUJ-pWMyYhbKSC8d9dx8QbxNOf6nZBcbG6kao-WwLjVbuaw-obQkK/w640-h248/11.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Step 10: &lt;/b&gt;Finally go to Keyvault and grab the VM password.&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8k7ivR7xptMlGxTEKucHkBsPYFt-Hlvm9rbiXaeMWanHnMrRc2FIc0kLQO7_sHyZ1CSZjnzYGCq3PRjpNc1g_RZT53qlUEq79N5eJy5BpUC7K1zLq9fRQsdIbi8j9000Nl_GklhFeVlY9Nr8HdQ02GmRAyyglXvkd1rCzJZOfAegkdwdU4Zd7qL77/s1525/12.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;760&quot; data-original-width=&quot;1525&quot; height=&quot;318&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8k7ivR7xptMlGxTEKucHkBsPYFt-Hlvm9rbiXaeMWanHnMrRc2FIc0kLQO7_sHyZ1CSZjnzYGCq3PRjpNc1g_RZT53qlUEq79N5eJy5BpUC7K1zLq9fRQsdIbi8j9000Nl_GklhFeVlY9Nr8HdQ02GmRAyyglXvkd1rCzJZOfAegkdwdU4Zd7qL77/w640-h318/12.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Please know that i opened SSH and addd a public IP just for our testing purpose. Else you should use bastion. Code for bastion is also there in the project files. Just uncomment it.&lt;/p&gt;&lt;p&gt;I login to AUE VM and try pinging the private IP of USE VM.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtK-K4LyJmdMF0bgHQcTakeyucvY_FdPoaJe2rraMcnm9PAFSHoToAnH76o_SE_0Ti5dSroQbCyZdalifbc8I0MCaITo5zLTmoEv7ZGGR2SYCQEcaw0ixr2JvdQ06B1WyX7biiIHijInMXr6WHGhfKy1tbwQ51IpMToLuYv32jq4bxOlZZ0cqpX5dS/s853/13.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;378&quot; data-original-width=&quot;853&quot; height=&quot;284&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtK-K4LyJmdMF0bgHQcTakeyucvY_FdPoaJe2rraMcnm9PAFSHoToAnH76o_SE_0Ti5dSroQbCyZdalifbc8I0MCaITo5zLTmoEv7ZGGR2SYCQEcaw0ixr2JvdQ06B1WyX7biiIHijInMXr6WHGhfKy1tbwQ51IpMToLuYv32jq4bxOlZZ0cqpX5dS/w640-h284/13.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Same goes from USE VM to AUE VM.&lt;/p&gt;&lt;p&gt;If i ping the public IP, this wont work. Reason being, the firewall policy currently allow only the communcation between the private IP range of the VNets.&lt;/p&gt;&lt;p&gt;There now run the destroy pipeline after your testing to save money on your dev subscription 😃&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Refrences:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Article by Jake Walsh helped a lot to understand and formulate this project. Big thanks to him. &lt;a href=&quot;https://jakewalsh.co.uk/deploying-azure-virtual-wan-using-terraform/&quot;&gt;Link&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Best place to start after exploring VWAN to know how it is advantageous over other implementations. &lt;a href=&quot;https://learn.microsoft.com/en-us/azure/virtual-wan/virtual-wan-faq&quot;&gt;Link&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The mother of all &lt;a href=&quot;https://learn.microsoft.com/en-us/azure/virtual-wan/&quot;&gt;Link&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/8986396405078991470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2023/06/deploying-virtual-wan-using-terraform.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/8986396405078991470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/8986396405078991470'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2023/06/deploying-virtual-wan-using-terraform.html' title='Deploying Virtual WAN using Terraform &amp; Azure DevOps '/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRPy-GRMmyo7Q-_nC6kMJ_g2E_U9ScJIkjZbNkGxzGjexWaSSc-rwkyCYyNMTiF0Qvj8rIWhlV4pUzOQzZfbsmq8WJ_zdio85ZT2OsaFhoG0GMs5V_LuIoL3pmPOUqvkamOsrfL2mYaQIdwQcMMi8bgLuZYeIa9xJn0F6mZyVtEW_e3TTEDiL8XHMN/s72-w640-h510-c/vWAN-DemoLab-Overview.webp" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-4214792133792061731</id><published>2022-03-26T18:55:00.002-07:00</published><updated>2022-03-27T13:12:00.754-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><category scheme="http://www.blogger.com/atom/ns#" term="Security"/><title type='text'>How to build subscription based security around Azure functions</title><content type='html'>&lt;p&gt;Working in company which deals with hundreds of client azure tenants showed me how different it is working on your own tenant.&lt;/p&gt;&lt;p&gt;Recently i worked on a subscription based service and i want to show you how to build the secruity walls arround your azure functions.&lt;/p&gt;&lt;p&gt;Here is an example of subscriotion service which caters differently for each client based on thier type of subscription. Free or Paid or Premium.&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC_FL3gv00Q5SZ69qQxt4x_us2bt03ry7O3wvPryPYIZXyU9GzwDtAZnrcYyvqb7otnUg24EtJ3ClbuPJf8Z6-UTRF1hvW2yFpQuWwBZV90XmZErXCoZKG_NJ1QInHj5xhU0GQZ7TjwXUtyYa84Gx_rn7beSvri4kVgNMFkhLWLEd4xvhgwx3mECxc/s1005/1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;570&quot; data-original-width=&quot;1005&quot; height=&quot;362&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC_FL3gv00Q5SZ69qQxt4x_us2bt03ry7O3wvPryPYIZXyU9GzwDtAZnrcYyvqb7otnUg24EtJ3ClbuPJf8Z6-UTRF1hvW2yFpQuWwBZV90XmZErXCoZKG_NJ1QInHj5xhU0GQZ7TjwXUtyYa84Gx_rn7beSvri4kVgNMFkhLWLEd4xvhgwx3mECxc/w640-h362/1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Step 1:&lt;/b&gt; Lets start with creating a smiple azure function in Visual Studio. For the purposes of our example created two functions one with GET and one with POST methods.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgflEx0JmoLxv-GXB3d5tcZxxqOp7bpZgNmNpNnnWKmb-IqFM5h-wzPGYUtgzaUI7l21vdFch7f6iAK5MyZwuDS6AYQCAL1dAOT5w0WXp14xlDn_5ICPXr7ZENxGWg7mRzFSK0dwnQFI6l7JrlLa8lQAjxxQ6AtrjWX10ozFp3RZDarQk-T3bZy6aiD/s1377/2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;864&quot; data-original-width=&quot;1377&quot; height=&quot;402&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgflEx0JmoLxv-GXB3d5tcZxxqOp7bpZgNmNpNnnWKmb-IqFM5h-wzPGYUtgzaUI7l21vdFch7f6iAK5MyZwuDS6AYQCAL1dAOT5w0WXp14xlDn_5ICPXr7ZENxGWg7mRzFSK0dwnQFI6l7JrlLa8lQAjxxQ6AtrjWX10ozFp3RZDarQk-T3bZy6aiD/w640-h402/2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Publish this function project to Azure tenant and see it run and test.&lt;/p&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaFMFQSdXMx9Z9Yrw3YqNdu4I0psbcjl3yDSZl3Z6b6OKDDkXjgTdBbpMWY3w4egW2faBG3sbVGkNaeR0DXKIlSUeA1m8IDYpcT7R93bAswEPcs-xuIFOpkwCAyErtACG0RCX58yzrktPoHg_bhnRUqwFZ7xc0WJUrHAfc9L9H8U09bGBL1K9BNd9j/s1472/4.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;431&quot; data-original-width=&quot;1472&quot; height=&quot;188&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaFMFQSdXMx9Z9Yrw3YqNdu4I0psbcjl3yDSZl3Z6b6OKDDkXjgTdBbpMWY3w4egW2faBG3sbVGkNaeR0DXKIlSUeA1m8IDYpcT7R93bAswEPcs-xuIFOpkwCAyErtACG0RCX58yzrktPoHg_bhnRUqwFZ7xc0WJUrHAfc9L9H8U09bGBL1K9BNd9j/w640-h188/4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJpSvjogDUa63dIrwI6AhsPnthJJjqOrIo-qWQdRCAl5tvbT206rKDTj8LHN82jvQFb9mMDpBam2yN8GXFYVQ2SHX3T4hwckP1KNrnfNGIQGbVwvLNsak0lYtI1HLl-d6Ux1AX4NPp9sto6aFyXvjpYJ1i17q-5P_bH-fouWuv_JzGqNPXP6gpR5Pp/s1619/5.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;473&quot; data-original-width=&quot;1619&quot; height=&quot;186&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJpSvjogDUa63dIrwI6AhsPnthJJjqOrIo-qWQdRCAl5tvbT206rKDTj8LHN82jvQFb9mMDpBam2yN8GXFYVQ2SHX3T4hwckP1KNrnfNGIQGbVwvLNsak0lYtI1HLl-d6Ux1AX4NPp9sto6aFyXvjpYJ1i17q-5P_bH-fouWuv_JzGqNPXP6gpR5Pp/w640-h186/5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;Step 2: &lt;/b&gt;Now lets implement OAuth on top of this Function App. To do this go to Function App and go to Authentication.&amp;nbsp; Add an Identity Provider and pick Microsoft Idenity and make an App Registration.&lt;div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpdyoYIy-Jq_BP-zEkcHo-tK-EKvoXZfmkPgBl8wJDUkGx5NHBL9sk5MjLxRfYhWJo2YW7rJj7u9fdFuBpvDwsDtNLbeGio-n0zCqQxCVvVwepESW4CuDJ4VzqCWkaostKpxG0kXL2vr70Z9Ya2rW0DTXJHlUNn8sKt_0bYw_Bik1SEVtA62PCLjY2/s1311/6.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1026&quot; data-original-width=&quot;1311&quot; height=&quot;500&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpdyoYIy-Jq_BP-zEkcHo-tK-EKvoXZfmkPgBl8wJDUkGx5NHBL9sk5MjLxRfYhWJo2YW7rJj7u9fdFuBpvDwsDtNLbeGio-n0zCqQxCVvVwepESW4CuDJ4VzqCWkaostKpxG0kXL2vr70Z9Ya2rW0DTXJHlUNn8sKt_0bYw_Bik1SEVtA62PCLjY2/w640-h500/6.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;Now there is a OAuth layer and you can see that the functions wont respond with out a OAuth token.&lt;/div&gt;&lt;div&gt;The will respond with &quot;&lt;span face=&quot;&amp;quot;Segoe UI&amp;quot;, &amp;quot;Segoe UI Web (West European)&amp;quot;, &amp;quot;Segoe UI&amp;quot;, -apple-system, BlinkMacSystemFont, Roboto, &amp;quot;Helvetica Neue&amp;quot;, sans-serif&quot; style=&quot;background-color: white; color: #333333; font-size: 14px;&quot;&gt;401 Unauthorized&lt;/span&gt;&quot;:&quot;&lt;span face=&quot;&amp;quot;Segoe UI&amp;quot;, &amp;quot;Segoe UI Web (West European)&amp;quot;, &amp;quot;Segoe UI&amp;quot;, -apple-system, BlinkMacSystemFont, Roboto, &amp;quot;Helvetica Neue&amp;quot;, sans-serif&quot; style=&quot;background-color: rgba(128, 128, 128, 0.1); color: #333333; font-size: 14px; white-space: pre-wrap;&quot;&gt;You do not have permission to view this directory or page.&lt;/span&gt;&quot;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJRRXrvaxgiUQRTMCssZcdhI-ptRuB8bFow3j8L6YFbS3kluTmOJOxJ-7CXmW2NdYjgKJW0s0v2B1CbaMaSmCd2_E3nvR31XESZ6cR3IuPvYprH53oaSPf-QeS1YxT-SfX7-tEtRmXNvf1jC1cGltjytfVL-1Qhqoh5Pn21AK90XiMgZHzXawqfCYD/s1638/7.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;459&quot; data-original-width=&quot;1638&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJRRXrvaxgiUQRTMCssZcdhI-ptRuB8bFow3j8L6YFbS3kluTmOJOxJ-7CXmW2NdYjgKJW0s0v2B1CbaMaSmCd2_E3nvR31XESZ6cR3IuPvYprH53oaSPf-QeS1YxT-SfX7-tEtRmXNvf1jC1cGltjytfVL-1Qhqoh5Pn21AK90XiMgZHzXawqfCYD/w640-h180/7.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Now lets get that OAuth token using a postman request.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO58fLxIqP8cVBXq8RFG52vUSJ17VIekGBGKH2wEm_RyWDQMjsQtHGw9U2JJrthjGVzy5pwNbxlKrQis7C0RaDSha1VCnhKk2fQBN5B8zLtrTDOu9U_CARCTRmcumRPSdQmibUb_pyKLUcMJzWzqxFs0t5rFw7KfqFpyETQ32mSYU5HI49HYZEcZkI/s1679/8.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;954&quot; data-original-width=&quot;1679&quot; height=&quot;364&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO58fLxIqP8cVBXq8RFG52vUSJ17VIekGBGKH2wEm_RyWDQMjsQtHGw9U2JJrthjGVzy5pwNbxlKrQis7C0RaDSha1VCnhKk2fQBN5B8zLtrTDOu9U_CARCTRmcumRPSdQmibUb_pyKLUcMJzWzqxFs0t5rFw7KfqFpyETQ32mSYU5HI49HYZEcZkI/w640-h364/8.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Now lets fire that request using the Bearer token.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV1iB6_7yXcB1Lp0ePGbpx8_vjg_ZVBpmpWJh6n87EQM_g7c9bDSk9I9fSJQhVwAmrz3IILAvzdx4G8yQGFmAuLPYEf04YHN5aiK4yqYK_c_L-YNn2oBtcA075uvFWLFKCMuuqI6tECg5_arDICjb3YwR3y7d2fS5jtDhsRLxdbE65HQI2XV65vKzA/s1530/10.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;475&quot; data-original-width=&quot;1530&quot; height=&quot;198&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV1iB6_7yXcB1Lp0ePGbpx8_vjg_ZVBpmpWJh6n87EQM_g7c9bDSk9I9fSJQhVwAmrz3IILAvzdx4G8yQGFmAuLPYEf04YHN5aiK4yqYK_c_L-YNn2oBtcA075uvFWLFKCMuuqI6tECg5_arDICjb3YwR3y7d2fS5jtDhsRLxdbE65HQI2XV65vKzA/w640-h198/10.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Ok now with Oauth in place, we got one layer of protection. But this doesnt differentiate Free, Paid or Premium clients. They all can access the Azure functionality the same after having that OAuth token.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Step 3:&lt;/b&gt; Now its time for building the subscription based security layer around the OAuth enabled AZ functions. This is how it looks like by end of our configuration.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX5kCb6OaXxPocqb29iEbgs-xlywvmK0yY0XzDH6RpfwtS80j1Wh6fJFnbUfgkrvRHjugTWp03BkSCLKcCH6x0wu5tYFbw2GhtOmSSamhVsmVLfNRHN1IPyeiVssPGX-HlgVTuaAfQC8i4AyEHatxpLrWkHcl-Rbzwd8ozwTSLqVTl08D88MSsbzYu/s1159/11.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;598&quot; data-original-width=&quot;1159&quot; height=&quot;330&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX5kCb6OaXxPocqb29iEbgs-xlywvmK0yY0XzDH6RpfwtS80j1Wh6fJFnbUfgkrvRHjugTWp03BkSCLKcCH6x0wu5tYFbw2GhtOmSSamhVsmVLfNRHN1IPyeiVssPGX-HlgVTuaAfQC8i4AyEHatxpLrWkHcl-Rbzwd8ozwTSLqVTl08D88MSsbzYu/w640-h330/11.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Lets start with creating a Azure API Management Service. It will take more than 10 mins to provision this.&lt;/p&gt;&lt;p&gt;Once created go to APIs and create new one selecting FunctionApp template and choose the functions exposed over that API. I created 3 API endpoints one for Free with just GetFunction(), Paid endpoint with POSTMethod() and Premium with all Functions.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb_DgTAN-ArJLcioYi-ORsGOQDarmFPOjVIKD0lGwXPG-DUMfqyW02zgiJ19NeSF36IZsKAewwfkO4PhkL280RFPNUyn8QMGbpf3QXZtonUkAcHen0nWdfb8_1jWK_-k-GKeDwgpQCOF1hpRCcY46KOp71BI0ImXOJPEYqa9ZYWzhuGAY_Co0OgNZ9/s1222/16.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;827&quot; data-original-width=&quot;1222&quot; height=&quot;434&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb_DgTAN-ArJLcioYi-ORsGOQDarmFPOjVIKD0lGwXPG-DUMfqyW02zgiJ19NeSF36IZsKAewwfkO4PhkL280RFPNUyn8QMGbpf3QXZtonUkAcHen0nWdfb8_1jWK_-k-GKeDwgpQCOF1hpRCcY46KOp71BI0ImXOJPEYqa9ZYWzhuGAY_Co0OgNZ9/w640-h434/16.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Now lets test the Premium API with OAuth authorization. and see the result.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0fqvFnqMlpFPgtGktxSKskH5rmWY5kbLMHjZkcuMuoL8Fg-bKAlat3ZYZWOi1lsD9901R2vZX-tAJNokV5qB4HwHK9e_kKcby1XOfZOXr_6rQk5JdPG2R90tWZGfwOgIjhaoe4dJVv8tIbadJ8CllRsiMlBnz_KV4M86p4It4ZQecWFnRa-u8cKoN/s1837/17.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;847&quot; data-original-width=&quot;1837&quot; height=&quot;296&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0fqvFnqMlpFPgtGktxSKskH5rmWY5kbLMHjZkcuMuoL8Fg-bKAlat3ZYZWOi1lsD9901R2vZX-tAJNokV5qB4HwHK9e_kKcby1XOfZOXr_6rQk5JdPG2R90tWZGfwOgIjhaoe4dJVv8tIbadJ8CllRsiMlBnz_KV4M86p4It4ZQecWFnRa-u8cKoN/w640-h296/17.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Result:&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiceZbr2-OIf1Qq0BEipiEKTTImh5y79oqliK63ll9in7kv0Wpg6_EmxoThdnNCFoLg9Vpkn-Meb7P2HCIitxXifn4d3uvCSYZV0Bhdi2O1k2JlLQrJogrQe0O6dmbe5rw8ETYM1VSciWtZRJ--9D71qfZkJcpkvtB3nCDtU8FwHC9P3uKm9pGOARz_/s2047/18.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1073&quot; data-original-width=&quot;2047&quot; height=&quot;336&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiceZbr2-OIf1Qq0BEipiEKTTImh5y79oqliK63ll9in7kv0Wpg6_EmxoThdnNCFoLg9Vpkn-Meb7P2HCIitxXifn4d3uvCSYZV0Bhdi2O1k2JlLQrJogrQe0O6dmbe5rw8ETYM1VSciWtZRJ--9D71qfZkJcpkvtB3nCDtU8FwHC9P3uKm9pGOARz_/w640-h336/18.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Step 4: Creating AZ API Subscriptions for each client with set API access is a best practice. So lets start creating the Sub Keys for each client and select the API for which they paid for.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOTN3Yr7hbxIXx4tOxncLq1nO9czGGKx2riUdcuG0TGwYGfkdl3jWy-3FfRV_q3UkMfbXLlBq-RyF-9Z37iQPdV3jNRhQtPVE3kKH5WH8UFd4Eg-cW32jS8Smm3bhXR4XoQ-PAadffIkiZeCRyzr20X9cqnfMbbF4pE6-0orMdvfaJnobpuhot0MaJ/s541/19.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;541&quot; data-original-width=&quot;494&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOTN3Yr7hbxIXx4tOxncLq1nO9czGGKx2riUdcuG0TGwYGfkdl3jWy-3FfRV_q3UkMfbXLlBq-RyF-9Z37iQPdV3jNRhQtPVE3kKH5WH8UFd4Eg-cW32jS8Smm3bhXR4XoQ-PAadffIkiZeCRyzr20X9cqnfMbbF4pE6-0orMdvfaJnobpuhot0MaJ/w365-h400/19.png&quot; width=&quot;365&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Each subscription will have a primary and secondary key for access request. so now we send those clients these Subscription Keys and they need both OAuth key and thier own subscription key to access the azure functions.&lt;/p&gt;&lt;p&gt;Now when we made a request to API with OAuth it clearly says it needs the Subscription Key to access.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh46BI0gOXu99CUad9dhpbePsjjY3TQFoOlJ6QdXju-2QlO8kIVCi_dxgCbjr8sfSdhjqry-ikzEuZLo4-hn97oub8-KAMLIyTcUWgIBejULmDBem4qT3qowHrOizcwhlY0BA35cMW_2urgPEeS2as5Bo5_9fCoXp7RTCRsGieVfoibnYaHAvLPMGQH/s1631/20.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;706&quot; data-original-width=&quot;1631&quot; height=&quot;278&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh46BI0gOXu99CUad9dhpbePsjjY3TQFoOlJ6QdXju-2QlO8kIVCi_dxgCbjr8sfSdhjqry-ikzEuZLo4-hn97oub8-KAMLIyTcUWgIBejULmDBem4qT3qowHrOizcwhlY0BA35cMW_2urgPEeS2as5Bo5_9fCoXp7RTCRsGieVfoibnYaHAvLPMGQH/w640-h278/20.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Now lets try with both with OAuth tokens and Subscription key, it goes thorugh sucessfuly.&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijf828RYBuoHtt0KEuRP-CPV3tOB6hTQIKX2Ov2soWg3jr7HrDwRIHl9Q3gJNWQpQMXtMD-8KJ72P6ZqgGtxSRmOscR-n0UDQTVcjXnfQkF4YS8pz-c54jDqx41DzVedyIRNxwclaFfruXqh3IPLKaFiaVrTmoyIhEuvck3lF866Qd1KouuiIMMWuE/s1680/21.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;879&quot; data-original-width=&quot;1680&quot; height=&quot;334&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijf828RYBuoHtt0KEuRP-CPV3tOB6hTQIKX2Ov2soWg3jr7HrDwRIHl9Q3gJNWQpQMXtMD-8KJ72P6ZqgGtxSRmOscR-n0UDQTVcjXnfQkF4YS8pz-c54jDqx41DzVedyIRNxwclaFfruXqh3IPLKaFiaVrTmoyIhEuvck3lF866Qd1KouuiIMMWuE/w640-h334/21.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Objective of providing access to Azure functions based on subscriptions was acheieved.&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/4214792133792061731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2022/03/how-to-build-subscription-based.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/4214792133792061731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/4214792133792061731'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2022/03/how-to-build-subscription-based.html' title='How to build subscription based security around Azure functions'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC_FL3gv00Q5SZ69qQxt4x_us2bt03ry7O3wvPryPYIZXyU9GzwDtAZnrcYyvqb7otnUg24EtJ3ClbuPJf8Z6-UTRF1hvW2yFpQuWwBZV90XmZErXCoZKG_NJ1QInHj5xhU0GQZ7TjwXUtyYa84Gx_rn7beSvri4kVgNMFkhLWLEd4xvhgwx3mECxc/s72-w640-h362-c/1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-582521832416283618</id><published>2022-03-11T21:45:00.005-08:00</published><updated>2022-03-11T21:46:01.663-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="REACT"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint Online"/><title type='text'>React Js Modularity - Breaking a monolith react component into modular components</title><content type='html'>&lt;p&gt;Earlier in 2017, I have written a few articles on &lt;a href=&quot;https://pratapreddypilaka.blogspot.com/2017/07/basics-of-sharepoint-framework-webparts.html&quot; target=&quot;_blank&quot;&gt;Basics of SharePoint Framework&lt;/a&gt;, &lt;a href=&quot;https://pratapreddypilaka.blogspot.com/2017/11/react-component-basics.html&quot; target=&quot;_blank&quot;&gt;Use of React JS&lt;/a&gt; and &lt;a href=&quot;https://pratapreddypilaka.blogspot.com/2017/11/react-component-life-cycle.html&quot; target=&quot;_blank&quot;&gt;React JS component life cycle&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;&lt;p&gt;But Most of the SPFx web parts I created were task oriented and not application oriented. This means the size of the React components is small.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Now I am working on a product / application level components which are complex and big in size.&lt;/p&gt;&lt;p&gt;Here is a screenshot of a POC I am currently working.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj4Box-Jj7Zu0B8DKwoWAPAG6416vLokfKVEJyq_zgOkAmfKX7AvUmo46e7LVH3No5cMabIwpiiRDXQo44MXD4WQ0yqzJEZ9YHokG07HrtXP1oWTYVYZAHG2WphIWiSO7ZVTHBC5l_sQsl6hDODqs6rbbUaixGz1cO5E_lZiloCd24TDBMv3e_sRpte=s1787&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;696&quot; data-original-width=&quot;1787&quot; height=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj4Box-Jj7Zu0B8DKwoWAPAG6416vLokfKVEJyq_zgOkAmfKX7AvUmo46e7LVH3No5cMabIwpiiRDXQo44MXD4WQ0yqzJEZ9YHokG07HrtXP1oWTYVYZAHG2WphIWiSO7ZVTHBC5l_sQsl6hDODqs6rbbUaixGz1cO5E_lZiloCd24TDBMv3e_sRpte=w640-h250&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;There are 3 Tabs, in which some tabs has roughly 4 to 5 forms with numerous fields. Now with what ever experience you have with SPFx and ReactJS development, imagine how big this component will be.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you are dealing with any react component with more than 300 lines of code, you need to think about breaking that monolith into small chunks.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Its just not about no. of lines of code. Its about principle of &quot;Separation of Concerns&quot;. I can envision above application as below.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhCaKI0Znd1bFutgsMsvw0U0D7iUfrGQhFxfYEoY5kVXXZZ0AqBD4TEeUpjZB2zgusaknhUfSMJ-jEDWzXZGa0dAQR494aT2OUH-U7yo00ru94FoHlsiBis7_4CtYYPmXx0fWKBEyB5-2nAwhpXReQxc7o_AC_Q1GicSN9d-nXPRIOvXa0UZOXc5yFW=s863&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;537&quot; data-original-width=&quot;863&quot; height=&quot;398&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhCaKI0Znd1bFutgsMsvw0U0D7iUfrGQhFxfYEoY5kVXXZZ0AqBD4TEeUpjZB2zgusaknhUfSMJ-jEDWzXZGa0dAQR494aT2OUH-U7yo00ru94FoHlsiBis7_4CtYYPmXx0fWKBEyB5-2nAwhpXReQxc7o_AC_Q1GicSN9d-nXPRIOvXa0UZOXc5yFW=w640-h398&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Now question comes to how you going to separate functionality into different ReactJS components still make it work together.&lt;/div&gt;&lt;div&gt;There are 3 ways of doing it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;1. Functions:&lt;/b&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;Functions are used to separate small but reusable code that can be called in multiple places. Typical example would be headers and footers that can be written as functions and called in every page. below is the code sample how you do it in React.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiEQ152gK6DIM8YTSQGY7SLOc3P4bODCmi9ry4yDzus7rKOSi7JbhHMaqTC-vaFfFzit12FsA-ZNUVb7jtoHoiFd9m-4dDN3XS7N-PyzcT_4_e6Y38wIStb4QmlKx4ZxSiXz--ipGubwHSxC80y0iis4n_UjzItdkG56qqVXtOjEot8k3OkH92oDIRz=s927&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;453&quot; data-original-width=&quot;927&quot; height=&quot;312&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiEQ152gK6DIM8YTSQGY7SLOc3P4bODCmi9ry4yDzus7rKOSi7JbhHMaqTC-vaFfFzit12FsA-ZNUVb7jtoHoiFd9m-4dDN3XS7N-PyzcT_4_e6Y38wIStb4QmlKx4ZxSiXz--ipGubwHSxC80y0iis4n_UjzItdkG56qqVXtOjEot8k3OkH92oDIRz=w640-h312&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiqGjY7d5e-LOhVbNDbfUJPoW95pOVmCMa434PI-XooNblXT_l4N_qIx9_bYiU73Pc979AadTVkIkAMLs39_F3sb1Vdbk7Kh9bcNFuC2ztyXsLtd_ykWrXdNLsBcdwO8JnbhOJ_cnXzHmuJugODjwIdghMUBsfNDmE71hMs9yXDsvsX524OlgDcZZ9i=s777&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;466&quot; data-original-width=&quot;777&quot; height=&quot;384&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiqGjY7d5e-LOhVbNDbfUJPoW95pOVmCMa434PI-XooNblXT_l4N_qIx9_bYiU73Pc979AadTVkIkAMLs39_F3sb1Vdbk7Kh9bcNFuC2ztyXsLtd_ykWrXdNLsBcdwO8JnbhOJ_cnXzHmuJugODjwIdghMUBsfNDmE71hMs9yXDsvsX524OlgDcZZ9i=w640-h384&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgeqmksDD-CVXEfDtEXQwOpHOGDaba5bGoSPHmMbEHzv8wol9Qo4qpoHsYvokcJNIdvfN4lB78FMzrkDF6dwgqunCN_UknrLwIdEBFgTPVATqpWC243vmUo3LeMUsLfY2y4Nb8Sy6gH1AnwR-Xw5X4WHOXG4kOt5y1jnDgIDmQpCRhgsRnxcvJbtX4e=s1010&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;307&quot; data-original-width=&quot;1010&quot; height=&quot;194&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgeqmksDD-CVXEfDtEXQwOpHOGDaba5bGoSPHmMbEHzv8wol9Qo4qpoHsYvokcJNIdvfN4lB78FMzrkDF6dwgqunCN_UknrLwIdEBFgTPVATqpWC243vmUo3LeMUsLfY2y4Nb8Sy6gH1AnwR-Xw5X4WHOXG4kOt5y1jnDgIDmQpCRhgsRnxcvJbtX4e=w640-h194&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;2. Sibling Components:&amp;nbsp;&lt;/b&gt;&lt;div&gt;This means the the components are completely independent of their actions, and there is not data propagation between them. In the above example the components &quot;Information&quot; and &quot;Membership&quot; are sibling components. How do we embed them in UI Component?&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Here are the definitions of both Information and Membership components.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgGxwbBcHBi7lNcx6Lg21FUDlhQGeNjRDeo4uFPOiRVr03oOJTN30R0XUwLOkOpIpS1iItYd6p6WaFLqGuGL5zkJORKYxoSXOH3fiQB-nRO2jpSaZ5hKAdmnA6mzwmxXiBsfDIqZ6-yOGTyR47Vv5XM9nie5YSel_MwFUnfvxGNrR9jXfceUVv96OmM=s955&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;402&quot; data-original-width=&quot;955&quot; height=&quot;270&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgGxwbBcHBi7lNcx6Lg21FUDlhQGeNjRDeo4uFPOiRVr03oOJTN30R0XUwLOkOpIpS1iItYd6p6WaFLqGuGL5zkJORKYxoSXOH3fiQB-nRO2jpSaZ5hKAdmnA6mzwmxXiBsfDIqZ6-yOGTyR47Vv5XM9nie5YSel_MwFUnfvxGNrR9jXfceUVv96OmM=w640-h270&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh7fTFI07QjJMCQYhGRF6KicWPVkvJol5u0yaDiaR2sf6R_OreuierdMNbSZRcIPpMHieZQhlQC7PfqloJIb5V-1bh6NPm7b_yfl3wkaJPvTij4AOeeAbSMILCIa6bQbpd59XBO0Xu-TovUn5lXzxKTBCiCc6VERQP_vXc_SwD88sjTkxq0T-M1bCCh=s932&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;425&quot; data-original-width=&quot;932&quot; height=&quot;292&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh7fTFI07QjJMCQYhGRF6KicWPVkvJol5u0yaDiaR2sf6R_OreuierdMNbSZRcIPpMHieZQhlQC7PfqloJIb5V-1bh6NPm7b_yfl3wkaJPvTij4AOeeAbSMILCIa6bQbpd59XBO0Xu-TovUn5lXzxKTBCiCc6VERQP_vXc_SwD88sjTkxq0T-M1bCCh=w640-h292&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Now lets import these components into the UI component.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhQn76L5-pJhP9blQrC-swBkeC9KwzXTj151qKDRwP4jv-Ump8nxui5bXop79GQGqHxZqWOxWk0euwofgKZBxRGsC6bzBrA5JsSnbYyAA8TH60L93VWZnX2udFrLHjAuW8kr361YnBYz82K2_za-uIE2TEyssYEHFUaKPH2wn1iWCmwUcD2aA9wUTfJ=s565&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;57&quot; data-original-width=&quot;565&quot; height=&quot;64&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhQn76L5-pJhP9blQrC-swBkeC9KwzXTj151qKDRwP4jv-Ump8nxui5bXop79GQGqHxZqWOxWk0euwofgKZBxRGsC6bzBrA5JsSnbYyAA8TH60L93VWZnX2udFrLHjAuW8kr361YnBYz82K2_za-uIE2TEyssYEHFUaKPH2wn1iWCmwUcD2aA9wUTfJ=w640-h64&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;then this how we embed them in UI markup.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjhTtqL1JH7aIxumT6055V723McNDSFG9QpiJywWvq11JGD6jKxLO_aKDwyjmLUHorJrXE0crh_PpnOHTLOZzYQG0ShmpwktOlQANyAxMetLAT6OPhvzOZ9sJ7CfEgYvZJsaJt2oXr8ny9X1x6JHOn_GJrZhMpL9Uv09uJ3faUrySBHdYqjIu3g2YE1=s532&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;135&quot; data-original-width=&quot;532&quot; height=&quot;162&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjhTtqL1JH7aIxumT6055V723McNDSFG9QpiJywWvq11JGD6jKxLO_aKDwyjmLUHorJrXE0crh_PpnOHTLOZzYQG0ShmpwktOlQANyAxMetLAT6OPhvzOZ9sJ7CfEgYvZJsaJt2oXr8ny9X1x6JHOn_GJrZhMpL9Uv09uJ3faUrySBHdYqjIu3g2YE1=w640-h162&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Here is the out come.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhCbYjH_p-WugVWnCm0oUUtWqC742nJzvs3JWPWL580NOuALXi0VL2r8KQL3InE3_8vwVgsiy_AMoTpGmHrvosg6Hcimck16cGHkgcR3ZaP__yklofY3porS6JheC4y5fKYdliYB6_VcymG25es4w8CfrZqcOVCh7NaU5AJdGXwQmWjF2fM9p5QiEUq=s1497&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;482&quot; data-original-width=&quot;1497&quot; height=&quot;206&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhCbYjH_p-WugVWnCm0oUUtWqC742nJzvs3JWPWL580NOuALXi0VL2r8KQL3InE3_8vwVgsiy_AMoTpGmHrvosg6Hcimck16cGHkgcR3ZaP__yklofY3porS6JheC4y5fKYdliYB6_VcymG25es4w8CfrZqcOVCh7NaU5AJdGXwQmWjF2fM9p5QiEUq=w640-h206&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;3. Parent Child Components:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Now in Template component , I have a Taxonomy picker control. For it to work, I need the Webpart Context. But you cannot find webpart context in child component. I need to send it from UI component.&lt;/div&gt;&lt;div&gt;How do we do that?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Create a constructor in child component , which accepts the properties from parent.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiFFn_Loxjb1sLoqcpHUZR-eY1mLFMDhBFFyRVaITid8vKxMkMGhegKfX8PFPx1ywVVgDi4D_VQTT3rfD_bqS9EiVbfcwiee9ACQEUaXN5VxjoHWtvCVb-EnFPJT4Jm11jl4_rW4qvJmrYjJMxIrJTHDV5v_qASbYFgU6hTKsR9Hf2MB9kdd_sy542G=s865&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;361&quot; data-original-width=&quot;865&quot; height=&quot;268&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiFFn_Loxjb1sLoqcpHUZR-eY1mLFMDhBFFyRVaITid8vKxMkMGhegKfX8PFPx1ywVVgDi4D_VQTT3rfD_bqS9EiVbfcwiee9ACQEUaXN5VxjoHWtvCVb-EnFPJT4Jm11jl4_rW4qvJmrYjJMxIrJTHDV5v_qASbYFgU6hTKsR9Hf2MB9kdd_sy542G=w640-h268&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Now pass that webpart Context to Taxonomy picker.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgQWOkRhN7JPKf3jX28BY9oUJlpUZ6K1fNB117MuHtEU_F3VbcRcZwkR1_ilPefeVSDpzEWNtCVvQLMbrKWSBU5km-kQFdKwFSW7RtuXrFr_KisHiWANq9PhZEBQrJ3AtmUqe41_3Ou50xCHOfzEdvUMueHebqiPmCXpZqXZyYYfPbhMp-5cN0nnAHQ=s767&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;346&quot; data-original-width=&quot;767&quot; height=&quot;288&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgQWOkRhN7JPKf3jX28BY9oUJlpUZ6K1fNB117MuHtEU_F3VbcRcZwkR1_ilPefeVSDpzEWNtCVvQLMbrKWSBU5km-kQFdKwFSW7RtuXrFr_KisHiWANq9PhZEBQrJ3AtmUqe41_3Ou50xCHOfzEdvUMueHebqiPmCXpZqXZyYYfPbhMp-5cN0nnAHQ=w640-h288&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;In UI Component, this is how we send the Webpart Context to child component.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjmYG4Dullqf8wVeWNqSqdreZF2_30l98k44jV9tOvjkvFiTY7zGjztaXEw4nOhX4VOaX-OMef5S3eYSelZ92i-wU8yDBJGTiVMICKc0XmPkBIDYWed58g1n0oTBbGu_fnG71BNr_pbcgeRYMtrZpaTf1bQM-Uvz8t0rMPJu-VXvLAjtDjqOfRIF-WF=s545&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;236&quot; data-original-width=&quot;545&quot; height=&quot;278&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjmYG4Dullqf8wVeWNqSqdreZF2_30l98k44jV9tOvjkvFiTY7zGjztaXEw4nOhX4VOaX-OMef5S3eYSelZ92i-wU8yDBJGTiVMICKc0XmPkBIDYWed58g1n0oTBbGu_fnG71BNr_pbcgeRYMtrZpaTf1bQM-Uvz8t0rMPJu-VXvLAjtDjqOfRIF-WF=w640-h278&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Now look at the out put&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgNOGjYVTYHikXQCEy4GwePviWiS4wfKXkN3TKjBnXVvQ1uQduZKEloka84SpZIZzO0Z1sm3GpHC9gH_QPGAV0UR9eehX3KXmQYp3lzhQs-hEty3dXvfexYolRMZ4rnXK3JTQrAboUfFU46izc03jmPFBXj7RGtwzsC5pSrWnhfse0PNHUE0x6-SGuB=s1192&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;858&quot; data-original-width=&quot;1192&quot; height=&quot;460&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgNOGjYVTYHikXQCEy4GwePviWiS4wfKXkN3TKjBnXVvQ1uQduZKEloka84SpZIZzO0Z1sm3GpHC9gH_QPGAV0UR9eehX3KXmQYp3lzhQs-hEty3dXvfexYolRMZ4rnXK3JTQrAboUfFU46izc03jmPFBXj7RGtwzsC5pSrWnhfse0PNHUE0x6-SGuB=w640-h460&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;This is how we break monolith React components modular components and increase maintainability of our applications.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Happy coding !&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/582521832416283618/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2022/03/react-js-modularity-breaking-monolith.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/582521832416283618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/582521832416283618'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2022/03/react-js-modularity-breaking-monolith.html' title='React Js Modularity - Breaking a monolith react component into modular components'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEj4Box-Jj7Zu0B8DKwoWAPAG6416vLokfKVEJyq_zgOkAmfKX7AvUmo46e7LVH3No5cMabIwpiiRDXQo44MXD4WQ0yqzJEZ9YHokG07HrtXP1oWTYVYZAHG2WphIWiSO7ZVTHBC5l_sQsl6hDODqs6rbbUaixGz1cO5E_lZiloCd24TDBMv3e_sRpte=s72-w640-h250-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-7298621525886101330</id><published>2022-02-10T12:57:00.013-08:00</published><updated>2022-02-13T12:26:04.028-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><title type='text'>Azure PIM Provisioning and Configuration</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Setting up PIM
Administrator&lt;/span&gt;&lt;/h1&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Global
Admins enable PIM provisioning and create PIM Admin role assignment.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;PIM Admin Account
Pre-requisites: &lt;/span&gt;&lt;/h4&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;PIM admin
account need to have below 2 licenses assigned.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;mso-list: l0 level1 lfo2; text-indent: -18pt;&quot;&gt;&lt;/p&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Azure AD Premium P2&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;Enterprise Mobility + Security (EMS)
E5&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;!--[if !supportLists]--&gt;&lt;p&gt;&lt;/p&gt;



&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;PIM Admin Setup: &lt;/span&gt;&lt;/h4&gt;

&lt;p class=&quot;MsoListParagraphCxSpFirst&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;. Login to Azure portal as Global
admin, navigate to Azure Active Directory.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;2.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;In Featured highlights, click on &lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgZ9EwC1OaQHXJuJD660K7kwDjcMtuhcB5XLr_nUAqCpP-EDcJUpAhq1zcur8bqqi_s8UwFDV9nwK-C4gUMIZcsYdcX3IaFrqpYNse4z29zbHbvsvmMvsEG8w6TOCb7nXFx4JP5sgJ5nnQVEZ0SbXM8HTWH3nz_zw4DqTMnZJsf3vigZ0o_IE2VHwsa=s352&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgZ9EwC1OaQHXJuJD660K7kwDjcMtuhcB5XLr_nUAqCpP-EDcJUpAhq1zcur8bqqi_s8UwFDV9nwK-C4gUMIZcsYdcX3IaFrqpYNse4z29zbHbvsvmMvsEG8w6TOCb7nXFx4JP5sgJ5nnQVEZ0SbXM8HTWH3nz_zw4DqTMnZJsf3vigZ0o_IE2VHwsa=s320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;3.      Click on “Azure AD roles” in left pane=&amp;gt; Navigate to “Roles” by clicking on &lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgy8z31NPCVF2LTaRGF4FqMe_icXA_7wmCAbyDYYVz5x6kn4nsMI2bmngdX15QNvl-gGibO2foogKSc0LQHjy46qtKwU492ki6K2ds6KMXUu5cKxB9Z7nixLGLqUmlC9aafHSgkOPNBRDQ_RKSHOpBJqgiycfxTxoFVrhUb9kOsYWPyQOaYrS8gfPVA=s85&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgy8z31NPCVF2LTaRGF4FqMe_icXA_7wmCAbyDYYVz5x6kn4nsMI2bmngdX15QNvl-gGibO2foogKSc0LQHjy46qtKwU492ki6K2ds6KMXUu5cKxB9Z7nixLGLqUmlC9aafHSgkOPNBRDQ_RKSHOpBJqgiycfxTxoFVrhUb9kOsYWPyQOaYrS8gfPVA&quot; /&gt;&lt;/a&gt;&lt;br /&gt;4.      Search for “privileged role administrator”. &lt;br /&gt;&lt;br /&gt; &lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEggNJMQW-zTAOiKwjxvpa6fW-9BU2i7pksxTD6t50pLtMhRr6TD9lw0aIPrxZDC-RzsWKyF7M8nsNfrKKZyp7jck89VIfsYTEcvh_1iutYR0aSvpzj6gTt8Ln-gFE-n_zomB4B-TBrssBQPt5YaYPKguBHfpdrXeuOMVOCSm0OnmTGNdpEUUcyiypYR=s357&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEggNJMQW-zTAOiKwjxvpa6fW-9BU2i7pksxTD6t50pLtMhRr6TD9lw0aIPrxZDC-RzsWKyF7M8nsNfrKKZyp7jck89VIfsYTEcvh_1iutYR0aSvpzj6gTt8Ln-gFE-n_zomB4B-TBrssBQPt5YaYPKguBHfpdrXeuOMVOCSm0OnmTGNdpEUUcyiypYR=s320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;5.      Click on “Privileged Role Administrator” role. Click on &lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjiOfS05wViDy0wLGmHxmSkaEhzHGfKaqhYu-iESn1br6fTTWt5FyL6QV0vgyYpAUQe1Z5-88AZ-z8nfhhi56B1SRGrWBMWZYaC5zJyc0vr_CFB0bwvs2hZLxHb9iqHzYzqLjg6mnbFx_lY1mEQ1QByQI2uu4FAVYdt4cYbf5ehXk9_5SWRVnTy6A3y=s140&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjiOfS05wViDy0wLGmHxmSkaEhzHGfKaqhYu-iESn1br6fTTWt5FyL6QV0vgyYpAUQe1Z5-88AZ-z8nfhhi56B1SRGrWBMWZYaC5zJyc0vr_CFB0bwvs2hZLxHb9iqHzYzqLjg6mnbFx_lY1mEQ1QByQI2uu4FAVYdt4cYbf5ehXk9_5SWRVnTy6A3y&quot; /&gt;&lt;/a&gt;&lt;br /&gt;6.      Follow&lt;span style=&quot;text-indent: -18pt;&quot;&gt;&amp;nbsp;below configuration&lt;/span&gt;&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; margin-left: 36pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0;&quot;&gt;
  &lt;td style=&quot;border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 149.15pt;&quot; valign=&quot;top&quot; width=&quot;199&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Field&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 141.5pt;&quot; valign=&quot;top&quot; width=&quot;189&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 124.15pt;&quot; valign=&quot;top&quot; width=&quot;166&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Reason&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 1;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 149.15pt;&quot; valign=&quot;top&quot; width=&quot;199&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Selected
  Member(s)*&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 141.5pt;&quot; valign=&quot;top&quot; width=&quot;189&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;PIM
  Admin Account&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 124.15pt;&quot; valign=&quot;top&quot; width=&quot;166&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;This
  should be an account which will be permanently treated as PIM admin&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 2;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 149.15pt;&quot; valign=&quot;top&quot; width=&quot;199&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Assignment
  type&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 141.5pt;&quot; valign=&quot;top&quot; width=&quot;189&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Eligible&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 124.15pt;&quot; valign=&quot;top&quot; width=&quot;166&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;This
  means PIM admin account is always eligible, but not active. PIM admin need to
  activate this role every time the changes need to be made to PIM
  configuration &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 3; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 149.15pt;&quot; valign=&quot;top&quot; width=&quot;199&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Permanently
  eligible&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 141.5pt;&quot; valign=&quot;top&quot; width=&quot;189&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;YES&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 124.15pt;&quot; valign=&quot;top&quot; width=&quot;166&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Always
  eligible, but not active.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p class=&quot;MsoListParagraphCxSpFirst&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;7.&lt;span style=&quot;font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;PIM Admin setup is finished.&lt;/p&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;PIM Provisioning&lt;/h2&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;PIM Admin
will be enabling which roles need to be enabled for PIM Access requests and
which users are eligible for PIM requests.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Enabling PIM Admin Role &lt;/span&gt;&lt;/h4&gt;

&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Setup:&lt;/span&gt;&lt;/h4&gt;

&lt;p class=&quot;MsoListParagraphCxSpFirst&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Login to Azure portal as PIM Adin account. Navigate to Azure Active Directory. &lt;br /&gt;2.      In Featured highlights, click on  &lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh94ybZMN9yB55nouLOT8Ph3zIjAZejJf1Aq-iBXRNiK4dYvzS9ib8AagR5eJ2a8Eo7m-n2EojFLgRGNS1R0l7tIUJgwYbYjV4qVRlSZtbGce1NPkVZDHO-2WzDcJU8q9ak8J6GgWxtMPiXcMPPDi2mrEN4YwFJRB09VglEv_uaoDZEg8dXsVsncW8-=s352&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh94ybZMN9yB55nouLOT8Ph3zIjAZejJf1Aq-iBXRNiK4dYvzS9ib8AagR5eJ2a8Eo7m-n2EojFLgRGNS1R0l7tIUJgwYbYjV4qVRlSZtbGce1NPkVZDHO-2WzDcJU8q9ak8J6GgWxtMPiXcMPPDi2mrEN4YwFJRB09VglEv_uaoDZEg8dXsVsncW8-=s320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;3.      Click on “My Roles” in left pane. &lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgc8w57atYm2el0zKHvejAtP6nLTzfWr3GclIWiY9iNDlQzFVF-z05hNcJFtE1J4ocr29zW7sqQDVGE2sB1Cx1k3HBmAH0Hk-6LGHkmy9L1GqLRJ4lCCoKkFPl-HjI-m6GBUtY71mWJbHC4JuQ5E39zqraP6BltBnFeXeuV7RPUjyByd9urcKQxe4hi=s103&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgc8w57atYm2el0zKHvejAtP6nLTzfWr3GclIWiY9iNDlQzFVF-z05hNcJFtE1J4ocr29zW7sqQDVGE2sB1Cx1k3HBmAH0Hk-6LGHkmy9L1GqLRJ4lCCoKkFPl-HjI-m6GBUtY71mWJbHC4JuQ5E39zqraP6BltBnFeXeuV7RPUjyByd9urcKQxe4hi&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Here you will see all the roles for which current user is eligible for. As per above configuration “Privileged Role Administrator” role should be available permanently. &lt;br /&gt;&lt;br /&gt;4.      Click “Activate” button. User need to validate his credentials via Authenticator app by clicking on &lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEihvOHsLDVBVrkB6Nd4m8KWVaW81MgFIfrf96OvyEZeypU0kYFxbpmS5JGDhc2LcV-IUQ6nRJlnyyXkI8ib-bvNSqeVIJD67eIvzpx95UYoayY1lMWR7WRszYwDk2CaFgWkxneHvI2RVYSLH-3EvnJ2HCsZCnEVAPz4P_1TtxC5iNoy3djwRMuzzSy4=s322&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEihvOHsLDVBVrkB6Nd4m8KWVaW81MgFIfrf96OvyEZeypU0kYFxbpmS5JGDhc2LcV-IUQ6nRJlnyyXkI8ib-bvNSqeVIJD67eIvzpx95UYoayY1lMWR7WRszYwDk2CaFgWkxneHvI2RVYSLH-3EvnJ2HCsZCnEVAPz4P_1TtxC5iNoy3djwRMuzzSy4=s320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;5.      Now the Duration slider will be enabled, and user can select how many hours the PIM admin role need to be activated. &lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj__wgPlhxS2OpdSy6XvTm4y0umogIpt5vx6s-a41a-mBKnT0LwPvlbv9mg28UTGDEu1X472kcSmgHxoBTFkXKHLUvPVADtFKem1Z9ionjnsf_xwMLgnSIL5pgkNk9T_niwpnLdrNHaXmJvqI8A5rsUANJovav1v_hRO0yppF9yaL_xHhcZS8LCdHkJ=s306&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;188&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj__wgPlhxS2OpdSy6XvTm4y0umogIpt5vx6s-a41a-mBKnT0LwPvlbv9mg28UTGDEu1X472kcSmgHxoBTFkXKHLUvPVADtFKem1Z9ionjnsf_xwMLgnSIL5pgkNk9T_niwpnLdrNHaXmJvqI8A5rsUANJovav1v_hRO0yppF9yaL_xHhcZS8LCdHkJ=w400-h188&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;6.      PIM Ad&lt;span style=&quot;text-indent: -18pt;&quot;&gt;min role is active now.&lt;/span&gt;&lt;span style=&quot;text-indent: -18pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Configuring PIM constraints
for AD Roles&lt;/span&gt;&lt;/h1&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;In this
document we intend to enable below mentioned AD Roles for PIM requests.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoListParagraphCxSpFirst&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;SharePoint Administrator &lt;br /&gt;2.      Teams Administrator &lt;br /&gt;3.      Excha&lt;span style=&quot;text-indent: -18pt;&quot;&gt;nge Administrator&lt;/span&gt;&lt;/p&gt;

&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Setup:&lt;/span&gt;&lt;/h4&gt;

&lt;p class=&quot;MsoListParagraphCxSpFirst&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;/span&gt;&lt;/span&gt;As PIM admin user log into Azure Portal, go to Azure Active Directory, navigate to “Privileged Identity Management”. &lt;br /&gt;2.      Click on “AD Roles” =&amp;gt; Navigate to “Settings” in left pane. &lt;br /&gt;3.      Search for SharePoint Administrator role. Click on it. Now Click “Edit” Button to set the configuration. &lt;br /&gt;4.      Fo&lt;span style=&quot;text-indent: -18pt;&quot;&gt;llow below configuration&lt;/span&gt;&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; margin-left: 36pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0;&quot;&gt;
  &lt;td style=&quot;border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Field&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.3pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Reason&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 1;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Activation
  Maximum Duration (Hours)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.3pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;PIM Role
  Activation will automatically be disabled after 4 hours&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 2;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;On
  Activation , require&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Azure
  MFA&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.3pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;PIM role
  will not be activated without Authenticator MFA approval.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 3;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Require
  Justification on Activation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;True /
  Yes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.3pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Will
  make Justification txt field mandatory&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 4;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Require
  ticket information on activation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Ture/
  Yes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.3pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Will
  make ticket / SR field mandatory &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 5;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Require
  Approval to activate &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;False /
  No&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.3pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;No
  approvals necessary as of now&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 6;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Allow
  Permanent eligibility assignment&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;False /
  No&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.3pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;We want
  eligibility assignment only for a year.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 7;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Expire
  Eligibility assignments after&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;1 Year&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.3pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Eligibility
  assignment for this role will be valid for an year.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 8;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Allow
  Permanent active assignment&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;False /
  No &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.3pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 9;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Expire
  active assignments after &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;15 Days&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.3pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;We need
  to limit direct active assignments to minimum value so that they don’t
  overstay its welcome.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 10;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Require
  Azure Multi-Factor Authentication on active assignment&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;True /
  Yes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.3pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 11;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Require Justification
  on active assignment&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;True /
  Yes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.3pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 12; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Notification
  &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.25pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Enable
  all emails and add any additional email IDs if required.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 150.3pt;&quot; valign=&quot;top&quot; width=&quot;200&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

5.      Now repeat steps 3 and 4 for remaining roles “Teams Administrator” and “Exchange Administrator”.

&lt;p class=&quot;MsoListParagraphCxSpLast&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;6.&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;PIM Parameters for Ad role configuration
is completed. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Enabling PIM Access for
Users / Groups&lt;/span&gt;&lt;/h1&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;This step
is performed by PIM Admin by adding AD Users / AD Groups for each individual AD
Role.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Setup:&lt;/span&gt;&lt;/h4&gt;

&lt;p class=&quot;MsoListParagraphCxSpFirst&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;/span&gt;&lt;/span&gt;As PIM admin user log into Azure Portal, go to Azure Active Directory, navigate to “Privileged Identity Management”. &lt;br /&gt;2.      Click on “AD Roles” =&amp;gt; Navigate to “Roles” =&amp;gt; Search for “SharePoint Administrator” &lt;br /&gt;3.      Click&lt;span style=&quot;text-indent: -18pt;&quot;&gt;&amp;nbsp;on “Add Assignment”, follow
below configuration&lt;/span&gt;&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; margin-left: 36pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0;&quot;&gt;
  &lt;td style=&quot;border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 132.8pt;&quot; valign=&quot;top&quot; width=&quot;177&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Field&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 147.5pt;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 134.5pt;&quot; valign=&quot;top&quot; width=&quot;179&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Reason&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 1;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 132.8pt;&quot; valign=&quot;top&quot; width=&quot;177&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Scope
  type&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 147.5pt;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Directory&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 134.5pt;&quot; valign=&quot;top&quot; width=&quot;179&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 2;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 132.8pt;&quot; valign=&quot;top&quot; width=&quot;177&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Selected
  member(s)*&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 147.5pt;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span face=&quot;&amp;quot;Segoe UI&amp;quot;, sans-serif&quot; style=&quot;background-color: white; font-size: 12.6667px;&quot;&gt;AzureSecurityGroupForPIMAccess&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 134.5pt;&quot; valign=&quot;top&quot; width=&quot;179&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;This AD
  security group contains all the _admin accounts which requires elevated
  privileges from time to time. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 3;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 132.8pt;&quot; valign=&quot;top&quot; width=&quot;177&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Assignment
  type&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 147.5pt;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Eligible&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 134.5pt;&quot; valign=&quot;top&quot; width=&quot;179&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;The
  users in security group will be eligible for this role up on PIM access
  request. This doesn’t mean it is activated.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 4;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 132.8pt;&quot; valign=&quot;top&quot; width=&quot;177&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Assignment
  Starts&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 147.5pt;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Current
  date and time / Start date and time&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 134.5pt;&quot; valign=&quot;top&quot; width=&quot;179&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 5; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 132.8pt;&quot; valign=&quot;top&quot; width=&quot;177&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Assignment
  ends&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 147.5pt;&quot; valign=&quot;top&quot; width=&quot;197&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;1 year
  from now&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 134.5pt;&quot; valign=&quot;top&quot; width=&quot;179&quot;&gt;
  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0cm; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;1 year
  is maximum eligibility as per above configuration.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p class=&quot;MsoListParagraphCxSpFirst&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;4.&lt;/span&gt;Now repeat steps 2 and 3 for remaining roles “Teams Administrator” and “Exchange Administrator”.&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot;&gt;5.      Addin&lt;span style=&quot;text-indent: -18pt;&quot;&gt;g eligible user for each AD
role PIM access is completed.&lt;/span&gt;&lt;/p&gt;

&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/h1&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;PIM Usage&lt;/h1&gt;

&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;PIM User Request&lt;/span&gt;&lt;/h4&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;This is the
process followed by Users to raise Just-in-time privileged access for various
AD roles.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Pre-requisite:&lt;/span&gt;&lt;/h4&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;User should
be part of the “&lt;/span&gt;&lt;span face=&quot;&amp;quot;Segoe UI&amp;quot;,sans-serif&quot; style=&quot;background: white; color: black; font-size: 9.5pt; line-height: 107%;&quot;&gt;AzureSecurityGroupForPIMAccess&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;” AD security group. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Setup:&lt;/span&gt;&lt;/h4&gt;

&lt;p class=&quot;MsoListParagraphCxSpFirst&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;/span&gt;&lt;/span&gt;User log on to azure portal. Navigate to Azure Active Directory &lt;br /&gt;2.      In Featured highlights, click on &lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgOmeiHrH86tleUrr3ALONK4CIL9xoDo7uWCFNhbbutum1n_xHBpc5ZzVzvRTnGI7loTMj_Rtqh3IioYfXthUOk1KYWG-wOWlHOvVEzxgwLYG5R9nqujjQomFyp3y7sKvVVcMj2e2xb8jXkHg2Rz3xlDjjbeVFbF2H48qfpwvSz0xHiwkwmS70Z1pmA=s352&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgOmeiHrH86tleUrr3ALONK4CIL9xoDo7uWCFNhbbutum1n_xHBpc5ZzVzvRTnGI7loTMj_Rtqh3IioYfXthUOk1KYWG-wOWlHOvVEzxgwLYG5R9nqujjQomFyp3y7sKvVVcMj2e2xb8jXkHg2Rz3xlDjjbeVFbF2H48qfpwvSz0xHiwkwmS70Z1pmA=s320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;3.      Click on “My Roles” in left pane. User will see all the roles for whom user is eligible for just-in-time elevated privileges. &lt;br /&gt;4.      Click “Activate” Button, User need to MFA authenticated to enable the activate pane. Below information should be provided to activate PIM access. &lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhVfghhus8uhr3taLbaHL-c33O9ivhVdJx705y43MPK7hN7VUtHOJHMxLSpsHiElXp-C6TcDiFJG5Rw4PAp9QCP5qxBAaVXjLwV0rgla-TU7FA3hNfkDOuOxhmU9W_d4oRMVebmxBYe2FCL9DDVyiDWmw-1M1qu1iwjc_2tB94a77CTRZZ3yDoHuUvv=s446&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhVfghhus8uhr3taLbaHL-c33O9ivhVdJx705y43MPK7hN7VUtHOJHMxLSpsHiElXp-C6TcDiFJG5Rw4PAp9QCP5qxBAaVXjLwV0rgla-TU7FA3hNfkDOuOxhmU9W_d4oRMVebmxBYe2FCL9DDVyiDWmw-1M1qu1iwjc_2tB94a77CTRZZ3yDoHuUvv=s320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;5.&amp;nbsp;Just-in-time elevated privilege was activated successfully. This wil&lt;span style=&quot;text-indent: -18pt;&quot;&gt;l be active for next 4 hours.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/7298621525886101330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2022/02/azure-pim-provisioning-and-configuration.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/7298621525886101330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/7298621525886101330'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2022/02/azure-pim-provisioning-and-configuration.html' title='Azure PIM Provisioning and Configuration'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEgZ9EwC1OaQHXJuJD660K7kwDjcMtuhcB5XLr_nUAqCpP-EDcJUpAhq1zcur8bqqi_s8UwFDV9nwK-C4gUMIZcsYdcX3IaFrqpYNse4z29zbHbvsvmMvsEG8w6TOCb7nXFx4JP5sgJ5nnQVEZ0SbXM8HTWH3nz_zw4DqTMnZJsf3vigZ0o_IE2VHwsa=s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-4442106056656285096</id><published>2021-05-24T08:23:00.001-07:00</published><updated>2021-05-24T08:24:59.084-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Container"/><category scheme="http://www.blogger.com/atom/ns#" term="Docker"/><category scheme="http://www.blogger.com/atom/ns#" term="Security"/><title type='text'>Data Persistence Models in Docker Containers</title><content type='html'>&lt;p&gt;A container has different layers starting with &lt;b&gt;Minimal Subset of OS&lt;/b&gt; topped by &lt;b&gt;Container Filesystem&lt;/b&gt; topped by &lt;b&gt;Application layer &lt;/b&gt;topped by &lt;b&gt;Hosting layer. &lt;/b&gt;All these layers are read-only.&lt;/p&gt;&lt;p&gt;There is a top layer called &lt;b&gt;Container&amp;nbsp;Runtime layer &lt;/b&gt;which will be in a Read/Write state.&amp;nbsp;&lt;/p&gt;&lt;p&gt;The data on &lt;b&gt;Container&lt;/b&gt;&amp;nbsp;&lt;b&gt;Runtime&lt;/b&gt; layer is persistent only when the container is stopped/started . If a continer is deleted, this data will be lost forever. Also this data is isolated only to that continer and cannot be shared with other containers.&lt;/p&gt;&lt;p&gt;So lets look at better data persistance models to share data between different containers on a Host.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8OLU3JsGolyp5tMjzfR1pSX9jhUqprbcxUrf5cu4NHZCuE2jrRfUBM2Hgjf41zyUsChTr24AuWNOShXoYI_4hCTAUQCk7OFswE4G6j6rSw0FyT4P3FPG2GZSm5rjCp6R-9JcIsC60Z3w/s1108/1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;534&quot; data-original-width=&quot;1108&quot; height=&quot;308&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8OLU3JsGolyp5tMjzfR1pSX9jhUqprbcxUrf5cu4NHZCuE2jrRfUBM2Hgjf41zyUsChTr24AuWNOShXoYI_4hCTAUQCk7OFswE4G6j6rSw0FyT4P3FPG2GZSm5rjCp6R-9JcIsC60Z3w/w640-h308/1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Volume&lt;/span&gt;&lt;/b&gt; and &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;Bind Mount&lt;/b&gt;&lt;/span&gt; are two ways of persistent data storage thats avilable on a Host, which can be accessed (read/write) by multiple containers.&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Volume&lt;/span&gt;&lt;/b&gt; is the storage created and managed by Docker. This means no containers can go beyond the boundaries of docker while working with volumes.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;Bind Mount&lt;/b&gt;&lt;/span&gt; is the storage directly from file system of the host file. So if there is a malicious code deployed in a container, it can break the host by manipulating the host filesystem.&lt;/p&gt;&lt;p&gt;By now looking at color coding you should have understood that Volume is a better/safer way of storing and sharing data between containers. Let me show you by a demonstration.&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;For below demonstration, i have Docker Desktop, Windows Subsystem for Linux 2.0, Ubuntu 18.04 LTS installed on my dev machine.&lt;/p&gt;&lt;p&gt;This will enable my windows machine to run a Linux machine which i will be using as a host.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: #38761d; font-size: large;&quot;&gt;&lt;i&gt;Lets work with Volume first&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Let me open the Linux server and check the docker version first.&lt;/p&gt;&lt;p&gt;Then i will create a volume and i will name it &quot;&lt;b&gt;sharedvolume&lt;/b&gt;&quot;. Even if there is no folders at this point, volume will create necessary folders inside docker space.&lt;/p&gt;&lt;p&gt;Then i will create a linux container named &quot;&lt;b&gt;sender&lt;/b&gt;&quot; with the &lt;b&gt;sharedvolume&lt;/b&gt; mounted as &quot;/app&quot; folder inside container&lt;/p&gt;&lt;pre&gt;docker --version
docker volume create sharedvolume
docker container run -dit --name sender --mount type=volume,source=sharedvolume,target=/app ubuntu&lt;/pre&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVm0u_tYauGuFH9HD4LG1H5ViEExkY6VGF0SM2kWljvuW3tDtpj_U4G-0aiW65dr5YxLTHpitMgP09mZOeR7ESWzqqxbbU0PccpQU80zAXVszFzC2L77KMqOqqXW6TWy2ae3ysSiNFNBI/s1226/2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;348&quot; data-original-width=&quot;1226&quot; height=&quot;182&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVm0u_tYauGuFH9HD4LG1H5ViEExkY6VGF0SM2kWljvuW3tDtpj_U4G-0aiW65dr5YxLTHpitMgP09mZOeR7ESWzqqxbbU0PccpQU80zAXVszFzC2L77KMqOqqXW6TWy2ae3ysSiNFNBI/w640-h182/2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/p&gt;Lets list the running containers with &lt;i&gt;Docker Container ls&lt;/i&gt; command.&lt;div&gt;Make a note of the CONTAINER ID of the sender container.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Lets access the filesystem of the container and from inside the &lt;b&gt;sender&lt;/b&gt; container i will create a text file with intent of storing some data in the volume(/app folder).&lt;/div&gt;&lt;div&gt;&lt;pre&gt;docker attach &amp;lt;starting 4 letters of container id&amp;gt;
cd /app
echo &quot;This is the data i want to share with receiver container&quot;&amp;gt;volumedata.txt
ls
more volumedata.txt
exit&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKrgdO-Gn6_C_95Rt6VuBnq72Vq-XajKHQtvh5TTYoMkKovti72bWQih5l-thI27IvkXLINbOGOLZ037uX8yQVnrfgMXoRRoEdfsY7c7DuI4rUazSOnF5_foY4Sq-eS1OimoO8LdTjMUE/s1220/3.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;561&quot; data-original-width=&quot;1220&quot; height=&quot;294&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKrgdO-Gn6_C_95Rt6VuBnq72Vq-XajKHQtvh5TTYoMkKovti72bWQih5l-thI27IvkXLINbOGOLZ037uX8yQVnrfgMXoRRoEdfsY7c7DuI4rUazSOnF5_foY4Sq-eS1OimoO8LdTjMUE/w640-h294/3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;i&gt;more volumedata.txt&lt;/i&gt; is a command to read the content of that file which is saved inside volume.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now lets create the second linux&amp;nbsp; container named &quot;&lt;b&gt;receiver&lt;/b&gt;&quot; with the same &lt;b&gt;sharedvolume&lt;/b&gt; mounted as &quot;/app&quot; folder inside container. Then access the receiver container&#39;s file system, go to mounted &lt;b&gt;sharedvolume&lt;/b&gt; (/app folder) and see if we can find volumedata.txt file and its content.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;docker container run -dit --name receiver --mount type=volume,source=sharedvolume,target=/app ubuntu
docker container ls
docker attach &amp;lt;first 4 letters of receiver container id&amp;gt;
cd /app
ls
more volumedata.txt&lt;/pre&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBFjbupakwoAlVBye0Pdd2FFQz8G2zNNI9aZRc9PUBd2lrxD2DkMblm9DUl2sYGFtzAaU4YQbsSoFNgWH8ThERsSBMrmJeOdrzw-11iBY-cyorcW1jXp9SZdCI1MAXJ8YVWnfb5JwXqi0/s1215/4.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;404&quot; data-original-width=&quot;1215&quot; height=&quot;212&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBFjbupakwoAlVBye0Pdd2FFQz8G2zNNI9aZRc9PUBd2lrxD2DkMblm9DUl2sYGFtzAaU4YQbsSoFNgWH8ThERsSBMrmJeOdrzw-11iBY-cyorcW1jXp9SZdCI1MAXJ8YVWnfb5JwXqi0/w640-h212/4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;See the data saved from sender container was now accessible in receiver container.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Let me show the best part. If you open explorer on your windows dev machine and go to &quot;\\wsl$\docker-desktop-data\version-pack-data\community\&lt;b&gt;docker&lt;/b&gt;\&lt;b&gt;volumes&lt;/b&gt;\sharedvolume\_data&quot; path, you can see the volumedata.txt file here.&lt;/p&gt;&lt;p&gt;if you look at the path, you can clearly see that this data is created/stored insode the content of Docker.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZTyZHYAn11uOgFCiFDAYa1gma_9z9BSGdj1e1PyUODQA4TKBzLqKxQxX16GbuNJCSp622ktZp_1TDj4nSzDxsb9poCJxymXCdXZNDtleWxGhlqHuhXOluoTfNEfx-3tMBLCeuO_AgmzM/s1675/5.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;294&quot; data-original-width=&quot;1675&quot; height=&quot;112&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZTyZHYAn11uOgFCiFDAYa1gma_9z9BSGdj1e1PyUODQA4TKBzLqKxQxX16GbuNJCSp622ktZp_1TDj4nSzDxsb9poCJxymXCdXZNDtleWxGhlqHuhXOluoTfNEfx-3tMBLCeuO_AgmzM/w640-h112/5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Now lets stop both sender and receiver containers and delete them.&lt;/p&gt;&lt;pre&gt;docker container stop sender receiver
docker container rm sender receiver&lt;/pre&gt;&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;b&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlKhDuT-vk7k8-jNsnnOUNh9sR8Be1l15bDdf1ysulGn1_5vurqfXeT8Htq9OmIXFINl50RwFEt_bixk5O4vkISJp855JLJLgXFrzsYSmudCzq4L2ZliP0UbjBRs3W6TvtaWcw3DxJirg/s1227/6.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;277&quot; data-original-width=&quot;1227&quot; height=&quot;144&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlKhDuT-vk7k8-jNsnnOUNh9sR8Be1l15bDdf1ysulGn1_5vurqfXeT8Htq9OmIXFINl50RwFEt_bixk5O4vkISJp855JLJLgXFrzsYSmudCzq4L2ZliP0UbjBRs3W6TvtaWcw3DxJirg/w640-h144/6.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;i&gt;Lets work with Bind Mount now.&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Unlike Volume, you Bond Mount will not create folders, so you need to use an existing path/folder on your Linux host to store data.&lt;/p&gt;&lt;p&gt;Frist step is to create a folder called &quot;bindstorage&quot;.&lt;/p&gt;&lt;p&gt;Then create the sender container again, but this time with bind-mount as the data storage mapped to /app folder.&lt;/p&gt;&lt;p&gt;The i will access sender container filesystem, create a binddata.txt with some content inside /app folder in the sender container.&lt;/p&gt;&lt;pre&gt;mkdir bindstorage
ls
docker container run -dit --name sender --mount type=bind,source=&quot;$(pwd)&quot;/bindstorage,target=/app ubuntu
docker container ls
docker attach &amp;lt;first 4 letters of sender container&amp;gt;
cd app
echo &quot;this is the data saved in bindmount&quot;&amp;gt;bindmountdata.txt
ls
more bindmountdata.txt
exit&lt;/pre&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS3jyiDAs6WS4iqoKmVKsFuI1NgJSutxwy3N-ie640Jah1eNTek5ThWEkFCpADuYUbRTxRtOLKDba81ekKxeYSglIA03Py4lQgv383xErfevYzsQpRkWJyiFZm_JhG7XxP5fA-kBix2UE/s1353/7.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;525&quot; data-original-width=&quot;1353&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS3jyiDAs6WS4iqoKmVKsFuI1NgJSutxwy3N-ie640Jah1eNTek5ThWEkFCpADuYUbRTxRtOLKDba81ekKxeYSglIA03Py4lQgv383xErfevYzsQpRkWJyiFZm_JhG7XxP5fA-kBix2UE/w640-h248/7.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Now lets create receiver container wiht same bind-mount storage to data sharing.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Then lets see if we can find bindmountdata.txt file and its content.&lt;/p&gt;&lt;pre&gt;docker container run -dit --name receiver --mount type=bind,source=$(pwd)/bindstorage,target=/app ubuntu
docker container ls
docker attach &amp;lt;first 4 letters of receiver container id&amp;gt;
cd app
ls
more bindmountdata.txt
exit&lt;/pre&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpQ6XO8b8xQmsYfgijhSb532ikME-3vZDv4VTm-85_QoimH-KYTrgdyy2-22NiQRa6Wzq_EzQ0oDG8Ek7XN2hGNK9FAHSTnip_gCwj_YoKiu-wBVVAw45lRYpL9mDmYV5tlOPwcUuPI3o/s1355/8.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;383&quot; data-original-width=&quot;1355&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpQ6XO8b8xQmsYfgijhSb532ikME-3vZDv4VTm-85_QoimH-KYTrgdyy2-22NiQRa6Wzq_EzQ0oDG8Ek7XN2hGNK9FAHSTnip_gCwj_YoKiu-wBVVAw45lRYpL9mDmYV5tlOPwcUuPI3o/w640-h180/8.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;The data saved from sender container can now be read in receiver container.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;i&gt;You may have a question &quot;apart from some syntax changes, both seems like same? why is volume is preffered one?&quot;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Let me show the worst part of Bind-Mount storage model.&lt;/p&gt;&lt;p&gt;If you open the file explorer on your windows dev machine, and go to &quot;\\wsl$\Ubuntu-18.04\home\linuxusr\bindstorage&quot; path, you can see the bindmountdata.txt file.&lt;/p&gt;&lt;p&gt;This means the storage used in on the file system of the Hosting machine and with a bit of tweaking, any malicious code in a container can mess-up the Linux host and can break all other containers on that host, even scan for the details of other images and containers on the host.&lt;/p&gt;&lt;p&gt;Check this &lt;a href=&quot;https://blog.aquasec.com/dirty-cow-vulnerability-impact-on-containers&quot; target=&quot;_blank&quot;&gt;dirtyCOW&lt;/a&gt; which is a famous container vulnerability back in the day.&lt;/p&gt;&lt;p&gt;Hope i am helpful to some fellow developers.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/4442106056656285096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2021/05/data-persistence-models-in-docker.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/4442106056656285096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/4442106056656285096'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2021/05/data-persistence-models-in-docker.html' title='Data Persistence Models in Docker Containers'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8OLU3JsGolyp5tMjzfR1pSX9jhUqprbcxUrf5cu4NHZCuE2jrRfUBM2Hgjf41zyUsChTr24AuWNOShXoYI_4hCTAUQCk7OFswE4G6j6rSw0FyT4P3FPG2GZSm5rjCp6R-9JcIsC60Z3w/s72-w640-h308-c/1.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-5666611408927569906</id><published>2021-05-22T21:39:00.000-07:00</published><updated>2021-05-22T21:39:51.778-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><category scheme="http://www.blogger.com/atom/ns#" term="Azure DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Docker"/><category scheme="http://www.blogger.com/atom/ns#" term="Kubernetes"/><title type='text'>Containerize ASP.Net Core app on Azure Kubernetes Cluster</title><content type='html'>&lt;p&gt;In my &lt;a href=&quot;https://pratapreddypilaka.blogspot.com/2021/05/containerizing-aspnet-core-application.html&quot; target=&quot;_blank&quot;&gt;earlier post&lt;/a&gt;, we have deployed ASP.Net Core application to a Container hosted by a Linux Server.&lt;/p&gt;&lt;p&gt;&lt;b&gt;There are some problems with this approach.&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;What if the Host VM is stopped?&lt;/li&gt;&lt;li&gt;What if Container Instance is stopped?&lt;/li&gt;&lt;li&gt;How do we manage the deployment of any app changes?&lt;/li&gt;&lt;li&gt;Even when we stop Host VM, you still be paying for the Disk allocated. How we can avoid that?&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;This is where Azure Kubernetes comes into the picture.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Azure Kubernetes provide serverless CI/CD experience which also manages Health, Security, Auto-Scaling, Deployment and Governance aspects. More details can be &lt;a href=&quot;https://azure.microsoft.com/en-us/services/kubernetes-service/&quot; target=&quot;_blank&quot;&gt;found here&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;b&gt;In this article we will be:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Deploy a ASP.Net Core App to a Container&lt;/li&gt;&lt;li&gt;Create a Container Image from .Net Core Container&lt;/li&gt;&lt;li&gt;Push the Image to Azure Container Registry&lt;/li&gt;&lt;li&gt;Use Kubernetes to Pull that image and create mutliple instances of the container in Kubernete Pods.&lt;/li&gt;&lt;li&gt;Expose the .Net Core App via Azure Load-Balancer.&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit2JoFcilIZTzHwErhYLlXBeyt6wX5PyG2R6gaScDns22Uo-KKyUeO4-TvDYRYftLZg0rCqg_8ZnzChGs1KxF6cwSbnlpqCexvWqiNYI21I3o9GvhrQwRlAuduaXzcxug1jwhIYS_FIeM/s1044/4.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;617&quot; data-original-width=&quot;1044&quot; height=&quot;378&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit2JoFcilIZTzHwErhYLlXBeyt6wX5PyG2R6gaScDns22Uo-KKyUeO4-TvDYRYftLZg0rCqg_8ZnzChGs1KxF6cwSbnlpqCexvWqiNYI21I3o9GvhrQwRlAuduaXzcxug1jwhIYS_FIeM/w640-h378/4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;Step 1: Create a ASP.Net Core Web App.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;I named it &quot;&lt;b&gt;DemoContainerApp&lt;/b&gt;&quot;.&amp;nbsp;&lt;/div&gt;&lt;div&gt;Since we need to containerize and generate an image of that container with out provisioning a Host, you need to select Docker support while selecting additional properties.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXkJQiJ6C5WHznNDfDXi-2LEUANVU8YCPHJiSn2rnqE7IFLEUM-soiWSrKCLZWStVDvvyfJ6_lJnn1KZ4O-_Oa6eWVa3ZQbJYYe7SBrvjM9A_12yaLJdtHeb7_4154p2my9oVfuNYLs-o/s987/5.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;679&quot; data-original-width=&quot;987&quot; height=&quot;275&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXkJQiJ6C5WHznNDfDXi-2LEUANVU8YCPHJiSn2rnqE7IFLEUM-soiWSrKCLZWStVDvvyfJ6_lJnn1KZ4O-_Oa6eWVa3ZQbJYYe7SBrvjM9A_12yaLJdtHeb7_4154p2my9oVfuNYLs-o/w400-h275/5.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;This may ask you to download &quot;Docker Desktop&quot; and &quot;WSL 2.0 for Linux&quot;. Do it.&lt;/div&gt;&lt;div&gt;Now you have your ASP.Net Core App created and try running on IIS Express.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvpDrmcdpVES3va4RxZ2OciPsmRsjzyYLjv_nqlOON9fg2AqGFq-MXvAuCaDLg_v1uuL34uk_KdFCtw0YzAptCmbu7FJdHvDHzsjIw0Q6IDqagszk4cr2gXvmi3MF5LjY901vZKu2JKn4/s1310/6.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;470&quot; data-original-width=&quot;1310&quot; height=&quot;230&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvpDrmcdpVES3va4RxZ2OciPsmRsjzyYLjv_nqlOON9fg2AqGFq-MXvAuCaDLg_v1uuL34uk_KdFCtw0YzAptCmbu7FJdHvDHzsjIw0Q6IDqagszk4cr2gXvmi3MF5LjY901vZKu2JKn4/w640-h230/6.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;Step 2: Creating Container Registry&lt;/b&gt;&lt;br /&gt;&lt;div&gt;Go to Azure Portal, start by creating a Resource group for Container Registry. I named it &quot;ContainerRegistryRG&quot;.&amp;nbsp; Now search for &quot;Container Registry&quot; and create new one.&lt;/div&gt;&lt;div&gt;I have created a Container Registry named &quot;MyAppRegistry247&quot;.&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDTdymATe7Iw-F3hV4hxHFjhKVXD9E9kaslSFo_kUwb2tQzbHXzbBT88Ffnf0c8v94MKiUnlqOm1eOfE7TyNJ7WvdD9lGMrbmNB3aAuMuKADbj_i__XVwqR0394k9v-838eEvOsETZze8/s1396/7.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;501&quot; data-original-width=&quot;1396&quot; height=&quot;230&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDTdymATe7Iw-F3hV4hxHFjhKVXD9E9kaslSFo_kUwb2tQzbHXzbBT88Ffnf0c8v94MKiUnlqOm1eOfE7TyNJ7WvdD9lGMrbmNB3aAuMuKADbj_i__XVwqR0394k9v-838eEvOsETZze8/w640-h230/7.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Step 3: Deploy Container Image to Azure Container Registry&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;div&gt;We will use the capabilities of Visual studio combined with Docker Desktop to create a Container hosting our App then extract an image of of that container and push it to ACR.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now right click on the solution and select Publish, and select the Azure Container Registry you created in Step 2.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQbSWt2he1MbH7cywCd26wbHX4ELDWRmi8RPavzwDx8gnkfCmAKP-bxQvYsK1LtExNd7Zm86NHV-JQhP0QN7smnQkHEu5d-TtjL-WRYXwWX5a96eAMD257fRoUPswIBWOlKMAbcR44JzY/s1193/8.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1086&quot; data-original-width=&quot;1193&quot; height=&quot;582&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQbSWt2he1MbH7cywCd26wbHX4ELDWRmi8RPavzwDx8gnkfCmAKP-bxQvYsK1LtExNd7Zm86NHV-JQhP0QN7smnQkHEu5d-TtjL-WRYXwWX5a96eAMD257fRoUPswIBWOlKMAbcR44JzY/w640-h582/8.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Now publish the Application. This will do the following:&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Deploy the current .Net Core Web App, to a Docker Container Using Docker Desktop.&lt;/li&gt;&lt;li&gt;Extract the Image of that said container and push it to Azure Container Registry&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;To verify this, open the Docker Desktop and click on Images and you will see bot of the images.&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuQlNLYaMANSJtEwT4qBCocAip6FJKQFlsx9OMYAoRf8YM6w_ZU3KXA-bDqL2xyGZTbDhUuwAT3o6aW6nx_VXpJ84at_GeTZPAo8zwJQnZWdxh_zGtz3A2fSdk2ffSG7nWHJdyY0Zj2IM/s1667/9.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;614&quot; data-original-width=&quot;1667&quot; height=&quot;236&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuQlNLYaMANSJtEwT4qBCocAip6FJKQFlsx9OMYAoRf8YM6w_ZU3KXA-bDqL2xyGZTbDhUuwAT3o6aW6nx_VXpJ84at_GeTZPAo8zwJQnZWdxh_zGtz3A2fSdk2ffSG7nWHJdyY0Zj2IM/w640-h236/9.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Now open Azure portal and search for Container Registry and open &quot;&lt;b&gt;MyAppRegistry247&lt;/b&gt;&quot;. Go to &quot;&lt;b&gt;Respositories&lt;/b&gt;&quot;, you should see the container image for democontainerapp.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQZU1odvoJbcGtxfwUvFLD-mlcGRQ0K6Zsh1VB5CTeRUkLjTFMeEn3Pg3kPxFwelDQR6tNlEcN1KbC3NBN4HkhOm3HX6LehWdyIr91ATvzjahhvLvwBqxZtrgAgFuQRdTV_2-YN0M1uTU/s1765/10.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;947&quot; data-original-width=&quot;1765&quot; height=&quot;344&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQZU1odvoJbcGtxfwUvFLD-mlcGRQ0K6Zsh1VB5CTeRUkLjTFMeEn3Pg3kPxFwelDQR6tNlEcN1KbC3NBN4HkhOm3HX6LehWdyIr91ATvzjahhvLvwBqxZtrgAgFuQRdTV_2-YN0M1uTU/w640-h344/10.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 4: Create Azure Kubernetes Service Cluster&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Lets start by creating Resource Group for AKS. I named it &quot;aksRG&quot;.&lt;/div&gt;&lt;div&gt;Before you create Kubernetes cluster , you need to understand about &lt;b&gt;Service Principal&lt;/b&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To simply put, &lt;b&gt;Service Principal&lt;/b&gt; is the AAD credentials used by Kubernetes to interact with Container Registry to pull the container image to create instances of it in kubernete pods.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you havent dealth with next step properly, you may end up with some errors like below.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: #fcff01;&quot;&gt;&lt;span face=&quot;-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;&quot; style=&quot;color: #24292e; font-size: 14px;&quot;&gt;&lt;i&gt;&quot;Cannot find user or service principal in graph database for &#39;msi&#39;. If the assignee is an appId, make sure the corresponding service principal is created with &#39;az ad sp create --id msi&#39;&quot;&lt;/i&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Execute below code to create a new Service Principal that can be used for Kubernetes interaction with ACR.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;az ad sp create-for-rbac --skip-assignment --name demoAKSClusterServicePrincipal&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;This will generate Service principal with all the details displayed like below.&amp;nbsp;&lt;/div&gt;&lt;div&gt;Copy&lt;b&gt; appId&lt;/b&gt; and &lt;b&gt;password&amp;nbsp;&lt;/b&gt;(client secret) for creating Kubernetes Cluster.&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitiWviUDlX5wQcNmqbry4CaBazAvAi6OBpEfCqmC1UgnsOrUE2xZe7pbN0X85jnEXPJz0KbgpV-f3lzncJdHxrctrIOKihPm8SnOg4Fb9v9ofKae8tCy9b73GW08KV77B5P8-2C5jmqRY/s1354/3.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;331&quot; data-original-width=&quot;1354&quot; height=&quot;156&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitiWviUDlX5wQcNmqbry4CaBazAvAi6OBpEfCqmC1UgnsOrUE2xZe7pbN0X85jnEXPJz0KbgpV-f3lzncJdHxrctrIOKihPm8SnOg4Fb9v9ofKae8tCy9b73GW08KV77B5P8-2C5jmqRY/w640-h156/3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Execute below commands&lt;/div&gt;&lt;div&gt;&lt;pre&gt;#Creating Kubernetes Cluster with Service principal association
az aks create --resource-group aksRG --name &lt;span style=&quot;background-color: #fcff01;&quot;&gt;demo-aks-cluster&lt;/span&gt; --node-count 1 --enable-addons monitoring --service-principal &lt;appid&gt; --client-secret &lt;password&gt;
#Install Kubernetes command tools
az aks install-cli --install-location=./kubectl
#Update the Kubernetes config with the service principal details
az aks get-credentials --resource-group aksRG --name demo-aks-cluster &lt;/password&gt;&lt;/appid&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;With above commands AKS Cluster is ready, but nothing has been deployed yet.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 5: Run Kubectl commands to create Container intances load balanced.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;There are two parts to hosting containers on Kubernetes pods. &lt;b&gt;App&lt;/b&gt; &amp;amp; &lt;b&gt;Service&lt;/b&gt;&lt;/div&gt;&lt;div&gt;If you open AKS Cluster we created in step 4, you will see options &quot;WorkLoad&quot; and &quot;Services&quot; in left pane.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir8xrKLK6K-dXFX6rjcztgyzXXm9_aPKm16qkaZ6BZ6eLKofhUH-ewla3OaLGChKnoDoEO6Ixhmnj8prp50K3KmcCsnG284vqUYw6KM3Jncj-LMyoIReJ_GQcVT-7PiJlOHH25MWmesCY/s406/11.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;253&quot; data-original-width=&quot;406&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir8xrKLK6K-dXFX6rjcztgyzXXm9_aPKm16qkaZ6BZ6eLKofhUH-ewla3OaLGChKnoDoEO6Ixhmnj8prp50K3KmcCsnG284vqUYw6KM3Jncj-LMyoIReJ_GQcVT-7PiJlOHH25MWmesCY/s320/11.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Workloads&lt;/b&gt;&amp;nbsp;is defined by &lt;b&gt;app.yml &lt;/b&gt;file which will have details of container image details and number of Pods you want to host the containers.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Services and Ingresses&lt;/b&gt; is defined by &lt;b&gt;service.yml&lt;/b&gt; file have details of which workload should be hosted on what port.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Create 2 files app.yml and service.yml with below content.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;u&gt;&lt;b&gt;app.yml Content&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;apiVersion: apps/v1
kind: Deployment
metadata:
  name: democontainerapp-deployment
spec:
  replicas: 2
  selector:
    matchLabels:
      app: democontainerapp
  template:
    metadata:
      labels:
        app: democontainerapp
    spec:
      containers:
      - name: democontainerapp
        image: myappregistry247.azurecr.io/democontainerapp
        ports:
        - containerPort: 5000&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;service.yml Content&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;apiVersion: v1
kind: Service
metadata:
  name: democontainerapp-service
spec:
  type: LoadBalancer
  ports:
  - port: 80
  selector:
    app: democontainerapp&lt;/pre&gt;Open Azure Portal, open Azure Cloud Shell.&lt;/div&gt;&lt;div&gt;Upload both the app.yml and service.yml files.&lt;/div&gt;&lt;div&gt;Run below command to get the ClientID from the service principal associated to Kubernetes Cluster and create a Role based access to Container Registry so that container images can be accessed by AKS.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;$AKS_RESOURCE_GROUP=&quot;aksRG&quot;
$AKS_CLUSTER_NAME=&quot;demo-aks-cluster&quot;
$ACR_RESOURCE_GROUP=&quot;ContainerRegistryRG&quot;
$ACR_NAME=&quot;myappregistry247&quot;


$CLIENT_ID=$(az aks show --resource-group $AKS_RESOURCE_GROUP --name $AKS_CLUSTER_NAME --query &quot;servicePrincipalProfile.clientId&quot; --output tsv)
$ACR_ID=$(az acr show --name $ACR_NAME --resource-group $ACR_RESOURCE_GROUP --query &quot;id&quot; --output tsv)
az role assignment create --assignee $CLIENT_ID --role acrpull --scope $ACR_ID&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;Now run below kubectl commands to create both workloads and services using app.yml and service.yml file we uploaded earlier.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;#Create workloads
kubectl apply -f app.yml
#Create service and ingress rules with ports and loadbalancers
kubectl apply -f service.yml
#Bring the External IP address of load balancers for the pods hosting containers
kubectl get service democontainerapp-service --watch&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS2LxUhXtIgJ4FXFazGGuxKF7xUjJO9Mx2nmzXyq-HVDJABKIY7JJJZT7o5qK56p2X2J2uJX_uIEWdooPSmAZVxYHEa-KJ9bCisR-89uHKrYbj2s9GU9iW7XkIj7KHTVEAmjfBK-d80cE/s1226/13.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;337&quot; data-original-width=&quot;1226&quot; height=&quot;176&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS2LxUhXtIgJ4FXFazGGuxKF7xUjJO9Mx2nmzXyq-HVDJABKIY7JJJZT7o5qK56p2X2J2uJX_uIEWdooPSmAZVxYHEa-KJ9bCisR-89uHKrYbj2s9GU9iW7XkIj7KHTVEAmjfBK-d80cE/w640-h176/13.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Now go to said workloads and Services and Ingresses in Kubernetes Cluster and see them for yourself.&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Workloads&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAuCQA8C2d3c5fjTUvZm8RNZKZ0GE2jzOsh13EfwSx2DGWJlwDZoBdyKe9HfexqQMeFhbDSpg6SjVyMwpi82HF7GSbbSeaCSZnF5ODX19imSGyqC4JVxdTKKnVYzMJuy0nraBy4PTGAXw/s2175/14.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;404&quot; data-original-width=&quot;2175&quot; height=&quot;118&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAuCQA8C2d3c5fjTUvZm8RNZKZ0GE2jzOsh13EfwSx2DGWJlwDZoBdyKe9HfexqQMeFhbDSpg6SjVyMwpi82HF7GSbbSeaCSZnF5ODX19imSGyqC4JVxdTKKnVYzMJuy0nraBy4PTGAXw/w640-h118/14.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Services and Ingresses&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHdLjToEreWyaFe_yhZ127ZienIb8VY9xvFvREZbv6d8iSGV6I8jHCWIlUsN94rvkMSzqT6kA65dnKW08cadia7N-jQ-2F4Po5kJs1Et0FrKGLuKAOwa6hcXJjeLM3wsx98O5qmUeUA9Y/s2180/15.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;408&quot; data-original-width=&quot;2180&quot; height=&quot;120&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHdLjToEreWyaFe_yhZ127ZienIb8VY9xvFvREZbv6d8iSGV6I8jHCWIlUsN94rvkMSzqT6kA65dnKW08cadia7N-jQ-2F4Po5kJs1Et0FrKGLuKAOwa6hcXJjeLM3wsx98O5qmUeUA9Y/w640-h120/15.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Copy the External IP with port in a browser and now you can access ASP.Net core hosted in a container on Kubernetes Cluster.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6H_PS2J7slzZGBUqFvgjNIy5E7f_nLtkfOzAAWpinZ_v2ZAxhhXaKqH-XUWmK4SKymRFHX9ZzLbwOXcKNMwLFxD3aiZiAWXjv4n2fAOVvdl7nr_Yab0vw4suInzwkdkjtwo3-VgoBsxc/s1972/16.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;427&quot; data-original-width=&quot;1972&quot; height=&quot;138&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6H_PS2J7slzZGBUqFvgjNIy5E7f_nLtkfOzAAWpinZ_v2ZAxhhXaKqH-XUWmK4SKymRFHX9ZzLbwOXcKNMwLFxD3aiZiAWXjv4n2fAOVvdl7nr_Yab0vw4suInzwkdkjtwo3-VgoBsxc/w640-h138/16.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;In next article, we will automate the code deployment and Rolling deployments in Kubernetes using Azure DevOps Pipeline.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Hope i am helpful to fellow developers.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/5666611408927569906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2021/05/containerize-aspnet-core-app-on-azure.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/5666611408927569906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/5666611408927569906'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2021/05/containerize-aspnet-core-app-on-azure.html' title='Containerize ASP.Net Core app on Azure Kubernetes Cluster'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit2JoFcilIZTzHwErhYLlXBeyt6wX5PyG2R6gaScDns22Uo-KKyUeO4-TvDYRYftLZg0rCqg_8ZnzChGs1KxF6cwSbnlpqCexvWqiNYI21I3o9GvhrQwRlAuduaXzcxug1jwhIYS_FIeM/s72-w640-h378-c/4.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-2821147633309626296</id><published>2021-05-09T21:04:00.002-07:00</published><updated>2021-05-22T03:59:59.986-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Docker"/><title type='text'>Containerizing ASP.Net Core Application on a Linux Host</title><content type='html'>In this article we will see how to deploy a ASP.Net Core 3.1 Webapplication to a container hosted on a Linux Host.&lt;div&gt;Beofore we jump into implementation, we need to look at every component and know what it does.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-MGrZeKY4PCl9j1V89L-PCwhZ8FLKgsfWNK7ZxMG5rooFDq8GxIstWyRfNPtVQHPT3jn-6qt3c-qkzvhEMKgJB29CbNYbrwH2Iqin0ejYygW3b2dgnn6USP6oYKffrL3dY5EAeC3nDqc/s1177/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;615&quot; data-original-width=&quot;1177&quot; height=&quot;334&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-MGrZeKY4PCl9j1V89L-PCwhZ8FLKgsfWNK7ZxMG5rooFDq8GxIstWyRfNPtVQHPT3jn-6qt3c-qkzvhEMKgJB29CbNYbrwH2Iqin0ejYygW3b2dgnn6USP6oYKffrL3dY5EAeC3nDqc/w640-h334/1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. &lt;b&gt;Host&lt;/b&gt;: This can be a Linux or Windows server. Considering Linux servers have used from long time for contanerization, i picked it. But Windows is very close choice considering all the capabilities it acquired in last 2 years.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. &lt;b&gt;Docker:&lt;/b&gt;&amp;nbsp;It is the engine we use to host our containers. It will package the application with its dependecies and run them in isolated containers on the host.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3 &lt;b&gt;Reverse Proxy Server&lt;/b&gt;: This will be sitting behind the firewall and redirects the user requests to appropriate apps/containers. This will provide extra layer of abstraction and reduces the public exposure of the containers.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4. &lt;b&gt;Kestrel Web Server&lt;/b&gt;: When you install a .Net Core SDK, it will internally create a webserver to act as a backend server for the .Net Application. Proxy server will be sending the client calls to Kestrel Web server and responds back with the output from .Net App.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;5. &lt;b&gt;App&lt;/b&gt;: .Net Core Application we deploy to be containerized.&amp;nbsp;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;div&gt;Lets begin the implemntation.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step1: Provisioning the Host&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Its recommended that you start using Azure Key Vault for storing the Admin credentials, SSH keys and&lt;/div&gt;&lt;div&gt;Certficate Private keys. So i have my Linux Admin password in Key valut.&lt;/div&gt;&lt;div&gt;I am creating a Linux server using below CLI commands.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;$psw=az keyvault secret show --vault-name AdminCreds  -n MyLinuxAdminPSW --query value

az vm create -g LinContainerRG -n LinuxHost --image UbuntuLTS --admin-username linuxadminuser --admin-password $psw&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;Once the Host is created, go to the virtual machine in zure portal, go to Networking and open Port 80 for TCP connections.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 2: Install Docker on the Host&lt;/b&gt;&lt;/div&gt;&lt;div&gt;For this we need Putty to connect to our linux host. Download it from &lt;a href=&quot;https://www.putty.org/&quot; target=&quot;_blank&quot;&gt;this link&lt;/a&gt;, and install.&lt;/div&gt;&lt;div&gt;Go to Azure portal and copy the Public IP of the host. Open a new session connection to the host using Putty. You need Public IP of the host for this.&amp;nbsp;&lt;/div&gt;&lt;div&gt;Once you try to open the session, it will prompt you for credentials, use the admin credentials for now.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWubvj9iVjz89NpUNBH4WGAOuHrFmqtFC1kn1J1S0FzYLWFaxcGIAQURMmPBrMpDbJmNx4bP8KJReNohxJy3Lceca96nSxmXl7XzpUS3PDGXXWUPl6OPIEdwl7OlxiXjXvkPoL0nzenZo/s864/2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;634&quot; data-original-width=&quot;864&quot; height=&quot;294&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWubvj9iVjz89NpUNBH4WGAOuHrFmqtFC1kn1J1S0FzYLWFaxcGIAQURMmPBrMpDbJmNx4bP8KJReNohxJy3Lceca96nSxmXl7XzpUS3PDGXXWUPl6OPIEdwl7OlxiXjXvkPoL0nzenZo/w400-h294/2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Run below commands one by one to install Docker engine on your host.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository &quot;deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable&quot;
sudo apt update
sudo apt install docker-ce&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;Now we got docker installed on our host.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 3: Setup Reverse Proxy Server&lt;/b&gt;&lt;/div&gt;&lt;div&gt;A proxy server is a machine with its own IP, which makes web requests on behalf of other machines/users. These can provide badwidth, privacy and additional layer of sceurity.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are two types of proxy servers, below picture speaks volumnes about it.&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8-kyD4SaspUvthyphenhyphenJ9cET5Fsi5zk9UioZWnBe4_yUvHZd7TErvA4_8Rk6T6_EUcsga9YfSgatqdd055bUsmGZRVEkMM7ehyphenhyphenPyNDRlU37FmzmRTiSd8rGg0zANSzrv6jsejwJ2UZ3eBwno/s1323/3.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;794&quot; data-original-width=&quot;1323&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8-kyD4SaspUvthyphenhyphenJ9cET5Fsi5zk9UioZWnBe4_yUvHZd7TErvA4_8Rk6T6_EUcsga9YfSgatqdd055bUsmGZRVEkMM7ehyphenhyphenPyNDRlU37FmzmRTiSd8rGg0zANSzrv6jsejwJ2UZ3eBwno/w400-h240/3.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;Now you know whay we are using Reverse Proxy server infront of our containers.&lt;/div&gt;&lt;div&gt;You can use IIS Express, Apache or NGINX as a proxy server.&amp;nbsp;&lt;/div&gt;&lt;div&gt;We will setup the proxy server on Host, by executing below commands.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;sudo docker pull nginx:1.17.0
sudo docker images
sudo apt-get install nginx
sudo apt update&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;At this point if you try to broswe for http://PublicIP of your LinuxHost, this is what you see.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8rNqNGLvezxCkTEOVqLCQuIzdGHUcfYpQ5ztq5fkOYJsQFHnrbTQu_UDlL6Bcf-Ynks4pz75J3vIAWJ7DmEnAEdYsrQknh2jve06Co5Btg9vSgGXATu08azxixQM0vFSSwuo_tGAGC5s/s1352/9.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;461&quot; data-original-width=&quot;1352&quot; height=&quot;218&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8rNqNGLvezxCkTEOVqLCQuIzdGHUcfYpQ5ztq5fkOYJsQFHnrbTQu_UDlL6Bcf-Ynks4pz75J3vIAWJ7DmEnAEdYsrQknh2jve06Co5Btg9vSgGXATu08azxixQM0vFSSwuo_tGAGC5s/w640-h218/9.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;Step 4: Create .Net Core Application&lt;/b&gt;&lt;/div&gt;&lt;div&gt;We are now creating a basic Asp.Net Core webapplication. Go to Visual Studio 2019 and create a &quot;ASP.Net Core Web Application&quot;. Framework as .Net Core 3.1&lt;/div&gt;&lt;div&gt;I call it &quot;DemoCoreApp&quot;.&lt;/div&gt;&lt;div&gt;There are 2 small changes you need to do in code.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;1.&lt;/b&gt; Go to Startup.cs and replace this line &quot;app.UseHttpsRedirection();&quot; with below code.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;app.UseForwardedHeaders(new ForwardedHeadersOptions
	{
		ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
	});&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;As our core app will not be receiing call in ragulat client server fasion (http), it has to use Forward headers to identify protocal and IP details of the client. The above lines of code will take care of it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;2.&lt;/b&gt; Go to solution and add a file with name &quot;Dockerfile&quot; without any extention. Add below code to it.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;FROM mcr.microsoft.com/dotnet/core/sdk:3.1
WORKDIR /app
COPY  . .
ENV ASPNETCORE_URLS http://*:5000
EXPOSE 5000
ENTRYPOINT [&quot;dotnet&quot;, &quot;DemoCoreApp.dll&quot;]&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;I will explain every line of this code in following step.&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;Right click on the Docketfile and go to properties, chnage Copy to Output Directory to &quot;Copy always&quot;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSSDgqxNBhWuQ6xbYlSmAk_wVZZ0Nw3KV1Dlmd83Hv_Zb3I8a7lmCaXBkutEsaDo0ck0b_zr2erDnUV2ImJGjAfmjdpdOUX8IWX6csDRrbRBfXptOhnU1WHksMMbqhOR5c5IKr4hE0Jn4/s530/4.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;348&quot; data-original-width=&quot;530&quot; height=&quot;263&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSSDgqxNBhWuQ6xbYlSmAk_wVZZ0Nw3KV1Dlmd83Hv_Zb3I8a7lmCaXBkutEsaDo0ck0b_zr2erDnUV2ImJGjAfmjdpdOUX8IWX6csDRrbRBfXptOhnU1WHksMMbqhOR5c5IKr4hE0Jn4/w400-h263/4.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;Now build the project and Publish to a Folder, the published content will be in &quot;\bin\Release\netcoreapp3.1/Publish&quot; folder. Check that Dockerfile is copied to Publish folder.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 5: Transfer the Published content o Host&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Download &quot;WinSCP&quot; from this &lt;a href=&quot;https://winscp.net/eng/download.php&quot; target=&quot;_blank&quot;&gt;link&lt;/a&gt;. Install it and open WinSCP to transfer publish folder to Host.&lt;/div&gt;&lt;div&gt;Connect the Host using the PublicIP address and the user credentials.&lt;/div&gt;&lt;div&gt;Left side shows the local files and right side shows the Azure host&#39;s file system.&lt;/div&gt;&lt;div&gt;Navigate to &quot;\bin\Release\netcoreapp3.1/&quot; on left side and make sure you opened &quot;/home/Username&quot; directory on your host.&lt;/div&gt;&lt;div&gt;Now Drag and drop the publish folder.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_1JWBbown1rORNNQBoyvfvZvLXYj4iedFZOdZ6emANpLsVyOUtSrdzF8SCmWOFrUCixUL5bVePrayOrIrcUleHbAmGXiEtq86jDtc7to8j20nctZxnNHct5NYKZpd6GdkT03eh8y0U7s/s1507/5.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;766&quot; data-original-width=&quot;1507&quot; height=&quot;326&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_1JWBbown1rORNNQBoyvfvZvLXYj4iedFZOdZ6emANpLsVyOUtSrdzF8SCmWOFrUCixUL5bVePrayOrIrcUleHbAmGXiEtq86jDtc7to8j20nctZxnNHct5NYKZpd6GdkT03eh8y0U7s/w640-h326/5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Now go back to your Putty session, and run bwlow code.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;cd /etc/nginx/sites-available
sudo chmod 667 default&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;This will grant you edit access to dafult NGINX routing file.&lt;/div&gt;&lt;div&gt;Remeber we taked about reverse proxy where the proxy server routes the calls to containers based on certain conditions. Now we are going to write those conditions in that default file.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Open WinSCP tool and now navigate to /etc/nginx/sites-available/ and edit the default file.&lt;/div&gt;&lt;div&gt;Paste below content replacing the line &quot;try_files $uri $uri/ =404;&quot;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;proxy_pass http://localhost:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;This will take care of forwarding our calls to the .Net Core container.&lt;/div&gt;&lt;div&gt;Save and close it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now go back to Putty session and run below command.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;sudo nginx -s reload&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;In some cases you might get an error while reloading NGINX, saying&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;nginx: [error] open() &quot;/run/nginx.pid&quot; failed (2: No such file or directory)&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are many fixes on google for this which suites for PROD environment, where you cannot afford to restart. But here i can. So lets go to Azure portal and restart the Linux Host.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now connect to Host using Putty and run above command.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 6: Setting up container for .Netcore App&lt;/b&gt;&lt;/div&gt;&lt;div&gt;As i promised earlier, lets have a look at the commands in docker file which we embedded in app.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkfBSq0U1AhyphenhyphengLJHwFVz6dZkY-9Ipdbvhgi7FG554lD1cF-QUdhrr4xSqAzwgezWzLJrn6HusnfMBuu4GNwG6sfj7VGFg_VwVYgTkzZpviUbliYBQrxlMN5rOG9PE-6nvGuTXcY28x-As/s1391/7.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;493&quot; data-original-width=&quot;1391&quot; height=&quot;226&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkfBSq0U1AhyphenhyphengLJHwFVz6dZkY-9Ipdbvhgi7FG554lD1cF-QUdhrr4xSqAzwgezWzLJrn6HusnfMBuu4GNwG6sfj7VGFg_VwVYgTkzZpviUbliYBQrxlMN5rOG9PE-6nvGuTXcY28x-As/w640-h226/7.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;Now go to Putty session and run below commands one after another.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;cd publish
sudo docker build -t democoreapp .
sudo docker run -d -p 5000:5000 democoreapp&lt;/pre&gt;Above command will execute the content from Dockerfile in publish folder and create a container to host .Net Core App on port 5000 in kestrel webserver.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJuEaUNrA9d-nIKEEm376omJjBpdLhc-d7_srgdIUKt-eYgN_Qf2JAnik2sTtCIkRBqU47EyipJdKw8BOqAIca83TjMgnbwbbOI635k7tHHnNFFzpOU21QFW3DxzL_O_cnNt_mWmITC38/s1013/8.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;865&quot; data-original-width=&quot;1013&quot; height=&quot;546&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJuEaUNrA9d-nIKEEm376omJjBpdLhc-d7_srgdIUKt-eYgN_Qf2JAnik2sTtCIkRBqU47EyipJdKw8BOqAIca83TjMgnbwbbOI635k7tHHnNFFzpOU21QFW3DxzL_O_cnNt_mWmITC38/w640-h546/8.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;Now on your dev machine, if you browse for http://PublicIP of your Linux Host, this is what you see.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2KKeCbgAoB-CrxG6SOmju-FUr7czLo0XsD2mw3qIjcbF5NMyyeSrt7SPh3WDRpy0d0yvi7Yl24YyxmkyTSWPD1grjqZbJwg3iDKqMdjXjKnZkYEYzC7zmWW57QTONh22qND-jYveE9Uo/s1391/10.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;430&quot; data-original-width=&quot;1391&quot; height=&quot;198&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2KKeCbgAoB-CrxG6SOmju-FUr7czLo0XsD2mw3qIjcbF5NMyyeSrt7SPh3WDRpy0d0yvi7Yl24YyxmkyTSWPD1grjqZbJwg3iDKqMdjXjKnZkYEYzC7zmWW57QTONh22qND-jYveE9Uo/w640-h198/10.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Now, how do we know that app is running from container and not from Host itself?&lt;/div&gt;&lt;div&gt;Run below command to see list of containers running.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;sudo docker ps&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT9jGDUjiVHBtlrPaxrixos-vtArmQGKWesrXD3E8dqawxQFOX7N579zbDPtoPiLlcYKp9le5j073NwmtFou0sjSOwNWF0GntSTFfAT6sgo2NSZ-5oKbLxTO-JXN3m28nqaGD-kwGsWOA/s1759/11.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;229&quot; data-original-width=&quot;1759&quot; height=&quot;84&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT9jGDUjiVHBtlrPaxrixos-vtArmQGKWesrXD3E8dqawxQFOX7N579zbDPtoPiLlcYKp9le5j073NwmtFou0sjSOwNWF0GntSTFfAT6sgo2NSZ-5oKbLxTO-JXN3m28nqaGD-kwGsWOA/w640-h84/11.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;This will show all the containers running, and we can stop the container by running below command.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;sudo docker stop XXX&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;XXX being the first 3 digits of CONTAINER ID, highlighted in above screenshot.&lt;/div&gt;&lt;div&gt;Now the container is stopped , and try accessing the app now.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfR-RHZPVHUNQWLXpeaZEHDie4VgRR-QqxO1Y5QJ_4iV423ZNyUmc8cELoWhdJhg6HRpGDZQwF_DDRbPwGebswfxtpGP9xXDCAiosAkZnSdJodPnZR3d7OBLYt2uVvtnxcp6ypBv8jgM8/s1270/12.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;389&quot; data-original-width=&quot;1270&quot; height=&quot;196&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfR-RHZPVHUNQWLXpeaZEHDie4VgRR-QqxO1Y5QJ_4iV423ZNyUmc8cELoWhdJhg6HRpGDZQwF_DDRbPwGebswfxtpGP9xXDCAiosAkZnSdJodPnZR3d7OBLYt2uVvtnxcp6ypBv8jgM8/w640-h196/12.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Now we know that App is hosted in its own container on a Linux Host.&lt;/div&gt;&lt;div&gt;Lets start it back,&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;pre&gt;sudo docker run -d -p 5000:5000 democoreapp&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;Its back online.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdjuaU1cnSaKEFOQ0OYYe8_TrwLfSujt6XlrdX24u3AYQMZYXH0Mg2s5Y4YYCR4xzF7_7lqh_elRYXC7ECWAI_uByp-MEg8UfUOLvkLl2ixUawGGNrCmRE4oGew7Jlhn0tNCjrM-mbv6M/s1160/1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;601&quot; data-original-width=&quot;1160&quot; height=&quot;332&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdjuaU1cnSaKEFOQ0OYYe8_TrwLfSujt6XlrdX24u3AYQMZYXH0Mg2s5Y4YYCR4xzF7_7lqh_elRYXC7ECWAI_uByp-MEg8UfUOLvkLl2ixUawGGNrCmRE4oGew7Jlhn0tNCjrM-mbv6M/w640-h332/1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;We have sucesfully deployed .Net Core App in a container on a Linux Host</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/2821147633309626296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2021/05/containerizing-aspnet-core-application.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/2821147633309626296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/2821147633309626296'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2021/05/containerizing-aspnet-core-application.html' title='Containerizing ASP.Net Core Application on a Linux Host'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-MGrZeKY4PCl9j1V89L-PCwhZ8FLKgsfWNK7ZxMG5rooFDq8GxIstWyRfNPtVQHPT3jn-6qt3c-qkzvhEMKgJB29CbNYbrwH2Iqin0ejYygW3b2dgnn6USP6oYKffrL3dY5EAeC3nDqc/s72-w640-h334-c/1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-2329287446459421669</id><published>2021-05-05T18:57:00.004-07:00</published><updated>2025-01-16T12:19:10.079-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><category scheme="http://www.blogger.com/atom/ns#" term="ServiceBus"/><title type='text'>Azure Service Bus - Queues and Topics - Part 2</title><content type='html'>&lt;p&gt;&lt;b&gt;Use Case:&lt;/b&gt;&amp;nbsp;Organization X has a large-scale distributed serverless application environment. There are some azure components that sends a private messages which need to be accessed only once by other components using RoleBasedAccessControls. There are some messages that need to Fan-Out(one-to-many) to large number of systems, where sender doesnt need to know the receiver&#39;s details. The message should stay until time out, for receiving components to consume when they are avilable.&lt;/p&gt;&lt;p&gt;In the &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;a href=&quot;https://pratapreddypilaka.blogspot.com/2021/05/azure-service-bus-queues-and-topics.html&quot; target=&quot;_blank&quot;&gt;earlier article&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;, we have seen how we can use Azure Service Bus Queues for integration of serverless application environment. Now we will explore Service Bus Topic and how it will be used.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWyVqIRkKJJTjy41n1DaBJ9Xy2PMPhQab_jlw4feoBDarS2yUlORj1udIjfkOH5K6gjIRi4PRoc9uWCQhr7BV3zP5D7hmeSiyqZD3UsHeJtGDn6pJQGeJf8uL5VEmwk6bdphvfYZPKbAo/s1179/12.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;677&quot; data-original-width=&quot;1179&quot; height=&quot;368&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWyVqIRkKJJTjy41n1DaBJ9Xy2PMPhQab_jlw4feoBDarS2yUlORj1udIjfkOH5K6gjIRi4PRoc9uWCQhr7BV3zP5D7hmeSiyqZD3UsHeJtGDn6pJQGeJf8uL5VEmwk6bdphvfYZPKbAo/w640-h368/12.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;We have already created Azure service Bus in earlier article, you can reffer the link provoided at the top for details.&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;b&gt;Step 1: Creating Azure Service Bus Topic&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #222222;&quot;&gt;Go to azure portal, and open the Service Bus we created &quot;DemoAZSvcBus&quot;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #222222;&quot;&gt;In left pannel under &quot;Entities&quot;, click &quot;Topics&quot;.&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style=&quot;color: #222222;&quot;&gt;Create a new Topic, name it &quot;CorpAnnouncements&quot;.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglHtDoGvnZlMXcuC9bP3fJnILdVpCu3f_y3EY9aE-hBMKMghAYqIWmHyprDfheyEr2Qnf5bhYyA8Ya5IqWuiGojNRIUWKdbpEY1_UxzFb_WL7LU6-mCN4FqM1Qp-USac81I4U0ihhG1VA/s647/4.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;612&quot; data-original-width=&quot;647&quot; height=&quot;379&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglHtDoGvnZlMXcuC9bP3fJnILdVpCu3f_y3EY9aE-hBMKMghAYqIWmHyprDfheyEr2Qnf5bhYyA8Ya5IqWuiGojNRIUWKdbpEY1_UxzFb_WL7LU6-mCN4FqM1Qp-USac81I4U0ihhG1VA/w400-h379/4.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Once Topic is created, Open it. Now in left pannel, under &quot;Entities&quot;, click on &quot;Subscriptions&quot;.&lt;/div&gt;&lt;div&gt;Create a new Subscription , name it &quot;NZSubscription&quot;.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlasLKKpCEhMhqCBuPzsdGJdauWE1bJY-ovjdStQHRSLNhX4SxznAVzMH7aYWii0E4mE0q26qGcsf2ujRDL2Xxmfbh1bwFgbuy7Vo3880ue9ldxBxTMN7cHrG2Nw7nIKQEt4Bc0BQrfy8/s889/5.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;523&quot; data-original-width=&quot;889&quot; height=&quot;235&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlasLKKpCEhMhqCBuPzsdGJdauWE1bJY-ovjdStQHRSLNhX4SxznAVzMH7aYWii0E4mE0q26qGcsf2ujRDL2Xxmfbh1bwFgbuy7Vo3880ue9ldxBxTMN7cHrG2Nw7nIKQEt4Bc0BQrfy8/w400-h235/5.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Step 2: Get Connection string for Azure Service Bus Namespace.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;It costs money to create a storage account in azure, especially when you are using free tier or experimenting on your own. Thats why i use Azure CLI on Powershell 7.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Open Power shell and run below commands. After first command, you may need to authenticate to Azure console via browser, then close the browser. Make sure you check update Resource group name and Service Bus name in your command.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;az login &lt;br /&gt;az servicebus namespace authorization-rule keys list --resource-group &lt;span style=&quot;background-color: #fcff01;&quot;&gt;DefaultRG&lt;/span&gt;  --name RootManageSharedAccessKey  --query primaryConnectionString  --output tsv  --namespace-name &lt;span style=&quot;background-color: #fcff01;&quot;&gt;DemoAZSvcBus&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;This command will bring back the connection string which you need to keep it aside for following steps. It will be in this formatt.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMDXol2ZGKJAHamt9fo7IOhqzjnvRgmGDzzSJpRMZyLoO-r-8SRnuFLVx_z7F5o6OQf_ePbhwpak0zVZMM69B4NjDOl8l178K9iHUpSOyX4Outw_kNmux9ks8Mk9nZP2TLpLGn3TXtp1E/s1344/6.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;220&quot; data-original-width=&quot;1344&quot; height=&quot;104&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMDXol2ZGKJAHamt9fo7IOhqzjnvRgmGDzzSJpRMZyLoO-r-8SRnuFLVx_z7F5o6OQf_ePbhwpak0zVZMM69B4NjDOl8l178K9iHUpSOyX4Outw_kNmux9ks8Mk9nZP2TLpLGn3TXtp1E/w640-h104/6.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;Step 3: Create CorpMessageSender (Service Bus Topic Message Sender)&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Lets start with a folder &quot;ServiceBus&quot;. All the projects from here on will be created inside it.&lt;/div&gt;&lt;div&gt;Open Shell, navigate to &quot;ServiceBus&quot; folder. Run below commands one after another.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;dotnet new console -n CorpAnnouncementSender&lt;br /&gt;CD .\CorpAnnouncementSender\&lt;br /&gt;dotnet add package Microsoft.Azure.ServiceBus&lt;br /&gt;Code .&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;These command will create a new .Net Console application, then install Azure Service Bus package and open the project in VS Code.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Copy below code to program.cs. You may need to write similar code in your azure component which is sending out secured, transcation bound messages to other systems.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;using System;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.ServiceBus;

namespace CorpAnnouncementSender
{
    class Program
    {
        const string ServiceBusConnectionString = &quot;&lt;span style=&quot;background-color: #fcff01;&quot;&gt;Service Bus Connecttion string goes here&lt;/span&gt;&quot;;
        const string TopicName = &quot;corpannouncements&quot;;
        static ITopicClient topicClient;

        static void Main(string[] args)
        {
            Console.WriteLine(&quot;Sending a message to the corporate annpuncements topic...&quot;);
            SendCorpAnnouncementAsync().GetAwaiter().GetResult();
            Console.WriteLine(&quot;Message was sent successfully.&quot;);
        }

        static async Task SendCorpAnnouncementAsync()
        {
            topicClient = new TopicClient(ServiceBusConnectionString, TopicName);

            try
            {
                string messageBody = $&quot;Organization X going public IPO in Jan 2022&quot;;
                var message = new Message(Encoding.UTF8.GetBytes(messageBody));
                Console.WriteLine($&quot;Sending message: {messageBody}&quot;);
                await topicClient.SendAsync(message);
            }
            catch (Exception exception)
            {
                Console.WriteLine($&quot;{DateTime.Now} :: Exception: {exception.Message}&quot;);
            }

            await topicClient.CloseAsync();
        }
    }
}&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Save program.cs file, open shell and run&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;dotnet build&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;and now navigate to &quot;ServiceBus&quot; folder, run below command.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;dotnet run -p CorpAnnouncementSender&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;You will see the result like this.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_S0Lf9QZwDcBfvTaDrkftCdWYRneAceRUcSSoIDKTgF7c6jjIOy22p98OW6W5Qo6ksM6J6LBotZz2XFZCYWyckD2gcJQ62VQdxGeuwcIvL2Q7kcMU_z0hqnB80_rmRSj66E6ey-7H6y8/s1155/2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;549&quot; data-original-width=&quot;1155&quot; height=&quot;304&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_S0Lf9QZwDcBfvTaDrkftCdWYRneAceRUcSSoIDKTgF7c6jjIOy22p98OW6W5Qo6ksM6J6LBotZz2XFZCYWyckD2gcJQ62VQdxGeuwcIvL2Q7kcMU_z0hqnB80_rmRSj66E6ey-7H6y8/w640-h304/2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #222222; font-size: 15.4px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Lets explore Azure portal to see if the message has arrived.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #222222; font-size: 15.4px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Go to Service Bus &quot;DemoAZSvcBus&quot;, select Queues and open &quot;CorpAnnouncements&quot; Topic.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;You can see that the message we sent has been pused to all Subscriptions. In our case &quot;NZSubscription&quot;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_DAniPcUrBfzZPZDu9r1biZp3jBaJxQNYyqxpq9epV576hjIQjs4CuvMvH8o3JI_JA1ovEdgiuFNnda2eB1MxSlbfGEefjWKhKobsPkunr1G4jSqJdf1Nhw8fnYZFXzn3GuoWJ49Pn1c/s2221/6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;820&quot; data-original-width=&quot;2221&quot; height=&quot;236&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_DAniPcUrBfzZPZDu9r1biZp3jBaJxQNYyqxpq9epV576hjIQjs4CuvMvH8o3JI_JA1ovEdgiuFNnda2eB1MxSlbfGEefjWKhKobsPkunr1G4jSqJdf1Nhw8fnYZFXzn3GuoWJ49Pn1c/w640-h236/6.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;Unlike Queue, the messages in Topics will be tunnel to subscriptions and they will stay there for the subscribers to consume. They stay there until message timeout.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Step 4: Create CorpAnnouncementReceiver (Service Bus Topic Message Receiver)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Open Shell, navigate to &quot;ServiceBus&quot; folder. Run below commands.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;dotnet new console -n CorpAnnouncementReceiver&lt;br /&gt;CD .\CorpAnnouncementReceiver\&lt;br /&gt;dotnet add package Microsoft.Azure.ServiceBus&lt;br /&gt;Code .&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;Now copy below code in program.cs file.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;using System;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.ServiceBus;

namespace CorpAnnouncementReceiver
{
   class Program
    {

        const string ServiceBusConnectionString = &quot;&lt;span style=&quot;background-color: #fcff01;&quot;&gt;Service Bus Connection string here&lt;/span&gt;&quot;;&lt;br /&gt;
        const string TopicName = &quot;corpannouncements&quot;;
        const string SubscriptionName = &quot;NZSubscription&quot;;
        static ISubscriptionClient subscriptionClient;

        static void Main(string[] args)
        {
            MainAsync().GetAwaiter().GetResult();
        }

        static async Task MainAsync()
        {
            subscriptionClient = new SubscriptionClient(ServiceBusConnectionString, TopicName, SubscriptionName);

            Console.WriteLine(&quot;======================================================&quot;);
            Console.WriteLine(&quot;Press ENTER key to exit after receiving all the messages.&quot;);
            Console.WriteLine(&quot;======================================================&quot;);

            RegisterMessageHandler();

            Console.Read();

            await subscriptionClient.CloseAsync();
        }

        static void RegisterMessageHandler()
        {
            var messageHandlerOptions = new MessageHandlerOptions(ExceptionReceivedHandler)
            {
                MaxConcurrentCalls = 1,
                AutoComplete = false
            };
            subscriptionClient.RegisterMessageHandler(ProcessMessagesAsync, messageHandlerOptions);
        }

        static async Task ProcessMessagesAsync(Message message, CancellationToken token)
        {
            Console.WriteLine($&quot;Received corp announcement message: SequenceNumber:{message.SystemProperties.SequenceNumber} Body:{Encoding.UTF8.GetString(message.Body)}&quot;);
            //Uncomment below line if you want to delete the message from subscription
            //await subscriptionClient.CompleteAsync(message.SystemProperties.LockToken);
        }

        static Task ExceptionReceivedHandler(ExceptionReceivedEventArgs exceptionReceivedEventArgs)
        {
            Console.WriteLine($&quot;Message handler encountered an exception {exceptionReceivedEventArgs.Exception}.&quot;);
            var context = exceptionReceivedEventArgs.ExceptionReceivedContext;
            Console.WriteLine(&quot;Exception context for troubleshooting:&quot;);
            Console.WriteLine($&quot;- Endpoint: {context.Endpoint}&quot;);
            Console.WriteLine($&quot;- Entity Path: {context.EntityPath}&quot;);
            Console.WriteLine($&quot;- Executing Action: {context.Action}&quot;);
            return Task.CompletedTask;
        }  
    }
}&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Save program.cs file, open shell and run&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;dotnet build&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;and now navigate to &quot;ServiceBus&quot; folder, run below command.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;dotnet run -p CorpMessageReceiverr&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;You will see the result like this.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSmC3DiLXpgLxpjIPa6d2IUlBJ7GTDSaSdMzFf1yRzvcF-QdEY3VfiHLtxW0Q5W9GH-LFGx7psXoTWTzbf30wfZ_HvoYoqnKQofFSq9MWRL8j3XqUbhTQDNOt37QA577Mpr3VTkC3k5OM/s1311/7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;594&quot; data-original-width=&quot;1311&quot; height=&quot;290&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSmC3DiLXpgLxpjIPa6d2IUlBJ7GTDSaSdMzFf1yRzvcF-QdEY3VfiHLtxW0Q5W9GH-LFGx7psXoTWTzbf30wfZ_HvoYoqnKQofFSq9MWRL8j3XqUbhTQDNOt37QA577Mpr3VTkC3k5OM/w640-h290/7.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;The Message in subcription will not be deleted unless you delete them exclusively using your code.&lt;/div&gt;&lt;div&gt;I have commented the line of code which deletes the message. Your programatic choice.&lt;/div&gt;&lt;div&gt;Lets check azure portal is the message still there even after received by the subscriber components.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWetZNFiSXo-ef-nlvfwhfl7WT5Q_FZ1wtOgbkQRxsBUYSZH00-NxrBTK_p0KpqA3iNPWzwma67mrm2bfKKv2rXl6ZIQyL6TL0OR0KHkijyISL1JgjomwG0EAsneNTUlc-SGmxCqBIbF8/s2221/6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;820&quot; data-original-width=&quot;2221&quot; height=&quot;236&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWetZNFiSXo-ef-nlvfwhfl7WT5Q_FZ1wtOgbkQRxsBUYSZH00-NxrBTK_p0KpqA3iNPWzwma67mrm2bfKKv2rXl6ZIQyL6TL0OR0KHkijyISL1JgjomwG0EAsneNTUlc-SGmxCqBIbF8/w640-h236/6.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Typically your messages will not be a text message like mine, but in realtime, it will be a JSON message possibley with a data object embedded into it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I will Attach the source code for all 4 projects here. &lt;a href=&quot;https://1drv.ms/u/s!AmYiNWkD2PZWox6-Wpb5DqTyIq3K?e=rM0Gs1&quot; target=&quot;_blank&quot;&gt;Download&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/2329287446459421669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2021/05/azure-service-bus-queues-and-topics_5.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/2329287446459421669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/2329287446459421669'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2021/05/azure-service-bus-queues-and-topics_5.html' title='Azure Service Bus - Queues and Topics - Part 2'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWyVqIRkKJJTjy41n1DaBJ9Xy2PMPhQab_jlw4feoBDarS2yUlORj1udIjfkOH5K6gjIRi4PRoc9uWCQhr7BV3zP5D7hmeSiyqZD3UsHeJtGDn6pJQGeJf8uL5VEmwk6bdphvfYZPKbAo/s72-w640-h368-c/12.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-3977760865497231629</id><published>2021-05-05T10:52:00.008-07:00</published><updated>2025-01-16T12:19:21.420-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><category scheme="http://www.blogger.com/atom/ns#" term="ServiceBus"/><title type='text'>Azure Service Bus - Queues and Topics - Part 1</title><content type='html'>&lt;p&gt;&lt;b&gt;Use Case:&lt;/b&gt; Organization X has a large-scale distributed serverless application environment. There are some azure components that sends a private messages which need to be accessed only once by other components using RoleBasedAccessControls. There are some messages that need to Fan-Out(one-to-many) to large number of systems, where sender doesnt need to know the receiver&#39;s details. The message should stay until time out, for receiving components to consume when they are avilable.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfgNp6eE9dj6ca071tern3IocYPLVEHSYTg9feIVyWkss0lHle8uQi-byKXHoMqtIKpNFbYg0Z7zYkQWIr9XGKOG9mXGFtvvun2y-sDTbsveO1wAIOcE6E4Yat2zxruqiknz_QQeIaJo4/s1179/1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;677&quot; data-original-width=&quot;1179&quot; height=&quot;368&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfgNp6eE9dj6ca071tern3IocYPLVEHSYTg9feIVyWkss0lHle8uQi-byKXHoMqtIKpNFbYg0Z7zYkQWIr9XGKOG9mXGFtvvun2y-sDTbsveO1wAIOcE6E4Yat2zxruqiknz_QQeIaJo4/w640-h368/1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In this article, we will learn what is Azure Service Bus, Service Bus Queues, Service Bus Topics, How to access them programatically using .Net. Once you do it practically following my instrctions, you will understand the theory behind it. So follow me.&lt;/div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;Why Azure Service Bus?&lt;/b&gt;&lt;div&gt;Service Bus is a message broker which handles Integrity, Security, Communication protocols of Messages at Enterprise level.&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It has both Queues and Topics for message transmission. We will see each of it using .Net Console apps as both sender and receiver.&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;color: #222222; font-size: 15.4px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;color: #222222; font-size: 15.4px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Use Service Bus queues if you:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;p style=&quot;background-color: white; color: #222222; font-size: 15.4px;&quot;&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; color: #222222; font-size: 15.4px; line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;&quot;&gt;&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Need an At-Most-Once delivery guarantee.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Need a FIFO guarantee.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Need to group messages into transactions.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Want to receive messages without polling the queue.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Need to provide a role-based access model to the queues.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Need to handle messages larger than 64 KB but less than 256 KB.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Queue size will not grow larger than 80 GB.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Want to publish and consume batches of messages.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;p style=&quot;background-color: white; color: #222222; font-size: 15.4px;&quot;&gt;&lt;b style=&quot;background-color: transparent;&quot;&gt;Step 1: Create Azure Service Bus&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;font-size: 15.4px;&quot;&gt;Go to Azure portal, always start with a resource group. I named it &quot;DefaultRG&quot;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;font-size: 15.4px;&quot;&gt;Next Create a Service Bus, i named it &quot;DemoAZSvcBus&quot;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #222222;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGTcu4dEfwwNqTGzD-Qew1rE4NJkpx_JkaCtagJR66VnRMEo1UyT7o2W-IaQtrdhTb_n5-fdOVCB4pDaZmB8r975LwArDb05BmcvKawW0kbUlXupaVOZnbCgIO9ds4nEjVNfO0Kku6rrk/s1137/2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;807&quot; data-original-width=&quot;1137&quot; height=&quot;454&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGTcu4dEfwwNqTGzD-Qew1rE4NJkpx_JkaCtagJR66VnRMEo1UyT7o2W-IaQtrdhTb_n5-fdOVCB4pDaZmB8r975LwArDb05BmcvKawW0kbUlXupaVOZnbCgIO9ds4nEjVNfO0Kku6rrk/w640-h454/2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Once Service Bus is created, in the left pannel, under &quot;Entities&quot;, click on Queues.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #222222;&quot;&gt;Create a new Queue, name it &quot;CorpMessages&quot;.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnJKPUHeFW3YfXUSHu9pBtSX9f7xQ3ifk78iXMHw2DeduBEL9_1ND2reOGshnJwCQr8SuOHp0FnJTxuOzyDs5lmusYdR6w3S5e9d1VsQSj9VDL6IURFoSXFaIn6y7lQ-R6Zn0yRy27Wa8/s648/3.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;566&quot; data-original-width=&quot;648&quot; height=&quot;350&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnJKPUHeFW3YfXUSHu9pBtSX9f7xQ3ifk78iXMHw2DeduBEL9_1ND2reOGshnJwCQr8SuOHp0FnJTxuOzyDs5lmusYdR6w3S5e9d1VsQSj9VDL6IURFoSXFaIn6y7lQ-R6Zn0yRy27Wa8/w400-h350/3.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color: #222222;&quot;&gt;This is the queue we will use to send the private messages to other intended receiving systems.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For all the following steps, you need to install Azure CLI, .Net, Powershell 7, VS Code on your dev machines.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 2: Get Connection string for Azure Service Bus Namespace.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;It costs money to create a storage account in azure, especially when you are using free tier or experimenting on your own. Thats why i use Azure CLI on Powershell 7.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Open Power shell and run below commands. After first command, you may need to authenticate to Azure console via browser, then close the browser. Make sure you check update Resource group name and Service Bus name in your command.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;az login &lt;br /&gt;az servicebus namespace authorization-rule keys list --resource-group &lt;span style=&quot;background-color: #fcff01;&quot;&gt;DefaultRG&lt;/span&gt;  --name RootManageSharedAccessKey  --query primaryConnectionString  --output tsv  --namespace-name &lt;span style=&quot;background-color: #fcff01;&quot;&gt;DemoAZSvcBus&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;This command will bring back the connection string which you need to keep it aside for following steps. It will be in this formatt.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMDXol2ZGKJAHamt9fo7IOhqzjnvRgmGDzzSJpRMZyLoO-r-8SRnuFLVx_z7F5o6OQf_ePbhwpak0zVZMM69B4NjDOl8l178K9iHUpSOyX4Outw_kNmux9ks8Mk9nZP2TLpLGn3TXtp1E/s1344/6.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;220&quot; data-original-width=&quot;1344&quot; height=&quot;104&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMDXol2ZGKJAHamt9fo7IOhqzjnvRgmGDzzSJpRMZyLoO-r-8SRnuFLVx_z7F5o6OQf_ePbhwpak0zVZMM69B4NjDOl8l178K9iHUpSOyX4Outw_kNmux9ks8Mk9nZP2TLpLGn3TXtp1E/w640-h104/6.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;Step 3: Create CorpMessageSender (Service Bus Queue Message Sender)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Lets start with a folder &quot;ServiceBus&quot;. All the projects from here on will be created inside it.&lt;/div&gt;&lt;div&gt;Open Shell, navigate to &quot;ServiceBus&quot; folder. Run below commands one after another.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;dotnet new console -n CorpMessageSender&lt;br /&gt;CD .\CorpMessageSender\&lt;br /&gt;dotnet add package Microsoft.Azure.ServiceBus&lt;br /&gt;Code .&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2lQTCGE24LQ3XxFyBNDzwMo2ZVwe2xfsPOovlDFYaKdZYLbn-gyKkPzIbuiRKaWjPXdkv8bVg5VPey0ldOx8eFWK7qIdrNoejNj3k3AhuFjWdh6gdt1Z93320gBXnNIy83JUqmjo4hEU/s1299/7.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;374&quot; data-original-width=&quot;1299&quot; height=&quot;184&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2lQTCGE24LQ3XxFyBNDzwMo2ZVwe2xfsPOovlDFYaKdZYLbn-gyKkPzIbuiRKaWjPXdkv8bVg5VPey0ldOx8eFWK7qIdrNoejNj3k3AhuFjWdh6gdt1Z93320gBXnNIy83JUqmjo4hEU/w640-h184/7.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;These command will create a new .Net Console application, then install Azure Service Bus package and open the project in VS Code.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Copy below code to program.cs. You may need to write similar code in your azure component which is sending out secured, transcation bound messages to other systems.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;using System;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.ServiceBus;

namespace CorpMessageSender
{
    class Program
    {
        const string ServiceBusConnectionString = &quot;&lt;span style=&quot;background-color: #fcff01;&quot;&gt;Service Bus Connection string here&lt;/span&gt;&quot;;
        const string QueueName = &quot;corpmessages&quot;;
        static IQueueClient queueClient;

        static void Main(string[] args)
        {
            Console.WriteLine(&quot;Sending a message to the Corporate Messages queue...&quot;);
            SendCorpMessageAsync().GetAwaiter().GetResult();
            Console.WriteLine(&quot;Message was sent successfully.&quot;);
        }

        static async Task SendCorpMessageAsync()
        {
	    //Creating Service Bus Queue client 
            queueClient = new QueueClient(ServiceBusConnectionString, QueueName);

            try
            {
                string messageBody = $&quot;Private message from CEO: Q1 Results: $1bn Profit&quot;;
                var message = new Message(Encoding.UTF8.GetBytes(messageBody));
                Console.WriteLine($&quot;Sending message: {messageBody}&quot;);
		//Sending the private message to Service bus Queue
                await queueClient.SendAsync(message);
            }
            catch (Exception exception)
            {
                Console.WriteLine($&quot;{DateTime.Now} :: Exception: {exception.Message}&quot;);
            }
			
            await queueClient.CloseAsync();
        }
    }
}&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Save program.cs file, open shell and run&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;dotnet build&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;and now navigate to &quot;ServiceBus&quot; folder, run below command.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;dotnet run -p CorpMessageSender&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;You will see the result like this.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaWoglCGdAVk7C2bDAEwiTDlXWJWBQl7I5pRzwgZYzzqMkFJnK8JaSeIDR_hpPVpW7NOqlaWFHuh-ODlaJN5krDn9tDZFxRZ4YsOFtn9Dq1p4YxC4wkYKy8a7_GF6dSAJoTweO4h99qes/s853/8.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;199&quot; data-original-width=&quot;853&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaWoglCGdAVk7C2bDAEwiTDlXWJWBQl7I5pRzwgZYzzqMkFJnK8JaSeIDR_hpPVpW7NOqlaWFHuh-ODlaJN5krDn9tDZFxRZ4YsOFtn9Dq1p4YxC4wkYKy8a7_GF6dSAJoTweO4h99qes/w640-h150/8.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Lets explore Azure portal to see if the message has arrived.&lt;/div&gt;&lt;div&gt;Go to Service Bus &quot;DemoAZSvcBus&quot;, select Queues and open &quot;CorpMessages&quot; Queue.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2c3P1XCGpUHx7yFmfx0AhRsRr7yAJj4aI25Wd-R5N-CiI73NFpjbzb89wy9G_b_bMrW-vnMqVDMex3dRLjFKOhuHk3v_LHx-M_cliu-zXYDbY90pEvtMKgJyrO3SrKomIPV5WzWcPXY4/s2228/9.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;731&quot; data-original-width=&quot;2228&quot; height=&quot;210&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2c3P1XCGpUHx7yFmfx0AhRsRr7yAJj4aI25Wd-R5N-CiI73NFpjbzb89wy9G_b_bMrW-vnMqVDMex3dRLjFKOhuHk3v_LHx-M_cliu-zXYDbY90pEvtMKgJyrO3SrKomIPV5WzWcPXY4/w640-h210/9.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;Step 4: Create CorpMessageReceiver (Service Bus Queue Message Receiver)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Open Shell, navigate to &quot;ServiceBus&quot; folder. Run below commands.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;pre&gt;dotnet new console -n CorpMessageSender&lt;br /&gt;CD .\CorpMessageSender\&lt;br /&gt;dotnet add package Microsoft.Azure.ServiceBus&lt;br /&gt;Code .&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Now copy below code in program.cs file.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;using System;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.ServiceBus;

namespace CorpMessageReceiver
{
   class Program
    {

        const string ServiceBusConnectionString = &quot;&lt;span style=&quot;background-color: #fcff01;&quot;&gt;Service Bus Connection string here&lt;/span&gt;&quot;;&lt;br /&gt;
        const string QueueName = &quot;corpmessages&quot;;
        static IQueueClient queueClient;

        static void Main(string[] args)
        {

            ReceiveCorpMessageAsync().GetAwaiter().GetResult();

        }

        static async Task ReceiveCorpMessageAsync()
        {

            queueClient = new QueueClient(ServiceBusConnectionString, QueueName);

            Console.WriteLine(&quot;======================================================&quot;);
            Console.WriteLine(&quot;Press ENTER key to exit after receiving all the messages.&quot;);
            Console.WriteLine(&quot;======================================================&quot;);

            RegisterMessageHandler();

            Console.Read();

            await queueClient.CloseAsync();

        }

        static void RegisterMessageHandler()
        {
            var messageHandlerOptions = new MessageHandlerOptions(ExceptionReceivedHandler)
            {
                MaxConcurrentCalls = 1,
                AutoComplete = false
            };
            queueClient.RegisterMessageHandler(ProcessMessagesAsync, messageHandlerOptions);
        }

        static async Task ProcessMessagesAsync(Message message, CancellationToken token)
        {
            Console.WriteLine($&quot;Received message: SequenceNumber:{message.SystemProperties.SequenceNumber} Body:{Encoding.UTF8.GetString(message.Body)}&quot;);
            await queueClient.CompleteAsync(message.SystemProperties.LockToken);
        }

        static Task ExceptionReceivedHandler(ExceptionReceivedEventArgs exceptionReceivedEventArgs)
        {
            Console.WriteLine($&quot;Message handler encountered an exception {exceptionReceivedEventArgs.Exception}.&quot;);
            var context = exceptionReceivedEventArgs.ExceptionReceivedContext;
            Console.WriteLine(&quot;Exception context for troubleshooting:&quot;);
            Console.WriteLine($&quot;- Endpoint: {context.Endpoint}&quot;);
            Console.WriteLine($&quot;- Entity Path: {context.EntityPath}&quot;);
            Console.WriteLine($&quot;- Executing Action: {context.Action}&quot;);
            return Task.CompletedTask;
        }   
    }
}&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Save program.cs file, open shell and run&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;dotnet build&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;and now navigate to &quot;ServiceBus&quot; folder, run below command.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;dotnet run -p CorpMessageReceiverr&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;You will see the result like this.&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8v-RLyu6-4uzJzqdier0QC3mQP6FuyeI_Rx7EhaX4F8am8M-kQqPDYa0LpkhD7eCp_ziNd4UKGv8sahwxJ7ERAJCLBtxFjSPoWf0MbJcoVMN5jqf3trBg9cX8cpeUrdqacatkdrDBlfQ/s1204/10.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;229&quot; data-original-width=&quot;1204&quot; height=&quot;122&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8v-RLyu6-4uzJzqdier0QC3mQP6FuyeI_Rx7EhaX4F8am8M-kQqPDYa0LpkhD7eCp_ziNd4UKGv8sahwxJ7ERAJCLBtxFjSPoWf0MbJcoVMN5jqf3trBg9cX8cpeUrdqacatkdrDBlfQ/w640-h122/10.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Message received, and this message will be deleted from Service Bus Queue, since the intended receiver have consumed the message.&lt;/div&gt;&lt;div&gt;You may need to write similar code in your receiving component.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIJkrFtFMfs7v8gJjw2MWUN3BcjhMXy7dqM-C73QMCynQVIkOVFIce1cItcaSWZLACPTYIqjtUuS7w3l6IdO-UcU95ShNlEDTXImaPsN9Cs-R_WQT00IbEgpcPW8CmgQU05WHX9aP0G0I/s954/11.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;518&quot; data-original-width=&quot;954&quot; height=&quot;348&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIJkrFtFMfs7v8gJjw2MWUN3BcjhMXy7dqM-C73QMCynQVIkOVFIce1cItcaSWZLACPTYIqjtUuS7w3l6IdO-UcU95ShNlEDTXImaPsN9Cs-R_WQT00IbEgpcPW8CmgQU05WHX9aP0G0I/w640-h348/11.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;We have finished Azure Service Bus Queues. In nest article Part-2, we will programatically send and recieve messages to Azure Service Topics and observe thier behaviour.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1bP0zhotlfSfzgG_3o6JWBjJFqBedQi8xMbof039tz8JAj3Nd5VxwHqq-xZXdWQ1p0Ft3aJ8lvcr29ttdyMJpT1gajTBD14WidVgXf2HchufMUC5BtMoYuznfRF7k72OcyayBAVq3x3s/s1179/12.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;677&quot; data-original-width=&quot;1179&quot; height=&quot;368&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1bP0zhotlfSfzgG_3o6JWBjJFqBedQi8xMbof039tz8JAj3Nd5VxwHqq-xZXdWQ1p0Ft3aJ8lvcr29ttdyMJpT1gajTBD14WidVgXf2HchufMUC5BtMoYuznfRF7k72OcyayBAVq3x3s/w640-h368/12.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/3977760865497231629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2021/05/azure-service-bus-queues-and-topics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/3977760865497231629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/3977760865497231629'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2021/05/azure-service-bus-queues-and-topics.html' title='Azure Service Bus - Queues and Topics - Part 1'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfgNp6eE9dj6ca071tern3IocYPLVEHSYTg9feIVyWkss0lHle8uQi-byKXHoMqtIKpNFbYg0Z7zYkQWIr9XGKOG9mXGFtvvun2y-sDTbsveO1wAIOcE6E4Yat2zxruqiknz_QQeIaJo4/s72-w640-h368-c/1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-1355058184472985468</id><published>2021-05-05T03:51:00.001-07:00</published><updated>2021-05-05T03:51:30.894-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><title type='text'>Azure Messaging Models</title><content type='html'>&lt;p&gt;&amp;nbsp;All of this is straight from Microsoft Documentation. I am just grouping them for better reference.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Every time i say, &quot;&lt;b&gt;This is what Microsoft says, and then i validate the theory with a practicle implementation&lt;/b&gt;&quot;. This time, this article is full of thoery, so this is all about what Microsoft says. I take no credit for this infromation.&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;b&gt;What is a message?&lt;/b&gt;&lt;/p&gt;&lt;p&gt;In the terminology of distributed applications, messages have the following characteristics:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;A message contains raw data, produced by one component, that will be consumed by another component.&lt;/li&gt;&lt;li&gt;A message contains the data itself, not just a reference to that data.&lt;/li&gt;&lt;li&gt;The sending component expects the message content to be processed in a certain way by the destination component. The integrity of the overall system may depend on both sender and receiver doing a specific job.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;What is an event?&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Events are lighter weight than messages, and are most often used for broadcast communications. The components sending the event are known as publishers, and receivers are known as subscribers.&lt;/p&gt;&lt;p&gt;Events have the following characteristics:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;An event is a lightweight notification that indicates that something happened.&lt;/li&gt;&lt;li&gt;The event may be sent to multiple receivers, or to none at all.&lt;/li&gt;&lt;li&gt;Events are often intended to &quot;fan out,&quot; or have a large number of subscribers for each publisher.&lt;/li&gt;&lt;li&gt;The publisher of the event has no expectation about the action a receiving component takes.&lt;/li&gt;&lt;li&gt;Some events are discrete units and unrelated to other events.&lt;/li&gt;&lt;li&gt;Some events are part of a related and ordered series.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Use Queue storage if you:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Need an audit trail of all messages that pass through the queue.&lt;/li&gt;&lt;li&gt;Expect the queue to exceed 80 GB in size.&lt;/li&gt;&lt;li&gt;Want to track progress for processing a message inside of the queue.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Use Service Bus topics if you:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Need multiple receivers to handle each message&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Use Service Bus queues if you:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Need an At-Most-Once delivery guarantee.&lt;/li&gt;&lt;li&gt;Need a FIFO guarantee.&lt;/li&gt;&lt;li&gt;Need to group messages into transactions.&lt;/li&gt;&lt;li&gt;Want to receive messages without polling the queue.&lt;/li&gt;&lt;li&gt;Need to provide a role-based access model to the queues.&lt;/li&gt;&lt;li&gt;Need to handle messages larger than 64 KB but less than 256 KB.&lt;/li&gt;&lt;li&gt;Queue size will not grow larger than 80 GB.&lt;/li&gt;&lt;li&gt;Want to publish and consume batches of messages.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;What is Azure Event Grid?&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Azure Event Grid is a fully-managed event routing service running on top of Azure Service Fabric. Event Grid distributes events from different sources, such as Azure Blob storage accounts or Azure Media Services, to different handlers, such as Azure Functions or Webhooks. Event Grid was created to make it easier to build event-based and serverless applications on Azure.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWxhkTDIj8xvk_YtDmMdKUygQlDIkcA2HuzBWJCmtrj8AVsqF5NRZa7d9Gn7mU5ZjnlQX3AeXUzqaBButU1_KgXGMrhTzdBkwXtaZo0sUR6HnzZwvmh09Zm8ZNBNoO5KvjNoIpZlwr_UM/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;359&quot; data-original-width=&quot;570&quot; height=&quot;404&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWxhkTDIj8xvk_YtDmMdKUygQlDIkcA2HuzBWJCmtrj8AVsqF5NRZa7d9Gn7mU5ZjnlQX3AeXUzqaBButU1_KgXGMrhTzdBkwXtaZo0sUR6HnzZwvmh09Zm8ZNBNoO5KvjNoIpZlwr_UM/w640-h404/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;There are several concepts in Azure Event Grid that connect a source to a subscriber:&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Events:&lt;/b&gt; What happened.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Event sources:&lt;/b&gt; Where the event took place.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Topics: &lt;/b&gt;The endpoint where publishers send events.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Event subscriptions:&lt;/b&gt; The endpoint or built-in mechanism to route events, sometimes to multiple handlers. Subscriptions are also used by handlers to filter incoming events intelligently.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Event handlers:&lt;/b&gt; The app or service reacting to the event.&lt;/p&gt;&lt;p&gt;&lt;b&gt;What is Azure Event Hubs?&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Event Hubs is an intermediary for the publish-subscribe communication pattern. Unlike Event Grid, however, it is optimized for extremely high throughput, a large number of publishers, security, and resiliency.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Choose Event Hubs if:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;You need to support authenticating a large number of publishers.&lt;/li&gt;&lt;li&gt;You need to save a stream of events to Data Lake or Blob storage.&lt;/li&gt;&lt;li&gt;You need aggregation or analytics on your event stream.&lt;/li&gt;&lt;li&gt;You need reliable messaging or resiliency.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Otherwise, if you need a simple event publish-subscribe infrastructure, with trusted publishers (for instance, your own web server), you should choose Event Grid.&lt;/p&gt;&lt;p&gt;Event Hubs lets you build a big data pipeline capable of processing millions of events per second with low latency. It can handle data from concurrent sources and route it to a variety of stream-processing infrastructures and analytics services. It enables real-time processing and supports repeated replay of stored raw data.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/1355058184472985468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2021/05/azure-messaging-models.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/1355058184472985468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/1355058184472985468'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2021/05/azure-messaging-models.html' title='Azure Messaging Models'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWxhkTDIj8xvk_YtDmMdKUygQlDIkcA2HuzBWJCmtrj8AVsqF5NRZa7d9Gn7mU5ZjnlQX3AeXUzqaBButU1_KgXGMrhTzdBkwXtaZo0sUR6HnzZwvmh09Zm8ZNBNoO5KvjNoIpZlwr_UM/s72-w640-h404-c/image.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-1820325421590293855</id><published>2021-05-03T23:01:00.009-07:00</published><updated>2025-01-16T12:19:30.911-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><category scheme="http://www.blogger.com/atom/ns#" term="Functions"/><title type='text'>Azure Durable Functions - Starter, Orchestrator and Activity Fucntions</title><content type='html'>&lt;p&gt;&lt;b&gt;Use Case: &lt;/b&gt;A user starts to book a trip, which consists booking a Flight and Hotel and then pay for complete trip.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Back in the day, the answer used to be a single server-side application which is complex enough to take care of everything. Now we call it &lt;b&gt;Monolith&lt;/b&gt; application.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Now we use microservices architecture to seperate the concerns at domain level. With Function as a Service, it even evolved to a Serverless state, where you can provision the services even without using any infrastructure.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Azure Functions&lt;/b&gt; is one of the critical components of serverless designs, and here is what we know about them:&lt;/p&gt;&lt;p&gt;&lt;b&gt;Even-Driven:&lt;/b&gt; Azure functions are invoked based on a trigger caused by events like making a http call (or) adding a message to a Queue (or) adding a object to a blob storage (or) adding a new record to CosmosDB and many others.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Short-Lived: &lt;/b&gt;Azure functions are meant to for short period of excutions and to address a simple tasks which makes it more suitable for Microservices part of the design. Keep it simple and seperated.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Stateless: &lt;/b&gt;Azure Functions doesnt save any state infirmation of objects, thus the trigger mechanism will have both inputs and outputs.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Now considering above facts, i have created a design for above Use Case.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt_gxVvg8UNof-SW97DbCmh1uHuX_4vsAPGlAhJKUUVm6jqkA9sOY2vi730wi6fdEhOwgh6wiwNbQLuAzArW4obWBjn7ztlrbA6KYI4rvUiIQ4_6c8lY6kfO6KF49ChDorjo30Ls35FPM/s1180/1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;528&quot; data-original-width=&quot;1180&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt_gxVvg8UNof-SW97DbCmh1uHuX_4vsAPGlAhJKUUVm6jqkA9sOY2vi730wi6fdEhOwgh6wiwNbQLuAzArW4obWBjn7ztlrbA6KYI4rvUiIQ4_6c8lY6kfO6KF49ChDorjo30Ls35FPM/w640-h286/1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Now the deisgn is pretty much simple and self-explanatory. &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;But here is the catch.&lt;/b&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Inorder to confrim booking to the user, both flight and hotel bokings need to be done to finalize the cost of the trip. This means &quot;Confirm Booking&quot; should execute only when both &quot;Book Flight&quot; and &quot;Book Hotel&quot; are sucessful.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Give a thought for a minute how you going to handle in your opinion.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Here are the problems:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;1. Both &quot;Book Flights&quot; and &quot;Book Hotel&quot; functions might not be executed at the same millisecond. YOu are not sure which one will finish first.&lt;/div&gt;&lt;div&gt;2. One of the functions might not be avilable right away. Due to the fact Azure function instances were created for every 10 seconds based on demand.&lt;/div&gt;&lt;div&gt;3. What if one of the function gave an error.&lt;/div&gt;&lt;div&gt;4. How do you orchestrate the out put of two functions withholding data until both of them were finiched exceuting. Remeber Fucntions are stateless.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Durable Fucntions:&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Durable Functions&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;is a library that brings workflow orchestration abstractions to Azure Functions. It introduces a number of idioms and tools to define stateful, potentially long-running operations, and manages a lot of mechanics of reliable communication and state management behind the scenes.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Says Microsoft, but let us implement one and show you what it means.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 1:&lt;/b&gt; Create a Azure Function App.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjo9nltZz7CtCh0C7s9qUzH71xrVnHZIxB-4aqdoQlmC3m4Crul5D7ZpA7rVSjl5MVoPxadgusZsts3lEwIRFSVlC4PUQ1ArgVUf9TuosEnbTYZZY62Fa-PvwxUHEOSL4S1lLsRK7zkNg4/s1160/2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1061&quot; data-original-width=&quot;1160&quot; height=&quot;586&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjo9nltZz7CtCh0C7s9qUzH71xrVnHZIxB-4aqdoQlmC3m4Crul5D7ZpA7rVSjl5MVoPxadgusZsts3lEwIRFSVlC4PUQ1ArgVUf9TuosEnbTYZZY62Fa-PvwxUHEOSL4S1lLsRK7zkNg4/w640-h586/2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Durable Function is a open source package embraced by micrisoft azure. For this we need to install the package. For that we need to create &quot;package.json&quot; file. This file will hold information of all the packages installed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Open the Function App and in left hand menu click on &lt;b&gt;&quot;Console&quot;&lt;/b&gt; in &quot;Development Tools&quot; category.&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;Run below command.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaiW1GYISYwmH8Je5x3QYc0YUANNJakdiNgh8U4voBylteK-0QW2Wy3-1Ouw27cDC8ngOOPurexyNGuXxDuI_WoebTeicNuRVPEdhdVAnasjTwHgLLH76PyQt7-WWCl1oxxVrIL8NMNbw/s526/3.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;343&quot; data-original-width=&quot;526&quot; height=&quot;261&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaiW1GYISYwmH8Je5x3QYc0YUANNJakdiNgh8U4voBylteK-0QW2Wy3-1Ouw27cDC8ngOOPurexyNGuXxDuI_WoebTeicNuRVPEdhdVAnasjTwHgLLH76PyQt7-WWCl1oxxVrIL8NMNbw/w400-h261/3.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;This will create a new file &quot;package.json&quot;. Now click on &lt;b&gt;&quot;App Files&quot;&lt;/b&gt; in &quot;Fucntions&quot; category. Open the package.json file and add below code.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;{&lt;div style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;  &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;DuraFuctionDemo&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;  &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;version&quot;&lt;/span&gt;: &lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;1.0.0&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;Save the chnages and go to overview and restart the Function App.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 2:&amp;nbsp;&lt;/b&gt;&amp;nbsp;Install required packages.&lt;/div&gt;&lt;div&gt;Open Console again and run &quot;&lt;i&gt;npm install durable-functions&lt;/i&gt;&quot;. This might generate a new file with name &quot;package-lock.json&quot;.&amp;nbsp; Go to &quot;App files&quot; again and copy the content of &quot;package-lock.json&quot; file and paste it to &quot;package.json&quot; file and save.&lt;/div&gt;&lt;div&gt;Go to Overview and restart the Fucntion App again.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU4aPDdmQDRsvvyLZ9oI7R6HYhevvfoMPNWdY08fMDLWVOP6-rm_2zTwnpHIYcu4CSvdiLrADmZ-nKDmCRMFH73lDYMZIyknvbJthMUHf7_YxalCs4wulvVxZ-Uw1EOEg1gi8l3QiGp1I/s1190/5.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;497&quot; data-original-width=&quot;1190&quot; height=&quot;268&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU4aPDdmQDRsvvyLZ9oI7R6HYhevvfoMPNWdY08fMDLWVOP6-rm_2zTwnpHIYcu4CSvdiLrADmZ-nKDmCRMFH73lDYMZIyknvbJthMUHf7_YxalCs4wulvVxZ-Uw1EOEg1gi8l3QiGp1I/w640-h268/5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;Step 3:&lt;/b&gt; Create Fucntions.&lt;/div&gt;&lt;div&gt;Durable functions has 3 roles.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. &lt;b&gt;Starter&amp;nbsp;Fucntion&lt;/b&gt; - Invocation to this function will be handed over to Orchestartor Function.&lt;/div&gt;&lt;div&gt;2. &lt;b&gt;Orchestartor Function&lt;/b&gt; - This function will make calls to Activity Fucntions based on context.&lt;/div&gt;&lt;div&gt;3. &lt;b&gt;Activity Function&lt;/b&gt; - This function will do actual excution of the task and send back the response back to Orchestartor Fucntion.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Create a function, select &quot;Durable Functions HTTP starter&quot; as the template.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQDr8auIeeWBlyR0laTt5Rr16bQaEDzmoXlWtaxBX42ZZa3YfnY7vUhH6AKoNBEwzVDij6BQOtNNimOERjLJT_Dp_SHy591cvi_qTJFNLr66Tv1xa7SgpzPKOFHtBIEEKklR_KWDAjvw/s800/6.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;719&quot; data-original-width=&quot;800&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQDr8auIeeWBlyR0laTt5Rr16bQaEDzmoXlWtaxBX42ZZa3YfnY7vUhH6AKoNBEwzVDij6BQOtNNimOERjLJT_Dp_SHy591cvi_qTJFNLr66Tv1xa7SgpzPKOFHtBIEEKklR_KWDAjvw/w400-h360/6.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Leave the code as is.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4b9LhcBuWdiP8dNxq0lDj5hzMLqyGwk4Qzj9Hu4js7BgX6bxR-L7kbdUW5NPWvWJfECPIbbHXfCWBv20knB0cV0kqybZeUQBdgPJtv0mDxSvKxHut9Cw0npBwBrhqfqVTOyK8gO41des/s1559/10.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;533&quot; data-original-width=&quot;1559&quot; height=&quot;218&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4b9LhcBuWdiP8dNxq0lDj5hzMLqyGwk4Qzj9Hu4js7BgX6bxR-L7kbdUW5NPWvWJfECPIbbHXfCWBv20knB0cV0kqybZeUQBdgPJtv0mDxSvKxHut9Cw0npBwBrhqfqVTOyK8gO41des/w640-h218/10.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Create 1st Activity Function.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY-ABbTkAUIndGDVNpwzBDK50uMqx3QFMGyZWkZlwcuFCzaTbrRNsh_C9wpY6eGihnujoSg1iiO0RA-WiaZMgh0K8JUTcHE9XJXdCgW96NEZVXFEjHuILVGojT05khY5WxmuxL9OD07ew/s787/7.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;630&quot; data-original-width=&quot;787&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY-ABbTkAUIndGDVNpwzBDK50uMqx3QFMGyZWkZlwcuFCzaTbrRNsh_C9wpY6eGihnujoSg1iiO0RA-WiaZMgh0K8JUTcHE9XJXdCgW96NEZVXFEjHuILVGojT05khY5WxmuxL9OD07ew/w400-h320/7.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Paste below code in BookFlight function.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;module.exports = &lt;span style=&quot;background-color: #fffffe; color: blue; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fffffe; color: blue; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt; (context) {&lt;/span&gt;&lt;div style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;    &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #a31515;&quot;&gt;`Flight Bookings for the trip have been -  &lt;/span&gt;${context.bindings.name}&lt;span style=&quot;color: #a31515;&quot;&gt;!`&lt;/span&gt;;&lt;/div&gt;&lt;/div&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt;};&lt;/span&gt;&lt;/pre&gt;Create 2nd Activity Function.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXqB5j_MV3P6L7QA3pC5MA0Wk868iYyoX7vl2Qv2EuSfgzUw7E_c-HhGlu_n0XkWyiB16KkYrxnXU84Se4nDegjGgnIHez8rKr4Q2bn70pPKTcLwCJNVNTPXDix6bD0dcOJh8Uxoxx14M/s775/8.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;643&quot; data-original-width=&quot;775&quot; height=&quot;331&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXqB5j_MV3P6L7QA3pC5MA0Wk868iYyoX7vl2Qv2EuSfgzUw7E_c-HhGlu_n0XkWyiB16KkYrxnXU84Se4nDegjGgnIHez8rKr4Q2bn70pPKTcLwCJNVNTPXDix6bD0dcOJh8Uxoxx14M/w400-h331/8.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Paste below code in BookHotel function.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;module.exports = &lt;span style=&quot;background-color: #fffffe; color: blue; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fffffe; color: blue; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt; (context) {&lt;/span&gt;&lt;div style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;    &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #a31515;&quot;&gt;`Hotel Bookings for the trip have been -  &lt;/span&gt;${context.bindings.name}&lt;span style=&quot;color: #a31515;&quot;&gt;!`&lt;/span&gt;;&lt;/div&gt;&lt;/div&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt;};&lt;/span&gt;&lt;/pre&gt;Create Orchestrator function.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyEyD9YHedkQj2RDq22LQojKGMD-j7J5-3MKrSHGkKfoi5e6FgvU0k8ZlvT7jUgYKMJ1N1myZ1jI8EZYrlcS5Bbpe1a2sgzFPLzS5aCstJqs3ELm58vHY-xUeSaPjahyphenhyphenzIwEQ2i3vZLpc/s783/9.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;548&quot; data-original-width=&quot;783&quot; height=&quot;280&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyEyD9YHedkQj2RDq22LQojKGMD-j7J5-3MKrSHGkKfoi5e6FgvU0k8ZlvT7jUgYKMJ1N1myZ1jI8EZYrlcS5Bbpe1a2sgzFPLzS5aCstJqs3ELm58vHY-xUeSaPjahyphenhyphenzIwEQ2i3vZLpc/w400-h280/9.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Paste below code in &quot;BookingOrchestrator&quot; function.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;&lt;b&gt;const&lt;/b&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt; df = require(&lt;/span&gt;&lt;span style=&quot;background-color: #fffffe; color: #a31515; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt;&quot;durable-functions&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt;);&lt;/span&gt;&lt;div style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;div&gt;module.exports = df.orchestrator(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;* (context) {&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: blue;&quot;&gt;const&lt;/span&gt; outputs = [];&lt;/div&gt;&lt;br /&gt;&lt;div&gt;    &lt;span style=&quot;color: green;&quot;&gt;// Asyncronously calls both activity functions.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    outputs.push(&lt;span style=&quot;color: blue;&quot;&gt;yield&lt;/span&gt; context.df.callActivity(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;BookFlight&quot;&lt;/span&gt;, &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Confirmed&quot;&lt;/span&gt;));&lt;/div&gt;&lt;div&gt;    outputs.push(&lt;span style=&quot;color: blue;&quot;&gt;yield&lt;/span&gt; context.df.callActivity(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;BookHotel&quot;&lt;/span&gt;, &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Confirmed&quot;&lt;/span&gt;));&lt;/div&gt;&lt;div&gt;    &lt;/div&gt;&lt;div&gt;    &lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; outputs;&lt;/div&gt;&lt;/div&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt;});&lt;/span&gt;&lt;/pre&gt;We all all set for execution.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 4: &lt;/b&gt;Test the functionality.&lt;/div&gt;&lt;div&gt;Open Starter Function, click on &quot;Test/Run&quot; and give the orchestrator function name as parameter.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4r9kRwMvMksI0XHVYSEJ3u0dehaLfI5cKyuK09TdPa1myhppNjnsn3T2bhE7TlIARxGvAfpb4Fr3xxivhuhU6ySRObL4NPCmHaNwi_CjsA4Ee0hNQe73kHbWR_ZpiSHjhIDs0_4691cg/s930/11.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;237&quot; data-original-width=&quot;930&quot; height=&quot;103&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4r9kRwMvMksI0XHVYSEJ3u0dehaLfI5cKyuK09TdPa1myhppNjnsn3T2bhE7TlIARxGvAfpb4Fr3xxivhuhU6ySRObL4NPCmHaNwi_CjsA4Ee0hNQe73kHbWR_ZpiSHjhIDs0_4691cg/w400-h103/11.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;or you can copy the function url from &quot;Get Function URL&quot; from overview and replce below highlighted function name with orchestrator name.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;az_ea_font, &amp;quot;Segoe UI&amp;quot;, az_font, system-ui, -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, &amp;quot;Open Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;https://durafunctiondemo.azurewebsites.net/api/orchestrators/&lt;/span&gt;&lt;span face=&quot;az_ea_font, &amp;quot;Segoe UI&amp;quot;, az_font, system-ui, -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, &amp;quot;Open Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif&quot; style=&quot;background-color: #fcff01; font-size: 16px;&quot;&gt;{functionName}&lt;/span&gt;&lt;span face=&quot;az_ea_font, &amp;quot;Segoe UI&amp;quot;, az_font, system-ui, -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, &amp;quot;Open Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;?code=oPaGqBv7jRVOxQjuJkiEtA/caBxb6Py4IzHCW0iE/okQXfDEi1k9kw==&lt;/span&gt;&lt;br /&gt;&lt;p&gt;This is the response and the &lt;b&gt;&quot;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;statusQueryGetUri&lt;/span&gt;&quot; &lt;/b&gt;will give the final response combining the responses of all activity functions.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKNSQvN_2M30aPwshaJ2aYlEhtYM6xOTXOTkmlDmf-ICWKUV4Izl9oW2AuQg8rCJMS6na6OCetzVr1QElZKL8sw44kPOT1AQvQUvZkCpDM5XEKyMZ5CNFzBdkXlesa0gt4NSO4fKyTxDg/s1795/12.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;449&quot; data-original-width=&quot;1795&quot; height=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKNSQvN_2M30aPwshaJ2aYlEhtYM6xOTXOTkmlDmf-ICWKUV4Izl9oW2AuQg8rCJMS6na6OCetzVr1QElZKL8sw44kPOT1AQvQUvZkCpDM5XEKyMZ5CNFzBdkXlesa0gt4NSO4fKyTxDg/w640-h160/12.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Here is the final response from Orchestrator function.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf0yJDeGdzXsq1kVauvnOaBNSJis0CR_QQbstZxIUoIE1su6PFdbbNP0wWCkReBaxbF9xLz-K39byRGQmW0WRJjKWo1QteU6GDb5ycEj4fX0nf7ygThglh_ChmWxL3MN99vTKtqh8_WOM/s2084/13.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;212&quot; data-original-width=&quot;2084&quot; height=&quot;66&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf0yJDeGdzXsq1kVauvnOaBNSJis0CR_QQbstZxIUoIE1su6PFdbbNP0wWCkReBaxbF9xLz-K39byRGQmW0WRJjKWo1QteU6GDb5ycEj4fX0nf7ygThglh_ChmWxL3MN99vTKtqh8_WOM/w640-h66/13.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;Step 5:&lt;/b&gt; What if one of the activity functions is not avilable.&lt;/div&gt;&lt;div&gt;Lets Disable &quot;BookHotel&quot; activity function.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNlhuOp0b8qZLM0L0wV2JWK8OIbORKG_a35oRzbYTXOGRYG0G0JM_6JDBhTy-LbjrQ4CY4tEi0pC1WxWCgPLrUH0pWzmB70BySgwOrW1082eGQVQTHhrBxA78VKI2g7pqC-crTfKtLAGY/s1358/14.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;430&quot; data-original-width=&quot;1358&quot; height=&quot;202&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNlhuOp0b8qZLM0L0wV2JWK8OIbORKG_a35oRzbYTXOGRYG0G0JM_6JDBhTy-LbjrQ4CY4tEi0pC1WxWCgPLrUH0pWzmB70BySgwOrW1082eGQVQTHhrBxA78VKI2g7pqC-crTfKtLAGY/w640-h202/14.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Now repeat the Step 4&amp;nbsp; but browsing the url&amp;nbsp;&lt;span face=&quot;az_ea_font, &amp;quot;Segoe UI&amp;quot;, az_font, system-ui, -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, &amp;quot;Open Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;https://durafunctiondemo.azurewebsites.net/api/orchestrators/&lt;/span&gt;&lt;span face=&quot;az_ea_font, &amp;quot;Segoe UI&amp;quot;, az_font, system-ui, -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, &amp;quot;Open Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif&quot; style=&quot;background-color: #fcff01; font-size: 16px;&quot;&gt;{functionName}&lt;/span&gt;&lt;span face=&quot;az_ea_font, &amp;quot;Segoe UI&amp;quot;, az_font, system-ui, -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, &amp;quot;Open Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;?code=oPaGqBv7jRVOxQjuJkiEtA/caBxb6Py4IzHCW0iE/okQXfDEi1k9kw==&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;az_ea_font, Segoe UI, az_font, system-ui, -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, Open Sans, Helvetica Neue, sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;and then browse the url from&amp;nbsp;&lt;/span&gt;&lt;b&gt;&quot;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;statusQueryGetUri&lt;/span&gt;&quot;.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4WNFWGWjgnjKkGPuPDhbl__uvCw7Xf_sCjE8vnL9RqAriRj5qnzsLrauW8BKyrxK_FexNkICnIks6s_R1_-1STeC2s-Jr6E3413qFuDzNdx_7wB3jTp2y99gggwu-gnSZK4U7J9Tn_aE/s2108/15.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;211&quot; data-original-width=&quot;2108&quot; height=&quot;64&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4WNFWGWjgnjKkGPuPDhbl__uvCw7Xf_sCjE8vnL9RqAriRj5qnzsLrauW8BKyrxK_FexNkICnIks6s_R1_-1STeC2s-Jr6E3413qFuDzNdx_7wB3jTp2y99gggwu-gnSZK4U7J9Tn_aE/w640-h64/15.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;You can see that the Orchestrator function ran the &quot;BookFlight&quot; function, but due to the fact &quot;BookHotel&quot; function is unavilable, its holding its state waiting for the response from &quot;BookHotel&quot; function.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question is where is the state information saved for time being.&lt;/div&gt;&lt;div&gt;Ans: Its in a Azure Queue with all related information. Let me show you.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDqVVajtXtuOfUDf2cNxKWYyqBQlnqywxcyIHQOKjdMRPR4fTbgdv-Y9QzgoKSCCgBtK9MCXU2SxFwAdpUIa7Cc92j_jldualQNw1jfXcVcm7nlJBcRIFhJWt8Dx2XF9GRu4O29iYReQk/s1784/16.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;908&quot; data-original-width=&quot;1784&quot; height=&quot;326&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDqVVajtXtuOfUDf2cNxKWYyqBQlnqywxcyIHQOKjdMRPR4fTbgdv-Y9QzgoKSCCgBtK9MCXU2SxFwAdpUIa7Cc92j_jldualQNw1jfXcVcm7nlJBcRIFhJWt8Dx2XF9GRu4O29iYReQk/w640-h326/16.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Now, lets enable the &quot;BookHotel&quot; activity fucntion. and then the orchestrator function will pick where it left and process the final output.&lt;/div&gt;&lt;div&gt;Once you enabled the Activity function, the Message saved in Azure Queue by Durable function is cleared as the Orchestrator function will process the final output.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOL5QVSaguzEimoBBsmSykFZ5t6aDWP_9xKRohiBTkW_QQaHjPVovx_ex1R149eNnkl-0ndJVnYvu0A82cUmfJcmR9XA6He6xnsT7Kj62dZBvZ7rpOkcl9ClhzKgnE67ui-Ul4Nklc00g/s2201/17.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;215&quot; data-original-width=&quot;2201&quot; height=&quot;62&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOL5QVSaguzEimoBBsmSykFZ5t6aDWP_9xKRohiBTkW_QQaHjPVovx_ex1R149eNnkl-0ndJVnYvu0A82cUmfJcmR9XA6He6xnsT7Kj62dZBvZ7rpOkcl9ClhzKgnE67ui-Ul4Nklc00g/w640-h62/17.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;Finally lets talk about Billing.&lt;/b&gt;&lt;div&gt;Unlike Azure functions, Durable-Functions were billed based on number of calls+ time of execution.&lt;/div&gt;&lt;div&gt;But, Orchestrator function has a special feature &quot;Stop-Resume&quot; behavior. Once one of the fucntion yeild the result, instead of waiting (synchronously), Orchestrator function will stop and saves its state as a message in a Queue. Once the response from second function arrives, it will start again and finishes its job.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Hope i cclarified the concept of Durable-Functions.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/1820325421590293855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2021/05/azure-durable-functions-starter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/1820325421590293855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/1820325421590293855'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2021/05/azure-durable-functions-starter.html' title='Azure Durable Functions - Starter, Orchestrator and Activity Fucntions'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt_gxVvg8UNof-SW97DbCmh1uHuX_4vsAPGlAhJKUUVm6jqkA9sOY2vi730wi6fdEhOwgh6wiwNbQLuAzArW4obWBjn7ztlrbA6KYI4rvUiIQ4_6c8lY6kfO6KF49ChDorjo30Ls35FPM/s72-w640-h286-c/1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-7153043112660807082</id><published>2021-04-30T17:50:00.003-07:00</published><updated>2025-01-16T12:19:39.909-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><category scheme="http://www.blogger.com/atom/ns#" term="Functions"/><title type='text'>Azure Functions Basics - Part 2</title><content type='html'>&lt;p&gt;In earlier post, we have built the &lt;b&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;green&lt;/span&gt;&lt;/b&gt; part of below app. &lt;a href=&quot;https://pratapreddypilaka.blogspot.com/2021/04/azure-functions-basics-part-1.html&quot; target=&quot;_blank&quot;&gt;Part-1&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5UYxeN9hausQhVUp1rSWksBroXD_f8ywK3v6GIWmfFHrJzwKFYWjrBhcFyshQg09RQIVE4KCr8d1p9TRXeC-H4CSsfpHWdiPBq9DeCiqAyohKC2JDj1U-pNoaCPt370bKxS2MP-35syg/s840/2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;524&quot; data-original-width=&quot;840&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5UYxeN9hausQhVUp1rSWksBroXD_f8ywK3v6GIWmfFHrJzwKFYWjrBhcFyshQg09RQIVE4KCr8d1p9TRXeC-H4CSsfpHWdiPBq9DeCiqAyohKC2JDj1U-pNoaCPt370bKxS2MP-35syg/w640-h400/2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Now lets continue building&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;red&lt;/span&gt;&lt;/b&gt; part of the design.&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;b&gt;Step 4:&lt;/b&gt;&amp;nbsp;Create Azure Queue&lt;/p&gt;&lt;p&gt;Go to Azure portal and search for &quot;storage account&quot;.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If we refer to &lt;b&gt;Step1&lt;/b&gt;, where we create our first Azure Function, there is a storage account created as part of it. Lets open and see it.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZdrv-USy8_3LbPxlnh7OddakMEKnX-Jiwp7sNakExCxJw0pvLq2DAr2e4xk7MdRwJUrQLpwK0AscaJlIOuhjvZFsLhxS4rQYBHXyJxDhDN8It7WfHPEAq-YvxzdeysfSnKp-YywmLFAw/s1223/3.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;453&quot; data-original-width=&quot;1223&quot; height=&quot;238&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZdrv-USy8_3LbPxlnh7OddakMEKnX-Jiwp7sNakExCxJw0pvLq2DAr2e4xk7MdRwJUrQLpwK0AscaJlIOuhjvZFsLhxS4rQYBHXyJxDhDN8It7WfHPEAq-YvxzdeysfSnKp-YywmLFAw/w640-h238/3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;Here you can see all the files related to Function App are stored in this blob storage.&lt;/div&gt;&lt;div&gt;Now lets create a Queue with name &quot;orderqueue&quot;.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzijm6LcJA6ewVxHhOkh3FKvCyL7bqOFQVq9OdaFuTB1TVePJvRB8V5rB4soGXag09_GyWXjiWjjfPyxo5j0QMXsm6r2gfNhoMVSekxIfh3IbOdteb8kC0FF4qDHoLJzm0KdPCVQypxFU/s1112/4.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;472&quot; data-original-width=&quot;1112&quot; height=&quot;272&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzijm6LcJA6ewVxHhOkh3FKvCyL7bqOFQVq9OdaFuTB1TVePJvRB8V5rB4soGXag09_GyWXjiWjjfPyxo5j0QMXsm6r2gfNhoMVSekxIfh3IbOdteb8kC0FF4qDHoLJzm0KdPCVQypxFU/w640-h272/4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;Step 5:&lt;/b&gt; Update &quot;Fn_Save_PurchaseOrder&quot; function.&lt;/div&gt;&lt;div&gt;Open &quot;Fn_Save_PurchaseOrder&quot; function and go to &quot;Integration&quot; pane, add one more output. This time select it as Azure Queue storage. Give the detail and make sure you selected the Storageaccount in which we created the Queue and click ok.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOdJSRmCwtHprcEChsqvcsNzvUNDurEGugjh6C6t0idLQZSkzWIeMU5kzTRJEwxZD1JWMJ6Ee2SNGK31AOc6yAW65ws9GuSjsjKAX8JHF6e4llEwDnNTN7ynVAMpE8xHTIDm4jfp9Y6GA/s2242/5.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;872&quot; data-original-width=&quot;2242&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOdJSRmCwtHprcEChsqvcsNzvUNDurEGugjh6C6t0idLQZSkzWIeMU5kzTRJEwxZD1JWMJ6Ee2SNGK31AOc6yAW65ws9GuSjsjKAX8JHF6e4llEwDnNTN7ynVAMpE8xHTIDm4jfp9Y6GA/w640-h248/5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Now, the &lt;b&gt;&quot;function.json&quot;&lt;/b&gt; file will be updated with new binding pertaining to Azure Queue.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Switch to edit &lt;b&gt;&quot;index.js&quot; &lt;/b&gt;file and update it with below code.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;module.exports = &lt;span style=&quot;background-color: #fffffe; color: blue; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fffffe; color: blue; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt; (context, req) {&lt;/span&gt;&lt;div style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;    context.log(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;JavaScript HTTP trigger function processed a request.&#39;&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;    &lt;span style=&quot;color: green;&quot;&gt;//creating a JSON string from request data&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; newitem=&lt;span style=&quot;color: teal;&quot;&gt;JSON&lt;/span&gt;.stringify({&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;id&quot;&lt;/span&gt;: req.body.id,&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;item&quot;&lt;/span&gt;:req.body.item,&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;make&quot;&lt;/span&gt;:req.body.make,&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;model&quot;&lt;/span&gt;:req.body.model,&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;buyer&quot;&lt;/span&gt;:req.body.buyer,&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;address&quot;&lt;/span&gt;:req.body.address&lt;/div&gt;&lt;div&gt;    });&lt;/div&gt;&lt;br /&gt;&lt;div&gt;    &lt;span style=&quot;color: green;&quot;&gt;//saving the new item to newpurchaseorder output, &lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: green;&quot;&gt;//which is PurchaseOrders container in this case&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    context.bindings.newpurchaseorder=newitem;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;    &lt;span style=&quot;color: green;&quot;&gt;//Save the order item to Azure queue&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    context.bindings.neworderqueueitem=newitem;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;    &lt;span style=&quot;color: green;&quot;&gt;//confirming the save success&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    context.res={&lt;/div&gt;&lt;div&gt;        status:&lt;span style=&quot;color: #09885a;&quot;&gt;200&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;        body : &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Purchase Order saved sucesfully.&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;        headers: {&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;Content-Type&#39;&lt;/span&gt;: &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;application/json&#39;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;/div&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div&gt;Now lets test the functionality, using the same input form before.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;{&lt;div style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;    &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;id&quot;&lt;/span&gt;: &lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;1002&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;item&quot;&lt;/span&gt;:&lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;mobile&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;make&quot;&lt;/span&gt;:&lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;samsung&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;model&quot;&lt;/span&gt;:&lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;S21&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;buyer&quot;&lt;/span&gt;:&lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;Pratap&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;address&quot;&lt;/span&gt;:&lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;Wellington,NZ&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;This time, it not only saves data to CosmosDB, but also adds a message ot Orderqueue.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH6D3sZAXcrvKdZhYgb10sZwJdZDHpDqm0kleBRC49EgIGxhhHPe29i1yM5MCBXiyVkmDSvTcf9IE2R2aJ_6pd51S1iTHBwtXkvne-k94Hz_yWRyDtnkNFGl3VNiDbQppuYEadUk7Wwlw/s1774/6.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;475&quot; data-original-width=&quot;1774&quot; height=&quot;172&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH6D3sZAXcrvKdZhYgb10sZwJdZDHpDqm0kleBRC49EgIGxhhHPe29i1yM5MCBXiyVkmDSvTcf9IE2R2aJ_6pd51S1iTHBwtXkvne-k94Hz_yWRyDtnkNFGl3VNiDbQppuYEadUk7Wwlw/w640-h172/6.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;Step 6:&lt;/b&gt;&amp;nbsp;Create more conatiners in our Cosmos DB to handle available stock data&amp;nbsp; and shipping order data. I have added these two containers to same DB, and have a look at these partition keys.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwkugMXu3ync4dtj4Q7GclMgZmY1ghRZTjVjIwuuPMVlZ_ppeS_SG-g2P0YejInPcevhja2lAfvgLNyzfLrWIHDOr4GUs6ff-KqkPnZvawn2fi0RnUcWmGR57nZM79_0F_IJAvtnn2bjw/s1256/7.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;593&quot; data-original-width=&quot;1256&quot; height=&quot;302&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwkugMXu3ync4dtj4Q7GclMgZmY1ghRZTjVjIwuuPMVlZ_ppeS_SG-g2P0YejInPcevhja2lAfvgLNyzfLrWIHDOr4GUs6ff-KqkPnZvawn2fi0RnUcWmGR57nZM79_0F_IJAvtnn2bjw/w640-h302/7.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;I am adding some sample items to &quot;AvailableStock&quot;.&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz4Sma9szWSZ6RWEGm6u9rQDayJeh5IA55dh7BTEgiDp2DRWl_k4zacv8D50aCiamUcej4OVpIzR-kFK7GE5fTRNj7VdXDXgsyn6DCYU-PkoN1nKNiq0PqQMKoxz-a5qrzsqq9Yq-aYGE/s1303/8.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;492&quot; data-original-width=&quot;1303&quot; height=&quot;242&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz4Sma9szWSZ6RWEGm6u9rQDayJeh5IA55dh7BTEgiDp2DRWl_k4zacv8D50aCiamUcej4OVpIzR-kFK7GE5fTRNj7VdXDXgsyn6DCYU-PkoN1nKNiq0PqQMKoxz-a5qrzsqq9Yq-aYGE/w640-h242/8.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 7:&lt;/b&gt; Create&amp;nbsp; a new Azure Function &quot;Fn_ConfirmDelivery&quot;. Go to Function Apps, select &quot;Purchase OrderDemo&quot;, add a new function. Rember Function App is a container of Functions, so you can have multiple functions defined in same Function App.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This time choose &quot;Azure Queue Storage trigger&quot;, as we want this function to be triggered when ever there is a new item added to &quot;orderqueue&quot;. Give the details accordingly.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivhlZquuW9zKMgZUXa80hbdiT4FPYlMgij4Xew09gYteTrK05FsYDwoZTDErbwGukkncouNxjcBn9einoouVQNyib96FUgvEMqNV7tAra_hC1jIrHeYkY0NpcGz30CfKlaNTDL6MM0GLk/s1196/9.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1196&quot; data-original-width=&quot;843&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivhlZquuW9zKMgZUXa80hbdiT4FPYlMgij4Xew09gYteTrK05FsYDwoZTDErbwGukkncouNxjcBn9einoouVQNyib96FUgvEMqNV7tAra_hC1jIrHeYkY0NpcGz30CfKlaNTDL6MM0GLk/w453-h640/9.png&quot; width=&quot;453&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Once the function is created, go to &quot;Integration&quot; pane.&amp;nbsp; This function has to read information from &quot;AvailableStock&quot; container and confirm the delivery. So lets add a new input and new outputs.&lt;/div&gt;&lt;div&gt;Please note that input is from CosmosDB&#39;s&amp;nbsp; &lt;b&gt;AvailableStock&lt;/b&gt; container to read the avialbility and Output is to CosmosDB&#39;s &lt;b&gt;ShippingOrders&lt;/b&gt; container for creating a new shipment.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxPqLIbYrjMfNKY8mNvGnOv4_AT1OtnuDhOtjv5PZeThdE8LV8jwgbdBnJdQQJHTmIw0lI0fwuCMswYrn5FPOQGn795wUGnFatU30FdJYyQ_W6uLjsVOzulubnkijceEjiy7Z-V-_4RLo/s1059/10.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1059&quot; data-original-width=&quot;998&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxPqLIbYrjMfNKY8mNvGnOv4_AT1OtnuDhOtjv5PZeThdE8LV8jwgbdBnJdQQJHTmIw0lI0fwuCMswYrn5FPOQGn795wUGnFatU30FdJYyQ_W6uLjsVOzulubnkijceEjiy7Z-V-_4RLo/w604-h640/10.png&quot; width=&quot;604&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Now go to index.js file and update the code to below block.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;module.exports = &lt;span style=&quot;background-color: #fffffe; color: blue; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fffffe; color: blue; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt; (context, myQueueItem) {&lt;/span&gt;&lt;div style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;    context.log(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;JavaScript queue trigger function processed work item&#39;&lt;/span&gt;, myQueueItem);&lt;/div&gt;&lt;div&gt;    &lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; avilablemodel=context.bindings.avilablestock.find(model =&amp;gt; model = myQueueItem.model)    &lt;/div&gt;&lt;div&gt;    &lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(avilablemodel.availableunits&amp;gt;&lt;span style=&quot;color: #09885a;&quot;&gt;0&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;    {&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; newitemdelivery= &lt;span style=&quot;color: teal;&quot;&gt;JSON&lt;/span&gt;.stringify({&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;id&quot;&lt;/span&gt;:myQueueItem.buyer+&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;-&quot;&lt;/span&gt;+myQueueItem.model,&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;shiporderid&quot;&lt;/span&gt;:myQueueItem.buyer+&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;-&quot;&lt;/span&gt;+myQueueItem.model,&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;address&quot;&lt;/span&gt;:myQueueItem.address,&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;item&quot;&lt;/span&gt;: avilablemodel.item+avilablemodel.model&lt;/div&gt;&lt;div&gt;        })&lt;/div&gt;&lt;br /&gt;&lt;div&gt;        context.bindings.neworderdelivery=newitemdelivery&lt;/div&gt;&lt;div&gt;        context.log(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Requested Item is ready for shipping&quot;&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;        &lt;/div&gt;&lt;/div&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt;};&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;Save the function and test run by giving below data.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;pre&gt;{&lt;div style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px;&quot;&gt;&lt;div&gt;    &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;id&quot;&lt;/span&gt;: &lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;1002&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;item&quot;&lt;/span&gt;:&lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;mobile&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;make&quot;&lt;/span&gt;:&lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;samsung&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;model&quot;&lt;/span&gt;:&lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;S21&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;buyer&quot;&lt;/span&gt;:&lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;Pratap&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;address&quot;&lt;/span&gt;:&lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;Wellington,NZ&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;This will read the item availability and if avialable, it will create a record in ShippingOrders as we expected.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1QPE8vWrApsGMoIBqqjMJFVEQPHyjPNtL33nng2oOOrCHIdY84dHe5WKQmQ3veq-XtPvBTD_njPIFWoWtK1r43_s16bQOobrh1cOMa4RF52RjaJ8oAkl9f9jG7IDMTEVuJ-Uu3wPKJ9Y/s1554/11.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;803&quot; data-original-width=&quot;1554&quot; height=&quot;330&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1QPE8vWrApsGMoIBqqjMJFVEQPHyjPNtL33nng2oOOrCHIdY84dHe5WKQmQ3veq-XtPvBTD_njPIFWoWtK1r43_s16bQOobrh1cOMa4RF52RjaJ8oAkl9f9jG7IDMTEVuJ-Uu3wPKJ9Y/w640-h330/11.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Great. Since we finished everything from design, lets give a go from end to end.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU70EXseWilqNQf7kdHyqgTcVkcGAuRFW2psR0ts0rNbwUkqaGZGt7_V7iOwQniSCABrp8_aqd0weTzccxNgLy5hrP_cnGaWdw4VNPGhQOvPutci96pRPm8cxo-S4agpa_zpTagSyVmlY/s840/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;524&quot; data-original-width=&quot;840&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU70EXseWilqNQf7kdHyqgTcVkcGAuRFW2psR0ts0rNbwUkqaGZGt7_V7iOwQniSCABrp8_aqd0weTzccxNgLy5hrP_cnGaWdw4VNPGhQOvPutci96pRPm8cxo-S4agpa_zpTagSyVmlY/w640-h400/1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;This starts with a Http invocation to first azure function, and that should add order details in first container, then add a new message to orderqueue. This should trigger second function, which checks for availability and logs a shipping order in third container.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I am triggering the first function with below test data, a new watch for me.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNoqmYiPFg-lMjMxwn-2_Nxmbalc4EoF1XHb6n1ULp8xKfmyCoqv0sY93UIRVLhuw1E7x9YMfUp_9Y8RKB4KfFcGDkbwh6I3isizwlaXGeMUtebhmlg5OuXaCDl6XRxtQ6Px4f-yidpxE/s2048/12.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1050&quot; data-original-width=&quot;2048&quot; height=&quot;328&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNoqmYiPFg-lMjMxwn-2_Nxmbalc4EoF1XHb6n1ULp8xKfmyCoqv0sY93UIRVLhuw1E7x9YMfUp_9Y8RKB4KfFcGDkbwh6I3isizwlaXGeMUtebhmlg5OuXaCDl6XRxtQ6Px4f-yidpxE/w640-h328/12.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Now lets go to CosmosDB and check both &lt;b&gt;&quot;PurchaseOrders&quot; , &quot;ShipmentOrders&quot;&lt;/b&gt;&amp;nbsp;containers for the results.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6sXQUMiaQDF9aKx7KQcnwJLPh70IQ1RxtSsahVAjcL0bKGDRuR9SX3BuAR3NlqADp-eL04kx5lz9jbAhGbzqkVqllfhnhK5ftgs4pyoRhqHz3-jIbqaR1FIVQrzjYvZzSY_iVhNgo-nk/s1341/13.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;932&quot; data-original-width=&quot;1341&quot; height=&quot;444&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6sXQUMiaQDF9aKx7KQcnwJLPh70IQ1RxtSsahVAjcL0bKGDRuR9SX3BuAR3NlqADp-eL04kx5lz9jbAhGbzqkVqllfhnhK5ftgs4pyoRhqHz3-jIbqaR1FIVQrzjYvZzSY_iVhNgo-nk/w640-h444/13.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/7153043112660807082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2021/04/azure-functions-basics-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/7153043112660807082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/7153043112660807082'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2021/04/azure-functions-basics-part-2.html' title='Azure Functions Basics - Part 2'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5UYxeN9hausQhVUp1rSWksBroXD_f8ywK3v6GIWmfFHrJzwKFYWjrBhcFyshQg09RQIVE4KCr8d1p9TRXeC-H4CSsfpHWdiPBq9DeCiqAyohKC2JDj1U-pNoaCPt370bKxS2MP-35syg/s72-w640-h400-c/2.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-8441558268414193690</id><published>2021-04-30T06:54:00.007-07:00</published><updated>2025-01-16T12:19:49.775-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><category scheme="http://www.blogger.com/atom/ns#" term="Functions"/><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><title type='text'>Azure Functions Basics - Part 1</title><content type='html'>&lt;p&gt;&lt;b&gt;Azu&lt;/b&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;re Function:&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #171717; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Azure Functions is a serverless application platform. It allows developers to host business logic that can be executed without provisioning infrastructure. Functions provides intrinsic scalability and you are charged only for the resources used. You can write your function code in the language of your choice, including C#, F#, JavaScript, Python, and PowerShell Core. Support for package managers like NuGet and NPM is also included, so you can use popular libraries in your business logic.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Says Microsoft, now we will build some simple stuff shown below and understand basics while we do so.&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3vXEG0NOR0igGAadJikN-cHXHlE3qgK9vSNHwWcbySbjHPbOH4d93YXwQzdD9ir8H66eJNyg9yVu71VGXK3Cwi3sVEOGAXyfFx0qM26vpFVb0Uau9dw_77xFtlATw_7iyaSDDKHX_kA0/s840/1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;524&quot; data-original-width=&quot;840&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3vXEG0NOR0igGAadJikN-cHXHlE3qgK9vSNHwWcbySbjHPbOH4d93YXwQzdD9ir8H66eJNyg9yVu71VGXK3Cwi3sVEOGAXyfFx0qM26vpFVb0Uau9dw_77xFtlATw_7iyaSDDKHX_kA0/w640-h400/1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Azure function is a peice of code exceuted by events called triggers. They are meant for short period exceutions and designed to reduce complexity of your business logic.&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;This triggers may be a http call (or) a timely repetetion (or) a new item added in a CosmosDB (or) a new message added to a Azure Queue storage (or) a new item uploaded to a blob storage. There are wide variety of triggers avilable, which we see going ahaead.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;But, you should ask a question, &quot;Why Azure function instead of an App Service?&quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;App service is used to host both web applications and APIs. So why dont we deploy our code in App Services?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;App Services are PaaS, this means though you haven&#39;t deployed a dedicated server, App services will be hosted on bunch of servers managed by Microsoft. So you will be paying money for hosting, irrespective of the usage.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4c4c51;&quot;&gt;Where as in Function Apps, you pay for the usage.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;I am not saying Azure function is suitable for everything.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Here are some limitations:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;1. &lt;b&gt;Exceution time 10 mins:&lt;/b&gt; Not suitable for long running or complex business processes. Use WebJobs for long running process. If your code requires mutiple re-trys or communication with external resources try app services instead.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;2. &lt;b&gt;Exceution Frequency:&lt;/b&gt; Surely more Azure Function instances will be created every 10 seconds up to total 200 instances and each instance support many concurrent requests. Azure Functions are meant for short and on-demand calls. So if you have a functionality that should run 24/7 , better choose either App service or a service hosted on your dedictaed VM instance.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;Step 1: &lt;/b&gt;Go to azure portal and serach for Function Apps.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;Azure Function App&lt;/b&gt; is a container/wrapper for a set of functions.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Create a Function App. I choose Resource group as &quot;SampleRG&quot;, Function Name as &quot;PurchaseOrderDemo&quot; and Language as &quot;Node.JS&quot;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Please note that a storageaccount will be created as part of this. We will use it in later steps.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Lets create a new function. You can go to &quot;Functions&quot; option on left pane and click it.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Add a new function using &quot;+Add&quot; button on top.&lt;/p&gt;&lt;p&gt;You will be presented with a bunch of triggers. For our first function, choose &quot;Http Trigger&quot;.&lt;/p&gt;&lt;p&gt;Once you select trigger, you can name the function and select authorization.&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1IHSh8EjuOtAKMTJfCro_NnbFZA961lybsKbq5Bjg5qHJpu0iiUiGAb9vYLpNaFyUcTRYLyF87n4SUekh5kNR0XRiUNdI-K4FsYvAGFqKj2bN8RgStFgsBxqxR2FpsSiqZDZiuK0O42k/s830/2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;417&quot; data-original-width=&quot;830&quot; height=&quot;201&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1IHSh8EjuOtAKMTJfCro_NnbFZA961lybsKbq5Bjg5qHJpu0iiUiGAb9vYLpNaFyUcTRYLyF87n4SUekh5kNR0XRiUNdI-K4FsYvAGFqKj2bN8RgStFgsBxqxR2FpsSiqZDZiuK0O42k/w400-h201/2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;If you select &quot;Fucntion&quot; as authorization, you need a key to invoke this function, which i will show in next step. Go ahead and create the function. Once the function is created , you will be taken to a page like this.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTAv7vKQatGm5FjPImJj3bPCrOmmHCKASmE5luMWY-J1kK60m_eNr44nVL6PTskyUPpw9xVi_1DCFYnhxL-lfHY9CHNff7sIo-Pf3NygEME8fbICVKGctytVPKc46PYEopWPbzo5s-HT4/s516/3.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;467&quot; data-original-width=&quot;516&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTAv7vKQatGm5FjPImJj3bPCrOmmHCKASmE5luMWY-J1kK60m_eNr44nVL6PTskyUPpw9xVi_1DCFYnhxL-lfHY9CHNff7sIo-Pf3NygEME8fbICVKGctytVPKc46PYEopWPbzo5s-HT4/s320/3.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;&quot;Code+Test&quot;&lt;/b&gt; is where you will write your code and do unit testing.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;&quot;Integration&quot;&lt;/b&gt; is visual tool where we will add new inputs like reading data from other components like Queues and CosmosDB.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;By default the function will be created with some sample code which we can exceute and see.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Lets see how it goes.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKbyos8iF9G9niNuKrlu7k68KnHfgMpyiv0CTUN0ny8ff_bkyXeVCvjRmDN6P_qj4rXSCiKFHP_Is386UZKFpxI2CIGlZQXmvRvaet8nZb83ClsVmtrSTb3hUd52v-e16hNOX0_TI7e6s/s2235/4.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;721&quot; data-original-width=&quot;2235&quot; height=&quot;206&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKbyos8iF9G9niNuKrlu7k68KnHfgMpyiv0CTUN0ny8ff_bkyXeVCvjRmDN6P_qj4rXSCiKFHP_Is386UZKFpxI2CIGlZQXmvRvaet8nZb83ClsVmtrSTb3hUd52v-e16hNOX0_TI7e6s/w640-h206/4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white;&quot;&gt;First understand the code. All it does is accept a Http request and fetch the &quot;name&quot; key-value pair from its body and write a response saying Hello to the name value we provided.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;There will be 2 files associated to the function.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;&quot;Index.js&quot;&lt;/b&gt; file will have all our code.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;&quot;function.json&quot;&lt;/b&gt; file will have binding information. This code will be geneated from the triggers and inputs we configure in &quot;Integration&quot; part. You see more when we configure inputs for CosmosDB and Azure Queues.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Now click on that &quot;Get Function URL&quot; button and paste it in a new tab. It will be something like this.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioZKm1LzapQY2Ua3JR84HWzmnTxOT0kyQcfFqGG4v7XK7ptDWwEZBybja6gFS9EJmhoYHzKTimGKrvsV3bAmrwTFlBs17qlgTMO8aKGFddTBvhelhyJlDt8MmHp3sVBuhXzDms9tih2Vs/s1739/5.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;192&quot; data-original-width=&quot;1739&quot; height=&quot;70&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioZKm1LzapQY2Ua3JR84HWzmnTxOT0kyQcfFqGG4v7XK7ptDWwEZBybja6gFS9EJmhoYHzKTimGKrvsV3bAmrwTFlBs17qlgTMO8aKGFddTBvhelhyJlDt8MmHp3sVBuhXzDms9tih2Vs/w640-h70/5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;Look at the highlighted part in URL, this is what you copied from the &quot;Get Function URL&quot; button. There is a code embeded there due to the fact we choose &quot;Function&quot; as authorization earlier. If you choose &quot;Anonymous&quot; as authorization, you need no code to invoke this function via http call.&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;I have added &quot;&amp;amp;name=PRATAP&quot; at the end, this is the body of the http call i passed as query string.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;Thus by making a http call i invoked the function, and it responded to me by reading my name from the call.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;This is what out of the box functionality does.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;b&gt;Step 2: &lt;/b&gt;Time to create a Cosmos db and containers for our purchase order data .&amp;nbsp; A database account is required to create DB.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgXkL1OlxwKCvO-oFMi02PFwPDYNLOtJWr2ZpCAbHnYDPIpzFnPFzAMQ1N07J90F5xGcDwSxEdorKxuDCrDlJCZXkcDjvMR8jb2TMnsK6X_7rak3NrSdlK9UtJUl0I1g1tTYGWG0s06x8/s943/6.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;660&quot; data-original-width=&quot;943&quot; height=&quot;280&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgXkL1OlxwKCvO-oFMi02PFwPDYNLOtJWr2ZpCAbHnYDPIpzFnPFzAMQ1N07J90F5xGcDwSxEdorKxuDCrDlJCZXkcDjvMR8jb2TMnsK6X_7rak3NrSdlK9UtJUl0I1g1tTYGWG0s06x8/w400-h280/6.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;Once DB account it created you will be taken to a page, on the left pannel click &quot;Data Explorer&quot; option. It will be empty.&amp;nbsp;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;Lets create the Cosmos DB now. If you click the arrow next to &quot;+New Container&quot; , you can see &lt;b&gt;&quot;+New Database&quot; &lt;/b&gt;option. Select it.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggJiRzpDvQghkftg7Lmu71BXt5MVSYGSNq-ElAyn1HJfKQXA8hyphenhyphennTO83GgVc0oPBMjW5DViWMWuzIb5NsPeOkMNBW7x28cFNv7YlGp7C_Rc4zn56oJikmeXIEzUQBaYafnFBcQT-lanug/s657/7.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;598&quot; data-original-width=&quot;657&quot; height=&quot;364&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggJiRzpDvQghkftg7Lmu71BXt5MVSYGSNq-ElAyn1HJfKQXA8hyphenhyphennTO83GgVc0oPBMjW5DViWMWuzIb5NsPeOkMNBW7x28cFNv7YlGp7C_Rc4zn56oJikmeXIEzUQBaYafnFBcQT-lanug/w400-h364/7.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;Once the DB is created, this is how Data Explorer will look like.&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ3yaGHVc8a4uo5rLZLfSFYSLO-7eBVfEbvZddbeeCwwRa0NzenC4hcjHadbyPPDhyqVcOGn6karLCuzr3ygosCCLkHs6eV7jj_1v74t1RrQrhZkRWTBQRkSI6G5xbkhekcY6Q53OhHhk/s953/8.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;424&quot; data-original-width=&quot;953&quot; height=&quot;178&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ3yaGHVc8a4uo5rLZLfSFYSLO-7eBVfEbvZddbeeCwwRa0NzenC4hcjHadbyPPDhyqVcOGn6karLCuzr3ygosCCLkHs6eV7jj_1v74t1RrQrhZkRWTBQRkSI6G5xbkhekcY6Q53OhHhk/w400-h178/8.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;Now select &lt;b&gt;&quot;New Container&quot;&lt;/b&gt; option. A cointainer is collection of Items. I choose &quot;/id&quot; as partition key.&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZcO0YiRg957nmCTgm41LPxycXpaXU3tO9k-GIuwg2fgoL0DeN5L64XCL3LlVq5TU5aEzRjGSzwlpzcYtVwMjUFZPSXxASXhguShObIeG1RfRmj_Z6kzooONVGHVpj5dEoI8d5LmYV3nY/s623/9.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;623&quot; data-original-width=&quot;621&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZcO0YiRg957nmCTgm41LPxycXpaXU3tO9k-GIuwg2fgoL0DeN5L64XCL3LlVq5TU5aEzRjGSzwlpzcYtVwMjUFZPSXxASXhguShObIeG1RfRmj_Z6kzooONVGHVpj5dEoI8d5LmYV3nY/w399-h400/9.png&quot; width=&quot;399&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;Once container is created, lets test it by adding a item manually.&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLEPS5SKvHcfIPuvluE7CVitzJU_Gi07NbtU9IUF_O7g4qOr3-XEu1kDaBgPhDLtwfx7AmIS3DHLGyAZnAj7wlsplzIpvNwb5A85OGDaW-JSC5rgJSCw-Ox_n6X-7e9AtO5PBQV-aWvAg/s1762/10.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;632&quot; data-original-width=&quot;1762&quot; height=&quot;230&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLEPS5SKvHcfIPuvluE7CVitzJU_Gi07NbtU9IUF_O7g4qOr3-XEu1kDaBgPhDLtwfx7AmIS3DHLGyAZnAj7wlsplzIpvNwb5A85OGDaW-JSC5rgJSCw-Ox_n6X-7e9AtO5PBQV-aWvAg/w640-h230/10.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;Remeber Cosmos DB is a NoSQL database designed to store non sturctured data like json.&amp;nbsp;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;Click on &quot;New Item&quot; button and enter our first data item record, and click &quot;Save&quot; button.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;BOOM... new item information has been saved to Cosmos DB. Lets modify our &lt;b&gt;&quot;Fn_Save_PurchaseOrder&quot;&lt;/b&gt; function to do the same, when it was invoked with right data.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Step 3: &lt;/b&gt;Open the function we have created and tested earlier &quot;Fn_Save_PurchaseOrder&quot;.&lt;/p&gt;&lt;p&gt;Click on &lt;b&gt;&quot;Integration&quot;&lt;/b&gt; from left menu. A visual flow will be displayed showing the triggers , inputs and outputs. We created this function to be a Http trigger, so that out mobile app can send a http call to trigger save operation.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Saving the purchase order information to CosmosDB should be the output of this function.&lt;/p&gt;&lt;p&gt;Click on the &lt;b&gt;&quot;+ Add Output&quot;&lt;/b&gt; button and select &quot;CosmosDB&quot; and give the DB name, Collection name.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Now look at the &lt;b&gt;&quot;Document parameter name&quot;&lt;/b&gt; field. The value we give in this field is registered in &quot;function.json&quot; file.&lt;/p&gt;&lt;p&gt;Now look at &lt;b&gt;&quot;Cosmos DB account name connection&quot;&lt;/b&gt; field. Intially it will be empty. By clicking &lt;b&gt;&quot;New&quot;&lt;/b&gt; button, you get to select the database account with which this DB is connected to.&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIAHc23obsDEDW7kNhVtSkXJ02Vqvfy5Lj6ul0cpUMNMdc1M2STi3RnL_AwSM4lQOAa7c4xyDrlQWd6DwLbdLqn84k97hmCg7x1q_duYdlqkRwbFRcu2YmS6Wp2v61hgFLGlxNNEY0_-E/s2048/11.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1063&quot; data-original-width=&quot;2048&quot; height=&quot;332&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIAHc23obsDEDW7kNhVtSkXJ02Vqvfy5Lj6ul0cpUMNMdc1M2STi3RnL_AwSM4lQOAa7c4xyDrlQWd6DwLbdLqn84k97hmCg7x1q_duYdlqkRwbFRcu2YmS6Wp2v61hgFLGlxNNEY0_-E/w640-h332/11.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Click &quot;OK&quot; and save it. Earlier i talked about &quot;function.json&quot; file. The code inside holds all the refrences to triggers and inouts and outputs. This is how it looks right now.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvbrLiEGH8vu-qLQ-_dIeqb2PNVNJr_RcTwyB-z5yYR7DZHmgXWEyq-6pecuNRC0_dxuXi7NwxmtaRZKFHJyKklN-fmJHHn0QsnbNFZbRPgQ4wPsx2sOdcqhlrzCZo4av_enFD61kpcFY/s1324/12.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;957&quot; data-original-width=&quot;1324&quot; height=&quot;462&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvbrLiEGH8vu-qLQ-_dIeqb2PNVNJr_RcTwyB-z5yYR7DZHmgXWEyq-6pecuNRC0_dxuXi7NwxmtaRZKFHJyKklN-fmJHHn0QsnbNFZbRPgQ4wPsx2sOdcqhlrzCZo4av_enFD61kpcFY/w640-h462/12.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Now select index.js file and paste below code.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre&gt;module.exports = &lt;span style=&quot;background-color: #fffffe; color: blue; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fffffe; color: blue; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt; (context, req) {&lt;/span&gt;&lt;div style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;    context.log(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;JavaScript HTTP trigger function processed a request.&#39;&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;    &lt;span style=&quot;color: green;&quot;&gt;//creating a JSON string from request data&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; newitem=&lt;span style=&quot;color: teal;&quot;&gt;JSON&lt;/span&gt;.stringify({&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;id&quot;&lt;/span&gt;: req.body.id,&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;item&quot;&lt;/span&gt;:req.body.item,&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;make&quot;&lt;/span&gt;:req.body.make,&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;model&quot;&lt;/span&gt;:req.body.model,&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;buyer&quot;&lt;/span&gt;:req.body.buyer,&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;address&quot;&lt;/span&gt;:req.body.address&lt;/div&gt;&lt;div&gt;    });&lt;/div&gt;&lt;br /&gt;&lt;div&gt;    &lt;span style=&quot;color: green;&quot;&gt;//saving the new item to newpurchaseorder output, &lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: green;&quot;&gt;//which is PurchaseOrders container in this case&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    context.bindings.newpurchaseorder=newitem;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;    &lt;span style=&quot;color: green;&quot;&gt;//confirming the save success&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    context.res={&lt;/div&gt;&lt;div&gt;        status:&lt;span style=&quot;color: #09885a;&quot;&gt;200&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;        body : &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Purchase Order saved sucesfully.&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;        headers: {&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;Content-Type&#39;&lt;/span&gt;: &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;application/json&#39;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;/div&gt;&lt;span style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;Now save &lt;b&gt;&quot;Index.js&quot;&lt;/b&gt; file. Click &lt;b&gt;&quot;Test/Run&quot;&lt;/b&gt;&amp;nbsp;button to unti test our code.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;Use below code in the body for unti testing.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;{&lt;div style=&quot;background-color: #fffffe; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;    &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;id&quot;&lt;/span&gt;: &lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;1002&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;item&quot;&lt;/span&gt;:&lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;mobile&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;make&quot;&lt;/span&gt;:&lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;samsung&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;model&quot;&lt;/span&gt;:&lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;S21&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;buyer&quot;&lt;/span&gt;:&lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;Pratap&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;address&quot;&lt;/span&gt;:&lt;span style=&quot;color: #0451a5;&quot;&gt;&quot;Wellington,NZ&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;Select the post method and run the test.&lt;/span&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil9H74B88k6OEH9YV6AlUeATB1NDOTQxbiNRE6Zx_DRkGIrH4i7BQaAjnJCwShhH36h9ZEZZWM-kOlpjOeCLj1DCEjU0pOWFOeRKtGzy12aB-gX4ZOYRc2jkX-2LlzakKbzurvMSdNmhA/s830/13.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;509&quot; data-original-width=&quot;830&quot; height=&quot;245&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil9H74B88k6OEH9YV6AlUeATB1NDOTQxbiNRE6Zx_DRkGIrH4i7BQaAjnJCwShhH36h9ZEZZWM-kOlpjOeCLj1DCEjU0pOWFOeRKtGzy12aB-gX4ZOYRc2jkX-2LlzakKbzurvMSdNmhA/w400-h245/13.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;Lets check the data in CosmosDB as well.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdRsr59LMiE5m5sOkNTlON_SrhzvHyJjFhZk4ok6KEyCsUWIOP7pWfDNYJ_2_4rDdQkCKwxxMmqwa-M79zjEdLe_Jj2eMz9QvRxD3vwPsqx3nOa9UtP-04fqzTnN0LopiCfPXN_NPURHE/s1705/14.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;620&quot; data-original-width=&quot;1705&quot; height=&quot;232&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdRsr59LMiE5m5sOkNTlON_SrhzvHyJjFhZk4ok6KEyCsUWIOP7pWfDNYJ_2_4rDdQkCKwxxMmqwa-M79zjEdLe_Jj2eMz9QvRxD3vwPsqx3nOa9UtP-04fqzTnN0LopiCfPXN_NPURHE/w640-h232/14.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;There it is. Data saved to DB sucessfully.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;Now looking at the design again, we should ask why do we need second Azure function to confirm deliveries. Cant we just add that code in this function.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;Answer: What if there is an exception generated in confirmation part, How do we handle it?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;Azure functions are good at doing one thing &quot;DOING ONE THING&quot;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;In this design we add a message to a Azure Queue, which will trigger another function, which checks avilability of items and create items in Ordershipments.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;Lets say if the items are not available, then we add one more queue followed by another function which add the order details in Pending Orders container.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #4c4c51;&quot;&gt;Usually people say there is no re-try capability in Azure functions, but by adding error handling and Azure Queues, we can even implement re-try functionality as well.&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK69IG0LbAxD6cPt-DV66oW9mWcU0i4wzQ7qZO2NF-jOdPMquNMDE0BKMLDmU7Bj_ncl4zKvx7lqOwCzHe43DIwa40PUENyTt1hanQQr-_KIAomJ5AFmL7LOSeCgwO3LutTgpkN3ET3gA/s840/1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;524&quot; data-original-width=&quot;840&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK69IG0LbAxD6cPt-DV66oW9mWcU0i4wzQ7qZO2NF-jOdPMquNMDE0BKMLDmU7Bj_ncl4zKvx7lqOwCzHe43DIwa40PUENyTt1hanQQr-_KIAomJ5AFmL7LOSeCgwO3LutTgpkN3ET3gA/w640-h400/1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;In the next article we will continue adding remining functionality which familiarizes us with hadling Azure Queues and both input and Output bindings of Azure Functions.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Hope i made it as simple as possible. &lt;a href=&quot;https://pratapreddypilaka.blogspot.com/2021/04/azure-functions-basics-part-2.html&quot; target=&quot;_blank&quot;&gt;Part-2 link is here.&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/8441558268414193690/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2021/04/azure-functions-basics-part-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/8441558268414193690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/8441558268414193690'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2021/04/azure-functions-basics-part-1.html' title='Azure Functions Basics - Part 1'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3vXEG0NOR0igGAadJikN-cHXHlE3qgK9vSNHwWcbySbjHPbOH4d93YXwQzdD9ir8H66eJNyg9yVu71VGXK3Cwi3sVEOGAXyfFx0qM26vpFVb0Uau9dw_77xFtlATw_7iyaSDDKHX_kA0/s72-w640-h400-c/1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-2778269084189317122</id><published>2021-04-25T06:57:00.001-07:00</published><updated>2021-04-25T06:57:25.522-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><title type='text'>Azure Policy and Compliance Management</title><content type='html'>&lt;p&gt;&lt;span style=&quot;background-color: white; color: #171717; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Azure Policy helps to enforce organizational standards and to assess compliance at-scale. Through its compliance dashboard, it provides an aggregated view to evaluate the overall state of the environment, with the ability to drill down to the per-resource, per-policy granularity.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; color: #171717; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Thats what Microsoft documentation says.&amp;nbsp; Now let me say in my way.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; color: #171717; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;I work in a bank and the regulatory compliance says, data of our bank shouldn&#39;t leave Autralia.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; color: #171717; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;So if one of our developers deployed a production azure resource in any other AZ Regions, our organization has to pay big penalties for not complying with regulations.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; color: #171717; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;How do we do it? Using Azure Policy Assignment.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; color: #171717; font-size: 16px;&quot;&gt;Before we jump on to implemntation, you need to know about difference between Policy and Initiative.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; color: #171717; font-size: 16px;&quot;&gt;To keep it simple, Policy is a rule and Initiave is a collcetion of policies which set a standard.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; color: #171717; font-size: 16px;&quot;&gt;Eg: ISO(standard) is a Intiative, which comprises of&amp;nbsp; many policies which makes that standard.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicDQh_6kiZhesI7lkT5RIHX0C6-ZrVQi38UXqF3lcYHg0PClnI7eVKGyvXuJscOnTacAiMyRb3dksAYs9dEbZLjQixkY-pjm8emzvnP4ES42BdVsOBwj1ZII7IfBwEcSgOlOLEOljXwec/s1662/3.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;678&quot; data-original-width=&quot;1662&quot; height=&quot;262&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicDQh_6kiZhesI7lkT5RIHX0C6-ZrVQi38UXqF3lcYHg0PClnI7eVKGyvXuJscOnTacAiMyRb3dksAYs9dEbZLjQixkY-pjm8emzvnP4ES42BdVsOBwj1ZII7IfBwEcSgOlOLEOljXwec/w640-h262/3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;background-color: white; color: #171717; font-size: 16px;&quot;&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;So you can assign either a policy or an initiative to a resource group or entire subscription to make your resources comply with regulations. You can create new policies or initiatives of your own that were tailored for your organizational needs.&lt;/p&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; color: #171717; font-size: 16px;&quot;&gt;Enough theory, lets implement.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #171717;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;I have created a resource group &quot;DefaultRG&quot;. So as per my Organizational needs, i need to make sure any resources created in this resource group are located in same region &quot;Australia-East&quot;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #171717;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;color: #171717;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-nKZ-NWMz9Ia-fDVMtYdWe4IIQnQG7r5PUEQOij1W_cFk6fT2GrYG-GY2B8juYPPOOhJ8tVIQtjFAUc-c1JQaDfeax92R5XcL9TduY-ohJQJJ8wI5S9wJkVGgGT10BnfViXUW96V2ZtA/s1002/1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;419&quot; data-original-width=&quot;1002&quot; height=&quot;268&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-nKZ-NWMz9Ia-fDVMtYdWe4IIQnQG7r5PUEQOij1W_cFk6fT2GrYG-GY2B8juYPPOOhJ8tVIQtjFAUc-c1JQaDfeax92R5XcL9TduY-ohJQJJ8wI5S9wJkVGgGT10BnfViXUW96V2ZtA/w640-h268/1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;color: #171717;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Go to Azure portal and search for &quot;Policy&quot;.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #171717;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;There are many policies that were already defined in azure which we can use in our case. Click on Assignments, where we will assign an existing policy to our resource group.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #171717;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;color: #171717;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigtjKiKz5htbiP5NRQAjcMXhihVwxsZM1E1l1hriRuSUhrmuAvEed6YcaR1Z98Ggl0_V3mFSJL5RaL7F0ECw0zJqKb5X0TdqEUKsjvQ8EgjxJT5kYkj6hlYuw9XgsfJqfAQxsfvZg1DEI/s1087/2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;741&quot; data-original-width=&quot;1087&quot; height=&quot;436&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigtjKiKz5htbiP5NRQAjcMXhihVwxsZM1E1l1hriRuSUhrmuAvEed6YcaR1Z98Ggl0_V3mFSJL5RaL7F0ECw0zJqKb5X0TdqEUKsjvQ8EgjxJT5kYkj6hlYuw9XgsfJqfAQxsfvZg1DEI/w640-h436/2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;color: #171717;&quot;&gt;&lt;br /&gt;In Policy assignment screen, i choose to apply this policy to a resource group, instead of entire subscription.&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHMWA_JTgTXD0vvX1KZkva3Q1EozrXy1cMs6Ti6IYXXujBJCzYmtSjG2FIqW0slmc6PsJPBEnE0XrQACJOAuNoXdbCksIOMJejgT8x6Nhso8wIE0M3nZANAH0L-BvqD7OJviuHsdtxbaU/s2048/4.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1173&quot; data-original-width=&quot;2048&quot; height=&quot;366&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHMWA_JTgTXD0vvX1KZkva3Q1EozrXy1cMs6Ti6IYXXujBJCzYmtSjG2FIqW0slmc6PsJPBEnE0XrQACJOAuNoXdbCksIOMJejgT8x6Nhso8wIE0M3nZANAH0L-BvqD7OJviuHsdtxbaU/w640-h366/4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color: #171717;&quot;&gt;In the &quot;Parameters&quot; and &quot;Non Compliance Message&quot; tabs, select the region you choose to deploy for your compliance and give the error message to display if someone try to defy the policy.&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyzsHsYeiRB7stBsIi7b5zpMR6A_v5LWH8CV4VQYZmkiETeGay0N63IhZe-MK32VqZyA_5-P3sLsde5tmQIWMkO2GjlQnfYyY76gjNMWS6enoe2oHeE47MI0bkynaOiCQ8JAlwKc8Iekg/s1173/5.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;780&quot; data-original-width=&quot;1173&quot; height=&quot;426&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyzsHsYeiRB7stBsIi7b5zpMR6A_v5LWH8CV4VQYZmkiETeGay0N63IhZe-MK32VqZyA_5-P3sLsde5tmQIWMkO2GjlQnfYyY76gjNMWS6enoe2oHeE47MI0bkynaOiCQ8JAlwKc8Iekg/w640-h426/5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color: #171717;&quot;&gt;Review and Create.&amp;nbsp;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #171717;&quot;&gt;Since the policy is in place , lets test it.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #171717;&quot;&gt;I am using a Azure CLI command in powershell to create a VM in association with DefaultRG, but in a different region (Europe-West).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #171717;&quot;&gt;az &lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;color: #171717;&quot;&gt;vm create --resource-group DefaultRG --name myTestVM --location westeurope --image ubuntults --admin-username azureuser --admin-password AZpassword12345&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #171717;&quot;&gt;Now, lets see what happens.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFt3uzNeSJrdLaFnEKG8GFjuyLnMutQO3VrGkqoqbJ8oR_awkUUNbIWDpNJHcEdY2OgGdId77_igLdMKbZN1E4QwlaYYq2Pl4zWiAJ9Vplzb2kxb8IOqUAiAqqL1UxpunvTRN5SuNh_Hw/s1348/6.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;766&quot; data-original-width=&quot;1348&quot; height=&quot;364&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFt3uzNeSJrdLaFnEKG8GFjuyLnMutQO3VrGkqoqbJ8oR_awkUUNbIWDpNJHcEdY2OgGdId77_igLdMKbZN1E4QwlaYYq2Pl4zWiAJ9Vplzb2kxb8IOqUAiAqqL1UxpunvTRN5SuNh_Hw/w640-h364/6.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color: #171717;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #171717;&quot;&gt;Error Code: RequestDisallowedByPolicy&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #171717;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Message: Resource &#39;myTestVMVNET&#39; was disallowed by policy. Reasons: &#39;Resources in DefaultRG should only be deployed to Australia-East region.&#39;. See error details for policy resource IDs.&quot;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #171717;&quot;&gt;&quot;MyTestLocationPolicy&quot; assignment stopped me from creating a resource in a different region.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #171717;&quot;&gt;What happens if we applying a policy to an existing resources.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #171717;&quot;&gt;This time, i deleted the policy assignment and then created a new VM by keeping region as &quot;Australia-East&quot;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrVzaFMjOh6-bN8A86JQw8Zy0ToG_bhBM5DPr3Rom6UA8meZpjq2W8Z1MjCWPKYxb-hBjcqWOHuWpGk6HVd29pTSpimbwLPFfurc93n5DlwBaFWvdLo6Af-BHq_P01QdOjbmhin3X6v2I/s1321/7.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;446&quot; data-original-width=&quot;1321&quot; height=&quot;216&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrVzaFMjOh6-bN8A86JQw8Zy0ToG_bhBM5DPr3Rom6UA8meZpjq2W8Z1MjCWPKYxb-hBjcqWOHuWpGk6HVd29pTSpimbwLPFfurc93n5DlwBaFWvdLo6Af-BHq_P01QdOjbmhin3X6v2I/w640-h216/7.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color: #171717;&quot;&gt;Now i will add a new data disk under same resource group but the location as &quot;Europe-West&quot;.&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg32QBrDVMThiAcgDsTdsJ1GCPdSs6Owb2vgsd668tYNA1WJNUOdClVVJ0iHTsoHLMmJo2cqaTNh9T4-aNEJMTjGkLwGxsopry0zM7NBrZk-tPbmIlNs6L_803eBZqrZr2_yOOPJEMzFTU/s1122/8.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;534&quot; data-original-width=&quot;1122&quot; height=&quot;304&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg32QBrDVMThiAcgDsTdsJ1GCPdSs6Owb2vgsd668tYNA1WJNUOdClVVJ0iHTsoHLMmJo2cqaTNh9T4-aNEJMTjGkLwGxsopry0zM7NBrZk-tPbmIlNs6L_803eBZqrZr2_yOOPJEMzFTU/w640-h304/8.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgw8XBOcfDxcrrN9d9smXIjhwVsjhjdzq_mLe5zhaCqtjpUNneJnHV7e4oAecDrgUUMHCpnsnZLu-_jBgwl4gnNvs48r1q8QaDCFbPIATH0BmQVJujdeZkACOl5gFpVJrrfGwK4mnlhjdE/s1727/9.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;965&quot; data-original-width=&quot;1727&quot; height=&quot;358&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgw8XBOcfDxcrrN9d9smXIjhwVsjhjdzq_mLe5zhaCqtjpUNneJnHV7e4oAecDrgUUMHCpnsnZLu-_jBgwl4gnNvs48r1q8QaDCFbPIATH0BmQVJujdeZkACOl5gFpVJrrfGwK4mnlhjdE/w640-h358/9.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;color: #171717;&quot;&gt;&lt;p&gt;&lt;span style=&quot;color: #171717;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;Lets create the Policy assignment just like how we did earlier. After few minutes, the compliance status will be updated and it will show the non-compliance.&amp;nbsp;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgweuewvLXPXooL-bBUibHloWdGSq2NiQ_YaFBjch-_teIlVG4r1rZ2UwjKJk4edF9GWwRshMUBb6tNOy-rd8HWbGRBRrqnUkT20GYuMKN0cwsQ7IyJRFbAIO99HeeUnJZNO12Tob9TbnE/s2220/10.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;736&quot; data-original-width=&quot;2220&quot; height=&quot;212&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgweuewvLXPXooL-bBUibHloWdGSq2NiQ_YaFBjch-_teIlVG4r1rZ2UwjKJk4edF9GWwRshMUBb6tNOy-rd8HWbGRBRrqnUkT20GYuMKN0cwsQ7IyJRFbAIO99HeeUnJZNO12Tob9TbnE/w640-h212/10.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color: #171717;&quot;&gt;Note that, if a new policy is applied and if there is a no-compliant resource , it will not do anything, except riase non-compliance notification.&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #171717;&quot;&gt;Hope i bring some clarity on Azure Policies and Compliance Management.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/2778269084189317122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2021/04/azure-policy-and-compliance-management.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/2778269084189317122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/2778269084189317122'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2021/04/azure-policy-and-compliance-management.html' title='Azure Policy and Compliance Management'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicDQh_6kiZhesI7lkT5RIHX0C6-ZrVQi38UXqF3lcYHg0PClnI7eVKGyvXuJscOnTacAiMyRb3dksAYs9dEbZLjQixkY-pjm8emzvnP4ES42BdVsOBwj1ZII7IfBwEcSgOlOLEOljXwec/s72-w640-h262-c/3.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-4552553151758862995</id><published>2020-08-17T17:43:00.006-07:00</published><updated>2020-08-17T17:48:21.806-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Asp.Net"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="WEB API"/><title type='text'>Adding Swagger to Existing .Net Core WEB API Project</title><content type='html'>&lt;p&gt;In this article we will see How we can add Swagger to an existing WebAPI project.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;First why we need swagger here in this case?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Unlike SAOP based web sevrices or WCF Services, WebAPI are RESTFul. That means there is no WSDL in WebAPI. So Unless you prepare proper documentation about the methods, parameters and outputs, its hard to any consumer of the service to interpret them.&lt;/p&gt;&lt;p&gt;This is where swagger comes into the picture. If you use swagger and SwaggerUI in your WebAPI project, it pretty much takes care of the documentation part. It not only gives you the complete details of methods, parameters and outputs of the sevice, but also provides a UI component where consumers can test the service, without any third party tools.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj13_yL2rcHj6e0KoVx9nbrq4qVrdh-xlByyNuHOO-3nuEkVsFyLhtO-ldeX2xeJVey26vlKPcpj1C61i92LWIaqV0icDkMsEutc7lZjuQRjrgaBBRzLJh-utnHHxle7clX4Q0H7I6fSuY/s853/1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;426&quot; data-original-width=&quot;853&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj13_yL2rcHj6e0KoVx9nbrq4qVrdh-xlByyNuHOO-3nuEkVsFyLhtO-ldeX2xeJVey26vlKPcpj1C61i92LWIaqV0icDkMsEutc7lZjuQRjrgaBBRzLJh-utnHHxle7clX4Q0H7I6fSuY/s640/1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;For this example, i am using WebAPI project from one of the course on Linkedin Learning.&lt;/p&gt;&lt;p&gt;Here is the &lt;a href=&quot;https://1drv.ms/u/s!AmYiNWkD2PZWn0Ha_FUdCDk3lb3S?e=96QQf8&quot; target=&quot;_blank&quot;&gt;link for you to download and try it for yourself&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Download it and open the project and run it.&lt;/p&gt;&lt;p&gt;You will see this. With out any documentation, how anyone could interpret this.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpgD7qetqqJ6Py1aVtb1MpSj9uAe8_40J830qXfbxfqkTu-I4Bo1gMOEGeKxhv6YV1ktJqn-KeHkw1OY3cm4jMeO8vjs_orp7OeppfiAWOyq5JA_SiOjmMoK1FmGp_9K-CD7bGRbzKzPI/s667/2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;363&quot; data-original-width=&quot;667&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpgD7qetqqJ6Py1aVtb1MpSj9uAe8_40J830qXfbxfqkTu-I4Bo1gMOEGeKxhv6YV1ktJqn-KeHkw1OY3cm4jMeO8vjs_orp7OeppfiAWOyq5JA_SiOjmMoK1FmGp_9K-CD7bGRbzKzPI/s640/2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Lets start with the swagg.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Step 1:&lt;/b&gt;&lt;/span&gt; Open Existing WebAPI project in Visual studio. Go to Tools and open &quot;Nuget Package Manager&quot; and click on &quot;Manage Nuget Packages for the Solution&quot;.&lt;/p&gt;&lt;p&gt;Now browse for &quot;Swashbuckle.ASP.Net Core&quot;, install it by selecting the WebAPI project.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjlkHmbMc1gyybvBZ_3vpkTvtwhMAiGlAh-EU3a0Jc9euGFqqe85ZA4J8hLisD3PkKl_09pc_V0jio98h32fXFvyzc33dp0rPcJowCIeG7JpvuyoAXBX4YaT_M9Bl96q89tbaVBldjx4o/s844/3.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;486&quot; data-original-width=&quot;844&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjlkHmbMc1gyybvBZ_3vpkTvtwhMAiGlAh-EU3a0Jc9euGFqqe85ZA4J8hLisD3PkKl_09pc_V0jio98h32fXFvyzc33dp0rPcJowCIeG7JpvuyoAXBX4YaT_M9Bl96q89tbaVBldjx4o/s640/3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;This will install both Swagger and Swagger UI refreneces in your project.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Step2:&lt;/b&gt;&lt;/span&gt; Open Startup.cs file. This file handles all the regsitration of the controllers we use in WebAPI and the request pipelines. If you read default comments provided by framework itself, you will understand.&amp;nbsp;&lt;/p&gt;&lt;p&gt;There are 2 methods in that file.&lt;/p&gt;&lt;p&gt;1. ConfigureServices(): This is where you need to register all the controllers you expose in your service.&lt;/p&gt;&lt;p&gt;2. Configure(): This is where you will register request pipeline like handlers,authorization and routing.&lt;/p&gt;&lt;p&gt;Add assembly reference of &quot;&lt;b&gt;Microsoft.OpenAPI.Models&lt;/b&gt;&quot;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjcpDLS1mDMo7zAdPZjQlTF9SWrYtLEXKP9IqaH3OZ6RUGv3EeUcfn734_odqWAwi1rC-EYivdrqOF1KK08qOiZaneSpgWqAwSE0B6Sr4u67iZ3HdoLskzepmy7i9NymCj0zKbD-6Aqw4/s277/4.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;42&quot; data-original-width=&quot;277&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjcpDLS1mDMo7zAdPZjQlTF9SWrYtLEXKP9IqaH3OZ6RUGv3EeUcfn734_odqWAwi1rC-EYivdrqOF1KK08qOiZaneSpgWqAwSE0B6Sr4u67iZ3HdoLskzepmy7i9NymCj0zKbD-6Aqw4/s0/4.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Add below code in ConfigureServices() method.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre&gt;services.AddSwaggerGen(c=&amp;gt; {
     c.SwaggerDoc(&quot;v1&quot;, new OpenApiInfo { 
                            Title=&quot;HPlus Sports&quot;,
                            Version=&quot;1.0&quot;,
                            Description=&quot;Product API for HPlus Sports.&quot;                   
                });
            });&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;Add below code in Configure() method.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre&gt;app.UseSwagger();
app.UseSwaggerUI(c=&amp;gt; {
                c.SwaggerEndpoint(&quot;/swagger/v1/swagger.json&quot;, &quot;HPlus Sports&quot;);
            });&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;With this we requested to generate SwaggerDoc and also regietred it with endpoint &quot;/swagger/v1/swagger.json&quot;.&lt;/p&gt;&lt;p&gt;Also we requested SwaggerUI to use the above endpoint for its testing purpose.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Step 3:&lt;/b&gt;&lt;/span&gt; Lets build the solution and test it.&lt;/p&gt;&lt;p&gt;Run the project and you will see this as earlier.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv1ka5hiJldZgLwl4iUQvKcwIirdzZGwNQB8TibJ41mjOF1T6keIdB7F1j4JY1yiZAr49cEKyH5LOWgkVYkhq29K_vLXxcg0pAJGfTqBQV2H2t1VnK1PEaJASKlAq9yYPezUXvpsH-LRY/s667/2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;363&quot; data-original-width=&quot;667&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv1ka5hiJldZgLwl4iUQvKcwIirdzZGwNQB8TibJ41mjOF1T6keIdB7F1j4JY1yiZAr49cEKyH5LOWgkVYkhq29K_vLXxcg0pAJGfTqBQV2H2t1VnK1PEaJASKlAq9yYPezUXvpsH-LRY/s640/2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Now change the url form &quot;&lt;a href=&quot;https://localhost:44321/api/product&quot;&gt;https://localhost:44321/api/product&lt;/a&gt;&quot; to &quot;&lt;a href=&quot;https://localhost:44321/swagger/v1/swagger.json&quot;&gt;https://localhost:44321/swagger/v1/swagger.json&lt;/a&gt;&quot; and you see the json of the service revealing all the details required for invoking methods with proper parameters.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVvVwod8rr4WGS3GqyKkU_g2bUDU_nwSSUR5_lER1CwKRuNzhiEghwkuFAybXbHscY1rG7F4_2xEePIDWOfxQj5-2WZTOLm-ZtFsPNlz4yHeT1I9CixESuQYZ937yctmhFeFhV_irswJA/s781/5.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;781&quot; data-original-width=&quot;526&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVvVwod8rr4WGS3GqyKkU_g2bUDU_nwSSUR5_lER1CwKRuNzhiEghwkuFAybXbHscY1rG7F4_2xEePIDWOfxQj5-2WZTOLm-ZtFsPNlz4yHeT1I9CixESuQYZ937yctmhFeFhV_irswJA/s640/5.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;On top of this if you change the url to &quot;&lt;a href=&quot;https://localhost:44321/swagger/index.html&quot;&gt;https://localhost:44321/swagger/index.html&lt;/a&gt;&quot;, Service consumers can access SwaggerUI to run tests on the service to understand the output of the service calls, without using any third party tools.&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSN1OPVEa1VyxIr9bOrKjlR7NOrtmaHlHuknk2dQHRHu3ce4aiE6EiaYWY9EA_5n13c3jE-bIKtN7hoQY7SJ16r4ERpUw7VEHrmyBsfOM6l5UkVBlDTESxzlb0H4z40iF6Wti1rMWSKYA/s733/6.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;733&quot; data-original-width=&quot;676&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSN1OPVEa1VyxIr9bOrKjlR7NOrtmaHlHuknk2dQHRHu3ce4aiE6EiaYWY9EA_5n13c3jE-bIKtN7hoQY7SJ16r4ERpUw7VEHrmyBsfOM6l5UkVBlDTESxzlb0H4z40iF6Wti1rMWSKYA/s640/6.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;let me know if it helps. Thank you.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/4552553151758862995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2020/08/adding-swagger-to-existing-net-core-web.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/4552553151758862995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/4552553151758862995'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2020/08/adding-swagger-to-existing-net-core-web.html' title='Adding Swagger to Existing .Net Core WEB API Project'/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj13_yL2rcHj6e0KoVx9nbrq4qVrdh-xlByyNuHOO-3nuEkVsFyLhtO-ldeX2xeJVey26vlKPcpj1C61i92LWIaqV0icDkMsEutc7lZjuQRjrgaBBRzLJh-utnHHxle7clX4Q0H7I6fSuY/s72-c/1.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-1667698015354112473</id><published>2020-08-15T08:12:00.017-07:00</published><updated>2020-08-23T16:00:12.932-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><category scheme="http://www.blogger.com/atom/ns#" term="Azure DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><title type='text'>Azure DevOps 101 - Creating your first Build and Release Pipelines for automated deployments to DEV, QA and PROD </title><content type='html'>&lt;p&gt;&lt;b&gt;DevOps: &lt;/b&gt;I cannot do justice to DevOps in a single article. Its an Ocean. But for our purposes here is what i would say if some one asks me about it.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&quot;DevOps is a practice in which all the stakeholders were actively involved in entire lifecycle of product from Development , Testing, Productionizing and Production Support.&quot;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Core values of DevOps defined by CAMS - Culture, Automation, Measurement and Sharing.&lt;/p&gt;&lt;p&gt;This is eagle eye view of the core values.&lt;/p&gt;&lt;p&gt;Lets talk about second core value, Automation. Its not about just automation of everything in software life cycle.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Automation:&lt;/b&gt; It talks about fastening stages of SDLC with continuous integration and delivery thus reducing effort and time to roll new changes. Multiple changes getting tested and deployed in a day - make people&#39;s life a lot better. Please keep in mind &quot;Automation&quot; in DevOps means giving prefference to &quot;People over Process over Tools&quot;.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Please reffer to various guides or gurus for deep dive into DevOps.&lt;/p&gt;&lt;p&gt;Our objective here is to implement CI/CD (Continuous Integration / Continues Delivery) in Azure and learn how to cofigure your first Azure Devops Build and Release pipelines. Using which we will push our code to various stages DEV, QA and PROD.&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCBz_pDhqQUtFgdsCNd7OG1v-rNQCcXimLgeJOJiQZ7KfsmiZfFL2DfQf55ZM9S6wCME97bF20wNJA1VYHAHeLeufsZDdEeORlQOsqKUvfg28dHIaHaJxg6H_OWZUy3r_OuvNa81P9s2I/s640/microsoft-azure-devops-pipeline-xenonstack.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;360&quot; data-original-width=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCBz_pDhqQUtFgdsCNd7OG1v-rNQCcXimLgeJOJiQZ7KfsmiZfFL2DfQf55ZM9S6wCME97bF20wNJA1VYHAHeLeufsZDdEeORlQOsqKUvfg28dHIaHaJxg6H_OWZUy3r_OuvNa81P9s2I/s0/microsoft-azure-devops-pipeline-xenonstack.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;b&gt;Pre-Requisites:&lt;/b&gt; You should have Azure subscription ; Visual Studio and Git installed on your machine.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Step 1:&lt;/b&gt; &lt;/span&gt;First i am logging in to Azure console and creating 3 WebApps with DEV, QA and PROD attached in thier names. I am using .Net Core 2.1 code , so i am using same framework for the Azure WebApps.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihDEJeUVY9UolwIMHfg7X9ooMtDTPJsDxTMHuz_8ATNHH5KtJQhbjhsY0Jfw6rJwpzQoPr62pxNxsMX4UaUIue7B_b-L0gli-ggs8aWeXXK-v4cSxJEHgxkhh1tiJir3bFOi45yG-pQC0/s782/1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;533&quot; data-original-width=&quot;782&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihDEJeUVY9UolwIMHfg7X9ooMtDTPJsDxTMHuz_8ATNHH5KtJQhbjhsY0Jfw6rJwpzQoPr62pxNxsMX4UaUIue7B_b-L0gli-ggs8aWeXXK-v4cSxJEHgxkhh1tiJir3bFOi45yG-pQC0/s640/1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWIE58QQVV7obW2vdBB3lDjkzBuCmobOkXdZ53xOVX8bWSzUw_l6Dec6M76KOzfzeEw5pZpxp3UKX8ldF6aUnE7K0g_z1FOgpY2isGOz60l5mzFy3guAn9YG0uj0AgqIxHt4KcjF5hxAA/s848/2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;364&quot; data-original-width=&quot;848&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWIE58QQVV7obW2vdBB3lDjkzBuCmobOkXdZ53xOVX8bWSzUw_l6Dec6M76KOzfzeEw5pZpxp3UKX8ldF6aUnE7K0g_z1FOgpY2isGOz60l5mzFy3guAn9YG0uj0AgqIxHt4KcjF5hxAA/s640/2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Great. There is nothing deployed to these app services yet.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;Step 2:&lt;/span&gt; &lt;/b&gt;Open Visual studio and create a .Net Core web application targetting Core 2.1 Framework.&lt;/p&gt;&lt;p&gt;&amp;nbsp;I am using VS2019 here. Please make cure you installed Git on dev machine before you create this project.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Choose &quot;ASP.Net Core Webapplication&quot; in templates and then Choose &quot;Web Application&quot; and Framework 2.1 as shown below.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL2pk3fVreKQnYzPxwUywmnjjgshEDMnK1_quCTA1NgWnDqFAe6jS-xUkpMv5lT-Vzo35fuyrjxZOR7bKBMY3lUkp-5QP4kHtFGfchsarv0oL7T9VOlUo_JTpo3-luF0xW4ZezYup1ehA/s981/3.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;645&quot; data-original-width=&quot;981&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL2pk3fVreKQnYzPxwUywmnjjgshEDMnK1_quCTA1NgWnDqFAe6jS-xUkpMv5lT-Vzo35fuyrjxZOR7bKBMY3lUkp-5QP4kHtFGfchsarv0oL7T9VOlUo_JTpo3-luF0xW4ZezYup1ehA/s640/3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrO3Y7HLW86UhOID-LmXAaHIh0aqwcNzSQZ8SEU8uQhUj9RyeBYfquG277dGp1tLbyC6PnwJz34kS-sFviqqRO-WVkd6819ZBCG4jXVQrpG8Twk8UpXYl-UZp4H6AkbSayop7NrrPnem4/s988/4.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;622&quot; data-original-width=&quot;988&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrO3Y7HLW86UhOID-LmXAaHIh0aqwcNzSQZ8SEU8uQhUj9RyeBYfquG277dGp1tLbyC6PnwJz34kS-sFviqqRO-WVkd6819ZBCG4jXVQrpG8Twk8UpXYl-UZp4H6AkbSayop7NrrPnem4/s640/4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Great. Project is sucessfully created. Press F5 to see the output. Look at the Url.&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4gk9VI5ZxSJZ6J2AhW7hhAJ7qyXw4udfTewhP5VZVSBwO61wVU0YKb4OMwUoucDsI2o-W9Th9ehvnc_VAmRlLudnDk3qLPrWVGFXe7Z_lMQqlOXMBZg2CVbS1vhKLu1XMbASljRHSMWc/s1378/5.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;622&quot; data-original-width=&quot;1378&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4gk9VI5ZxSJZ6J2AhW7hhAJ7qyXw4udfTewhP5VZVSBwO61wVU0YKb4OMwUoucDsI2o-W9Th9ehvnc_VAmRlLudnDk3qLPrWVGFXe7Z_lMQqlOXMBZg2CVbS1vhKLu1XMbASljRHSMWc/s640/5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Step 3:&lt;/b&gt;&lt;/span&gt; Lets deploy this to Azure WebApp in DEV.&lt;/p&gt;&lt;p&gt;Right click on solution and click publish. If you are using the same account for both visual studio and Azure subscription, Visual studio will automatically display your subscription and available webapps to deploy. If not you may need to configure a dpeloyment profile in which you need to give subscription details.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg_3DF3WP6f71xBk_kNyLTICP31sf1bKkNs0apWD9qBFbPqer29jQ1hrZGjHi-TAjDgtQp3t6Sz7Oh1Z8iEWqTq5uwOeNCu6a9JO9G6Us5cjJA2d9NSLH6t9bjmbAb2pS5qwG4geA_r4Y/s813/6.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;813&quot; data-original-width=&quot;809&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg_3DF3WP6f71xBk_kNyLTICP31sf1bKkNs0apWD9qBFbPqer29jQ1hrZGjHi-TAjDgtQp3t6Sz7Oh1Z8iEWqTq5uwOeNCu6a9JO9G6Us5cjJA2d9NSLH6t9bjmbAb2pS5qwG4geA_r4Y/s640/6.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Now once the deployment is finished , browse your dev version of App Service with name &quot;AZWebApp-Dev&quot; and here is the out put. Look at the url.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn8lnnoyXiDM8CzMVHoYBJ8LIZUimlIjfXP9yaM0c0Fz-bcZm3FkimOrfYOrCrmh00mSlVQnlbIXhxLg9qNs73YQaV3Lih8mTIY7Wl2hjgIawIT8PaRf3gJbu1EQd_evqY-jeyeGcYDGg/s1441/7.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;577&quot; data-original-width=&quot;1441&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn8lnnoyXiDM8CzMVHoYBJ8LIZUimlIjfXP9yaM0c0Fz-bcZm3FkimOrfYOrCrmh00mSlVQnlbIXhxLg9qNs73YQaV3Lih8mTIY7Wl2hjgIawIT8PaRf3gJbu1EQd_evqY-jeyeGcYDGg/s640/7.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Wait we talked about Automation, CI/CD , Azure DevOps. But what we did is a manual deployment.&amp;nbsp;&lt;/p&gt;&lt;p&gt;This is not ideal. So lets automate this.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Step 4:&lt;/b&gt;&lt;/span&gt; Go to Visual Studio where the project is opened currently. Open terminal from &quot;View&quot; menu.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicSXbiDQ5mVjaTTlAVJz96BzG-3R2b2hlvLv_Dxrkzc_9ttUx3b8G96-QtgIDEn-8ljivMDsSuqMwUaeaMRadQja9zTcYbv5f6-koAd5uAprWDosm6qtWSB6QWOWIlw1s5qmKJ0UVCmjo/s624/8.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;149&quot; data-original-width=&quot;624&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicSXbiDQ5mVjaTTlAVJz96BzG-3R2b2hlvLv_Dxrkzc_9ttUx3b8G96-QtgIDEn-8ljivMDsSuqMwUaeaMRadQja9zTcYbv5f6-koAd5uAprWDosm6qtWSB6QWOWIlw1s5qmKJ0UVCmjo/s0/8.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Now you see that all of your project files are committed to your local git repository.&lt;/p&gt;&lt;p&gt;To view your local git repo, go to &quot;Team Explorer&quot;, click on the bottom Git symbol, you will see local repos. But initially your new repo wont be shown, so add it as shown below and give the project folder path and it will show up.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMLS0D-VUmekK-_RvG2rBpoZdCCJloEZY9qBnsfBeael4YMOrLtYOvJRMMeWbE9kmr3d3DB4E7oB0irIJJHZNgJ9vNkA21RXBB1RM1GDeyLNSNXkn6PGPqpn11qhA0ZXgGKApMQHPHHYQ/s467/9.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;467&quot; data-original-width=&quot;359&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMLS0D-VUmekK-_RvG2rBpoZdCCJloEZY9qBnsfBeael4YMOrLtYOvJRMMeWbE9kmr3d3DB4E7oB0irIJJHZNgJ9vNkA21RXBB1RM1GDeyLNSNXkn6PGPqpn11qhA0ZXgGKApMQHPHHYQ/s0/9.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Now once it is added, click on &quot;AZWebApp&quot; repo, you see both your default repo and the new one. Double click on new &quot;AZWebApp&quot; repo and close the VisualStudio and reopen and open project. This is what you will see.&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm56cqCaEBDyLMi_eYWghKd2hTg2ZYdZe-L9uafbLvRoABGpkT56NVe0hFniuk6qUCECY22yV3wHtL8Yk4SN7G751NMxnhGzixxY9LCiXJBDWAybR1KnlDdC7lfZKzEDwqIAMLUJvuJcM/s355/10.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;89&quot; data-original-width=&quot;355&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm56cqCaEBDyLMi_eYWghKd2hTg2ZYdZe-L9uafbLvRoABGpkT56NVe0hFniuk6qUCECY22yV3wHtL8Yk4SN7G751NMxnhGzixxY9LCiXJBDWAybR1KnlDdC7lfZKzEDwqIAMLUJvuJcM/s0/10.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;You can remove the default repo and make sure the current repo is highlighted as shown below.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Step 5:&lt;/b&gt;&lt;/span&gt; Go to Azure console and search for &quot;Azure DevOps Organizations&quot;, and click on it.&lt;/p&gt;&lt;p&gt;You may need to create an organization, which is registering a unique organization assciation with your subscription. Here is mine.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqzBrfx_hf1-ycMxFFOliI4h8tZV547onlih94qrgCnBrPuX4bLgNeTmWQSmjcHZrvjG-GD7-JnWrRfp0egqTP6v9EZ7pobUSjiI4Svu72JtQX0_z0kevjlesN-3jzmfT7E4aUAJwu3XY/s915/11.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;261&quot; data-original-width=&quot;915&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqzBrfx_hf1-ycMxFFOliI4h8tZV547onlih94qrgCnBrPuX4bLgNeTmWQSmjcHZrvjG-GD7-JnWrRfp0egqTP6v9EZ7pobUSjiI4Svu72JtQX0_z0kevjlesN-3jzmfT7E4aUAJwu3XY/s640/11.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Create an Organization and its time to create a Project under that. Click on the link &quot;New Project&quot;.&lt;/p&gt;&lt;p&gt;I created my Project with name &quot;Demo&quot; and selected Git as the source control for this. I kept it a private project as i dont bother to share it with anyone.&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi31NLM2AoUJyu-XwY5HRIqZEFrU6zwZdunA_GbOantma3tmlXaIMHfk6777uBnsqMikDQNR5g3_7QTi7wEM8s59MGH1KRfE04eh07s8XfVRepWMhlPxrUfAZ0gD4m6r2EXR_joRuVR4IM/s622/12.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;622&quot; data-original-width=&quot;615&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi31NLM2AoUJyu-XwY5HRIqZEFrU6zwZdunA_GbOantma3tmlXaIMHfk6777uBnsqMikDQNR5g3_7QTi7wEM8s59MGH1KRfE04eh07s8XfVRepWMhlPxrUfAZ0gD4m6r2EXR_joRuVR4IM/s0/12.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Once the project si created, you will be taken to a page where you see various Icons which were shown below.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsX0oAlrJl0_QEeOEUKUGbA2byVaLAD3o9dCE45xsPnjEZaWbKNzxdRYXfwLTRatWU0vnut54DJ4KpWqlQ6Hm5kUlWeS-D6Rd7h1FAz-opg_t96rP1o8iR72rS70fbGfEnl43mSzTTNbs/s1029/13.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;469&quot; data-original-width=&quot;1029&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsX0oAlrJl0_QEeOEUKUGbA2byVaLAD3o9dCE45xsPnjEZaWbKNzxdRYXfwLTRatWU0vnut54DJ4KpWqlQ6Hm5kUlWeS-D6Rd7h1FAz-opg_t96rP1o8iR72rS70fbGfEnl43mSzTTNbs/s640/13.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;On your project summary page , in the left side pannel, click on Repos. Now it will say that &quot;Demo os empty add some code to it.&quot;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiLsmAvVdu2F6uNJjhQ9K-J0FC-jX6Xx7dFZfcV1B3woPvL16UB3Fsqg0nKDHD9JUbsEoyO10NcCLPvuVk7OrIzR002YBDEhJ4egWLw7MaYyIIJMqQ9XbsFHAdDVAq0v6WmqcXXf7yUog/s924/14.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;299&quot; data-original-width=&quot;924&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiLsmAvVdu2F6uNJjhQ9K-J0FC-jX6Xx7dFZfcV1B3woPvL16UB3Fsqg0nKDHD9JUbsEoyO10NcCLPvuVk7OrIzR002YBDEhJ4egWLw7MaYyIIJMqQ9XbsFHAdDVAq0v6WmqcXXf7yUog/s640/14.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Click on the &quot;+&quot; button and add a new repository. I names it &quot;AZWebAppRepo&quot; and choose Git Ignore as Visul Studio, as i want unnecessary files form VS to be checked in.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6rbBI6SpzpMaAuGjrNHFhybt0XvIdzu4IN8fRGFRdJ0-cd_yi5DZjzCp1myIOtPJiOySuraGWt5QP5vfPAWb6RxlitHeR1sARIFm8tsBshnJCe_e-5QxdVRtzQL1vLtjG5VeY80avW3M/s481/15.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;354&quot; data-original-width=&quot;481&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6rbBI6SpzpMaAuGjrNHFhybt0XvIdzu4IN8fRGFRdJ0-cd_yi5DZjzCp1myIOtPJiOySuraGWt5QP5vfPAWb6RxlitHeR1sARIFm8tsBshnJCe_e-5QxdVRtzQL1vLtjG5VeY80avW3M/s0/15.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Once created, you can see there will be only 2 files. ReamMe text file and a gitignore file.&lt;/p&gt;&lt;p&gt;Its time to push our code to this repo.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Step 6:&lt;/b&gt;&lt;/span&gt; Go to Visual studio and open the project and go to &quot;Team Explorer&quot;. Click on &quot;Manage Connections&quot; and select &quot;Connect to a Project&quot; option. A window will be opened with your azure DevOps Organizations listed. Click on Organization (in my case &quot;Demo&quot;) and click Connect.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNsJX8CbSyb_NyYyVCLk57KhHn6-cZujADznUa7Vcuf6mntUt2botx955uD1XF8A_zVgx8JOD_ojX3AmofGTvtJ8YnJtPcTO0oCyt18_YK_B0wSYbiwgYNpWPOJJ754zpdmT_efAaUl8o/s803/16.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;357&quot; data-original-width=&quot;803&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNsJX8CbSyb_NyYyVCLk57KhHn6-cZujADznUa7Vcuf6mntUt2botx955uD1XF8A_zVgx8JOD_ojX3AmofGTvtJ8YnJtPcTO0oCyt18_YK_B0wSYbiwgYNpWPOJJ754zpdmT_efAaUl8o/s640/16.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Now you will see like shown below in your &quot;Team Explorer&quot;. Select your Azure Devops organization name and click on the drop arrow highlighted. Now click on &quot;Sync&quot; option. By this we are asking to synch the local Git repo to the Repo on our Azure Devops organization.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYKg-vecMyGYnWYfoiQ3e-p7IR5jQ0n_5A1Jneqgh9IUSuxMBL34J39J1SVPRMda7HaZT7ia0unHRRJzUqUpfQsRbMpBHZbRUMy5l9i1_DCo4_bjjeV8ZLfbIyaCV1YcEMvKzFJOebN0k/s318/17.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;318&quot; data-original-width=&quot;224&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYKg-vecMyGYnWYfoiQ3e-p7IR5jQ0n_5A1Jneqgh9IUSuxMBL34J39J1SVPRMda7HaZT7ia0unHRRJzUqUpfQsRbMpBHZbRUMy5l9i1_DCo4_bjjeV8ZLfbIyaCV1YcEMvKzFJOebN0k/s0/17.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;It should comeup with a window like this. Dont worry if it doesnt. Some times you may need to re-open the project one more time from Visual studio with out closing the IDE after connecting to Azure Organization.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi30JlFtrOBfAtNa6Hqfy6FB5KFqfUaUiNw2IUqCbZzCNegBuSGBep1msCX8p53MGa14DTYIAHamHaDuBJgniEK4W4KCuGrb5JhQ2qSJYoVY_zc9GJNxznXC1QHjxsm9QMzz6LPGva7i8s/s469/18.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;469&quot; data-original-width=&quot;393&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi30JlFtrOBfAtNa6Hqfy6FB5KFqfUaUiNw2IUqCbZzCNegBuSGBep1msCX8p53MGa14DTYIAHamHaDuBJgniEK4W4KCuGrb5JhQ2qSJYoVY_zc9GJNxznXC1QHjxsm9QMzz6LPGva7i8s/s0/18.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Publish the current local repo to Azure Devops Repo by clicking the highlighted button. now you have to select the Organization, the Project and the Repo we created in Step 5. Here is mine.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQEDLkK0xsX_SdMbzdQJU1bnXyZn9X22ksT8TJZapM2SoXKmgziM541y8I9f8MYK0SoiIldeLGC2ZLu4ivo4jD_cyekfMlPI5GWC34d8kfh3NZ-2Ks2ZLDHRhR43L1fqEV_kzFYyeOHtM/s430/19.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;430&quot; data-original-width=&quot;397&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQEDLkK0xsX_SdMbzdQJU1bnXyZn9X22ksT8TJZapM2SoXKmgziM541y8I9f8MYK0SoiIldeLGC2ZLu4ivo4jD_cyekfMlPI5GWC34d8kfh3NZ-2Ks2ZLDHRhR43L1fqEV_kzFYyeOHtM/s0/19.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&amp;nbsp;Publish repository and you get a sucess message.&amp;nbsp;&lt;div&gt;You might get an error message saying&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&quot;Error encountered while pushing branch to the remote repository: rejected Updates were rejected because the remote contains work that you do not have locally. This is usually caused by another repository pushing to the same ref. You may want to first integrate the remote changes before pushing again.&quot;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;This is because of the conflicts you trying mutiple times to publish and some conflicts between local and Azure repos. Use below command and it will be done.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;git push -f origin master&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Now go back to Azure Repo we created in Step 5. You can find all the code published to Azure Repo.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsPX0mPK4C0bFn7z-C0wegPRJFv8FWSM650WGACAp7np8aELOALnRsDyc8r6nikWZ-LelCGFSRUhTqwG7j0hDMxFkFfEETNZeOiIiqqIjMzp4AkQ2cf7XlT8XA5aARWkZ6xi1aIXWUfqM/s1393/20.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;487&quot; data-original-width=&quot;1393&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsPX0mPK4C0bFn7z-C0wegPRJFv8FWSM650WGACAp7np8aELOALnRsDyc8r6nikWZ-LelCGFSRUhTqwG7j0hDMxFkFfEETNZeOiIiqqIjMzp4AkQ2cf7XlT8XA5aARWkZ6xi1aIXWUfqM/s640/20.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Step 7:&lt;/b&gt;&lt;/span&gt; We have created Repo, now we need to go for Build Pipeline.&lt;/p&gt;&lt;p&gt;Go to Azure portal and open your Azure Project. You see a rocket shaped icon which says &quot;Pipeline&quot;. Click on it. We havent configured any pipelines yet so lets start by clicking Create new Pipeline.&lt;/p&gt;&lt;p&gt;Now if you are a pro in Yaml configuration, please go ahead and create your pipeline. But for first time please click the link which says &lt;span style=&quot;font-size: x-large; font-weight: bold;&quot;&gt;&quot;&lt;/span&gt;&lt;a class=&quot;bolt-link&quot; href=&quot;https://dev.azure.com/pratappilaka/Demo/_apps/hub/ms.vss-ciworkflow.build-ci-hub?_a=build-definition-getting-started&amp;amp;id=0&quot; style=&quot;background-color: white; border-radius: 2px; box-sizing: inherit; cursor: pointer; font-size: x-large; font-weight: bold; outline: transparent; text-decoration-line: none; transition: all 80ms cubic-bezier(0.165, 0.84, 0.44, 1) 0s, all 80ms linear 0s;&quot; tabindex=&quot;0&quot;&gt;Use the classic editor&lt;/a&gt;&lt;span style=&quot;font-size: x-large; font-weight: bold;&quot;&gt;&quot; &lt;/span&gt;&lt;span&gt;Which will take us to this.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaTalbyPdTbguXhABDlD5zQ8vG_313iGrD2qIvjxYe5ZCxNUJfWRfMIwCyexh74X-n3d35rJwG1BswuLJE8p2Ijr2yhGi_Htsht2Ai6LgLET7yFN-tlq5DYFEv16OQa3M5LFsIdtALLsQ/s483/21.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;483&quot; data-original-width=&quot;459&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaTalbyPdTbguXhABDlD5zQ8vG_313iGrD2qIvjxYe5ZCxNUJfWRfMIwCyexh74X-n3d35rJwG1BswuLJE8p2Ijr2yhGi_Htsht2Ai6LgLET7yFN-tlq5DYFEv16OQa3M5LFsIdtALLsQ/s0/21.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span&gt;Next step is to select which template we want to use. Select ASP.Net Core (.Net Framework) and lcick apply.&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgEyOCGsVpFjkUltvB2h69P6FTKo33hqkIrln_ZoekUVI1EEfZxCSlMvxVDPintdxqrnTGL9_fEGRRFLK8fbDmncXgmT0tzA1bpHZKlwviCFBWKNkSqDQA_s774FP6RqZjk4aPNR-h3vM/s780/22.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;435&quot; data-original-width=&quot;780&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgEyOCGsVpFjkUltvB2h69P6FTKo33hqkIrln_ZoekUVI1EEfZxCSlMvxVDPintdxqrnTGL9_fEGRRFLK8fbDmncXgmT0tzA1bpHZKlwviCFBWKNkSqDQA_s774FP6RqZjk4aPNR-h3vM/s640/22.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span&gt;Now you will see a GUI to configure various tasks. First rename the Pipeline, and the Agent which i have highlighted below. You many need to add various tasks based on additional dependecies and Nuget packages you have installed. But in our case ours is vanilla code. So we rename the Build pipeline and gaent and save.&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU2hjD9Y3_64aZjVhAtGvSlXwk5UAU2GVLbgIXs1WQXJLwbJFWDSwJFuwjQk00YgWtvzegBkLiuq59KH-eePHrS_IsYtEpL4QS_ZcYOkdpFQUlLxrG-jpq4-nBlP_IOX3uJj1YKcOQGkI/s654/23.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;389&quot; data-original-width=&quot;654&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU2hjD9Y3_64aZjVhAtGvSlXwk5UAU2GVLbgIXs1WQXJLwbJFWDSwJFuwjQk00YgWtvzegBkLiuq59KH-eePHrS_IsYtEpL4QS_ZcYOkdpFQUlLxrG-jpq4-nBlP_IOX3uJj1YKcOQGkI/s640/23.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Now click on trigger section. and select &quot;Enable Continious Integration&quot; checkbox. By doing this we are saying rollout a build everytime i check in the code to Azure Repo.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH9Pcp4gIIhEAiwnqF5rm6-MI3AOJfeZFnI_gVuYJzKifuglBCZKBm91v6T1U1_WYHx4q0uSLd9JDkyIAXakfj_dt24mnqtEfXvzKYKdBkYZL_5sYVGQFrq0kdYoE60XWCvg50aCRyYs4/s936/24.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;477&quot; data-original-width=&quot;936&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH9Pcp4gIIhEAiwnqF5rm6-MI3AOJfeZFnI_gVuYJzKifuglBCZKBm91v6T1U1_WYHx4q0uSLd9JDkyIAXakfj_dt24mnqtEfXvzKYKdBkYZL_5sYVGQFrq0kdYoE60XWCvg50aCRyYs4/s640/24.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Click Save and give appriproate comments. With this our build pipeline has been configured.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Step 8:&lt;/b&gt;&lt;/span&gt; Lets create a &quot;Release Pipeline&quot;. On Azure portal, go to Project page and in the same Pipeline menu on left side pannel, click on &quot;Releases&quot; this time. Click on &quot;Create New Release Pipeline&quot; button.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHBFsTbq6FtBDBSFk6XXIcX-wy0hbNa-Cv5Aa4ZdMTuNfZLaVsyd9kkF4tfBR0hpDLMTpbkyHeiFeseEI7pxw3uYIxldfgBLw6fnnVPh9kn0_d1LMMbX2r1IaDuA5-ob4AUPdQK0ss978/s1309/25.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;409&quot; data-original-width=&quot;1309&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHBFsTbq6FtBDBSFk6XXIcX-wy0hbNa-Cv5Aa4ZdMTuNfZLaVsyd9kkF4tfBR0hpDLMTpbkyHeiFeseEI7pxw3uYIxldfgBLw6fnnVPh9kn0_d1LMMbX2r1IaDuA5-ob4AUPdQK0ss978/s640/25.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;once you applied &quot;Azure App Service Deployment&quot; template, rename the the stage to &quot;Development&quot;.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA3AEMJXDKC-NnHTW9x7JWe2nJHLJFyR989VyYwbJ2f-vh2g7rk40uaHK6gBvoWWPsg7iOLnLcKziaFkSe9ykdVLDEWXp3-OKVS-WhD1zTO467oTtZNYm-JaAv0JjEyKsE0a_o9m-5Eao/s278/26.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;122&quot; data-original-width=&quot;278&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA3AEMJXDKC-NnHTW9x7JWe2nJHLJFyR989VyYwbJ2f-vh2g7rk40uaHK6gBvoWWPsg7iOLnLcKziaFkSe9ykdVLDEWXp3-OKVS-WhD1zTO467oTtZNYm-JaAv0JjEyKsE0a_o9m-5Eao/s0/26.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Now click on &quot;1 job, 1 task&quot; link and it will take you to Tasks pane.&lt;/p&gt;&lt;p&gt;Here you need to select the Azure subscription, and Authenticate. Once authentication is sucessful, you will see available App Sevrices to which you can deploy. I select &quot;AZWebApp-Dev&quot; as this is Development stage.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqy4z4-ucLFkNIynQRlrLXR3rdFDBCYjAVfbgMRWRoTbHFLrXKYHC1j_4WCir_G0ZcuKcQZV_zri7Oa5oW1CF1bOyypvXUIYIdCnLcslrYwqOduTZkyjPaWJ-x3Tj8aGY_q4r7i26-cYs/s981/27.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;500&quot; data-original-width=&quot;981&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqy4z4-ucLFkNIynQRlrLXR3rdFDBCYjAVfbgMRWRoTbHFLrXKYHC1j_4WCir_G0ZcuKcQZV_zri7Oa5oW1CF1bOyypvXUIYIdCnLcslrYwqOduTZkyjPaWJ-x3Tj8aGY_q4r7i26-cYs/s640/27.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Save it and come back to PipeLine tab. We have configured to which WebApp it has to deploy. Now we have to configure what has to be deployed and from where. Click on &quot;Artifact&quot; icon. This will give some options and we have to choose the Build pipe line option and select the Build pipeline we created in Step 7.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK3FZCd1n118O6bF3O8SMw2QZfVqaLpTGWEcwtfOuilEUDNDqb26pRpn1SnlNokR2Q1hpXJ7w1C0Q0p8Nu4tbe4SKzerAYscJcNi0skQ4IdFzJOxmDWNrQkY4z9N2zxKZEt89b0Q8CazM/s1330/28.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;659&quot; data-original-width=&quot;1330&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK3FZCd1n118O6bF3O8SMw2QZfVqaLpTGWEcwtfOuilEUDNDqb26pRpn1SnlNokR2Q1hpXJ7w1C0Q0p8Nu4tbe4SKzerAYscJcNi0skQ4IdFzJOxmDWNrQkY4z9N2zxKZEt89b0Q8CazM/s640/28.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Add the Build pipeline to artifact and save the Release pipeline. Now pay close attention to little lightning icon on&amp;nbsp; our artifact. Its a trigger. Click on it.&amp;nbsp;&lt;/p&gt;&lt;p&gt;On your right hand side you see a toggle for enabling continious delivery. this means everytime we have a new build form our Build pipeline, we want a new release to be rolled out.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Edit the release pipeline name and save it.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO8txzaYcMBRcNxyht3Ff9oqCQpMgeRJ-Vbam51mp8YzFEQa5O0kkR1F3okVFCdhkZ4AZ6r7zyoq0HOeXqyj_EdxqkJVLS4MUDQyDfBrH1X2gaJT4dWtlgSbOISLavHpiJRHsS6k22yAs/s817/29.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;363&quot; data-original-width=&quot;817&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO8txzaYcMBRcNxyht3Ff9oqCQpMgeRJ-Vbam51mp8YzFEQa5O0kkR1F3okVFCdhkZ4AZ6r7zyoq0HOeXqyj_EdxqkJVLS4MUDQyDfBrH1X2gaJT4dWtlgSbOISLavHpiJRHsS6k22yAs/s640/29.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;With this we have configured both our Build and Release pipelines for a basic vanila ASP.Net Core webapplication.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Step 9:&lt;/b&gt;&lt;/span&gt; Lets modify the code in our ASP.Net Core application. Open Visual Studio and open the project.&lt;/p&gt;&lt;p&gt;I want to make a small chage to code by editing the ./Pages/Shared/_Layouts.cshtml and changing the &quot;AZWebApp&quot; name to &quot;AZWeApp_Update&quot;.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRvFWyC1RVqHTnNJq0TLotr6rTwCjev1nh0stj1u0Dg6yeRyQr_UTQ2ulMTJ2TWsg3rI92G4IH8xyVNSxwYUCAWHSlxnq3PDB2V7rUFkgQkIbyP6quJ8aDqpsmTw8G6OC1AdWaq_kF7dI/s641/30.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;233&quot; data-original-width=&quot;641&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRvFWyC1RVqHTnNJq0TLotr6rTwCjev1nh0stj1u0Dg6yeRyQr_UTQ2ulMTJ2TWsg3rI92G4IH8xyVNSxwYUCAWHSlxnq3PDB2V7rUFkgQkIbyP6quJ8aDqpsmTw8G6OC1AdWaq_kF7dI/s640/30.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS937BosTqLUqc3J61M4Nwe6529N4ldwrd7zM7CGcRM6Olnn2oMdVj3GIJCdkPrnNfZmvcV1L3uV8U9zw6JO-9oK4fDi1nvCCRBEFBdNGMZKzvGtwCAX3h2rzqZCT11fjlQU14Cg68Zww/s878/31.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;184&quot; data-original-width=&quot;878&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS937BosTqLUqc3J61M4Nwe6529N4ldwrd7zM7CGcRM6Olnn2oMdVj3GIJCdkPrnNfZmvcV1L3uV8U9zw6JO-9oK4fDi1nvCCRBEFBdNGMZKzvGtwCAX3h2rzqZCT11fjlQU14Cg68Zww/s640/31.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Save it and now go to &quot;Team Explorer&quot;. Bottom you see a small Pencil Icon showing number of files changed. Click on it. Now you see &quot;_Layouts.cshtml&quot; file as one of them. Right click on the file and sleect Stage. This means we are trying to make this file as part of next commit. Now &quot;_Layouts.cshtml&quot; file will be shown under staged files.Give the proper Comment as this will be displayed toughout your automated deployment.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Please understand that we have commited the change to Local Git Repo, not the Azure Repo.&lt;/p&gt;&lt;p&gt;Inorder to do that, in Team Explorer, there is a small &quot;Plug&quot; icon with in connection manager. Click on it and no select Azure Repo and click on the down arrow shown below and select &quot;Sync&quot;.&lt;/p&gt;&lt;p&gt;Now you san see the Push Option enabled as there is a Local Git Repo Commit available that is not commited to Azure repo. Click Push. With this we checked in the code change to Azure Repo.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFF_YeuSZGuGvvjI1s7mVrSSqq7MAZobadBesEpUOhWd_GYZCN4y2Ggbtqskn_hIsA9yNCO1vpzYxJcwG8hnh_2HnxkZOvdl6ZhyEGrk3oD70aTNVx7AGucrVeOMVpfdcr5JLE87fQG_M/s850/33.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;350&quot; data-original-width=&quot;850&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFF_YeuSZGuGvvjI1s7mVrSSqq7MAZobadBesEpUOhWd_GYZCN4y2Ggbtqskn_hIsA9yNCO1vpzYxJcwG8hnh_2HnxkZOvdl6ZhyEGrk3oD70aTNVx7AGucrVeOMVpfdcr5JLE87fQG_M/s640/33.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Now go to Azure portal and open Azure Devops Project we created &quot;Demo&quot;. Click on &quot;Pipeline&quot; on left side pannel. You can see an automated build was rolledout due to ou code check-in.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijCuWR40JhlQyUsIimTTmtQgY_2u9OL13r-l6ixKwJBpvHrlVyyySe9ICQoVeteiyViwB3FTnEChlM0s5BdrYNCvZhgAtCFj9aTybVnoIvaU0WMlffDDFbIinoO9cHbnnVuwQv1dUMwgU/s1145/35.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;419&quot; data-original-width=&quot;1145&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijCuWR40JhlQyUsIimTTmtQgY_2u9OL13r-l6ixKwJBpvHrlVyyySe9ICQoVeteiyViwB3FTnEChlM0s5BdrYNCvZhgAtCFj9aTybVnoIvaU0WMlffDDFbIinoO9cHbnnVuwQv1dUMwgU/s640/35.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Now go to Releases and you will see a automated build was released to Development stage, which is still in-progress here.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNb0RyCcp-qmBx3tC4BO8ywFmQeXL1pUV-mOl2MC0Zn1W2dEn8Dih_VJcTwClQcas8d9EPT7UlazfFahXaCY739GMiMCOLiHfegca11Q5vTqEB0KT2c2qi0JU9gcZ5qqT0OC7drFWFqxY/s1349/34.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;420&quot; data-original-width=&quot;1349&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNb0RyCcp-qmBx3tC4BO8ywFmQeXL1pUV-mOl2MC0Zn1W2dEn8Dih_VJcTwClQcas8d9EPT7UlazfFahXaCY739GMiMCOLiHfegca11Q5vTqEB0KT2c2qi0JU9gcZ5qqT0OC7drFWFqxY/s640/34.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Wait until it is completed and now click on the Release task and you will see this.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu8VFrS2Vl8Sk6pGJEW5yIqMfQc9bAWnrvca69JyclkAN6RVBIYwgrdzjQTScjm7xZuM9874xR_j91pdVQJrg6KWmdU09qreV9xE1H7feY95bZ6WX0_Sel47OfPvoZd2Z2RZmkaJSxByo/s705/36.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;495&quot; data-original-width=&quot;705&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu8VFrS2Vl8Sk6pGJEW5yIqMfQc9bAWnrvca69JyclkAN6RVBIYwgrdzjQTScjm7xZuM9874xR_j91pdVQJrg6KWmdU09qreV9xE1H7feY95bZ6WX0_Sel47OfPvoZd2Z2RZmkaJSxByo/s640/36.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Lets browse our Azure App Sevice &quot;AZWebApp-Dev&quot;. Here is the new code running in Azure WebApp dployed using Azure DevOps CI/CD.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY82BdiPlU6wdZtb01gmJLXpNHIw3YGGTQ3eTCRcuE8DPGuIGI0dxV9YuSPwRD0vT4imZFHGYcPBvgwpZafHijeENIQnMVrWyaHgzNbX89PXA9dHGJXhAWxTvL0tL84pmwkbONwE_RioM/s573/37.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;344&quot; data-original-width=&quot;573&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY82BdiPlU6wdZtb01gmJLXpNHIw3YGGTQ3eTCRcuE8DPGuIGI0dxV9YuSPwRD0vT4imZFHGYcPBvgwpZafHijeENIQnMVrWyaHgzNbX89PXA9dHGJXhAWxTvL0tL84pmwkbONwE_RioM/s0/37.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Its not yet over. But we are close. Now we need to configure two other stages, QA and PROD.&lt;/p&gt;&lt;p&gt;Step 10: Open Azure Devops Project and navigate to Release pipeline we created earlier.&lt;/p&gt;&lt;p&gt;Repeat everything we done in Step 8 and select&amp;nbsp; App Service &quot;AZWebApp-QA&quot; for QA stage and &quot;AZWebApp-Prod&quot; for Production stage.&lt;/p&gt;&lt;p&gt;Unlike DEV, We dont want to roll out every change to QA and PROD. So pay attention to little icon in front of QA and PROD stages.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicE6dOmf_JaOLCl_PTLHRvYvAU9og-w68TKGawBDTs4n8C3kpCJvMS2j7kCfz3aL9F3xZG_-ji7aD6ykT8smggzFeDh2BC1kLOXLILGp55-o1Ptuytu7wQy0qRPS4flR25c_fLSCTIPuo/s1254/39.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;431&quot; data-original-width=&quot;1254&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicE6dOmf_JaOLCl_PTLHRvYvAU9og-w68TKGawBDTs4n8C3kpCJvMS2j7kCfz3aL9F3xZG_-ji7aD6ykT8smggzFeDh2BC1kLOXLILGp55-o1Ptuytu7wQy0qRPS4flR25c_fLSCTIPuo/s640/39.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;When you click that Icon representing &quot;Pre-Deployment Conditions&quot;, there is an option to enable Approvals over what to be deployed. Add the right users to the approval group and do the same for PROD as well.&lt;/p&gt;&lt;p&gt;Now we are all set for an End to End deployment using basic Azure DevOps CI/CD.&lt;/p&gt;&lt;p&gt;Repeat Step 9, changing the code. Now i am changing &quot;AZWebApp_Update&quot; to &quot;AZWebApp_Finale&quot;. Staged the chnage and checking in the code. This should trigger automated deployment.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinTQK6Rlxx1wlOWhsO_E-sAZ2AJ91kph3ot2ertTBPsTYedrsOUDuhTjF_yTbkt7IQ6dyCnoRsQhBgJiAMu1dChzh_KZbhYqH4ySM8Ts71_LnIPIaXd-JPov2vDGofav54TT9XDuCZ6EY/s419/40.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;295&quot; data-original-width=&quot;419&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinTQK6Rlxx1wlOWhsO_E-sAZ2AJ91kph3ot2ertTBPsTYedrsOUDuhTjF_yTbkt7IQ6dyCnoRsQhBgJiAMu1dChzh_KZbhYqH4ySM8Ts71_LnIPIaXd-JPov2vDGofav54TT9XDuCZ6EY/s0/40.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;You can see an ongoing build in Build Pipeline.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6q7YU_gaRZvThIqV_mU13S1_z5LzomHG49cjiGzlnZ0GCwOJO5TgIebMKm6M_I0kNb86aNBPBUCIqds4NZZfxKPeoPtzuIjbfpJ3u0oSe2xAVnuxn6IVMIB1WhVbSCtwsi8ufapkjr70/s1174/41.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;259&quot; data-original-width=&quot;1174&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6q7YU_gaRZvThIqV_mU13S1_z5LzomHG49cjiGzlnZ0GCwOJO5TgIebMKm6M_I0kNb86aNBPBUCIqds4NZZfxKPeoPtzuIjbfpJ3u0oSe2xAVnuxn6IVMIB1WhVbSCtwsi8ufapkjr70/s640/41.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Once Build is sucesfully rolledout, lets go to Release Pipeline.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR-xjcc1fYKudsB3LptRH5feIHqiEnndK_EmDMlzWKr1JY_Ran1hiLFBOhv67fDp83-jC7N__yf1uRgb5xBrB1mDs3PuF7VOlzlKDizMijFiGTMSvuu8R01jjFGUrat2bU91r5HmcZLjE/s1002/42.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;286&quot; data-original-width=&quot;1002&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR-xjcc1fYKudsB3LptRH5feIHqiEnndK_EmDMlzWKr1JY_Ran1hiLFBOhv67fDp83-jC7N__yf1uRgb5xBrB1mDs3PuF7VOlzlKDizMijFiGTMSvuu8R01jjFGUrat2bU91r5HmcZLjE/s640/42.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Once Dev is Completed, you will see QA is pending with our Approval.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbcTxUkpUg5qfTjWDneobLNEML4D_BzRPHRwtZnmuu4wSlr1TyPMZ3aNCU6d8dx_wCBHHx1cIK7y0BNQR_Aa5UDubxQObdf-qSF_g3RsXnb5so91VOs_MRE2zEsb7TKgXzlGKkakY1tv4/s936/43.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;336&quot; data-original-width=&quot;936&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbcTxUkpUg5qfTjWDneobLNEML4D_BzRPHRwtZnmuu4wSlr1TyPMZ3aNCU6d8dx_wCBHHx1cIK7y0BNQR_Aa5UDubxQObdf-qSF_g3RsXnb5so91VOs_MRE2zEsb7TKgXzlGKkakY1tv4/s640/43.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;QA Deployment is finished and now PROD release is waiting for my Approval. After Approval, the PROD release starts.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD1TX7M77S7JmDvUi1m5ZfnZD3mdfAyhnnoIksI7SRaXvIO4m7qRGlufksbVRYJm-1tBa9aP8Oa6GMBdprj5_FaCZlDcCwUso41wx8TUxozESSE6NT6J-taK9fRFPbF5urt_ySU5VIXl8/s981/45.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;281&quot; data-original-width=&quot;981&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD1TX7M77S7JmDvUi1m5ZfnZD3mdfAyhnnoIksI7SRaXvIO4m7qRGlufksbVRYJm-1tBa9aP8Oa6GMBdprj5_FaCZlDcCwUso41wx8TUxozESSE6NT6J-taK9fRFPbF5urt_ySU5VIXl8/s640/45.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Finally PROD deployment is also finished.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBOlTCjKAxd0rg2eJ8i99rrlKPXrfYhPhindP8qXIHKOg-CIRDa5dHr8etfhrIrhKZ7Sw1jJqCyKDACI3SybcZUEqMTYcvXKolvYtnRNl9P4WMUeD5_K0kVKaITbMnAjnu_7uzhD7d87c/s986/46.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;270&quot; data-original-width=&quot;986&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBOlTCjKAxd0rg2eJ8i99rrlKPXrfYhPhindP8qXIHKOg-CIRDa5dHr8etfhrIrhKZ7Sw1jJqCyKDACI3SybcZUEqMTYcvXKolvYtnRNl9P4WMUeD5_K0kVKaITbMnAjnu_7uzhD7d87c/s640/46.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Lets check the final output on PROD App Service.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9RpVnXLEfqMxTljVH2OB6itrVsgEs1x65n5uMO44a7Ohhfkqih-Vx0v4EnCu7Eir0hFI0OmLhyC7-TF639Ie88O56bLXMXLtX4PN5SpVEjSL2vchxmryN3I-y4EIixYi3RP1LXa84cI8/s1202/47.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;370&quot; data-original-width=&quot;1202&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9RpVnXLEfqMxTljVH2OB6itrVsgEs1x65n5uMO44a7Ohhfkqih-Vx0v4EnCu7Eir0hFI0OmLhyC7-TF639Ie88O56bLXMXLtX4PN5SpVEjSL2vchxmryN3I-y4EIixYi3RP1LXa84cI8/s640/47.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Ok, now we are done. Happy Learning.&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/1667698015354112473/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2020/08/azure-devops-101-creating-your-first.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/1667698015354112473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/1667698015354112473'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2020/08/azure-devops-101-creating-your-first.html' title='Azure DevOps 101 - Creating your first Build and Release Pipelines for automated deployments to DEV, QA and PROD '/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCBz_pDhqQUtFgdsCNd7OG1v-rNQCcXimLgeJOJiQZ7KfsmiZfFL2DfQf55ZM9S6wCME97bF20wNJA1VYHAHeLeufsZDdEeORlQOsqKUvfg28dHIaHaJxg6H_OWZUy3r_OuvNa81P9s2I/s72-c/microsoft-azure-devops-pipeline-xenonstack.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4208378482021219922.post-3206602878009481702</id><published>2020-07-27T02:13:00.001-07:00</published><updated>2020-07-27T02:13:31.757-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AWS"/><category scheme="http://www.blogger.com/atom/ns#" term="AWS Security"/><category scheme="http://www.blogger.com/atom/ns#" term="AWS Subnet"/><category scheme="http://www.blogger.com/atom/ns#" term="AWS VPC"/><title type='text'>Terraform - Provisioning  Infrastructure level Security in AWS </title><content type='html'>A year ago I have created an article showing how to create infrastructure-level security in AWS step by step. &lt;b&gt;Now its time to automate the provisioning process using Octopus and terrafrom.&lt;/b&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;We have done it manually from AWS Management console.&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://pratapreddypilaka.blogspot.com/2019/08/aws-vpc-basics-how-to-configure.html&quot; target=&quot;_blank&quot;&gt;Here is the link for the earlier article.&lt;/a&gt;&amp;nbsp;&lt;/h4&gt;&lt;div&gt;Here are the components we intend to create using terrafrom.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1tPvEw2yIWJlcfK7KFfvS_86z-0P-8DrmkkcPGjDXGZL6EYRRl9wAURg5zHkR7NLzUhgpl92QV6_bcFpxfU1Ezc54nfLrILreO2sifhFgbl3XXWbIanU2VAADELkFEzFNRyDH7AvVgnE/s826/1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;388&quot; data-original-width=&quot;826&quot; height=&quot;294&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1tPvEw2yIWJlcfK7KFfvS_86z-0P-8DrmkkcPGjDXGZL6EYRRl9wAURg5zHkR7NLzUhgpl92QV6_bcFpxfU1Ezc54nfLrILreO2sifhFgbl3XXWbIanU2VAADELkFEzFNRyDH7AvVgnE/w625-h294/1.png&quot; width=&quot;625&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;We will be creating VPC, Public and Private Subnets, RoutTables, Security Groups,&amp;nbsp;Inbound / Outbound rules for communication channels on each of the security groups.&lt;/div&gt;&lt;div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;First i would recommend creating all this components manually so that you know in and out of the significance of each component and know the dpeendecies of each of those components on others.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Read the above mentioned article for manual process and indetail explanation of each of the components.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now coming to Terrafrom, i hope you have read the &quot;&lt;a href=&quot;https://pratapreddypilaka.blogspot.com/2020/07/iac-infrastructure-as-code-using.html&quot; target=&quot;_blank&quot;&gt;IaC Infrastructure as Code using Terraform - Basics&lt;/a&gt;&quot; and &quot;&lt;a href=&quot;https://pratapreddypilaka.blogspot.com/2020/07/iac-terraform-automation-using-octopus.html&quot; target=&quot;_blank&quot;&gt;IaC - Terraform Automation using Octopus Deploy&lt;/a&gt;&quot; articles from earlier. These articles will give basic understanding and implementation of Octopus integration with terrafroms from scratch.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;By now if you follow above articles you should be able to create Octopus projects and create deployment steps as part of process and able to deploy componenets (S3 Bucket) to AWS.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We will add two additional steps to process to deal with creation and deletion of all the components shown above.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifoH3aZH8iEn42IiIrB8MrQJou_mip43teQneSZjFXaOsSj1OmP8toceYsfKR_mb3MOpzoCo2YCj00DSv5ghmhhBFpxLWVp5h3eBo9xGmIX1g5tjPOMSBPHRQWgJzCzitj6ta3AALJ6i0/s969/21.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;523&quot; data-original-width=&quot;969&quot; height=&quot;338&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifoH3aZH8iEn42IiIrB8MrQJou_mip43teQneSZjFXaOsSj1OmP8toceYsfKR_mb3MOpzoCo2YCj00DSv5ghmhhBFpxLWVp5h3eBo9xGmIX1g5tjPOMSBPHRQWgJzCzitj6ta3AALJ6i0/w625-h338/21.png&quot; width=&quot;625&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now lets deal with code required to create the components shown in above picture.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;terraform {
    backend &quot;s3&quot; {
        bucket = &quot;#{terraformstates3bucket}&quot;
        key = &quot;#{terraformvpcstatekey}&quot;
        region = &quot;#{awsregion}&quot;
    }
}

provider &quot;aws&quot; {
  region=&quot;#{awsregion}&quot;
}

resource &quot;aws_vpc&quot; &quot;tf_vpc&quot; {
  cidr_block           = &quot;10.0.0.0/16&quot;
  enable_dns_hostnames = true
  enable_dns_support   = true

  tags {
    Name = &quot;My Octo AWS VPC&quot;
  }
}

resource &quot;aws_internet_gateway&quot; &quot;tf_internet_gateway&quot; {
  vpc_id = &quot;${aws_vpc.tf_vpc.id}&quot;

  tags {
    Name = &quot;My Octo AWS IGW&quot;
  }
}

resource &quot;aws_route_table&quot; &quot;tf_public_rt&quot; {
  vpc_id = &quot;${aws_vpc.tf_vpc.id}&quot;

  route {
    cidr_block = &quot;0.0.0.0/0&quot;
    gateway_id = &quot;${aws_internet_gateway.tf_internet_gateway.id}&quot;
  }

  tags {
    Name = &quot;My Octo AWS Pub RT&quot;
  }
}

resource &quot;aws_default_route_table&quot; &quot;tf_private_rt&quot; {
  default_route_table_id  = &quot;${aws_vpc.tf_vpc.default_route_table_id}&quot;

  tags {
    Name = &quot;My Octo AWS Pri RT&quot;
  }
}

resource &quot;aws_subnet&quot; &quot;tf_public_subnet&quot; {
  count                   = 1
  vpc_id                  = &quot;${aws_vpc.tf_vpc.id}&quot;
  cidr_block              = &quot;10.0.0.0/24&quot;
  map_public_ip_on_launch = true
  availability_zone       = &quot;us-west-2a&quot;

  tags {
    Name = &quot;My Octo AWS Pub SubNet&quot;
  }
}
resource &quot;aws_subnet&quot; &quot;tf_private_subnet&quot; {
  count                   = 1
  vpc_id                  = &quot;${aws_vpc.tf_vpc.id}&quot;
  cidr_block              = &quot;10.0.1.0/24&quot;
  availability_zone       = &quot;us-west-2b&quot;

  tags {
    Name = &quot;My Octo AWS Pri SubNet&quot;
  }
}

resource &quot;aws_route_table_association&quot; &quot;tf_public_assoc&quot; {
  count          = &quot;${aws_subnet.tf_public_subnet.count}&quot;
  subnet_id      = &quot;${aws_subnet.tf_public_subnet.id}&quot;
  route_table_id = &quot;${aws_route_table.tf_public_rt.id}&quot;
}
resource &quot;aws_route_table_association&quot; &quot;tf_private_assoc&quot; {
  count          = &quot;${aws_subnet.tf_private_subnet.count}&quot;
  subnet_id      = &quot;${aws_subnet.tf_private_subnet.id}&quot;
  route_table_id = &quot;${aws_default_route_table.tf_private_rt.id}&quot;
}

resource &quot;aws_security_group&quot; &quot;tf_public_sg&quot; {
  name        = &quot;My Octo AWS Pub SG&quot;
  description = &quot;Used for access to the public instances&quot;
  vpc_id      = &quot;${aws_vpc.tf_vpc.id}&quot;

  #SSH
  ingress {
    from_port   = 22
    to_port     = 22
    protocol    = &quot;tcp&quot;
    cidr_blocks = [&quot;0.0.0.0/0&quot;]
  }

  #HTTP

  ingress {
    from_port   = 80
    to_port     = 80
    protocol    = &quot;tcp&quot;
    cidr_blocks = [&quot;0.0.0.0/0&quot;]
  }

  egress {
    from_port   = 0
    to_port     = 0
    protocol    = &quot;-1&quot;
    cidr_blocks = [&quot;0.0.0.0/0&quot;]
  }
}

resource &quot;aws_security_group&quot; &quot;tf_private_sg&quot; {
  name        = &quot;My Octo AWS Pri SG&quot;
  description = &quot;Used for access to the private instances&quot;
  vpc_id      = &quot;${aws_vpc.tf_vpc.id}&quot;

  #SSH
  ingress {
    from_port   = 22
    to_port     = 22
    protocol    = &quot;tcp&quot;
    security_groups = [&quot;${aws_security_group.tf_public_sg.id}&quot;]
  }

  #HTTP
  ingress {
    from_port   = 80
    to_port     = 80
    protocol    = &quot;tcp&quot;
    security_groups = [&quot;${aws_security_group.tf_public_sg.id}&quot;]
  }

  egress {
    from_port   = 0
    to_port     = 0
    protocol    = &quot;-1&quot;
    cidr_blocks = [&quot;0.0.0.0/0&quot;]
  }
}&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;Add above source code to both&amp;nbsp;&lt;/div&gt;&lt;div&gt;1. Create AWS VPC step which is a Terraform-Apply step&lt;/div&gt;&lt;div&gt;2. Delete AWS VPC step which is a Terraform-Destroy step&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk_UaJd6DGgDhbs1_p6a8ecCqr9nGtNpM7nx6jJZWnE6SNd7DBXLKlVTLq9Ax1EWrce6z2ldDhS6OP4odFJm4B9zN32jCWs-yFptCa2LEtuSFgsj30kDwDlYHLp9LBE2n2_3l1Ltx82T0/s1326/2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;461&quot; data-original-width=&quot;1326&quot; height=&quot;218&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk_UaJd6DGgDhbs1_p6a8ecCqr9nGtNpM7nx6jJZWnE6SNd7DBXLKlVTLq9Ax1EWrce6z2ldDhS6OP4odFJm4B9zN32jCWs-yFptCa2LEtuSFgsj30kDwDlYHLp9LBE2n2_3l1Ltx82T0/w625-h218/2.png&quot; width=&quot;625&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;Now i deployed the build and choose to run Create AWS VPN step.&lt;/div&gt;&lt;div&gt;Here is the output.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBc3FzWzxFCE-jDr19VUSPcbNbcgAMvulkgP2XU3q8mmGtMp_l6Zzo-D74T7gO62H4IvaDzPtVpKrquGjdMNLmmTAJ1Yuw1CGwHqcpUs4zo7n1mqUNAQYFTOkaUe6i4i3ck58ZF0p10RY/s1003/1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;457&quot; data-original-width=&quot;1003&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBc3FzWzxFCE-jDr19VUSPcbNbcgAMvulkgP2XU3q8mmGtMp_l6Zzo-D74T7gO62H4IvaDzPtVpKrquGjdMNLmmTAJ1Yuw1CGwHqcpUs4zo7n1mqUNAQYFTOkaUe6i4i3ck58ZF0p10RY/w625-h286/1.png&quot; width=&quot;625&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;You can see that irrespctive of the order i mentioned resources , terraform being a good provisioning tool, it interprets what need to be created first and which component creation should follow.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I have taken individual snapshots of all the components created in AWS and pasted in a single screenshot.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDhbU7jiccKhJByzQZEQb8y-PjyfuCIrA87q6YWhyphenhyphenRpy9L3mXQfIOJyFtjdq9CE17XpTrIWxGTNvadjcCToTfPYj2fgMbf8MeeBcIIlQdFImwnNAVwkpFCPgPZ4VWqmhX_1Eul6yoBTrA/s994/3.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;646&quot; data-original-width=&quot;994&quot; height=&quot;406&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDhbU7jiccKhJByzQZEQb8y-PjyfuCIrA87q6YWhyphenhyphenRpy9L3mXQfIOJyFtjdq9CE17XpTrIWxGTNvadjcCToTfPYj2fgMbf8MeeBcIIlQdFImwnNAVwkpFCPgPZ4VWqmhX_1Eul6yoBTrA/w625-h406/3.png&quot; width=&quot;625&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;When you run the &quot;Delete AWS VPN&quot; step, terraform will identify the dependencies between components and delete them in right order.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Thus we can provision infrastructure level security boundaries in AWS using Octopus and Terrafrom.&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pratapreddypilaka.blogspot.com/feeds/3206602878009481702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pratapreddypilaka.blogspot.com/2020/07/terraform-provisioning-infrastructure.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/3206602878009481702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4208378482021219922/posts/default/3206602878009481702'/><link rel='alternate' type='text/html' href='http://pratapreddypilaka.blogspot.com/2020/07/terraform-provisioning-infrastructure.html' title='Terraform - Provisioning  Infrastructure level Security in AWS '/><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD3Wd9MS0a7ZEslznGnwWWd1tE1poyBWY6xAOQ40mDXLxVk2rLn5SD_Z6OihgLV5bbp6TgHpevfhxU27JOMbU4SDioZgy_FuRyFvEIcKJ-2hnvh082TjVl3uaXFll03oVygxOrz5Rs4_z1K-vxrdEq0005lsQ36TMgkdkdHJG8j42OcIA/s220/Polish_20231127_212857399-01.jpeg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1tPvEw2yIWJlcfK7KFfvS_86z-0P-8DrmkkcPGjDXGZL6EYRRl9wAURg5zHkR7NLzUhgpl92QV6_bcFpxfU1Ezc54nfLrILreO2sifhFgbl3XXWbIanU2VAADELkFEzFNRyDH7AvVgnE/s72-w625-h294-c/1.png" height="72" width="72"/><thr:total>1</thr:total></entry></feed>