CHUVASH.eu

CHunky Universe of Vigourous Astonishing SHarepoint :)

Category Archives: programming

Git Merge develop to main in an Azure DevOps Release

This post is a techy one. It’s about running git commands in Azure DevOps Releases in order to finalize a deployment job to production.

Let me first describe our scenario:

We use Azure DevOps for code and for deployment. Our branch strategy a simplified Gitflow model, where all the current work is merged to the “develop” branch. The code from the “develop” branch is then built and released to staging environments and production. After a release to Production and regression tests the develop branch needs to be merged into the “main” branch (or “master”). So simply put, the git merge into main is what we mean by finalizing a production release.

The “Finalize” stage in a release definition consists of one step: a bash script. But before you can run git commands you need to configure a couple things. Let’s go through them:

Step 1: Permissions

Step 2. New Stage

Next, create a new stage, call it “Finalize Production Deployment” (or other name of your choice). On the Build Agent step, enable “Allow scripts to access the OAuth token”

Add a step: Bash, call it “Git – merge changes to main”. Paste this git code.

git config –global user.email "azuredevops@microsoft.com"
git config –global user.name "Azure DevOps"
REPO="$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_git/$(Build.Repository.Name)"
EXTRAHEADER="Authorization: Bearer $(System.AccessToken)"
git -c http.extraheader="$EXTRAHEADER" clone $REPO
cd $(Build.Repository.Name)
MAINBRANCHNAME=$(git rev-parse –abbrev-ref HEAD)
git config http.$REPO.extraHeader "$EXTRAHEADER"
echo — Merge $(Build.SourceBranchName) to $MAINBRANCHNAME
git fetch origin $(Build.SourceBranchName) –prune
git merge origin/$(Build.SourceBranchName) -m "merge $(Build.SourceBranchName) to $MAINBRANCHNAME" –no-ff
TAGNAME=$(Release.ReleaseName)
echo — Create tag named $TAGNAME
git tag -a -m "$(Build.SourceBranchName) installed to production" $TAGNAME
git push origin $MAINBRANCHNAME
git push origin –tags

That’s it, the code is pretty universal. Let me know if something does not work.

You can stop reading unless you want more details 🙂

More details

A neat list of all available variables

When I started working I found this very useful: The built-in “Initialize job”. Click on that:

There you can find all the built-in and your variables in a nice list. Pretty useful for building a bash script:

Here is how I construct the repo url, neat, isn’t it?

Pipelines vs. Releases

If you run this code in a classic Release Definition, you won’t get the repo. You need to clone it first. Why Release and a Pipeline. Well, due to reasoning described in my other blog post, we still run Releases: Azure Key Vault vs. Pipeline Variables. But Pipelines should work, too.

Dry-run

I found it useful while mickle-mackling with the finalize step, disable all the other steps and commenting out the actual push to origin. That way I could run it fast and focus on the steps I needed to fix first.

Authorization

Before you can configure the authorization header, you need to clone it first and cd into that directory. In order to clone it you need to have the extraheader. Tough luck? No, not at all, you just need to add in two places, when cloning and and then in the git repository for all the following commands:

User Identity

Using git config you can define any user identity. Use something that makes sense and is easy to recognize.

main vs. master

If your repos main branches are both main and master, no worries, you don’t need to guess or create a variable. All you need to do is to check the current branch after you have cloned it. NB: it’s different in case you use a Pipeline.

Further reading and links

VĂ„r robot Stefan

Roboten Stefan

HÀr Àr historian om Stefan, en robot jag och barnen har jobbat pÄ under den senaste mÄnaden. I en sann DIY-anda vill jag skriva om vÄrt projekt pÄ bloggen och förhoppningsvis inspirera andra att utforska det. I och med projektet innebÀr en hel del pyssel, sÄ Àr det lÀmpat i princip för alla Äldrar.

Även om allting togs fram parallellt och stegvis (“i iterationer”), kommer projektet presenteras det i förenklad ordning

  • IdĂ©, hur allting uppstod
  • HĂ„rdvara, material som vi anvĂ€nt
  • Pyssel, utklippning, mĂ„leri etc
  • Mjukvara (och elektroniken)
  • LĂ€rdomar, diverse insikter vi har fĂ„tt pĂ„ vĂ€gen

Idé

