Giter VIP home page Giter VIP logo

microsoft / azuretipsandtricks Goto Github PK

View Code? Open in Web Editor NEW
1.5K 97.0 481.0 507.97 MB

Learn some of our favorite Azure tips and tricks—some long-standing, and new ones that have recently been added to become more productive with Azure. Star the repo now to shave hours off your coding tasks tomorrow.

Home Page: http://azuredev.tips

License: Creative Commons Attribution 4.0 International

Vue 71.63% JavaScript 17.11% Stylus 11.27%
docs azure app service tips tricks

azuretipsandtricks's Introduction

Welcome

Welcome to Azure Tips and Tricks, this site is a special collection hundreds of tips in form of blog posts and videos that span the entire universe of the Azure platform. The tips you'll find here are based on real-world scenarios that we've encountered (along with the community) while using Azure. Feel free to jump in and come back weekly for new tips!

::: tip What's New? :calendar: Check out the Recently Added item on the left sidebar 👈 for the latest tips and tricks!

👊 that ⭐ button on the official GitHub repo to stay up to date. :::

Site Map

Resouce Description
Home This site can always be found at https://aka.ms/azuretipsandtricks
Videos Our growing playlist of hundreds videos based on the series
Live-coding, interviews and more Join us to discuss all-things Azure! From live-coding, special guest interviews, breaking software development news and more!
Questions Add to the GitHub issue tracker and tag it as a question
RSS Feed Keep up to date with all the newest tips posted by subscribing to the RSS feed
Stickers Feel free to print any of these stickers for your events and community meetups
Survey Have an idea for a post? Do you have feedback? Leave it here
Contribute and star the repo Something out of date? Is something wrong? Then submit a PR and help us fix it. Also, ⭐ the repo to keep up to date with the project.

Git Workflow

In general, we follow the "fork-and-pull" Git workflow.

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that we can review your changes

NOTE:

  • Be sure to merge the latest from "upstream" before making a pull request!
  • Each page has a "Edit this page on GitHub" link. Click it to easily navigate to the blog post file. They are also located in /src/blog with a name such as tip120.md.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Special thanks to all our Contributors 👍 .

Legal Notices

Microsoft and any contributors grant you a license to the Microsoft documentation and other content in this repository under the Creative Commons Attribution 4.0 International Public License, see the LICENSE file, and grant you a license to any code in the repository under the MIT License, see the LICENSE-CODE file.

Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at this link.

Privacy information can be found at https://privacy.microsoft.com.

Microsoft and any contributors reserve all other rights, whether under their respective copyrights, patents, or trademarks, whether by implication, estoppel or otherwise.

azuretipsandtricks's People

Contributors

azrikahar avatar beigebadger avatar erjuntun75 avatar hjc1983 avatar hrudayanath avatar isaacrlevin avatar jesseloudon avatar manosrini avatar markdreiling avatar mbcrump avatar metin avatar microsoft-github-policy-service[bot] avatar p33tr avatar panzerbjrn avatar ramsesrm avatar richeney avatar sachin4dotnet avatar skovvart avatar stefanpetter avatar theheatdk avatar timsmith714 avatar tomkerkhove avatar tosokr avatar uneedgo avatar vaheminasyan2 avatar vuder avatar whaakman avatar xorboo avatar xuguang-yao avatar yucwan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azuretipsandtricks's Issues

Azure "Classic Metrics Explorer"

Hi,
A month ago I've been used "Classic Metrics Explorer" from "Application Insights Monitor" and then pinned those charts onto dashboard. It was so nice to show multiple metrics in one tile, for example in screenshot.
chart-metric-explorer

Before "Classic Metrics Explorer" option were appearing here which has been disappeared now.
image

I know this feature has been retired and I don't see any other efficient way to show charts on custom dashboard similar to "Classic Metrics Explorer".

I would appreciate if someone can still tell me the way so I can create charts like this:
image

