Category: Cloud

Azure SQL with AAD authentication

I though this had to be an easy task. Well, actually it is. If you find the right documentation and read it in the correct order 🙂

Basically I wanted to be able to login with my AAD (Azure Active Directory) user.

In the first step, the database needs to be configured for Azure Active Directory in order to add users in the second step.

Configure an Administrator

In the Azure portal go the the SQL server and search for “active directory” to add an Active Directory admin.

After you’ve added an admin and saved the value, you will be able to use SSMS (SQL Server Management Studio) to logon to the server. Probably SSMS will prompt you about a firewall exception.

Use SQL Management Studio to add users and grant permissions

For other users (not the administrator we configured above) to be able to logon, access has to be granted like with an on premises SQL Server.

Add a user to the master DB

Create a new query o

Next grant permissions to the user on the database itself.

Add user to database

Open another query on the database.

That should be it.

Some documentation I used:

7 Jun
19 Apr

Was ist Cloud-native? – Die Muttersprache der Cloud

Im Zeitalter der Digitalen Transformation umschwirren uns unzählige neue Buzzwords. Bei „Cloud-Native“ sprechen wir dabei keineswegs von einer weiteren Etage auf dem Turm zu Babel, sondern vielmehr von einem essentiellen Bestandteil der Digitalisierung, nämlich der Muttersprache der Cloud.

Ich habe wieder einen Beitrag auf dem Arvato Cloud Blog geschrieben:

https://it.arvato.com/cloud-blog/de/2018/04/was-ist-cloud-native—die-muttersprache-der-cloud.html

Azure Table Storage REST Api not returning data

Today I wanted to query entities of an Azure Table via REST Api and did not get any results.

Looking over the query over and over again did not solve the problem. Sometimes I did not get any items back.

The “sometimes” depended on the query. I checked each part. Partition Key, string and date columns. Everything looked all right. And then it hit me.

I did not get a result, if there was too much data. Specifying the $top option to 1000 will always return data.

Learning for today: if a filtered query would return too much data, it will not return anything until you implement paging according to https://docs.microsoft.com/en-us/rest/api/storageservices/query-timeout-and-pagination

No Default Subscription?

Set-AzureWebsite : No default subscription has been designated. Use Select-AzureSubscription -Default <subscriptionName> to set the default subscription.

*doh* Again I’ve used PowerShell comandlets for Azure classic instead of Resource Manager 🙁

Reminder: Always check for the magic “Rm” chars in the command, if a resource cannot be found.

Azure Meetup OWL

Nicht vergessen. Morgen findet das Azure Meetup zum Thema Build, Test und Deployment mit Azure in Bielefeld statt.

Meetup #2 – Build, Test und Deployment mit Azure

Wednesday, Oct 11, 2017, 7:00 PM

Arvato Bielefeld / Sennestadt
Fuggerstraße 11 Bielefeld, DE

17 Mitglieder Went

Liebe Azure OWL Community,am[masked] wird unser zweites Azure OWL Meetup durchgeführt.Diesmal soll es hauptsächlich um Build, Test und Deployment auf der Azure Platform gehen.Tyler von Microsoft wird uns einen Vortrag zu Build, Test und Deployment vorstellen und speziell auf Delivery Pipelines mit Docker, Kubernetes und Vistual Studio Team…

Check out this Meetup →

 

HowTo use Azure cmdlets in Azure Schedule

A Runbook schedule can be triggered every hour. If you need a smaller interval, like every minute, you can use the Azure Scheduler to do so.
So I went to the Azure Portal, created an Azure Schedule instance (with a job collection tier of at least basic, to be able to create schedules that are triggered every minute) and called a Runbook via webhook.

The Runbook contains a cmdlet that results in an error 🙁
Get-AzureRmMetric : The term 'Get-AzureRmMetric' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.

Azure cmdlets can be made available through the Automation Account the Runbook is using. The “Browse Gallery” link will let you find and choose the necessary cmdlets.

The error message above appears, because a) the cmdlet was not installed and b) the referenced version of AzureRM.profile was to old. Fortunately the problem can be resolved easily by upgrading the Azure modules.

After all modules are up to date, I could add the desired module and my runbook wasn’t complaining anymore 🙂

Azure SQL – Standard Tier IDs

In case you need the ServiceObjectiveId for SQL standard tiers, here is the list for you.