Vi har en microbit v2 som vi har letat anvĂ€ndning för. Microbit v2 har en mikrofon och en liten högtalare, definitivt en enorm fördel om man vill fĂ„ barn med pĂ„ pysslandet med elektronik. Jag hade sett nĂ„gonstans pĂ„ nĂ€tet om figurer man kunde göra av mjölkkartonger. “Stefan” dĂ„, varför just det namnet? Min fyraĂ„riga dotter brukade skylla pĂ„ Stefan om det var “nĂ„gon” som stökade till, rĂ„kade trampa pĂ„ nĂ„gon annans fötter och sĂ„nt. “Det var inte jag, det var Stefan” brukade hon sĂ€ga ett tag. SĂ„ vi kĂ€nde att vi behövde ge Stefan en kropp, ett ansikte för att göra en rolig grej av det. Under arbetet med roboten har betydelsen av Stefan minskat dock. Roboten behöll sitt fina namn – Stefan – i alla fall.

en enklare gif

HĂ„rdvara

Det hÀr var vad vi anvÀnde. Det finns miljontals andra material-kombinationer som kan funka. Tipset Àr att se vad man har hemma.

Ingredienser

  • Mjölkkartong, 1,5 L
  • Microbit v2
  • 1 Servo-motor (180 grader)
  • 2 KrokodilklĂ€mmor
  • 1 batterihĂ„llare för 2xAAA-batterier för att driva microbiten
  • 1 batterihĂ„llare för 4xAAA-batterier för att driva servon
  • Diverse sladdar
  • HobbyfĂ€rg
  • Elastisk trĂ„d (pĂ€rlarmbandstrĂ„d)
  • Batterier 6xAAA (vi har laddningsbara och kan ladda dem dĂ„ och dĂ„ nĂ€r roboten blir “trött”)

Verktyg:

  • Sax
  • Limpistol
  • Pensel
  • Microsoft MakeCode för Microbit (gratis som webbapplikation eller Windows-app). Windows-app har fördelen att man kan skriva till microbiten direkt, utan att ladda ner det först, plus att det kommer ihĂ„g dina senaste projekt

Pyssel

Roboten Stefan skulle sĂ€ga “Hej” och han mĂ„ste kunna öppna munnen. Det första vi gjorde var just att klippa ut munnen. Vi klistrade fast servon (efter lĂ„nga undersökningar i vilken vinkel och hur mycket den rörde sig). Vi anvĂ€nde limpistol för att sĂ€tta fast servon. För att munnen skulle stĂ€ngas, följa med servon tillbaka, knöt vi lĂ€ppen till servon med en rosa elastisk trĂ„d (den har man för att göra pĂ€rlarmband bland annat).

Vi satte fast servon med limpistol.

Roboten Stefan skulle ocksĂ„ kunna visa med sin “nĂ€sa”. Vi gjorde ett fyrkantigt hĂ„l för microbitens ledlampor. För knapparna och A och B gjorde vi smĂ„ hĂ„l. PĂ„ det sĂ€ttet kunde man jacka in microbiten in i de hĂ„len sĂ„ att det höll sig fast. Knapparna blev irisar i Stefans ögon senare.

PĂ„ baksidan gjorde vi ett runt hĂ„l för att Stefan kunde gĂ„ pĂ„ toa đŸ’©. (Det var inte min idĂ© 😜).

Stefan behövde ocksÄ ett större hÄl pÄ baksidan för att stoppa in elektroniken.

MÄlningen var vÀldigt kul och det gjorde vi i mÄnga omgÄngar (ibland med en hel veckas mellanrum, sÄ lÀnge tÄlamodet rÀckte och nÀr lusten att mÄla var pÄ topp). Prototypen pÄ ansiketet skissade vi först pÄ papper.

Prototypen pÄ Stefans ansikte

Stefan skulle ha stora tĂ€nder, röda lĂ€ppar och blĂ„ ögon. đŸ€©

Frost-fantasten mÄlar Stefan.

Elektroniken kopplade vi med nÄgra krokodilklÀmmor och sladdar. Vi försökte följa samma fÀrgkodning. PIN 1 anvÀnde vi för att styra. GND delades av microbiten, servon och servons batteripack.

HÀr kan man se hur sladdarna Àr kopplade.

Mjukvaran

Vi anvÀnde MakeCode for micro:bit, en app frÄn Microsoft Store.

