<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Azure Development Community</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/azuredev/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/azuredev/feed.xml</link>
    <description>We’re a community leadership team of Microsoft employees, MVPs, Partners, and Azure development experts. This blog represents the opinions and expertise of the broad development echosystem; it is not the officially endorsed position of Microsoft or Azure.</description>
    <lastBuildDate>Thu, 09 May 2019 17:33:15 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Azure Development Community - Same Great Blog... NEW HOME!!!</title>
      <link>https://docs.microsoft.com/archive/blogs/azuredev/azure-development-community-same-great-blog-new-home</link>
      <pubDate>Thu, 28 Feb 2019 15:13:05 GMT</pubDate>
      <dc:creator><![CDATA[Ed Price - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/azuredev/?p=11235</guid>
      <description><![CDATA[I'm pleased to announce that our blog has moved!

You can now find us on the growing Microsoft...]]></description>
      <content:encoded><![CDATA[I'm pleased to announce that our blog has moved!

You can now find us on the growing Microsoft Tech Community:
<ul>
 	<li><a href="https://techcommunity.microsoft.com/t5/Azure-Developer-Community-Blog/bg-p/AzureDevCommunityBlog">https://techcommunity.microsoft.com/t5/Azure-Developer-Community-Blog/bg-p/AzureDevCommunityBlog</a></li>
</ul>
Since that platform is the new place to embrace the Microsoft developer and technical community, then that's where we need to be!

All our blog posts are migrated over there, so you can still find the hits over there on our new site!

Feel free to comment if you're looking for a particular post, but searching on the new blog will get you there. Also, this blog will be removed on 3/20, so we'll want to update any broken links to the new blog.

Thank you all! We look forward to many more years as we dig into new technologies and content in Azure Development!

- Ninja Ed]]></content:encoded>
    </item>
    <item>
      <title>Azure Content Spotlight - Azure Data Factory</title>
      <link>https://docs.microsoft.com/archive/blogs/azuredev/azure-content-spotlight-azure-data-factory-2</link>
      <pubDate>Thu, 14 Feb 2019 08:00:11 GMT</pubDate>
      <dc:creator><![CDATA[Sjoukje Zaal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/azuredev/?p=11215</guid>
      <description><![CDATA[Welcome to another Azure Content Spotlight! These articles are used to highlight items in Azure that...]]></description>
      <content:encoded><![CDATA[Welcome to another Azure Content Spotlight! These articles are used to highlight items in Azure that could be more visible to the Azure community.

This week our content spotlight is about Azure Data Factory. From my experience as a Cloud Architect, moving, storing and transforming data in Azure is one of the biggest topics at this moment for organizations. Microsoft is releasing a lot features around data solutions at the moment, and one of these features is Azure Data Factory. Data is mostly stored in <span>relational, non-relational, and other storage systems. But raw data doesn't have the proper context or meaning to provide meaningful insights to analysts, data scientists, or business decision makers.</span>

Azure Data Factory provides a service that <span>can orchestrate processes to refine these enormous stores of raw data into actionable business insights. It is build for complex hybrid extract-transform-load (ETL), extract-load-transform (ELT), and data integration projects.</span>

To get started with Azure Data Factory, you can refer to the following video's and articles:
<ul>
 	<li><a href="https://docs.microsoft.com/en-us/azure/data-factory/">Azure Data Factory Documentation</a></li>
 	<li><a href="https://channel9.msdn.com/Shows/Azure-Friday/Visually-build-pipelines-for-Azure-Data-Factory-V2">Visually build pipelines for Azure Data Factory V2</a></li>
 	<li><a href="https://channel9.msdn.com/Shows/Azure-Friday/Quickly-build-data-integration-pipelines-using-templates-in-Azure-Data-Factory">Quickly build data integration pipelines using templates in Azure Data Factory</a></li>
 	<li><a href="https://channel9.msdn.com/Shows/Azure-Friday/Code-free-data-transformation-at-scale-using-Azure-Data-Factory">Code-free data transformation at scale using Azure Data Factory</a></li>
 	<li><a href="https://channel9.msdn.com/Shows/Azure-Friday/enhanced-productivity-using-azure-data-factory-visual-tools">Enhanced productivity using Azure Data Factory visual tools</a></li>
 	<li><a href="https://channel9.msdn.com/Shows/Azure-Friday/Run-Azure-Functions-from-Azure-Data-Factory-pipelines">Run Azure Functions from Azure Data Factory pipelines</a></li>
</ul>
&nbsp;

Cheers, Sjoukje

<iframe class="ginger-extension-definitionpopup" src="//kdfieneakcjfaiglcfcgkidlkmlijjnh/content/popups/definitionPopup/index.html?title=hottest&amp;description=used%20of%20physical%20heat%3B%20having%20a%20high%20or%20higher%20than%20desirable%20temperature%20or%20giving%20off%20heat%20or%20feeling%20or%20causing%20a%20sensation%20of%20heat%20or%20burning"></iframe>]]></content:encoded>
    </item>
    <item>
      <title>Azure Content Spotlight - Azure Cost Management</title>
      <link>https://docs.microsoft.com/archive/blogs/azuredev/azure-content-spotlight-azure-cost-management</link>
      <pubDate>Thu, 07 Feb 2019 21:17:18 GMT</pubDate>
      <dc:creator><![CDATA[chilberto]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/azuredev/?p=11165</guid>
      <description><![CDATA[Welcome to another Azure Content Spotlight! These articles are used to highlight...]]></description>
      <content:encoded><![CDATA[Welcome to another Azure Content Spotlight! These articles are used to highlight items

<img src="https://msdnshared.blob.core.windows.net/media/2019/02/2019-02-07_10-30-12.jpg" alt="" width="230" height="197" class="size-full wp-image-11175 alignright" />

in Azure that could be more visible to the Azure community.

With this week's announcement, <a href="https://azure.microsoft.com/en-us/blog/azure-cost-management-now-general-availability-for-enterprise-agreements-and-more/">Azure Cost Management now general availability for enterprise agreements and more!</a>, our content spotlight is about Azure Cost Management. The Azure Cost Management has had several new features added so let's have a quick tour of some of its capabilities:
<h2>Budgets:</h2>
Budgets is a great feature for keeping an eye on costs and providing a mechanism for alerts on these budgets. The following screenshot shows a monthly budget of $100 and includes an alert for when the current running cost becomes 70% of the budget:

<a href="https://msdnshared.blob.core.windows.net/media/2019/02/2019-02-08_18-04-34.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2019/02/2019-02-08_18-04-34.jpg" alt="" width="979" height="559" class="alignnone wp-image-11185" /></a>

Once the budgets have been defined, these are shown on the Budgets option as a convenient summary:

<a href="https://msdnshared.blob.core.windows.net/media/2019/02/2019-02-08_18-07-05.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2019/02/2019-02-08_18-07-05.jpg" alt="" width="1844" height="408" class="alignnone size-full wp-image-11195" /></a>
<h2>Cost Analysis:</h2>
Cost Analysis provides a means of tracking costs over a time period. The graph offers some great features including a time period, grouping and granularity. For example, the following graph shows daily consumption against the monthly budget and includes the different types of meter indicating that sql and event hubs are the most significant cost:
<h2><a href="https://msdnshared.blob.core.windows.net/media/2019/02/2019-02-08_18-09-32.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2019/02/2019-02-08_18-09-32.jpg" alt="" width="817" height="315" class="alignnone size-full wp-image-11205" /></a></h2>
<h2>References</h2>
Both references have links to helpful videos:
<ul>
 	<li><a href="https://azure.microsoft.com/en-us/blog/azure-cost-management-now-general-availability-for-enterprise-agreements-and-more/">Azure Cost Management now general availability for enterprise agreements and more!</a></li>
 	<li><a href="https://docs.microsoft.com/en-us/azure/cost-management/">Azure Cost Management Documentation</a></li>
</ul>
Lot's of great features to explore so have a look!]]></content:encoded>
    </item>
    <item>
      <title>Debugging Docker Containers (attaching)</title>
      <link>https://docs.microsoft.com/archive/blogs/azuredev/debugging-docker-containers-attaching</link>
      <pubDate>Wed, 30 Jan 2019 20:00:19 GMT</pubDate>
      <dc:creator><![CDATA[chilberto]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/azuredev/?p=11115</guid>
      <description><![CDATA[The Azure Developer Community blog has moved! Find this blog post over on our new blog at the...]]></description>
      <content:encoded><![CDATA[The Azure Developer Community blog has moved! Find this blog post over on our new blog at the Microsoft Tech Community:

<a href="https://techcommunity.microsoft.com/t5/Azure-Developer-Community-Blog/Debugging-Docker-Containers-attaching/ba-p/338698">https://techcommunity.microsoft.com/t5/Azure-Developer-Community-Blog/Debugging-Docker-Containers-attaching/ba-p/338698</a>

=================

Visual Studio has excellent built in support for working with Docker containers and most of the examples on the web are written <a href="https://msdnshared.blob.core.windows.net/media/2018/02/luis.png"><img width="225" height="225" class="size-full wp-image-7906 alignright" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/02/luis.png" /></a>with those tools installed. But what about the situation where the container is already running? This post will provide an example of debugging a .Net Framework application running a windows container as well as provide references to posts about remote debugging for different platforms including the .Net Framework, Python, and .Net Core applications.
<h3>General</h3>
In all three examples, the container needs to be <em>prepared</em> to allow for Visual Studio to access a running process on the container. Most devs are familiar with debugging solutions at design time using both the auto-attach (F5) and attaching the debugger to a running process on their local machine. This approach can be used to attach to a <a href="https://docs.microsoft.com/en-us/visualstudio/debugger/attach-to-running-processes-with-the-visual-studio-debugger?view=vs-2017#BKMK_Attach_to_a_process_on_a_remote_computer">remote computer</a> and even to <a href="https://docs.microsoft.com/en-us/visualstudio/debugger/remote-debugging-azure?view=vs-2017">Azure Web Apps</a> and <a href="https://markheath.net/post/remote-debugging-azure-functions">Azure Functions</a>.

Attaching to a container is similar to those examples where the ability to remote debug needs to be enabled on the container to allow Visual Studio the ability to connect.
<h3>.Net Framework</h3>
The first step to enabling the debug of a .Net Framework app is to install and run the remote debugger. The following is an example of enabling this on a dockerfile that uses Microsoft's Asp.Net image:

[code lang="bash"]

FROM microsoft/aspnet:10.0.14393.2665

EXPOSE 4020 4021
# download the remote debugger
RUN Invoke-WebRequest -OutFile c:\rtools_setup_x64.exe -Uri https://download.microsoft.com/download/1/2/2/1225c23d-3599-48c9-a314-f7d631f43241/rtools_setup_x64.exe;
# install the remote debugging 
RUN &amp;amp;amp;amp; 'c:\rtools_setup_x64.exe' /install /quiet

# rest of the docker file
[/code]

After the image has been built, the next step is to make sure the ports for remote debugging (-p 4020:4020 -p 4021:4021) are also mapped when running the container. For example, the following starts the container with the name "mysite" and exposes ports 4020 and 4021 and port 80 as port 8078.

[code]

docker run -d -p 4020:4020 -p 4021:4021 -p 8078:80 --name mysite core

[/code]

The final step is to start the remote debugger on the container as shown below:

[code]

docker exec -it mysite &quot;C:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE\Remote Debugger\x64\msvsmon.exe&quot; /nostatus /silent /noauth /anyuser /nosecuritywarn

[/code]

Within Visual Studio, select the Attach to Process action in the Debug window:

<a href="https://msdnshared.blob.core.windows.net/media/2019/01/2019-01-30_10-15-21.jpg"><img width="297" height="253" class="alignnone size-full wp-image-11125" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/01/2019-01-30_10-15-21.jpg" /></a>

In the Transport, Remote is used and the Find button is used to establish the remote connection:

<a href="https://msdnshared.blob.core.windows.net/media/2019/01/2019-01-30_10-15-49.jpg"><img width="822" height="188" class="alignnone size-full wp-image-11135" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/01/2019-01-30_10-15-49.jpg" /></a>

The screenshot below shows the detected containers:

<a href="https://msdnshared.blob.core.windows.net/media/2019/01/2019-01-30_10-16-08.jpg"><img width="386" height="493" class="alignnone size-full wp-image-11145" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/01/2019-01-30_10-16-08.jpg" /></a>

If there is more than one container detected, you can determine the specific IP address of the container by using the docker inspect command:

[code]

docker inspect -f &quot;{{ .NetworkSettings.Networks.nat.IPAddress }}&quot; mysite

[/code]

Once the container has been selected, then the running process can be selected. For example, if debugging a IIS web application:

<a href="https://msdnshared.blob.core.windows.net/media/2019/01/2019-01-30_10-17-12.jpg"><img width="814" height="438" class="alignnone size-full wp-image-11155" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/01/2019-01-30_10-17-12.jpg" /></a>

Hope this helps! Please post any helpful comments for others and any other links you might know of!
<h3>References</h3>
<h4>.Net Framework</h4>
Another example of remote debugging .Net Framework applications can be found in post by Richard Banks: <a href="https://www.richard-banks.org/2017/02/debug-net-in-windows-container.html">How to Remote Debug a .NET App in a Windows Docker Container</a>.
<h4>.Net Core</h4>
<a href="https://github.com/Microsoft/MIEngine/wiki/Offroad-Debugging-of-.NET-Core-on-Linux---OSX-from-Visual-Studio">Offroad Debugging of .NET Core on Linux OSX from Visual Studio</a>

<a href="https://blog.quickbird.uk/debug-netcore-containers-remotely-9a103060b2ff">Debug .NetCore Containers in Docker and Kubernetes</a>
<h4>Python</h4>
<a href="https://code.visualstudio.com/docs/python/debugging#_remote-debugging">Python debug configurations in Visual Studio Code</a>

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Azure Speech Service: Example project for custom voices, transcribe videos &amp; generate subtitles!</title>
      <link>https://docs.microsoft.com/archive/blogs/azuredev/azure-speech-service-example-project-for-custom-voices-transcribe-videos-generate-subtitles</link>
      <pubDate>Fri, 25 Jan 2019 15:25:35 GMT</pubDate>
      <dc:creator><![CDATA[Pete Laker]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/azuredev/?p=11045</guid>
      <description><![CDATA[The Azure Developer Community blog has moved! Find this blog post over on our new blog at the...]]></description>
      <content:encoded><![CDATA[The Azure Developer Community blog has moved! Find this blog post over on our new blog at the Microsoft Tech Community:

<a href="https://techcommunity.microsoft.com/t5/Azure-Developer-Community-Blog/Azure-Speech-Service-Example-project-for-custom-voices/ba-p/338692">https://techcommunity.microsoft.com/t5/Azure-Developer-Community-Blog/Azure-Speech-Service-Example-project-for-custom-voices/ba-p/338692</a>
========================
<blockquote>
<h3><strong><em>Feed audio from friends, family or vids of your favourite celebrity.</em></strong></h3>
<h3><strong><em>Train a customised voice that sounds just like them.</em></strong></h3>
<h3><strong><i>Then make them say whatever you want!</i></strong></h3>
</blockquote>
<i></i>

[audio wav="https://msdnshared.blob.core.windows.net/media/2019/01/Martin-Fake-Voice-V2.wav"][/audio]

&nbsp;

OK so this still sounds a little bit robotic. But the training data was less than 8 minutes of poor quality audio, with non-matching text.

With not much more effort, you can buff this up to sound very close to the real person!

&nbsp;

To hear what Martin sounds like (and learn a thing or two)<strong> <a target="_blank" href="https://www.linkedin.com/pulse/devops-habits-from-microsofts-martin-woodward-peter-laker/" rel="noopener">watch this excellent series of clips about Azure DevOps</a>.</strong>

&nbsp;
<h2>Why implement a custom voice?</h2>
This is a rapidly maturing technology, which has many real-world benefits. You can generate custom voices for chat bots, to use in games, for interacting with home automation, including Cortana, Alexa or Siri skills. It offers very believable video narration, and more realistic voice for call handling, to name just a few popular uses. The transcription service was where I came in. It is driven by the latest AI from Azure Cognitive Services. It provides almost real-time transcription and corrects itself as it goes.

<a target="_blank" href="https://msdnshared.blohttps://social.technet.microsoft.com/wiki/contents/articles/52457.transcribe-video-make-custom-voices-and-subtitles-with-windows-10-and-azure-speech-services.aspx" rel="noopener"><img width="712" height="470" class="alignnone size-full wp-image-11075" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/01/TranscribeScreenshot.png" /></a>

&nbsp;
<h2>Is it a lot of work to implement this new tech?</h2>
As an IT pro reading the docs, training a "Custom Voice" with Microsoft Speech Service <em>sounds</em> like a complicated and cumbersome task.

I also initially thought it sounded like too big of a job, to prepare all the training data for a decent sounding voice.

But it wasn't, and <strong>I hope to dispel that myth for you as well</strong>!

The services are very forgiving and will produce recognisable results with under a minute's worth of training data!

The code I've <strong><a target="_blank" href="https://github.com/ProjectPete/AzureCustomSpeech" rel="noopener">uploaded to GitHub</a></strong> makes it even simpler.

&nbsp;
<h2>What is a simplest way to implement this tech?</h2>
Instead of spending hours reciting carefully scripted phrases for training data, why not flip it around?

<em><strong>Take existing audio and first transcribe that to text.</strong></em>
<em><strong>Then feed that the original audio and the auto-transcription BACK into the service!</strong></em>

For even better results, spend as little as half an hour, tidying the transcription mistakes and feed that curated/cleaned version back in.
You'll see how easy that is, with the demo tool I've posted <a target="_blank" href="https://github.com/ProjectPete/AzureCustomSpeech" rel="noopener"><b>posted to GitHub</b></a>.
It also helps you splice the audio up, into small chunks to feed into the service.

<a href="https://msdnshared.blob.core.windows.net/media/2019/01/PolishedSnippet.png"><img width="1419" height="214" class="alignnone size-full wp-image-11085" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/01/PolishedSnippet.png" /></a>

This visual tool will do everything required to prep the training data and you can learn and adapt it to your needs.

<span style="color: #ff0000"><em><strong>Read more and watch demos of this project <a target="_blank" href="https://social.technet.microsoft.com/wiki/contents/articles/52457.transcribe-video-make-custom-voices-and-subtitles-with-windows-10-and-azure-speech-services.aspx" rel="noopener">HERE</a></strong></em></span>

This project (which you can just download and run) will show you how to authenticate against the Speech Service, how to upload audio for transcription and also how to request and download the your final custom generated audio files.

&nbsp;
<h2>Three simple steps to implement</h2>
<ol>
 	<li>Transcribe your audio with the Speech to Text service</li>
 	<li>Upload your snippets of curated phrases and text into the Custom Voice service</li>
 	<li>Tell it what you want it to say and download the result</li>
</ol>
&nbsp;

You can <a target="_blank" href="https://github.com/ProjectPete/AzureCustomSpeech" rel="noopener"><strong>download the code for this project from GitHub</strong></a> and have your own custom voice ready, in under an hour!

&nbsp;

The initial results may initially sound a little "robotic", of course. But it's shocking to hear a familiar voice coming back at you. The final quality of your voice is actually only limited to the amount of time you then have. To tidy up the samples, perfect the acoustic library and work on the phonetic scripts. But you can still get very impressive results, with very little work.

&nbsp;
<h2>Why did I need to implement this tech?</h2>
Simply for better transcription results. I initially just wanted to provide viewers a transcript of a video presentation that <a target="_blank" href="https://twitter.com/martinwoodward" rel="noopener">Martin Woodward</a> (<a target="_blank" href="https://channel9.msdn.com/events/speakers/Martin-Woodward" rel="noopener">Microsoft Principal Group Program Manager for Azure DevOps</a>) gave, to my <a href="https://www.meetup.com/Azure-Developer/">Azure Developer Meetup</a> group last November.  You can watch the full set of eight clips from that great session here.

The basic recognition code was <a target="_blank" href="https://docs.microsoft.com/en-gb/azure/cognitive-services/speech-service/how-to-recognize-speech-csharp" rel="noopener">copy n paste from the docs</a> and I had transcription results within just FIVE minutes! However, the sound quality and his slight accent meant the transcription had many errors. they would have taken me some time to manually correct.

<a href="https://msdnshared.blob.core.windows.net/media/2019/01/RawTranscribed.png"><img width="841" height="254" class="alignnone size-full wp-image-11105" alt="" src="https://msdnshared.blob.core.windows.net/media/2019/01/RawTranscribed.png" /></a>

So I decided instead to feed the "best bits" of the audio BACK into the service, generate an acoustic model and hopefully get a much improved transcription out. <strong>And it worked!</strong>

&nbsp;

As a side-effect, I also generated a custom voice, which was trained to sound very similar to Martin! I was so impressed at how easy it was.

&nbsp;

So over the festive break, I pulled together some demo code to show how it is implemented.

This is now available in <strong><a target="_blank" href="https://github.com/ProjectPete/AzureCustomSpeech" rel="noopener">this C# GitHub repo</a></strong>, to demonstrate how to implement this.

&nbsp;

You can download that now and try yourself.<strong> It's easy!</strong>

Within just 30-60 minutes, you can get impressive results!
<span style="float: none;background-color: transparent;color: #333333;cursor: text;font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size: 16px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;text-align: left;text-decoration: none;text-indent: 0px"></span>

&nbsp;

<span style="float: none;background-color: transparent;color: #333333;cursor: text;font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size: 16px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;text-align: left;text-decoration: none;text-indent: 0px">I'm filling out </span><strong><a target="_blank" href="https://social.technet.microsoft.com/wiki/contents/articles/52457.transcribe-video-and-make-your-own-custom-voices-with-azure-speech-services.aspx" rel="noopener">a more detailed article on using the service HERE on TechNet Wiki.</a> </strong>

&nbsp;

Plus, I'll be documenting the project features in the GitHub project wiki - if you just want to use the tool and not know the code.

&nbsp;

Pete Laker,
<a target="_blank" href="https://mvp.microsoft.com/en-us/PublicProfile/5001916" rel="noopener">Azure MVP</a> and <a target="_blank" href="https://www.microsoft.com/en-gb/atwork/it-implementer" rel="noopener">Microsoft IT Implementer</a>

&nbsp;

<hr />

This is part of a series of Azure developer blog posts, in my role as <a href="https://www.microsoft.com/en-gb/atwork/it-implementer">Microsoft IT Implementer</a>.

I'm honoured to have been asked by Microsoft to demystify and demonstrate some of the latest technologies, which excite me - and I hope you too!

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Azure Content Spotlight - Cognitive Services</title>
      <link>https://docs.microsoft.com/archive/blogs/azuredev/azure-content-spotlight-cognitive-services</link>
      <pubDate>Thu, 24 Jan 2019 14:58:36 GMT</pubDate>
      <dc:creator><![CDATA[chilberto]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/azuredev/?p=11025</guid>
      <description><![CDATA[The Azure Developer Community blog has moved! Find this blog post over on our new blog at the...]]></description>
      <content:encoded><![CDATA[The Azure Developer Community blog has moved! Find this blog post over on our new blog at the Microsoft Tech Community:

<a href="https://techcommunity.microsoft.com/t5/Azure-Developer-Community-Blog/Azure-Content-Spotlight-Cognitive-Services/ba-p/338688">https://techcommunity.microsoft.com/t5/Azure-Developer-Community-Blog/Azure-Content-Spotlight-Cognitive-Services/ba-p/338688</a>
========================

<span>Welcome to another Azure Content Spotlight! These articles are used to highlight items in </span>

<img width="225" height="225" class="size-full wp-image-7906 alignright" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/02/luis.png" />

<span>Azure that could be more visible to the Azure community.</span>

This week's spotlight highlights Cognitive Services containers. These containers offer a mechanism for taking Azure Cognitive Services to the <a href="https://azure.microsoft.com/en-us/blog/bringing-ai-to-the-edge/">IoT Edge</a> as well as running behind infrastructure that might prevent external network activity. In <a href="https://channel9.msdn.com/Shows/AI-Show/Using-Cognitive-Services-in-Containers?ocid=AID765057&amp;wt.mc_id=CFID0401">This Week in Cognitive</a>, Noelle LaCharite provides a great summary of the state of these services and Microsoft's motivation for providing them for their customers.

Additionally, Christoffer Noring provides an entertaining introduction to using the <a href="https://itnext.io/cognitive-services-api-i-need-your-clothes-boots-and-your-motorcycle-1216c36cfe8b">Cognitive Services API in Cognitive Services API — I need your clothes, boots and your motorcycle</a> including examples using the Azure CLI to create the service and using curl to call the services.

&nbsp;

&nbsp;

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Azure Content Spotlight – Azure Data Architecture Guide</title>
      <link>https://docs.microsoft.com/archive/blogs/azuredev/azure-content-spotlight-azure-data-architecture-guide</link>
      <pubDate>Thu, 17 Jan 2019 03:12:25 GMT</pubDate>
      <dc:creator><![CDATA[Sjoukje Zaal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/azuredev/?p=11005</guid>
      <description><![CDATA[The Azure Developer Community blog has moved! Find this blog post over on our new blog at the...]]></description>
      <content:encoded><![CDATA[The Azure Developer Community blog has moved! Find this blog post over on our new blog at the Microsoft Tech Community:

<a href="https://techcommunity.microsoft.com/t5/Azure-Developer-Community-Blog/Azure-Content-Spotlight-8211-Azure-Data-Architecture-Guide/ba-p/338686">https://techcommunity.microsoft.com/t5/Azure-Developer-Community-Blog/Azure-Content-Spotlight-8211-Azure-Data-Architecture-Guide/ba-p/338686</a>
========================

<span>Welcome to another Azure Content Spotlight! These articles are used to highlight items in Azure that could be more visible to the Azure community.</span>

This week's content spotlight is about the Azure Data Architecture Guide, which is published by the Azure CAT team. This guide can be used by data professionals, architects and developers, who are interested in selecting the right data services and technologies on Azure. It will give you a lot of interesting information, and guidance on how to design effective data architectures and solutions on the Azure platform.

The Azure CAT team provided a series of blog posts:
<ul>
 	<li><a href="https://blogs.msdn.microsoft.com/azurecat/2018/06/21/azure-data-architecture-guide-blog-1-introduction/">Azure Data Architecture Guide – Blog #1: Introduction</a></li>
 	<li><a href="https://blogs.msdn.microsoft.com/azurecat/2018/08/30/azure-data-architecture-guide-blog-2-on-demand-big-data-analytics/">Azure Data Architecture Guide – Blog #2: On-demand big data analytics</a></li>
 	<li><a href="https://blogs.msdn.microsoft.com/azurecat/2018/11/07/azure-data-architecture-guide-blog-3-advanced-analytics-and-deep-learning/">Azure Data Architecture Guide – Blog #3: Advanced analytics and deep learning</a></li>
 	<li><a href="https://blogs.msdn.microsoft.com/azurecat/2018/11/14/azure-data-architecture-guide-blog-4-hybrid-data-architecture/">Azure Data Architecture Guide – Blog #4: Hybrid data architecture</a></li>
 	<li><a href="https://blogs.msdn.microsoft.com/azurecat/2018/11/26/azure-data-architecture-guide-blog-5-clickstream-analysis/">Azure Data Architecture Guide – Blog #5: Clickstream analysis</a></li>
 	<li><a href="https://blogs.msdn.microsoft.com/azurecat/2018/11/29/azure-data-architecture-guide-blog-6-business-intelligence/">Azure Data Architecture Guide – Blog #6: Business intelligence</a></li>
 	<li><a href="https://blogs.msdn.microsoft.com/azurecat/2018/12/07/azure-data-architecture-guide-blog-7-intelligent-applications/">Azure Data Architecture Guide – Blog #7: Intelligent applications</a></li>
 	<li><a href="https://blogs.msdn.microsoft.com/azurecat/2018/12/24/azure-data-architecture-guide-blog-8-data-warehousing/">Azure Data Architecture Guide – Blog #8: Data warehousing</a></li>
</ul>
&nbsp;

You can also refer to the <a href="https://docs.microsoft.com/en-us/azure/architecture/data-guide/">Azure Data Architecture</a> guide.

&nbsp;

Cheers, Sjoukje
<div class="ginger-module-correctionBubble" style="padding: 0px">
<div class="ginger-module-correctionBubble-container ginger-module-correctionBubble-container-loggedout">
<div class="ginger-module-correctionBubble-login">Log in</div>
<div class="ginger-module-correctionBubble-body">to use Ginger</div>
</div>
<div class="ginger-module-correctionBubble-container ginger-module-correctionBubble-container-loggedin">
<div class="ginger-module-correctionBubble-limited">Limited mode</div>
<div class="ginger-module-correctionBubble-body">the<a class="ginger-module-correctionBubbleService-mistake-bubble-approve" title="Approve the Suggestion"></a><a class="ginger-module-correctionBubbleService-mistake-bubble-ignore" title="Ignore the Suggestion"></a> Azure Data Architecture guide</div>
<a class="ginger-module-correctionBubble-close" title="Ignore mistake">×</a>

</div>
</div>
<iframe src="//kdfieneakcjfaiglcfcgkidlkmlijjnh/content/popups/definitionPopup/index.html?title=download&amp;description=transfer%20a%20file%20or%20program%20from%20a%20central%20computer%20to%20a%20smaller%20computer%20or%20to%20a%20computer%20at%20a%20remote%20location" class="ginger-extension-definitionpopup"></iframe>]]></content:encoded>
    </item>
    <item>
      <title>Playing with Containers in Azure App Service</title>
      <link>https://docs.microsoft.com/archive/blogs/azuredev/playing-with-containers-in-azure-app-service</link>
      <pubDate>Mon, 14 Jan 2019 09:00:37 GMT</pubDate>
      <dc:creator><![CDATA[Andreas Helland]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/azuredev/?p=10875</guid>
      <description><![CDATA[Talking about containers is getting old by now, but in the light of my last article on deploying to...]]></description>
      <content:encoded><![CDATA[Talking about containers is getting old by now, but in the light of my last article on deploying to Docker Hub via Azure DevOps I still thought it worthwhile to revisit. (Available here: <a href="https://blogs.msdn.microsoft.com/azuredev/2019/01/07/setting-up-a-docker-containers-infrastructure-with-azure-devops/" rel="noopener" target="_blank">https://blogs.msdn.microsoft.com/azuredev/2019/01/07/setting-up-a-docker-containers-infrastructure-with-azure-devops/</a>)

You might be able to grasp the beauty of packaging code to Docker images and then deploy a number of containers, but you still need somewhere to actually run these containers. The first choice of this author is usually Azure, but which service in Azure? You have more than one way to skin the proverbial cat in Azure.

I'm not going to cover all these options within this post, but will instead focus on Azure App Service for now. Turns out there are a couple of options inside that offering as well.

Let's cover a basic scenario. We have a setup where we create a frontend and a backend, and want them to communicate with each other. I'm leaving the Docker Hub deployment out of this post -  I'll show the Azure parts and assume the images are retrievable.

Start by creating an empty solution in Visual Studio:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_01.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_01.png" alt="" width="941" height="653" class="alignnone size-full wp-image-10885" /></a>

Then add a web app:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_02.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_02.png" alt="" width="941" height="653" class="alignnone size-full wp-image-10895" /></a>
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_03.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_03.png" alt="" width="786" height="553" class="alignnone size-full wp-image-10905" /></a>

Add a <em>Dockerfile.CI</em> (if you want to pipe it through Azure DevOps):
[code language="csharp"]
FROM microsoft/dotnet:2.2-sdk AS build-env
WORKDIR /app

# Copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore

# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out

# Build runtime image
FROM microsoft/dotnet:2.2-aspnetcore-runtime
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT [&quot;dotnet&quot;, &quot;FooFrontend.dll&quot;]
[/code]

After testing and building locally you should make sure it ends up as an image you can retrieve. For the purposes of this example I have pushed it to <a href="https://hub.docker.com/r/ahelland/hellofoo-frontend" rel="noopener" target="_blank">https://hub.docker.com/r/ahelland/hellofoo-frontend</a>.

Create a web app in Azure:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_04.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_04.png" alt="" width="302" height="579" class="alignnone size-full wp-image-10915" /></a>

You will get three options - let's start with <em>Single Container</em>:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_05.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_05.png" alt="" width="620" height="339" class="alignnone size-full wp-image-10925" /></a>

<em>Startup file</em> should match your <em>ENTRYPOINT</em> in your Dockerfile.

Open the web app to verify it worked:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_06.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_06.png" alt="" width="519" height="172" class="alignnone size-full wp-image-10935" /></a>

That was just pure boilerplate code though. Let's add some text like "Hello from Docker". For instance we could edit <em>index.cshtml</em> to contain a div like this:
[code language="csharp"]
&lt;div class=&quot;text-center&quot;&gt;
    Hello from Docker!&lt;br /&gt;
&lt;/div&gt;
[/code]

That's fairly static though, and we want this to be configurable. Using the standard mechanisms in .NET Core we create a setting in <em>appsettings.json</em>:
[code language="csharp"]
{
  &quot;Logging&quot;: {
    &quot;LogLevel&quot;: {
      &quot;Default&quot;: &quot;Warning&quot;
    }
  },
  &quot;AllowedHosts&quot;: &quot;*&quot;,
  &quot;UI_Texts&quot;: {
    &quot;Greeting&quot;: &quot;Hello from Docker!&quot;,
  }
}
[/code]

And edit <em>index.cshtml</em> accordingly:
[code language="csharp"]
@page
@using Microsoft.Extensions.Configuration;
@inject IConfiguration configuration;
@model IndexModel
@{
    ViewData[&quot;Title&quot;] = &quot;Home page&quot;;
}

&lt;div class=&quot;text-center&quot;&gt;
    Greeting: @configuration.GetSection(&quot;UI_Texts&quot;)[&quot;Greeting&quot;]&lt;br /&gt;
&lt;/div&gt;
[/code]

This works, but it persisted in the Docker image - what if we want to change it? And what if this was just a placeholder value specifically because we don't want to embed secrets in the image?

If we go back to the cloud (after checking in the code and pushing to Docker Hub) we can add an application setting in Azure App Service:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_07.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_07.png" alt="" width="705" height="269" class="alignnone size-full wp-image-10945" /></a>

Do note that the hierarchical definition is different for containers than non-containerized app service instances. The format for non-container is <em>parent.child</em> whereas containers require <em>parent__child</em> (double underscore).

This modifies the environment settings in for the host, and Docker picks up on this. A quick refresh of the browser and it should have changed (no redeploy necessary):
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_08.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_08.png" alt="" width="523" height="89" class="alignnone size-full wp-image-10955" /></a>

That's quite a nice way to handle configuration. No touching of the file system necessary.

I initially said that I wanted to do a frontend vs backend setup, but this just covered a frontend. The next step would be adding a backend:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_09.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_09.png" alt="" width="941" height="653" class="alignnone size-full wp-image-10965" /></a>
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_10.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_10.png" alt="" width="786" height="553" class="alignnone size-full wp-image-10975" /></a>

And we need a <em>Dockerfile.CI</em> for this project too.
[code language="csharp"]
FROM microsoft/dotnet:2.2-sdk AS build-env
WORKDIR /app

# Copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore

# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out

# Build runtime image
FROM microsoft/dotnet:2.2-aspnetcore-runtime
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT [&quot;dotnet&quot;, &quot;FooBackend.dll&quot;]
[/code]

While this API doesn't do much we would still like to print out the result of an API-call. Let's use the same approach as before - add a setting to <em>appsettings.json</em>:
[code language="csharp"]
&quot;UI_Texts&quot;: {
    &quot;Greeting&quot;: &quot;Hello from Docker in the cloud!&quot;
  },
&quot;API&quot; {
    &quot;api_address&quot;: &quot;https://localhost:1234/api/values&quot;
  }
[/code]

And add it to <em>index.cshtml</em>:
[code language="csharp"]
@page
@using Microsoft.Extensions.Configuration;
@using System.Net.Http;
@inject IConfiguration configuration;
@model IndexModel
@{
    ViewData[&quot;Title&quot;] = &quot;Home page&quot;;
}

@{
    using (var client = new HttpClient())
    {
        var apiAddress = configuration.GetSection(&quot;API&quot;)[&quot;api_address&quot;];
        string requestUrl = apiAddress;
        HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, requestUrl);
        HttpResponseMessage response = client.SendAsync(request).Result;
        var responseString = response.Content.ReadAsStringAsync().Result;
        ViewBag.result = responseString;
    }
}

&lt;div class=&quot;text-center&quot;&gt;
    Greeting: @configuration.GetSection(&quot;UI_Texts&quot;)[&quot;Greeting&quot;]&lt;br /&gt;
    Result of API call: @ViewBag.result;
&lt;/div&gt;
[/code]

You'll notice I needed to add some inline code to execute the http call, and then I pass it back via the ViewBag.

Compile, test, check in and all that jazz. I posted this image to: <a href="https://hub.docker.com/r/ahelland/hellofoo-backend" rel="noopener" target="_blank">https://hub.docker.com/r/ahelland/hellofoo-backend</a>

We'll want to move back to the Azure Portal to sort this out, but there are a couple questions to be answered first.

<strong>We used "Single container" in the first round, and this doesn't sound like one container?</strong>
True, and that's why there is an option for <em>Docker Compose</em>, as the purpose of that is specifically setting up more than one container and in some cases a relationship between containers.

<strong>Can we still use the <em>application settings</em> in the portal to set the config for Docker-compose?</strong>
No, we can't. But is is possible to do via environment settings in the Docker config. (See below.)

<strong>Well, what do I use for the address - clearly "localhost" doesn't sound right?</strong>
And here is another beauty about containers; you just refer to it by name and let Docker handle the rest. (Also see below.)
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_11.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_11.png" alt="" width="395" height="396" class="alignnone size-full wp-image-10985" /></a>

[code language="csharp"]
version: '3.4'

services:
  foofrontend:
    image: ahelland/hellofoo-frontend:latest
    environment:
      - UI_Texts__Greeting=&quot;Hello from Docker-Compose&quot;
      - API__api_address=https://foobackend/api/values
      - ASPNETCORE_URLS=https://+:80
    ports:
      - &quot;59372:80&quot;
  foobackend:
    image: ahelland/hellofoo-backend:latest
    environment:
      - ASPNETCORE_URLS=https://+:80
    ports:
      - &quot;59376:80&quot;
[/code]

This might actutally take a minute or two to fall in place, but if everything went as planned the web page should look roughly like this:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_12.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/HelloFoo_12.png" alt="" width="415" height="113" class="alignnone size-full wp-image-10995" /></a>

I have noticed that there are sometimes hangups in the UI where you need to refresh to make a new Docker-Compose "stick", but that's probably a preview thing.

This approach works the way we want it for our little setup, but be aware that there are some limitation to this:
 - You can only expose one container on the internet; in this case the frontend (it comes first in the Docker-Compose file). The API is only available inside the container network.
 - If you want/need fine-grained control of ports you will notice that Azure App Service does some magic behind the scenes for you which may or may not be ok for you.
 - Troubleshooting when it doesn't work isn't all that easy by default, meaning that you might want to make sure you log extra info to the console (which should be visible in the portal)

If you want/need more complicated container setups it might be that Azure App Service isn't right for you. Maybe you need Kubernetes or something. That is outside the scope of this post - this post is just to show some of the thing a web apps can do for you.]]></content:encoded>
    </item>
    <item>
      <title>Setting up a Docker Containers Infrastructure with Azure DevOps</title>
      <link>https://docs.microsoft.com/archive/blogs/azuredev/setting-up-a-docker-containers-infrastructure-with-azure-devops</link>
      <pubDate>Mon, 07 Jan 2019 09:00:27 GMT</pubDate>
      <dc:creator><![CDATA[Andreas Helland]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/azuredev/?p=10725</guid>
      <description><![CDATA[I frequently write code that is meant for public consumption. It might not be perfect code, but I...]]></description>
      <content:encoded><![CDATA[I frequently write code that is meant for public consumption. It might not be perfect code, but I make an effort to make it available for others to peruse either way.

The general distinction I use when it comes to choosing a repository for a given solution is pushing it to GitHub if it is public, while using Azure DevOps if it's intended for internal usage. (For home at least - for business there are other factors and other solutions.) If I go with a private repo it's also a natural fit to pipe it from Azure DevOps into Azure Container Registry (ACR) if I'm doing containers. This is nice and dandy for most purposes, but I sometimes want "hybrids". I want the code to be public, but I want to easily deploy it to my own Azure services at the same time. I want to provide public container images, but ACR only supports private registries. And I certainly do not want to maintain parallell setups if I can avoid it.

An example scenario would be doing code samples related to Azure AD. The purpose of the code is of course that everyone can test it as easily as possible, but at the same time I obviously have some parameters that I want to keep out of the code while still being able to test things myself. Currently my AAD samples is one big Visual Studio solution with a bunch of projects inside - great for browsing on GitHub. Less scalable for my own QA purposes if I want to actually deploy them other places than localhost :)

The beauty of Azure DevOps is that while it is one "product" there are several independent modules inside. Sure, you can use everything from a-z, but you can also be selective and only choose what you like. In my case this would be looking closer at the Pipelines feature.

I am aware of things like GitHub Actions and direct integration with Docker Hub, so it's not that I'm confused about that part. It's just that I like things like features like the boards in Azure DevOps as well as being able to easily deploy to my AKS clusters so I thought I'd take a crack at combining some of these things.

The high level flow would be something like this:
	- Write code in Visual Studio. Add the necessary Docker config, Helm charts, etc.
	- Push to a GitHub repo.
	- Pull said GitHub repo into Azure DevOps.
	- Build the code in Azure DevOps, and push images to Docker Hub while in parallell pushing to Azure Container Registry.
	- Provided the Docker image was built to support it I can supply a config file, a Kubernetes secret, or something similar and push it to an AKS cluster for testing and demo purposes.

Easy enough I'd assume. I didn't easily locate any guides on this setup though, so I'm putting it into writing just in case I'm not the only one wondering about this :) Not rocket science to figure out, but still nice to have screenshots of it.

I ran through the wizard in Visual Studio to create a <em>HelloDocker</em> web app. Afterwards I added Docker support for Linux containers. The default Dockerfile isn't perfect for Azure DevOps pipelines though so I created one for that purpose called Dockerfile.CI:
[code language="csharp"]
FROM microsoft/dotnet:2.2-sdk AS build-env
WORKDIR /app

# Copy csproj and restore
COPY *.csproj ./
RUN dotnet restore

# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out

# Build runtime image
FROM microsoft/dotnet:2.2-aspnetcore-runtime
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT [&quot;dotnet&quot;, &quot;HelloDocker.dll&quot;]
[/code]

Next step is pushing it to GitHub - I'll assume you've got that part covered as well. I have also made sure I have a Docker Hub id, and the credentials for that ready.

So, let's move into Azure DevOps and create a project:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_01.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_01.png" alt="" width="1145" height="1261" class="alignnone size-full wp-image-10735" /></a>

Then you will want to navigate to the <em>Project Settings</em>, and <em>Service connections</em> for Pipelines:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_02.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_02.png" alt="" width="731" height="1111" class="alignnone size-full wp-image-10745" /></a>

First let`s add a GitHub repo - you have two choices:
Use <em>External Git</em>:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_03.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_03.png" alt="" width="1171" height="641" class="alignnone size-full wp-image-10755" /></a>

Use <em>GitHub</em>:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_04-01.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_04-01.png" alt="" width="1171" height="675" class="alignnone size-full wp-image-10765" /></a>
	
External Git will let you add any random repo on GitHub, whereas the GitHub connection requires you to have permissions to the GitHub account. (The benefits are that you can browse the repo instead of typing in paths manually, you can report back to GitHub that releases should be bundled up, etc. so provided it is your repo you should consider using a GitHub connection.)

That means you have to login and consent for the <em>GitHub</em> connection:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_04-2.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_04-2.png" alt="" width="1079" height="963" class="alignnone size-full wp-image-10775" /></a>

Since we're already in the service connection let's add a Docker registry as well:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_07.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_07.png" alt="" width="1149" height="957" class="alignnone size-full wp-image-10785" /></a>

Then we will move on to creating a pipeline. 

If you chose an <em>External Git</em> repo choose that as a source:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_05.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_05.png" alt="" width="1143" height="883" class="alignnone size-full wp-image-10795" /></a>

Or <em>GitHub</em> as a source if that's what you set up in the previous step - that requires you to choose the repository you want to work with:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_06.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_06.png" alt="" width="1133" height="1041" class="alignnone size-full wp-image-10805" /></a>

There are a number of templates to choose from, but to make it easy you can opt for the Docker container template:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_08.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_08.png" alt="" width="607" height="487" class="alignnone size-full wp-image-10815" /></a>

I chose to do builds both for ACR and Docker hub in the same pipeline by adding two more Docker tasks. (For simple customization needs this might not be required, but options are always great.)
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_09.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_09.png" alt="" width="684" height="436" class="alignnone size-full wp-image-10825" /></a>

The build task looks like this:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_10.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_10.png" alt="" width="2103" height="2029" class="alignnone size-full wp-image-10835" /></a>

And pushing the image:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_11.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_11.png" alt="" width="2075" height="1809" class="alignnone size-full wp-image-10845" /></a>

Kick off the build, and hopefully you will get something along these lines:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_12.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_12.png" alt="" width="376" height="547" class="alignnone size-full wp-image-10855" /></a>

Which means you should also have an image available for everyone:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_13.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/AzDevOps_13.png" alt="" width="618" height="365" class="alignnone size-full wp-image-10865" /></a>

And there you have it - pull from Docker Hub into Azure Web Apps, do a replace a number of files and push a customized image into ACR only to pull into AKS afterwards. Well, you catch my drift :)]]></content:encoded>
    </item>
    <item>
      <title>Enforcing security controls right from CI/CD pipeline with AzSK - Deep Dive</title>
      <link>https://docs.microsoft.com/archive/blogs/azuredev/enforcing-security-controls-right-from-ci-cd-pipeline-with-azsk-deep-dive</link>
      <pubDate>Sat, 29 Dec 2018 08:17:15 GMT</pubDate>
      <dc:creator><![CDATA[stephane eyskens]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/azuredev/?p=10655</guid>
      <description><![CDATA[Azure Security Kit  aka AzSK is a framework that is used internally by Microsoft to control &amp;...]]></description>
      <content:encoded><![CDATA[Azure Security Kit  aka AzSK is a framework that is used internally by Microsoft to control &amp; govern their Azure Subscriptions. While some features are overlapping with Azure Security Center, I find a lot of value in the Kit, mostly in the following areas:
<ul>
 	<li>The attestation module allowing for a full traceability of security controls deviation and justification of why a given control was not respected, which may be very useful in case of internal/external audit</li>
 	<li>The CI/CD extensions available on the marketplace. This makes possible to enforce security controls as from CI builds, so very early in the application lifecycle. On top of Azure DevOps extensions, the kit also ships with Visual Studio extensions to provide security guidance as the developer is typing the code.</li>
 	<li>An ARM Template Security checker that is available from CI/CD as well as separate cmdlet. This ensures ARM templates conform to security policies defined at organization level.</li>
 	<li>A lot of room for customizing control settings, creating organization specific controls, etc.
It is free, the only costs you might have would be incurred by a few resources (Storage Account &amp; Automation) that are required to use the kit but overall, it is very low.</li>
</ul>
The kit comes with other things such as Continuous Assurance (CA) &amp; integration with OMS but that's where there is a bit of overlapping with Azure Security Center (ASC). The latter being much easier to use but less customizable and does not cover CI/CD. AzSK's documentation is rather good but it still takes a bit of time to get acquainted, especially in the CI/CD domain as this is still a work in progress. I dogged into the source code of AzSK and more particularly into the ARM Library Checker (.NET &amp; .Net core module) in order to understand exactly how it works and that's what I'm going to share here.

That said, you should already know how to create a custom org policy and setup CA, etc. as I'm not going to go through all the details. I guess the official doc all in all is certainly about 50 pages. If you don't know AzSK at all, you may still read this article but it's going to be harder to grasp it correctly.
<h4>Step 1 - working with the Azure DevOps tasks</h4>
Currently, the extension comes with 2 tasks, the AzSK_ARMTemplateChecker used to inspect and validate ARM template files and AzSK_SVTs, used to validate the overall security of the resource group that is bound to the current release or use a tagname/value pair that identifies resources used and deployed by your application. AzSK_ARMTemplateChecker  is meant to be used as a pre-deployment scan while AzSK_SVTs is meant to be used as a post-deployment scan. Even when you use AzSK_ARMTemplateChecker, it is a good idea to also validate the overall solution with AzSK_SVTs as you might have tasks in your release pipeline that could modify some resources not via ARM templates but rather via Powershell, Azure Cli, etc., making a final scan with AzSK_SVTs necessary.

Those two tasks are using cmdlets behind the scenes which can also be used directly by sys admins. The configuration of the tasks is explained in the AzSK doc but I'd like to come with extra details that are not discussed in the official doc. For the time being, the ARM checker task does not work with parameters which means that it expects to have the actual parameter values as part of the template. So, for instance, one of the built-in controls checks how many instances of a given app service plan runs. The control doing this is the following:

[code langage="json"]

{
&quot;id&quot;: &quot;AppService270&quot;,
&quot;apiVersions&quot;: [ &quot;2016-09-01&quot; ],
&quot;controlId&quot;: &quot;Azure_AppService_BCDR_Use_Multiple_Instances&quot;,
&quot;isEnabled&quot;: true,
&quot;description&quot;: &quot;App Service must be deplsoyed on a minimum of 1 instance to ensure availability&quot;,
&quot;rationale&quot;: &quot;App Service deployed on multiple instances ensures that the App Service remains available even if an instance is down.&quot;,
&quot;recommendation&quot;: &quot;Run command 'Set-AzureRmAppServicePlan -Name '&amp;amp;amp;amp;lt;AppServicePlanName&amp;amp;amp;amp;gt;' -ResourceGroupName '&amp;amp;amp;amp;lt;RGName&amp;amp;amp;amp;gt;' -NumberofWorkers '&amp;amp;amp;amp;lt;NumberofInstances&amp;amp;amp;amp;gt;''. Run 'Get-Help Set-AzureRmAppServicePlan -full' for more help.&quot;,
&quot;severity&quot;: &quot;High&quot;,
&quot;jsonPath&quot;: [ &quot;$.sku.capacity&quot; ],
&quot;matchType&quot;: &quot;IntegerValue&quot;,
&quot;data&quot;: {
&quot;type&quot;: &quot;GreaterThan&quot;,
&quot;value&quot;: 1
}
}

[/code]

as you can see, the jsonPath attribute contains the relative path to the property of the corresponding resource in the controlled ARM template, which is typically something like this:

[code langage="json"]

&quot;resources&quot;: [
{
...
&quot;sku&quot;: {
&quot;name&quot;: &quot;[parameters('skuName')]&quot;,
&quot;capacity&quot;: &quot;[parameters('skuCapacity')]&quot;
},
...
}

[/code]

where the value of "capacity" is supposed to come from the "skuCapacity" parameter. However, if you ask the ARM checker task (as well as the cmdlet) to check the template "as is", it will fail because the condition in the control states that the value should be greater than 1, meaning that the library will compare "[parameters('skuCapacity')]" &gt; 1 which will of course fail. Since hardcoding values directly in the template isn't CI/CD friendly, the easiest way to workaround this is to simply make a configuration transformation step as follows:

<a href="https://msdnshared.blob.core.windows.net/media/2018/12/cicd11.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/12/cicd11-300x148.png" alt="" width="300" height="148" class="alignnone size-medium wp-image-10715" /></a>

where you can specify which transformation to apply. In this case, I'm asking the task to take my first resource and replace the value of the sku capacity by the value of my release variable, and that will do the trick. For sake of simplicity, I'm illustrating this with only this parameter but you should of course do that with all the parameters.

Next you can simply use the AzSK_ARMTemplateChecker task that is easy to configure. Now, I had hard times finding how to specify which controls should to be taken into account by the task. Although the official documentation is quite exhaustive, there are still some grey zones and I had hard times making it work because there is currently (MS is working on that) a bug (specific to ARM checker) with this feature and that's why it didn't work for me from the start.
<h4>Step 2 - controls being checked by the ARM Checker</h4>
By default, if you haven't setup a custom organization policy, the controls that will be checked by AzSK are retrieved from the default online policy store: https://azsdkossep.azureedge.net/1.0.0/ARMControls.json .

The file contains a series of resources which in turn contain a series of controls. The control I showed earlier (AppService270) is part of this file under the AppService resource. So, by default, all controls that are applicable to resources that are part of your ARM template will be executed. If you want to use your own controls, you first need to use the latest version of AzSK (currently 3.9.0), then you have to take a copy of ARMControls.json, modify it as you wish and upload it to your own online policy store. That's what I did but still, I thought it didn't work because of the bug I was referring to earlier: the control's isEnabled attribute is currently ignored by the ARM Checker (but works fine with SVT...) so I thought the system was not picking up my control file. Then I jumped to my self-hosted build agent and started debugging and troubleshooting with Fiddler and I noticed that my file was well retrieved. So, I ended up cloning the AzSK repo and made a step by step debugging of the ARM checker library and realized that this property was just ignored. So, I fixed that in my own local environment and MS should release a fix ASAP.

Once you uploaded your own version of ARMControls.json, you also have to specify how you want to use it in ServerConfigMetadata.json, and this is either like this:

[code langage="json"]
{
&quot;Name&quot; : &quot;ARMControls.json&quot;,
&quot;OverrideOffline&quot;:true
}

[/code]

either like this:

[code langage="json"] { &quot;Name&quot; : &quot;ARMControls.json&quot;} [/code]

With the first option, you tell AzSK that you want to use only your file. The second option tells AzSK to overlay the out of the box ARMControls with yours which allows you to only specify the delta. Up to you to decide which one you prefer.

Then, you may change existing controls and even add your own. If we come back to the control I showed earlier:

[code langage="json"] 
{ 
&quot;id&quot;: &quot;AppService270&quot;,
&quot;apiVersions&quot;: [ &quot;2016-09-01&quot; ], 
&quot;controlId&quot;: &quot;Azure_AppService_BCDR_Use_Multiple_Instances&quot;,
 &quot;isEnabled&quot;: true, 
&quot;description&quot;: &quot;App Service must be deplsoyed on a minimum of 1 instance to ensure availability&quot;, 
&quot;rationale&quot;: &quot;App Service deployed on multiple instances ...&quot;,
&quot;recommendation&quot;: &quot;Run command 'Set-AzureRmAppServicePlan...&quot;, 
&quot;severity&quot;: &quot;High&quot;, 
&quot;jsonPath&quot;: [ &quot;$.sku.capacity&quot; ], 
&quot;matchType&quot;: &quot;IntegerValue&quot;,
 &quot;data&quot;: { &quot;type&quot;: &quot;GreaterThan&quot;,
 &quot;value&quot;: 1 } 
} [/code]

we could enable it or disable it (again not working right now), decide that GreaterThan 0 would be more suitable for a development environment as you don't especially want to pay for multiple instances in dev, change the description, severity etc. So, except the JsonPath attribute that you should never change, you can do whatever you want with the rest.

If you want to add your own controls, as for instance enforcing MSI or making sure ARR Affinity is disabled, you could simply add the following JSON body under the AppService resource:

[code langage="json"]

{
&quot;controlID&quot;: &quot;Azure_AppService_ClientAffinity_SEY_0001&quot;,
&quot;description&quot;: &quot;ARR Affinity must be turned off for App Service;&quot;,
&quot;id&quot;: &quot;AppService_Client_Affinity_SEY_0001&quot;,
&quot;severity&quot;: &quot;Medium&quot;,
&quot;recommendation&quot;: &quot;Go to Azure Portal --&amp;amp;amp;gt; your App Service --&amp;amp;amp;gt; Settings --&amp;amp;amp;gt; Application Settings --&amp;amp;amp;gt; ARR Affinity --&amp;amp;amp;gt; Click on 'OFF'.&quot;,
&quot;jsonPath&quot;: [ &quot;$.properties.clientAffinityEnabled&quot; ],
&quot;matchType&quot;: &quot;Boolean&quot;,
&quot;data&quot;: {
&quot;value&quot;: true
},
&quot;isEnabled&quot;: false,
&quot;rationale&quot;: &quot;ARR Affinity makes it easier to drive DOS/DDOS attacks against the underlying resource&quot;
}

[/code]

This control is not enforced by AzSK right now but I personally find ARR Affinity may pose a security risk since when turned on, the webapp will return a cookie named ARRAffinity containing the specific backend instance ID to which Azure should target client requests. That makes it easy for attackers to overload always the same instance until it is down and then get a fresh ARRCookie etc. until all the instances are down. In any case, ARR Affinity is often required by poorly written applications that were not correctly designed to run on multiple nodes. So, the earlier such issues are discovered (in the CI pipeline), the better!
<h4>Step 3 - controls being checked by the SVT task</h4>
As a reminder, the SVT task is to be used in a post-deployment phase so for instance, it could be the last task of a release pipeline. SVT works differently than ARM Checker although the ultimate purpose is the same. For SVT, all the control files live in the [AzSK Module Path]\[AzSK version]\Framework\Configurations\SVT\Services and each resource has its own corresponding JSON file. If we look into AppService.json, we'll find a similar control to the one we worked with so far:

[code langage="json"]

{
&quot;ControlID&quot;: &quot;Azure_AppService_BCDR_Use_Multiple_Instances&quot;,
&quot;Description&quot;: &quot;App Service must be deployed on a minimum of two instances to ensure availability&quot;,
&quot;Id&quot;: &quot;AppService270&quot;,
&quot;ControlSeverity&quot;: &quot;Medium&quot;,
&quot;Automated&quot;: &quot;Yes&quot;,
&quot;MethodName&quot;: &quot;CheckAppServiceInstanceCount&quot;,
&quot;Rationale&quot;: &quot;App Service deployed on&amp;amp;amp;nbsp;....&quot;,
&quot;Recommendation&quot;: &quot;Run command ...&quot;,
&quot;Tags&quot;: [
&quot;SDL&quot;,
&quot;TCP&quot;,
&quot;Automated&quot;,
&quot;BCDR&quot;,
&quot;AppService&quot;
],
&quot;Enabled&quot;: true,
&quot;FixControl&quot;: {
&quot;FixMethodName&quot;: &quot;SetMultipleInstances&quot;,
&quot;FixControlImpact&quot;: &quot;Medium&quot;
}
}

[/code]

but as you might have noticed, there is no JsonPath attribute nor any rule to define the behavior of the control. Instead, there is the MethodName attribute which indicates which PowerShell method should be called when this control is being executed.  In this case, the method CheckAppServiceInstanceCount of the resource AppService should be called but where is the code defined? Well, simple: in the AppService.ps1  ([AzSK Module Path]\[AzSK version]\Framework\Core\SVT\Services) script that defines the AppService class and sure enough, if you look for CheckAppServiceInstanceCount into that file, you'll find its implementation.

That said, you should *never* change any of the local files. For SVT controls, you can change some settings in the ControlSettings.json file but if you want to change the behavior or a given control, or add a new control, you'll have to extend the resource. For all the details, you should read the official doc but I'm going to show you how I extended SVT to create the ARR Affinity check in a similar way as for the ARM checker. Since ClientAffinityEnabled (displayed as ARR Affinity in the portal) is a property of an Azure webapp, I extended the AppService feature by adding two new files to my org policy folder:

AppService.ext.json that contains the declarative definition of the control
AppService.ext.ps1 that contains the method to call when the control executes
The contents of AppService.ext.json are:

[code langage="json"]

{
&quot;FeatureName&quot;: &quot;AppService&quot;,
&quot;Reference&quot;: &quot;aka.ms/azsktcp/appservice&quot;,
&quot;IsMaintenanceMode&quot;: false,
&quot;Controls&quot;: [
{
&quot;ControlID&quot;: &quot;Azure_AppService_ClientAffinity_SEY_0001&quot;,
&quot;Description&quot;: &quot;ARR Affinity must be turned off for App Service&quot;,
&quot;Id&quot;: &quot;AppService_Client_Affinity_SEY_0001&quot;,
&quot;ControlSeverity&quot;: &quot;Medium&quot;,
&quot;Automated&quot;: &quot;Yes&quot;,
&quot;MethodName&quot;: &quot;CheckAppServiceClientAffinityEnabled&quot;,
&quot;Rationale&quot;: &quot;ARR Affinity makes it easier to drive DOS/DDOS attacks against the underlying resource&quot;,
&quot;Recommendation&quot;: &quot;Go to Azure Portal ...&quot;,
&quot;Tags&quot;: [
&quot;SDL&quot;,
&quot;TCP&quot;,
&quot;Automated&quot;,
&quot;Config&quot;,
&quot;AppService&quot;,
&quot;FunctionApp&quot;
],
&quot;Enabled&quot;: true
}
]

}

[/code]

where the most important part is the method name CheckAppServiceClientAffinityEnabled that is implemented in AppService.ext.ps1:

[code langage="PowerShell"]
#using namespace Microsoft.Azure.Commands.AppService.Models
Set-StrictMode -Version Latest
class AppServiceExt: AppService
{
 hidden [PSObject] $ResourceObject;
 hidden [PSObject] $WebAppDetails;
 hidden [PSObject] $AuthenticationSettings;
 hidden [bool] $IsReaderRole;
AppServiceExt([string] $subscriptionId, [string] $resourceGroupName, [string] $resourceName):
Base($subscriptionId, $resourceGroupName, $resourceName)
{
$this.GetResourceObject();
$this.AddResourceMetadata($this.ResourceObject.Properties)
}
 AppServiceExt([string] $subscriptionId, [SVTResource] $svtResource):
  Base($subscriptionId, $svtResource)
 {
  $this.GetResourceObject();
  $this.AddResourceMetadata($this.ResourceObject.Properties)
 }
 hidden [ControlResult] CheckAppServiceClientAffinityEnabled([ControlResult] $controlResult)
 {
  if([Helpers]::CheckMember($this.WebAppDetails,&quot;ClientAffinityEnabled&quot;))
  {
   if($this.WebAppDetails.ClientAffinityEnabled)
   {
    $controlResult.AddMessage([VerificationResult]::Failed,
    [MessageData]::new(&quot;ARR Affinity for resource &quot; + $this.ResourceContext.ResourceName + &quot; is turned on&quot;, ($this.WebAppDetails | Select-Object ClientAffinityEnabled)));
   }
   else
   {
    $controlResult.AddMessage([VerificationResult]::Passed,
    [MessageData]::new(&quot;ARR Affinity for resource &quot; + $this.ResourceContext.ResourceName + &quot; is turned off&quot;, ($this.WebAppDetails | Select-Object ClientAffinityEnabled)));
   }
 }
 else
 {
   $controlResult.AddMessage([VerificationResult]::Manual,
   [MessageData]::new(&quot;Could not validate ARR Affinity settings on the AppService: &quot; + $this.ResourceContext.ResourceName + &quot;.&quot;));
 }
 return $controlResult;
}
}[/code]

in which I simply check the value of the ClientAffinityEnabled webapp property and I return the control result (Passed, Failed, Manual) accordingly. Once you've uploaded your extension files to your org policy storage account, you also have to list them in ServerConfigMetadata.json.
<h4>Step 4 - different policies for different environments?</h4>
Depending on the control baseline (which I'm not covering in this article) you want to define, you might decide to use a single corporate policy for all your subscriptions and environments but you might also want to define different policies per environment. For instance, with the example I talked about so far (multiple instances enforced by the control), you might want the control to behave differently whether you are in dev (where a single instance is enough) or in staging/prod where you should indeed have more than 1 instance to be HA.

No matter what you decide and independently of AzSK, the way your environments are organised (1 vs multiple subscriptions) will also influence the way you'll tackle your policies. AzSK supports to have either one policy store per subscription, either one global store. However, I noticed that this doesn't matter too much, especially when it comes to CI/CD as the underlying tasks will trigger a fresh PowerShell window for every execution and target a given policy store using the Set-AzSKPolicySettings cmdlet. So, if you decide to work with only one policy store cross-environments (DEV/STAGING/PROD), you might simply define your build/release variables this way:

<a href="https://msdnshared.blob.core.windows.net/media/2018/12/pipeline1.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/12/pipeline1-300x138.png" alt="" width="300" height="138" class="alignnone size-medium wp-image-10675" /></a>

scoped at release level and then let your different stages use the same settings. However, should you use different policy stores, you may define them like this:

<a href="https://msdnshared.blob.core.windows.net/media/2018/12/pipeline2.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/12/pipeline2-300x90.png" alt="" width="300" height="90" class="alignnone size-medium wp-image-10685" /></a>

in this case I defined AzSKServerUrl twice with different values and scoped respectively to the DEV &amp; STAGING stages. My org policy storage account looks like this:

<a href="https://msdnshared.blob.core.windows.net/media/2018/12/blobstorage.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/12/blobstorage-300x53.png" alt="" width="300" height="53" class="alignnone size-medium wp-image-10695" /></a>

So, I simply created one container per environment and each container contains its own control files:

<a href="https://msdnshared.blob.core.windows.net/media/2018/12/blobstorage2.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/12/blobstorage2-300x166.png" alt="" width="300" height="166" class="alignnone size-medium wp-image-10705" /></a>

Hope this helps!]]></content:encoded>
    </item>
  </channel>
</rss>