Tier nameServiceObjectiveId
Standard (S0)f1173c43-91bd-4aaa-973c-54e79e15235b
Standard (S1)1b1ebd4d-d903-4baa-97f9-4ea675f5e928
Standard (S2)455330e1-00cd-488b-b5fa-177c226f28b7
Standard (S3)789681b8-ca10-4eb0-bdf2-e0b050601b40
Standard (S4)3cf14e1a-0a5d-408c-bbc7-f63c5282f735
Standard (S6)ab69b4e3-d7cc-4aa5-87a6-f8b50615a03c
Standard (S7)b6ca0894-d2f0-4e40-99f5-0f8a93cc2437
Standard (S9)0efa88e9-99ff-4e36-a148-8c4b20c0826c
Standard (S1298100e8b-2f8a-4a81-9eb5-4d1e675c5a29

Usually you could change the tier within the Azure Portal. To change them via PowerShell, you can use the above IDs.

Connection Problems to a Secure Service Fabric Cluster

To be able to connect to a secure Service Fabric Cluster via PowerShell, you need to import the certificate specified into your personal certificate store. Otherwise an Exception will be thrown. Unfortunately the Exception does not point into the right direction 🙁

So in case you get an Exception like this

Connect-ServiceFabricCluster : An error occurred during this operation. Please check the trace logs for more details.
At line:1 char:1
+ Connect-ServiceFabricCluster -ConnectionEndpoint xyz-sf-de …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Connect-ServiceFabricCluster], FabricException
+ FullyQualifiedErrorId : CreateClusterConnectionErrorId,Microsoft.ServiceFabric.Powershell.ConnectCluster

you need to import the certificate with its private key (*.pfx) into the personal certificate store of the PC you are running PowerShell on.

 

Specifying -verbose for PowerShell will print additional information, that does not help a lot.

PS C:\WINDOWS\system32> Connect-ServiceFabricCluster -ConnectionEndpoint xyz-sf-dev.northeurope.cloudapp.azure.com:19000 -X509Credential -FindType FindByThumbprint -FindValue xyz -StoreLocation CurrentUser -StoreName My -ServerCertThumbprint xyz -Verbose
VERBOSE: System.Fabric.FabricException: An error occurred during this operation. Please check the trace logs for more
details. —> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80071C57
at System.Fabric.Interop.NativeClient.IFabricClientSettings2.SetSecurityCredentials(IntPtr credentials)
at System.Fabric.FabricClient.SetSecurityCredentialsInternal(SecurityCredentials credentials)
at System.Fabric.Interop.Utility.<>c__DisplayClass25_0.<WrapNativeSyncInvoke>b__0()
at System.Fabric.Interop.Utility.WrapNativeSyncInvoke[TResult](Func`1 func, String functionTag, String
functionArgs)
— End of inner exception stack trace —
at System.Fabric.Interop.Utility.RunInMTA(Action action)
at System.Fabric.FabricClient.InitializeFabricClient(SecurityCredentials credentialArg, FabricClientSettings
newSettings, String[] hostEndpointsArg)
at Microsoft.ServiceFabric.Powershell.ClusterConnection.FabricClientBuilder.Build()
at Microsoft.ServiceFabric.Powershell.ClusterConnection..ctor(FabricClientBuilder fabricClientBuilder, Boolean
getMetadata)
at Microsoft.ServiceFabric.Powershell.ConnectCluster.ProcessRecord()
Connect-ServiceFabricCluster : An error occurred during this operation. Please check the trace logs for more details.
At line:1 char:1
+ Connect-ServiceFabricCluster -ConnectionEndpoint xyz-sf-de …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Connect-ServiceFabricCluster], FabricException
+ FullyQualifiedErrorId : CreateClusterConnectionErrorId,Microsoft.ServiceFabric.Powershell.ConnectCluster

Guest Post on the Arvato Systems Cloud Blog

I’ve published an article on the Arvato Systems Cloud Blog (German) and Arvato Systems Blog (English).

Geld sparen mit serverloser Architektur

Ihr Unternehmen plant eine großangelegte Digitalkampagne zur Vermarktung eines neuen Produktes? Sie sind nicht sicher, ob die aktuelle Architekturlösung den Ansprüchen ihrer geplanten Kampagne gerecht werden kann? Bei einem Ausbau Ihrer Infrastruktur würden hohe Kosten auf Sie zukommen?

How a serverless architecture can help you scale easily and save costs during your next marketing campaign

Is scaling up your existing infrastructure very expensive? Are you not sure if your infrastructure can meet the demands of your next big marketing campaign? Get to know an alternative to scale up your current environment for a short period.

Often there is no need to set up an infrastructure like a web server, database server, and load balancers. Let us take a look at some cloud providers and how they can serve our content more cost efficient and deliver websites to the visitors with high performance.

Azure Meetup OWL

Am 13.7. wird das erste Treffen des Azure Meetups OWL stattfinden. Wir sind derzeit noch auf der Suche nach einem Ort und den Themen 🙂
Vermutlich wird es um Chatbots und Machine Learning gehen. Wir werden aber auch auf euer Feedback eingehen um Themen für die nächsten Treffen zu finden.

Wenn ihr dabei sein möchtet, meldet euch bitte über die Meetup Seite an.

Update:

Ort: Arvato Systems, An der Autobahn 100, Gütersloh, Tower I

Zeit: 19:00 – 21:00 Uhr

Es wird um eine namentliche Anmeldung gebeten, da die Besucher beim Pförtner angemeldet werden müssen. Bitte entweder über Meetup, oder sendet mir eine E-Mail.