MakeCode i Microsoft Store

Projektet döpte vi till Stefan, kort och gott.

Projektet Stefan

Vi anvĂ€nde blockprogrammering. Det Ă€r kul Ă€ven för mig som “skriv”-programmerar pĂ„ jobbet. What-You-See-Is-What-You-Get (nĂ€stan i alla fall) Ă€r sĂ„klart toppen för barn.

Blockprogrammering i MakeCode

Nackdelen med blockprogrammering Àr att det inte Àr sÄ lÀtt att ÄteranvÀnda koden eller spara koden. Som tur Àr kan man bara öppna den i python eller javascript. Vi (jag) satsade pÄ python, för att det Àr vackert och koncist. Den aktuella koden Àr sparad pÄ github, den kan dock Àndras och justeras i framtiden:

LÄt oss gÄ igenom blocken lite grann. Programmet bestÄr av tre huvudkomponenter:

  • Vid start (det som hĂ€nder nĂ€r Stefan slĂ„s pĂ„): Den visar “STEFAN” med rullande bokstĂ€ver, spelar upp ljudet Mysterious.
  • För alltid (det Stefan gör under sin vakna tid, huvudprogrammet): den spelar upp 6 gĂ„nger “Hello” och öppnar munnen samtidigt, lika mĂ„nga gĂ„nger. Om ljudet runtomkring tyst/lĂ„gt, tystnar Ă€ven Stefan. Om Stefan hör högre ljud (nĂ„gon kommer in i rummet och pratar eller nĂ„gon ropar “hej”), börjar Stefan sĂ€ga “Hej” frĂ„n början igen, och öppna munnen, och detta 6 gĂ„nger igen. SĂ„ fortsĂ€tter det tills man stĂ€nger av Stefan.
  • Vid knapptryck (möjligheten att styra Stefan med knappar, ifall inget annat funkar): nĂ€r man trycker pĂ„ A-knappen, börjar Stefan hĂ€lsa och prata, nĂ€r man trycker pĂ„ B-knappen, slutar Stefan.
Stefan vaknar – “vid start”
Huvudmomentet – “för alltid”

SĂ„ knapparna anvĂ€ndes mest för felsökning och Ă„terstĂ€llning i början. Även om de inte anvĂ€nds idag, har vi behĂ„llit funktionen för sĂ€kerhets skull.

Knapparna A och B sÀtter och stÀnger av Stefan.

LĂ€rdomar

Den sista bilden med knapptrycken fĂ„r vara den första lĂ€rdomen. Vi hade flera variabler: paus, running, cycles. SĂ„ smĂ„ningom hade vi endast “cycles” – cykler för hĂ€lsningar. En cykel Ă€r en munöppning och Hello-fras. Den börjar pĂ„ 1 och slutar efter 6 gĂ„nger. UpptĂ€cker en högre ljudnivĂ„, börjar den frĂ„n början. Vi skulle kunna ha nedrĂ€kning istĂ€llet, men det blev upprĂ€kning istĂ€llet.

Hakan vikte vi först, men det var trögt, sÄ vi skÀra lÄnga strÀck i vecket för att göra munöppningen lite smidigare.

Servon drevs först av microbit, det var ovĂ€sen Ă€ven nĂ€r munnen var stĂ€ngd, servon “darrade” och vĂ€snades. Vi kopplade in ett extra batteripack endast för servon, dĂ„ blev det tyst. GND delas av microbiten och servons batteripack.

Vi fick experimentera ganska mycket med servons grader, och hittade bra vinklar till slut. Lite mer Àn 90 grader: 180 och 60. Detta beror frÀmst pÄ sjÀlva servons placering och elastiska trÄden, man fick ta i lite mer för att den skulle spÀnna trÄden och stÀnga munnen.

Tidigt i projektet hade vi en powerbank som drev det hela. TyvÀrr stÀngde den av sig vid inaktivitet. En bra funktion för mobilladdning, men dÄligt för Stefan.

Powerbanken fick plats men klarade inte uppgiften.

Mjölkkartongen kÀndes lite skum nÀr man mÄlade pÄ den med hobbyfÀrg, som om den inte riktigt ville fastna i. Men vi tÀnkte att Stefan inte skulle trivas i att vara perfektionist, sÄ det syns igenom att det inte Àr mjölk, utan en laktosfri mjölkdryck pÄ vissa stÀllen.

