Weekly CW09-2020

Matthew Devaney tweeted some highlights from Michał Guzowski.

  1. 10 tips I wish to know before I’ve started with PowerApps
  2. How to overcome 500 items limit in PowerApps
  3. PowerApps components patterns

But in general you should keep an eye on the blog of Michał if you are interested in Power Platform/Apps topics.

Microsoft lately publishes more and more documents which in the past you would only have access to if you attended a training. Manuela tweeted about the materials for the “Admin in a day” training which are available on Github.

Last thing for this week is a tweet by Keith Whatling which shows a nice way to use the WITH function in Power Apps.

Run Azure Function in Docker Container

Introduction

Azure Functions can basically also be executed in Docker. During development you can also execute them locally. In this context, however, there is a problem in connection with Http triggers. Although the monthly Azure Functions Webcast (issue 20.02.2020) announced improvements in the area of Kubernetes Deployments, no further information is available or I could not find it.

Therefore this article shows how to use Azure Functions with a Http Trigger Docker.

Requirements

This article refers to the procedure using Windows. In MacOS the procedure should work the same way, only specific commands like creating directories have to be adapted.

Create Azure Function

To create a new Azure Function project with an Http Trigger and Dockerfile, simply execute the following commands. As runtime for the creation we select ‘dotnet’.

mkdir funcDemoDocker
cd funcDemoDocker
func init
func new --name MyHttpTrigger --template "HttpTrigger
func init --docker-only

The project can then be started directly and the Azure Function can be executed in the CLI.

func start --build

Afterwards you can call the Azure Function in the browser as usual.

The project also contains the appropriate docker file to create the necessary docker image.

docker build -t funcdemodocker .

After the image is created, we can start a container.

docker run -p 8080:80 funcdemodocker

If you now call up the administration page of the Azure Function, you will see that it has started normally.

But if you try to access the Http trigger, you get a 401 (Unauthorized) error.

This is because the authentication of the Azure Function is deactivated during local execution using the CLI. This is not the case when executing in Docker.

Solution

To solve this problem, you only have to define the keys and tell the container or more precisely the Azure Function Runtime by means of parameters where to find them. To do this, the file with the keys must first be created. In this case this file is created in the directory C:\dev\my-secrets with the name host.json. The contents of the file should look like the following:

{
    "masterKey": {
        "name": "master",
        "value": "<key>"
        "encrypted": false
    },
    "functionKeys": [{
        "name": "default",
        "value": "<key>"
        "encrypted": false
    }]
}

The <key> can be replaced by any value, for tests e.g. test1234. To then start the container, the following command is executed.

docker run -v C:\dev\my-secrets:/azure-functions-host/Secrets -e AzureWebJobsSecretStorageType=files -p 8080:80 funcdemodocker

Afterwards you can address the Http trigger as usual using the key.

Conclusion

Using the way described above you can also run Azure Functions with Http Trigger in a docker container. The problem of unknown keys is solved by setting them explicitly. As mentioned above, this workaround should be fixed in the next version of the Azure Functions Core Tools and the keys will be generated automatically and displayed on startup.

Weekly CW08-2020

Interested in Durable Functions? Have a look at »Durable Functions #9: Raise Events / Human Interaction Pattern« by Marc Duiker.

Ever wondered whether everyone has an internal monologue? Doesn’t look like it but a have a look at »Today I Learned That Not Everyone Has An Internal Monologue And It Has Ruined My Day« for further details.

This is one I still need to watch myself but I sounds very interesting. »Build Serverless Apps with Blazor« explains how to build serverless apps using Azure Functions together with Blazor.

Jeff Hollan tweeted about about Buccaneer which is generator for OpenAPI definitions out of .NET Core 3.1 projects.

Weekly CW07-2020

If you are still lacking good content to read in 2020, what about 9 books about Azure? After reading and understanding all books mentioned in »The Top 9 Microsoft Azure Books You Need to Read in 2020« you should have a pretty deep knowledge about Azure.

Ever wondered »What is the most cost-effective way to run SQL and Windows Server in the cloud?« would be? Looking at this article you will have good starting point for your decision.

Sometimes components available in Azure seem to do similiar things. When choosing between the right way to handle logs, alerts, change feeds and webhooks and are not sure whether Event Grid could be right for you, you should have a look at »How Azure Event Grid is different from logs, alerts, change feeds and webhooks«.

Do you use your Azure shell on a daily base and wondered whether it would be possible to optimize your personal workflow? Then have a look at »Azure Cloud Shell + zsh, oh-my-zsh, tmux, and badass terminal!«.

Weekly CW06-2020

Even though “Diving into Durable Entities” is a little bit older (September 2019) it is still a great introduction to Durable Entities in Durable Functions v2.

Using Azure API Management you can publish and manage your APIs. “How to publish your APIs with the new developer portal in Azure API Management” shows how to do this. Using Azure Functions together with Azure API Management is especially great because this way you can expose your Azure Functions as an API using OpenAPI to use them in Power Apps.

Looking for guidance on starting a greenfield project using React + .NET Core? Then you should definitely have a look at “Choosing a “Modern” React.js + .Net Core Stack” by jeremydmiller.

This weeks highlight is definitely “SameSite Cookies In A Nutshell”. One might be thinking how this can be a highlight but this topic will become very important in the next days/weeks. After reading this article you will understand why. You should also have a look at the linked articles on SameSite cookies changes in Chrome 80+.