RSS feed does not show titles in Outlook

... in the body of the message. Can you add the title or description of the link to the body? It will make it consistent with the way most of the feeds are done today - thanks!

Content check: Tips 41-50

Gets a 301 response for each attempted download

I just tried this and it looks like all of the docs listed in the repo have been moved...

% curl https://api.github.com/repositories/72685026/contents/articles | jq -r '.[] | select(.type | contains("dir")) | "https://docs.microsoft.com/pdfstore/Azure.azure-documents/live/\(.name).pdf"' | wget -i -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 162k 100 162k 0 0 183k 0 --:--:-- --:--:-- --:--:-- 182k
--2020-02-17 22:39:12-- https://docs.microsoft.com/pdfstore/Azure.azure-documents/live/active-directory-b2c.pdf
Resolving docs.microsoft.com (docs.microsoft.com)... 2.21.208.15
Connecting to docs.microsoft.com (docs.microsoft.com)|2.21.208.15|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://opbuildstorageprod.blob.core.windows.net/output-pdf-files/Azure.azure-documents/live/active-directory-b2c.pdf [following]
--2020-02-17 22:39:12-- https://opbuildstorageprod.blob.core.windows.net/output-pdf-files/Azure.azure-documents/live/active-directory-b2c.pdf
Resolving opbuildstorageprod.blob.core.windows.net (opbuildstorageprod.blob.core.windows.net)... 40.112.152.16
Connecting to opbuildstorageprod.blob.core.windows.net (opbuildstorageprod.blob.core.windows.net)|40.112.152.16|:443... connected.
HTTP request sent, awaiting response... 404 The specified resource does not exist.
2020-02-17 22:39:13 ERROR 404: The specified resource does not exist..

--2020-02-17 22:39:13-- https://docs.microsoft.com/pdfstore/Azure.azure-documents/live/active-directory-domain-services.pdf
Connecting to docs.microsoft.com (docs.microsoft.com)|2.21.208.15|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://opbuildstorageprod.blob.core.windows.net/output-pdf-files/Azure.azure-documents/live/active-directory-domain-services.pdf [following]

I only wanted a couple anyway so I'll look for those, but I thought I'd let you know :)

Content check: Tips 61-70

Dev Ops questions related to existing IIS configuration on Azure

Currently we're hosting under IIS 10 on Azure VM. What's the transition to the modern Dev Ops process using node.JS? How do we manage security in the same way, for example? How do we tie Kubernetes to the same web server using IIS (we use web client HTML5 apps and .Net Core APIS)

Please provide a detailed article on the migration process from IIS to Kubernetes, or the process of using both in a CI/CD or simple web deploy scenario.

Content check: Tips 11-20

Calling HTTPS Service from Azure Function

Hi,

I am currently trying to investigate if I can call a HTTPS Service endpoint from an Azure Function? I need to understand how I would install the certificate for the application and whether this is programmable or configurable using Azure PaaS Functions? Or whether this is even possible from a Function.

I have researched on the internet and I could not find that much material so this is the reason for the query here.

Thanks

Mike

Suggestion: Twitter bot

Excellent resource! Just have a suggestion: how about a Twitter bot that posts random existing tips on regular basis? Or is there one that I just couldn't find?

Tip 242 -

Kumar, good tip! (I do find these useful!)

It is handy to know the source IP address for the NLB probes. Am I right in thinking that this is included in the Service Tag "AzureLoadBalancer" and that you can use that in the higher priority NSG rules instead?

Rich

Localization - Azure Tips and Tricks Vuepress Website

Hi @mbcrump

Forked the project and I am starting to see how to make a localization the VuePress website with intention to create a PR's in the next few days to start to translate to Portuguese the Azure Tips and Tricks website.

I've been reading the vuepress doc about how to make Internationalization.

As soon as possible if I find, I'll create another issue to control all the PR's and translations as same as I did to the React documentation here