“Vid högt ljud” fungerar inte. Det upptĂ€cktes inte eller var det i osynk, sĂ„ vi fick skriva om det till att mĂ€ta ljudnivĂ„n i varje körning i huvudmomentet, alltsĂ„ i “för alltid”.

Det finns “döda vinklar” i systemet. LjudnivĂ„n mĂ€ts, och sedan Ă€r det vissa pauser dĂ„ ljudnivĂ„n inte mĂ€ts. Det har hĂ€nt att högt ljud har passerat förbi. Det vore bĂ€ttre med ett event – “vid högt ljud”, men det fungerade tyvĂ€rr inte. Även med “döda vinklar” (sekunder) Ă€r det förvĂ„nansvĂ€rt pĂ„litligt. Helt enkelt att vi tilltalar Stefan med högre röst, och inte anvĂ€nder Stefan som en supermaskin kapabel att upptĂ€cka varenda ljudnivĂ„höjning. VĂ„r tolerans för Stefans tillkortakommanden Ă€r helt enkelt mycket högre.

SÄ ser den ut och sÄ hÀlsar vÄr robot Stefan

MagicMirror2 and Chuvash

This post is about my setup of the popular MagicMirror2 application. I show the steps needed to set it up on a Raspberry Pi Zero W and connect it to a TV set. As a bonus, I share my thoughts on the Chuvash localization work.

MagicMirror2 is a DIY project and an open-source application, voted to number one of the best Raspberry Pi Projects. In essence, it shows information of your choice (weather, calendar, news) on a screen that is embedded in a mirror.

I was introduced to MagicMirror2 by my colleague, who uses it in another way: rather than having it in a mirror, he has it on his smart tv. The customisability is the beauty of the whole DIY and the Raspberry Pi.

Installation

I also decided to use it on my tv, through the built-in web browser. My raspberry pi zero w required some special steps due to its processor architecture. Fortunately, I found a guide for MagicMirror2 and Raspberry Pi Zero W which I used as a starting point.

After trying it, I found that I needed those steps for my server-only magic:

  • Install node and npm for armv6l
  • Clone the MagicMirror
  • Install npm packages targeting the armv7l
  • Run the server
# node from apt won't work
wget https://nodejs.org/dist/v10.16.0/node-v10.16.0-linux-armv6l.tar.xz
tar xvf node-v10.16.0-linux-armv6l.tar.xz
cd node-v10.16.0-linux-armv6l/
sudo cp -R * /usr/local/
sudo reboot
git clone https://github.com/MichMich/MagicMirror
cd MagicMirror
# it needs to be armv7l, not armv6l
npm install -arch=armv7l
# if errors arise: rm -rf nod_modules. Then npm install again
npm run server .
view raw magicmirror.sh hosted with ❤ by GitHub
Creating a bookmark on the TV browser.

My tv screen with MagicMirror2 localized into Chuvash

Chuvash

Every time I work with software I try to think: can I help to translate/localize it to Chuvash. Chuvash is a “little” language, it is only spoken by 1.5 million people. Almost in all cases, it is hard to even to register the Chuvash as such (like in Windows, or macOS), and it is even harder to localize applications, because they tend to have thousands or sometimes millions of strings to translate (and maintain!).

With MagicMirror I experienced how work from the past can help today, how small pieces can become connected parts of a bigger picture.

MagicMirror uses momentjs, a javascript library for datetime. In matter of fact, that’s exactly something that I already have worked on:

That was nice! I changed language to “cv” in the config/config.js and the most of the interface turned into Chuvash. (cv – is the iso code for Chuvash language). What a feeling of joy!

Why that excitement? Well, almost everything in the Chuvash IT (UX, localization, keyboard layouts, speech recognition, machine translation etc) is driven and sponsored by volunteers and a community. That’s why it is a special joy to see pieces come together, even though it is a small DIY project.

The MagicMirror2 itself does a minimal set of strings to translate. I translated it and submitted a Pull Request, which has been already merged to the develop branch.

I also created a list of Compliments in Chuvash:

DIY: Integrating TrĂ„dfri lights with Teams presence

It seems that Work from Home (WFH) is here to stay, it’s okay. I’d say, Work from a Smart Home is even more okay. To me, Home Automation (HA) and Work from Home (WFH) are really two peas in a pod.

