Wednesday, April 26, 2023

Verify configuration files deployed to Azure App Services with type keyword

We typically deploy our web applications to Azure App Service using CI/CD pipelines. Within these pipelines, we often perform variable transformations based on the targeted environment. This may include Connection Strings or API endpoints

How do we ensure that our variables are correctly transformed and our configuration files are in proper order? Here's a trick I use.

Navigate to the specific app service instance and click on "Console" under "Deployment Tools".








You can utilize the Windows command shell with the type keyword as follows.

type appsettings.json

It will enable you to view your deployed configuration file.

Wednesday, April 19, 2023

Azure Private Link service and Private Endpoint

The similarity in names between Private Link service and Private Endpoint in Azure can often be confusing. However, it's important to note that there is a distinction between the two.

What is Private Link service

Private Link enables Azure PaaS services and services hosted in Azure to be accessed privately within a virtual network. Traffic between your virtual network and the service traverses the Microsoft backbone network, thus eliminating exposure to the public Internet.

What is Private Endpoint

A Private Endpoint is a network interface that securely and privately connects the caller to a service established with Azure Private Link.

A Private Link service can receive connections from multiple private endpoints, and each private endpoint connects to a specific Private Link service. This shows a one-to-many relationship

Sunday, April 2, 2023

Presentation - Efficient Data Streaming with Event Hubs for Kafka

Recently I did a technical session in Perth Azure User Group at Microsoft Perth. The event was themed as Azure Open Source Night.

My session was on "Efficient Data Streaming with Event Hubs for Kafka"

Following is the presentation I did

Following is the code I demonstrated. In this sample An Azure Function written in .NET 6 pushes events to an event hub, those are consumed by Apache Kafka consumer written in Java. 





Following are the configuration changes you need to perform.

1. In Producer, change the EventHubConnectionAppSetting in local.settings.json file. You can get the connection string by navigating to SAS policies and in the policy you created for sending.


{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "",
    "FUNCTIONS_WORKER_RUNTIME": "dotnet",
    "EventHubConnectionAppSetting":"CONNECTION"
  }
}


2. In Consumer, change the Event Hubs namespace and connection string in Consumer.config file.You can get the connection string by navigating to SAS policies and in the policy you created for receiving.


bootstrap.servers=EVENTHUBNAMESPACE.servicebus.windows.net:9093
group.id=$Default
request.timeout.ms=60000
security.protocol=SASL_SSL
sasl.mechanism=PLAIN
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="$ConnectionString" password="CONNECTION";


You can get further information from this repository

I loved the event. Following are few snaps.