Probably I'll work as same I did with the React Doc in Portuguese. But first, I would like to know with you what do you think about it?

Internationalization - Vuepress

Content check: Tips 121-130

Content check: Tips 51-60

Tip 186 Question - Azure SignalR Service

https://microsoft.github.io/AzureTipsAndTricks/blog/tip186.html?utm_campaign=dotNET%20Weekly&utm_medium=email&utm_source=week-11_year-2019

What does the Azure SignalR Service do for me that SignalR in my app cant do itself? I suppose a new layer is added between my app and Azure now so that when I tell SignalR hub to dispatch does it first go tell Azure to do the dispatching?

I assume this is all so we can lean in to a more distributed and stable SignalR service as opposed to relying on the websocket connection with my core app sitting in AAS?

I googled these questions and almost all the docs on Azure SignalR Service just explain what SignalR is, they don't elaborate on any of the added benefits of using the service as opposed to just letting the app process do it.

Content check: Tips 130-140

Update to support .NET Core 3.1?

What would you like to know?
Hi, thanks for Tip196!
Waiting for a neat and tidy unit test & integration test solution for Azure Functions.
...in the meantime, is there an update of Tip196 to support the new framework?

Content check: Tips 81-90

Content check: Tips 1-10

Content check

Purpose: check if given tip has up-to-date screenshots, code and scripts.
Directions: open the tip below, follow steps, check the code, content and screenshots on accuracy. Submit pull request if there is something that needs to be updated. Check off the box below.

Question: How to upgrade git software in Azure Cloud Shell (powershell)?

Following on from useful Tip: https://microsoft.github.io/AzureTipsAndTricks/blog/tip15.html