Weekly CW05-2020

If you are looking for a way on how to use Event Grid, Azure Keyvault and Azure Functions all together then “Using Event Grid, Azure Keyvault and Azure Functions” is for you.

Seeing this sentence

consider the partner programs that you’re involved in, and whether they are influencing any decisions you’re making to the detriment of your customers

in “Leaving The AWS Partner Network” made me think whether this a valid point. My educated guess would be that yes is the answer to this question.

Steve Sanderson presented at .NET Conf on “Focus on Blazor”. The code from his demo is now available online at SteveSandersonMS / presentation-2020-01-DotNetConf. Nice to see that using Blazor enables you to build cross-platform UI client.

Thorben Janssen wrote “Dual Writes – The Unknown Cause of Data Inconsistencies”. If you never heard of dual write issues and think about using Microservices for specific scenarios which include data persistence then you definitely should read this article.

Microsoft eating OSS?

Yesterday evening I have been reading the blog post “Why we terminated our partnership with Microsoft – Re: Next decade of open source” by Paul Stovell who founded Octopus Deploy.

Octopus Deploy homepage, https://octopus.com/, 2020-01-28 20:10

Figure: Octopus Deploy homepage, https://octopus.com/, 2020-01-28 20:10

! PSA
I have never personally used Octopus Deploy in a professional context even though I had a deeper look at it in 2015 but then finally backed away from it due to the licensing costs.

My first thought was that Paul Stovell has a valid argument here. Nevertheless, I continued to think about his situation. At the same time I also read comments at Hacker News about it where I originally found the blog post.

In the end I came to the conclusion that the specific situation of Octopus Deploy is not comparable to other OSS projects. Octopus Deploy is not an OSS project, only many parts of it are OSS.

Therefore it can be said that Octopus Deploy is a competitor of Microsoft. So you can’t accuse Microsoft to have torpedoed an OSS project, but only to have made the decision to launch an own product as an alternative to a competitor.

Conclusion

As a conclusion I can only say that one should not be discouraged by this blog post to be an active contributor in a .NET OSS project or even start one yourself.

So I personally cannot agree with Paul Stovell’s conclusion.

Which brings me back to Aaron’s post: it’s not going to work.

Yes, it can happen that Microsoft will eventually come to the point of offering an alternative and thus become the de facto standard, but that doesn’t necessarily have to happen. This can be seen in enough popular OSS .NET libraries.

Basically, my observation is that Microsoft has made a fundamental turnaround in its attitude towards OSS since Satya Nadella became CEO. Maybe Microsoft had the idea to push OSS out of the market a long time ago. In the last few years, however, I have observed that this behavior can no longer be seen.

Weekly CW04-2020

This one is a thing which I still need to watch myself. Nevertheless I’m going to recommend it anyways. How authentication works for the web and apps in the modern enterprise – This is a fantastic 35min split across 6 videos.

Unfortunately John Feminella does not allow to view his threads in Thread Reader. Apart from this fact you should have definitely a look at this thread: As of today, we have about eighteen years to go until the Y2038 problem occurs. In addition you should then have a look at this one: &ldquo;Thread by @Foone: re: the 2020 bug because of bad y2k fixes&hellip;&quot;
I guess there will be some work upcoming in the next years because of the year 2038 problem.

Keeping your Azure Function private is a good thing in an enterprise context. Therefore have a look at Azure Functions Private Site Access by Michael S. Collier.

Improving you as a person is as important or might be even more important as improving your professional skills. To improve you as a person who might be suffering from Impostor Syndrome you should view this great TEDx Talk from Dona Sarkar: The Imposter Syndrome Banishing Spell.

Weekly CW03-2020

This weeks Weekly edition unfortunately is a litte bit delayed. This week was kind of stressful and on Thursday evening it simply forgot to write it.

If you are using Microsoft Authenticator for MFA to protect your account, what you definitely should do, you maybe have been asking yourself how to transfer this app to a new device. Toni Pohl wrote a nice guide on how to transfer you authenticator app to a new device: How to setup the MFA App Authenticator app on a new device for a specific Azure AD

Priyesh Wagh wrote a useful guide on how to “Create new Sandbox and copy Production over to it in PowerPlatform Admin Center”. This one is quite useful if you are working on Power Platform.

Security is always important. Why not start the year even it is already some weeks old with a review of “Top ten best security practices for Azure today”. Really helpful session from last years Microsoft Ignite.

Async/await is a constant question in the .NET community. The article “ConfigureAwait FAQ” deals in particular with ConfigureAwait which continues to draw questions in this context.

Weekly CW02-2020

This weekly will start with a some articles dealing with patterns in software development.

From my point of view it is more important to understand patterns in general than how to use every specific piece of software/programming language in detail especially if you are trying to move into an architectural role. Often you have to find a solution for a specific problem. This is from my observation easier if you have a broad toolset of patterns available instead of a specific piece of software.
The last one from the former ones is my personal favorite because it facilitates so much cutting edge technology like KEDA, dapr and Azure Service Bus.

Async / Await: From Zero to Hero” is a must read for people trying to get their head around async/await in C#. Zhi Yuan has written a great article to understand the concepts behind async/await.