Today’s “guest” is a tiny application that I’ve set up on my raspberry pi to listen to my presence (status) in Teams and show it with colors of my smart RGB light (IKEA TrĂ„dfri).

The code

You can find the application on github:

I’ll try to provide the needed documentation on the github repo and focus more on the story part in this blog post.

The story

I stumbled upon Elio Struyf’s blog post and I was amazed:

Wow! I thought immediately: that would be a cool challenge, I wanted to set up this, too. Although, with some adjustments for my smart home:

  • I wanted to run the whole application on one raspberry pi only, because I don’t have the second one, neither I have HomeBridge installation (maybe something for future projects, though).
  • I wanted to have as little code as possible, maintenance should be kept to minimal.
  • I wanted to use python in order to learn more python and because python seems to be the most supported language on the pi.
  • I wanted to use IKEA TrĂ„dfri lights (with a gateway and a remote) that I already have invested into.

I omit the configuration steps for TrÄdfri lights and Raspberry Pi, you can see them in my previous blog post:

Why show Teams presence with a smart light

Elio wrote his blog post in April this year – in the times of the lockdown in Belgium. In Sweden, we hadn’t a real lockdown, but it seems that it might come times when my children would need to be at home more while I work. In that case a superclear system that shows when I have important meetings is just awesome. Maybe, with that I am prepared for such times.

But to be really honest, the main driving factor is the fact that it is very satisfying to tinker around with this DIY stuff 😜😎

Lessons learned

There is a python wrapper for MSGraph which is awesome, but it needs more contributors:

In your Azure AD App Registration you can specify auth flow type as public, with that you don’t need to store a client secret for delegated access. That was a kind of a new thing to me.

Presence endpoint in MSGraph is in beta, make sure you call the beta endpoint. The scope is ‘https://graph.microsoft.com/Presence.Read’ and you need an admin consent for that permission grant.

Setting up a HelloWorld Azure Alert

Azure Alerts are awesome for monitoring of solutions in Azure. If you are about to set up your first Alert Rules in Azure, then it’s a guide for you. Configuring alert rules can be quite intimidating at first, with all the options, metrics, evaluation times, etc.

Here is a very very simple setup that can serve as a teaser and help you get started with the Azure Alerts.

I’ll use Teams as an easy way to set up notifications.

The core solution (alert handler) will be an Azure Function, also because it’s fast and easy to set up.

A reliable failing resource

“Reliable failing”, huh? Yes, this oxymoron is the best description of what we are looking for: a resource in Azure that can fail reliably (“fail faster”), so that we can trigger our alerts while developing.

To do that an easy way, we’ll just create a logic app and let it fail all the time.

Run it, and you’ll see how it fails as intended.

The runs history of my failing logic app

When you’re done setting up the alerts, you can remove the failing logic app.

Communication channel

On the other end we need a reliable communication channel.

Let’s pick a channel in a team and create an incoming webhook. I call my webhook alert-hook. (Just to make it easier to follow this guide, it will appear here and there)

Why incoming webhook? Because it is easy to create and send messages to, and also with the right notifications on that channel and the Teams mobile you’ll get the smoothest way of setting up push notifications! Isn’t it great to get your custom alerts directly on you mobile in real time?

Just to make one step at a time, already try the incoming webhook by calling it using PowerShell. Verified small steps make it easier to troubleshoot future potential issues.

$body = "{'text':'hello world'}"
$ct = 'application/json; charset=utf-8'
$uri = "https://outlook.office.com/webhook/6c15f246-4ad8-47a7-ac3c-8c3e4ff96e08@21a772a0-3ad8-483b-bef2-d9c28cfe5dff/IncomingWebhook/7d88ca6b0f7d417bb87d4f8ae8816760/1522ad47-6712-4e3b-b454-d1198e0287a8"
Invoke-RestMethod Method POST ContentType $ct Body $body Uri $uri
view raw call-webhook.ps1 hosted with ❤ by GitHub

When you see the “hello world” from alert-hook in your Teams channel, then you’re ready to proceed with the next step.

Alert Handler

Now it’s time to set up the core of that solution – a handler that will receive alerts and pass it to the Teams channel.