It would be useful to have a Tip for upgrading git (and potentially other) Azure Cloud Shell provided 3rd party software. In my Azure Cloud Shell, git does not appear to be upgraded automatically (I don't know if it should be automatic or manual).

My Azure Cloud shell:

git --version
git version 2.7.4

This is an old version. 2.22.x would be more recent for example.
I even got a message in Cloud Shell suggesting upgrading git. But I can't see instructions for how to do this.
I first used Azure Cloud shell when it first came out, so perhaps all the software has remained on those older versions?

Thanks

Tip 128 not working for me (getting 404s)

When I run the commad from https://microsoft.github.io/AzureTipsAndTricks/blog/tip128.html, I only get 404s. What am I missing? Is it supposed to still work?

$ curl https://api.github.com/repositories/72685026/contents/articles | jq -r '.[] | select(.type | contains("dir")) | "https://docs.microsoft.com/pdfstore/Azure.azure-documents/live/\(.name).pdf"' | wget -i -
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  159k    0  159k    0     0  61886      0 --:--:--  0:00:02 --:--:-- 61907
--2020-04-05 15:48:39--  https://docs.microsoft.com/pdfstore/Azure.azure-documents/live/active-directory-b2c.pdf
Resolving docs.microsoft.com (docs.microsoft.com)... 92.123.151.23, 2a02:26f0:4:180::353e, 2a02:26f0:4:1a8::353e
Connecting to docs.microsoft.com (docs.microsoft.com)|92.123.151.23|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://opbuildstorageprod.blob.core.windows.net/output-pdf-files/Azure.azure-documents/live/active-directory-b2c.pdf [following]
--2020-04-05 15:48:41--  https://opbuildstorageprod.blob.core.windows.net/output-pdf-files/Azure.azure-documents/live/active-directory-b2c.pdf
Resolving opbuildstorageprod.blob.core.windows.net (opbuildstorageprod.blob.core.windows.net)... 40.112.152.16
Connecting to opbuildstorageprod.blob.core.windows.net (opbuildstorageprod.blob.core.windows.net)|40.112.152.16|:443... connected.
HTTP request sent, awaiting response... 404 The specified resource does not exist.
2020-04-05 15:48:43 ERROR 404: The specified resource does not exist..

--2020-04-05 15:48:43--  https://docs.microsoft.com/pdfstore/Azure.azure-documents/live/active-directory-domain-services.pdf
Connecting to docs.microsoft.com (docs.microsoft.com)|92.123.151.23|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://opbuildstorageprod.blob.core.windows.net/output-pdf-files/Azure.azure-documents/live/active-directory-domain-services.pdf [following]
--2020-04-05 15:48:44--  https://opbuildstorageprod.blob.core.windows.net/output-pdf-files/Azure.azure-documents/live/active-directory-domain-services.pdf
Connecting to opbuildstorageprod.blob.core.windows.net (opbuildstorageprod.blob.core.windows.net)|40.112.152.16|:443... connected.
HTTP request sent, awaiting response... 404 The specified resource does not exist.
2020-04-05 15:48:45 ERROR 404: The specified resource does not exist..

--2020-04-05 15:48:45--  https://docs.microsoft.com/pdfstore/Azure.azure-documents/live/active-directory.pdf
Connecting to docs.microsoft.com (docs.microsoft.com)|92.123.151.23|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://opbuildstorageprod.blob.core.windows.net/output-pdf-files/Azure.azure-documents/live/active-directory.pdf [following]
--2020-04-05 15:48:46--  https://opbuildstorageprod.blob.core.windows.net/output-pdf-files/Azure.azure-documents/live/active-directory.pdf
Connecting to opbuildstorageprod.blob.core.windows.net (opbuildstorageprod.blob.core.windows.net)|40.112.152.16|:443... connected.
HTTP request sent, awaiting response... 404 The specified resource does not exist.
2020-04-05 15:48:48 ERROR 404: The specified resource does not exist..

...

Content check: Tips 21-30

Broken link to requestb.in

When you get to the point to where it asks you for a URL, then use requestb.in to see what your HTTP client is sending

the original hosted version of RequestBin (at requestb.in) was taken down last year and the link is broken.

There's a new hosted version, with some additional features (including enhanced privacy) at https://requestbin.com

Azure API Management - Questions

What would you like to know?

  1. Can i publish GraphQL Endpoints via API-Management or only REST is supported
  2. Is it mandatory to create a Product in API Management, or i can just publish my APIs without Product setup
  3. Can i enforce policies at the API Management level or operation level

Replicate local Docker Build in Azure DevOps (https://microsoft.github.io/AzureTipsAndTricks/blog/tip55.html)

Looking for a bit of help. Going through the Docker + .NET core tutorial (https://microsoft.github.io/AzureTipsAndTricks/blog/tip55.html). In this you have a dockerfile that assumes that you have built the application i.e. done a dotnet build to a folder and the docker file does this "COPY ${source:-obj/Docker/publish} ." If I have to replicate this scenario in Azure DevOps scenario, say I have dotnet build that builds the project to a Build.OutputDirectory, is there a way I can access this Build Variable from the Docker file?

Here in this tutorial, you publish a dotnet app like so --> dotnet publish -c Release -o ./obj/Docker/publish. Then in your dockerfile you refer to this folder like so "COPY ${source:-obj/Docker/publish} ." If I have to replicate this in Azure DevOps build, is there anyway I can I do this ${source:-$(Build.OutputDirectory)} assuming my dotnet build step on the build pipeline does this --> dotnet publish -c Release -o $(Build.OutputDirectory).

I tried to do this in Azure DevOps but my docker context was not able to see the Build.ArtifactsStagingDirectory assuming my dotnet publish was publishing the build to Build.ArtifactsStagingDirectory.

image

Content check: Tips 101-110

Deploying an ASP.Net Web API (Core or Not) to IIS on Azure running SendGrid

We already have ASP.Net Web API Core services running on Azure under IIS. The problem is the existing example for IIS configuration (written for IIS 7.5) of SendGrid makes no sense given that Azure 1) doesn't allow creation of an SMTP server, and 2) doesn't run IIS 7.5, but it runs IIS 10.

Can someone post exact steps, if any, to ensure that we can run our SendGrid C# ASP.Net Core API on an Azure virtual machine under IIS on Azure?

I should mention that we're doing this because our client HTML5 web apps, which call our web services, are also running on the same IIS instance and referenced within the same domain.

What we don't want to do is get into the complexity of running a custom Azure API running SendGrid on some other server/cloud instance not sharing the same domain. Though I understand the reason for doing this for some scalability, this is out of scope for what we need to more simply accomplish.

It's already disappointing that we can't directly host SMTP on Azure, but have to use a SendGrid as a third party product to accomplish the same functionality for our user. Almost every web app on the planet needs to perform SMTP services, and this thus defeats any simplicity of using Azure for Web App hosting.

Tip 248 - ARM Template Viewer

Hi, for the top 5 developer extensions you have the ytechie.armviz Arm Template Visualizer extension.

Can I suggest you take a look at the bencoleman.armview ARM Template Viewer extension instead?

It was written by our very own Ben Coleman, one of the CSAs in the UK OCP team. The ARM Tools for VS Code team are considering integrating it directly into the official ARM extension so that it also gets installed. It has twice the downloads of the other one and great feedback. And it has its own button for the preview, uses the official SVG logos with drill down info and can export pretty looking png files.

@benc-uk

Powershell / Change Web App Traffic Percentages

Hello, whenever another deployment slot is created in a WebApp, in the WebGUI you are able to adjust those percentages. How can that be accomplished using Powershell? Are there ARM or AZ commands that will do this?

WebAppTrafficPercentages

Content check: Tips 91-100

Should the Tip#98 page reference Microsoft.Azure.Cosmos.Table?

When using VSCode to create a v3 Azure Function, I needed to add
a using Microsoft.Azure.Cosmos.Table
statement (and may have had to do a dotnet add package, but cannot remember for sure).
It seems all the changes with extension bundles for functions, there has been much change for what to reference....and if you even can reference the old OR newer packages.

E.g. in Tip#98 I could NOT find a way to get a package that was .NET Core based for Microsoft.Azure.ConfigurationManager or Microsoft.WindowsAzure.ConfigurationManager. Thankfully the tip said I could hardcode the storageAccount connection string...but that's less than ideal for production.

Thank you for these tips&tricks, they are really helping compared to most of the official docs for Azure Functions (and all the now outdated chaff on Stackoverflow and other forums).

DataFlow Sort misplaces 4th item.

What would you like to know?

How come when I sort some Integer data in a Sort action, it always misplaces the fourth item.

I.e:
Player:               Score:
Jenny Norgaard	        9600
Dan Drayton	        9600
Rajab Shammas	        9600
Jimmie Turman	       14400
Niew Leekpai	        4800
Rosie Reeves	        4800
Vicky Erickson	        4800
Francesca Lombard       4800
Nicholas Rose	        4800
Rodrigo Romani	        4800

But when I preview the data in the dataflow designer, it looks correct. But after when I preview data in the data set (after the pipeline has run) it looks like what i typed above?

Content check: 111-120

Azure function

Hello,

I have a request to zip all files in a specific folder in OneDrive using Logic App/Azure Function.
What steps should I do, to get all files in OneDrive in a specific folder and zip in one single file?

Thank you much for your attention.

VuePress Build Instructions?

Hello,
These are great docs. I've been trying to stand up something similar. Are you able to share your workflow for publishing these VuePress docs? I've walked through the official docs several times and can't seem to get:

  1. Markdown files to render in VuePress. The Github Pages template takes over.
  2. An automated build process without using a 3rd party.
    Any insights are greatly appreciated.
    Thank you

Content check: Tips 71-80

Content check: Tips 31-40

Content check: Tips 141-150

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.