Why do we need an Alert Handler? Well, because you can’t send the alerts directly to a Teams channel (or whatever communication channel you choose), they have different schemas. But also, an Alert Handler is an opportunity to make an alert more readable (e.g. by formatting it as an adaptive card), and even filtering out some alerts or parts of them (e.g. in some scenarios only Fired Events (not Resolved) are relevant for notifications).

For the sake of simplicity, let’s just create PowerShell Azure Function in the Azure Portal. Just choose everything latest (in my case it was PowerShell Core 7.0, Consumption Plan, West Europe). If you uncertain, check this post:

Create a new function alert-hook, and paste the same hello-world code snippet from the above step.

Test and run it once to verify this step. If you see the hello-world again, then it works.

Alert Rule

Now it’s time to set up an Alert Rule, the most intimidating part 🙂 Let’s just get this over with.

Open the Failing Resource, and navigate to its Alerts.

We’ll create an alert rule as simple as possible. For reference you can check this out:

We need those 4 steps. I created a simplified diagram of the properties that you need have in mind:

Alert Rule Scope

When you click on “New alert rule”, the Scope will be already defined, it will point to the “Failing Resource”.

Alert Rule Condition

There are so many signals and possibilities. In this guide, just choose “Runs Failed” as a Signal.

In the Alert Logic, select “Greater than or equal”, 1; 5 minutes Granularity Period and 1 minute Frequency of Evaluation. No comment on them right now. Just do it.

When we’re done, re-visit this page and try other things, right now we just want to have an alert directly when our failing resource fails.

Action Group

Action Group is what gets triggered. It is billed and that’s why it is connected to a Resource Group (it might be another resource group, it does not need to be in the same place as our “Failing Resource”). Just create a new one:

Here is a simplified diagram of an action group:

Action Group Action – Webhook

There are a couple of options for Notifications and Actions to try out. Let’s focus on the Webhook in this guide. In the picture it is called GenericTolleAlertHook.

Copy the Uri from the your function (“Get function url”) and paste it into the Webhook URI.

Important: enable the common alert schema. That will save much of the pain.

Common Alert Schema

The payload in the alert may vary. To make it more predictable for parsing in the alert handler, we just need to enable the common schema, which will be crucial when we will extact and send some data to the Teams channel.

Action Group Bonus Tip: It might be not obvious when you set up it in the Azure Portal, but an alert rule can have 1 or multiple action groups (!). And the other way around: An action group can be used in multiple Alert Rules.

That makes it very flexible, we could create one generic Action Group that notifies Teams and reuse it across alert rules.

Alert Rule Details

The last step is to give the rule a name and description. Keep the Severity as it is right now.

Alert Handler Improvements

We need one more thing to call this guide complete: rather than saying Hello World, we need to have “Alert Fired” and what alert (alert rule name), to make it useful for real.

Let’s re-visit the alert-hook function and make some improvements. Remember the common alert schema? Make sure you enable it in the Alert Rule -> Action Group -> Action. When you do that you will get payloads like these I get:

When you look at them you can see some attributes that we can make use of:

  • $Request.Body.data.essentials
    • .alertRule (name)
    • .monitorCondition (“Fired” vs. “Resolved”)
    • .firedDateTime (vs. resolvedDateTime)
    • .description
    • .severity
    • .alertTargetIDs (https://portal.azure.com/#@/resource + alertTargetIDs) (the logic app)
view raw rule-props.md hosted with ❤ by GitHub

We’ll use the alertRule and monitorCondition properties, that we’ll send in the body of the incoming webhook to Teams:

Let’s test and run. Copy and paste a sample alert payload (with the common alert schema). The links are above.

It should result in a new post in your Teams channel:

Further improvements

A simple alert rule is configured. Enjoy! Discover more and if you would like new challenges here are some tasks that you can try:

Adaptive Card

Try to update the payload in the Teams incoming webhook to make an adaptive card.

Fired vs. Resolved

It might be good to have different paths for Fired and Resolved. I find it confusing when Resolved Notifications appear alongside with Fired Events. It’s better to suppress the Resolved notifications, or at least format them differently, or maybe even post them as answers to an existing posts (the original Fired posts)?

Summary

Azure Alerts are great. Start with a simple set up, see it working and improve continously. An ActionGroup can be reused, you can have a generic Action Group. That makes it easy to set up new alert rules and and you only need to update the action in one place only. Of course, the alert rules can have their specific actions as well, you can connect more than one action group to an alert rule. Use Common Alert Schema to avoid parsing errors and to achieve a generic action group.

Teams is a good notifications destination, especially for your first Alert Rule, it’s easy to set up, does not mean additional costs and (best of all), you and your colleagues can enable notifications the destination channel (channel with your incoming webhook), that way you will be immediately notified when something fails in your Azure Applications, – both on Desktop and in your mobile! Good DevOps, isn’t it?

Working with resx files in Visual Studio

Today I found a nice Visual Studio Extension for working with localization and resx files: Resx Resource Manager. This extension provides an additional view in your project and scans all the resx files. I would recommend it to all projects where you have to translate your interface. Here is how it looks in my project:

resx-001

It can also assist with some machine translation from Bing and MyMemory:

resx-002

Another good thing is the Export and Import to and from Excel. Wonderful if you need help from Non-developers.

resx-003

Trying out Visual Studio Code on Ubuntu

I am very curious about the new .NET Core, ASP.NET 5, EF 7 and Visual Studio Code for Linux, Mac and Windows. I have tried it out on an Ubuntu 15.04 machine. The installation and configuration required a few steps, so it is not an usual “Next-next-next”-installation. But, hey, it is just a beta, a preview so far, and first of all: It worked. I am sharing a couple of screenshots and the commands I ran in the terminal, mixed with comments and links:

 

Selection_003

Selection_004

Selection_005

#install latest node and npm
#https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs
sudo npm install -g yo
sudo npm install -g generator-aspnet
# download VS Code and make a link
# make a folder
mkdir workspace/tryvs
cd workspace/tryvs
# create "src/global.json" file:
# http://docs.asp.net/en/latest/tutorials/your-first-mac-aspnet.html
{
  "sdk": {
    "version": "1.0.0-beta7"
  }
}
nano src/global.json
# start VS Code 
# create 
# install omnisharp:
# http://docs.asp.net/en/latest/getting-started/installing-on-linux.html#installing-on-debian-ubuntu-and-derivatives
curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh
dnvm
#install dnx
sudo apt-get install -y libunwind8 gettext libssl-dev libcurl3-dev zlib1g libicu-dev
dnvm upgrade -r coreclr
cd EmptyApplication
dnu restore

#install libuv
#http://docs.asp.net/en/latest/getting-started/installing-on-linux.html#using-docker
sudo apt-get install make automake libtool curl
curl -sSL https://github.com/libuv/libuv/archive/v1.4.2.tar.gz | sudo tar zxfv - -C /usr/local/src
cd /usr/local/src/libuv-1.4.2
sudo sh autogen.sh
sudo ./configure
sudo make
sudo make install
sudo rm -rf /usr/local/src/libuv-1.4.2 && cd ~/
sudo ldconfig

#build, I got an error here
dnu build

#start the web server
dnx web
Daniel Chronlund Cloud Tech Blog

News, tips and thoughts for Microsoft cloud fans

Đ’ŃƒĐ»Đ° ЧăĐČашла

VulaCV - ЧăĐČашла ĐČŃƒĐ»Đ°Ń‚Ń‚Đ°Ń€Đ°ĐșĐ°Đœ саĐčт

Discovering SharePoint

And going crazy doing it

Bram de Jager - Architect, Speaker, Author

Microsoft 365, SharePoint and Azure

SharePoint Dragons

Nikander & Margriet on SharePoint

Mai Omar Desouki

PFE @ Microsoft

Cameron Dwyer

Office 365, SharePoint, Azure, OnePlace Solutions & Life's Other Little Wonders

paul.tavares

Me and My doings!

Share SharePoint Points !

By Mohit Vashishtha

Jimmy Janlén "Den Scrummande Konsulten"

Erfarenheter, synpunkter och raljerande om Scrum frÄn Jimmy Janlén

Aryan Nava

DevOps, Cloud and Blockchain Consultant

SPJoel

SharePoint for everyone

SharePointRyan

Ryan Dennis is a SharePoint Solution Architect with a passion for SharePoint and PowerShell

SharePoint 2020

The Vision for a Future of Clarity

Aharoni in Unicode

Treacle tarts for great justice

... And All That JS

JavaScript, Web Apps and SharePoint

blksthl

Mostly what I know and share about...