Using Serilog with Azure Log Stream

Continuing of our previous article here, let’s explore how to show the logs in Azure Log Stream. Integrating Serilog To begin, incorporate Serilog into your project using Visual Studio or the .NET CLI: # Using Visual Studio Install-Package Serilog.AspNetCore # Using .NET CLI dotnet add package Serilog.AspNetCore Configuring Serilog Add the necessary configuration settings in your appsettings.json file, resembling the structure below: "Serilog": { "Using": ["Serilog.Sinks.Console", "Serilog.Sinks.File"], "MinimumLevel": "Debug", "WriteTo": [ { "Name": "Console" }, { "Name": "File", "Args": { "path": "Logs/applog-.txt", "rollingInterval": "Day" } } ], "Enrich": ["FromLogContext", "WithMachineName"], "Properties": { "ApplicationName": "Your ASP.NET Core App" } } Deploying Your App to Azure Deploy your application to Azure using the steps outlined in our previous article: ...

December 6, 2023 · 2 min · Alex Popescu

Configuring CTCI Device on Windows with WiFi Adaptor

Have you ever struggled with setting up a CTCI device on Windows 10/11 with a WiFi adapter? Fear not! This guide will walk you through the process using the versatile Microsoft Loopback Adapter. Now you can using Microsoft Loopback Adaptor. Install Microsoft Loopback Adapter Begin by installing the Microsoft Loopback Adapter, also known as the Microsoft KM-TEST Loopback Adapter. You can follow a similar method outlined here Configuring After successful installation, proceed to configure the Loopback adapter with the IP address 192.168.100.1. Simultaneously, set up the CTCI device (aka [REDACTED]) with the IP address 192.168.100.2. ...

November 27, 2023 · 1 min · Alex Popescu

Overriding appsettings.json on Azure Web App

This article demonstrates how to override app settings values on Azure Web App by creating a straightforward RESTful Web API service, deploying it to Azure Web App, and then overriding specific settings. Web API Creation To start, create a simple .NET 6 application (the latest LTS version at the time of writing) using the following command: dotnet new webapi -o TestApi Next, add a sample settings in appsettings.json: "Position": { "Title": "Editor", "Name": "Joe Smith" } Create an options object to map these setting object in a file named PositionOptions.cs: ...

October 23, 2023 · 3 min · Alex Popescu

Installing SQL Server in a Free Kubernetes Cluster on IBM Cloud

Let’s install SQL Server in a free Kubernetes cluster on IBM Cloud. Kubernetes installation Installing Kubernetes on IBM Cloud is free. Simply search for Kubernetes, select the Kubernetes service or use this link), and create a free cluster in the desired resource group. After 5-10 minutes, the cluster should be created. To test the connection to the cluster, select the Kubernetes cluster and then click Actions > Connect via CLI. The command we are looking for is the second one. ...

June 28, 2023 · 5 min · Alex Popescu

Toying with IBM Cloud Transient Servers

Last week I was toying with IBM Cloud tranzient servers, and got to setting a webhook url to be notified if the server needs to be reclaimed. In case the name doesn’t tells you anything, Transient Virtual Servers is the IBM Cloud equivalent to AWS Spot Instances. Creating a tranzient servers is easy enough trhough IBM Cloud portal, setting the webhook URL is not. It’s available only through API here In order to use SoftLayer, we need to generate a key. ...

June 4, 2023 · 2 min · Alex Popescu

From Source to Container: Building Efficient Quarkus Docker Images

In this article, we continue the trend from the previous article here and we will explore a few ways of creating a Docker image for a Quarkus app. Minimal install docker file Now with Quarkus, there are two ways of compiling a application: the normal java way and the native way. Quarkus native images and Java application packages have some significant differences. Java application packages contain a compiled bytecode that requires the JVM to run, while Quarkus native images are pre-compiled and optimized for a specific platform (in this example Linux), resulting in a smaller size and faster startup time. ...

May 5, 2023 · 5 min · Alex Popescu

Simplifying Java Container Images: Dockerfile vs Spring Native Buildpacks

Deploying a Java SpringBoot application to Docker and Kubernetes involves building a container image that bundles the application with its dependencies and environment. There are two methods of building a container image: Spring Cloud Native Buildpacks and Dockerfile. Dockerfile Dockerfile is the oldest and most common way to build container images. It is a text file that contains a series of instructions to compile the source code and assemble the layers of a container image. Dockerfile gives you full control and flexibility over how your image is built, but it also comes with some drawbacks. ...

April 29, 2023 · 4 min · Alex Popescu

Unleashing the Power of Hugo: Integrating Config Parameters with JavaScript

The Challenge: Using a config.yml Parameter in a JavaScript File Lately, I found myself in a predicament. I wanted to use a config.yml parameter in a JavaScript file, and apparently, it’s not that easy since most .js files are static as far as Hugo is concerned. Why would you like to do that? Well, let’s say you have a separate JavaScript file for Google Analytics that needs to be loaded at page start/end, but you don’t want to hardcode the Google Analytics ID. ...

April 20, 2023 · 2 min · Alex Popescu

How to find Proclib concatenation in z/OS

The easy way of Proclib concatenation in z/OS is to use the command $dproclib in master console (or in SDSF prefixed with /). The response is something like this for ADCD: RESPONSE=S0W1 $HASP319 PROCLIB(PROC00) $HASP319 PROCLIB(PROC00) STATIC LIBRARY, $HASP319 DD(1)=(DSNAME=USER.Z24C.PROCLIB, $HASP319 VOLSER=C4CFG1,UNIT=SYSALLDA), $HASP319 DD(2)=(DSNAME=FEU.Z24C.PROCLIB, $HASP319 VOLSER=C4CFG1,UNIT=SYSALLDA), $HASP319 DD(3)=(DSNAME=ADCD.Z24C.PROCLIB, $HASP319 VOLSER=C4SYS1,UNIT=SYSALLDA), $HASP319 DD(4)=(DSNAME=SYS1.PROCLIB, $HASP319 VOLSER=C4RES1,UNIT=SYSALLDA) Documentation and links Display a PROCLIB concatenation - https://www.ibm.com/docs/en/zos/2.3.0?topic=section-d-proclibxxxxxxxx-display-proclib-concatenation

April 19, 2023 · 1 min · Alex Popescu

Simple Rest API with GO and gin

This is the first part of a series of blog posts about embedding ReactJS front-end app with Go REST API back-end. Let’s start first by creating a REST API in GO and Gin - a web framework for APIs written in GO. Requirements To get started, you need to install Go and Gin on your machine. You can follow the official instructions for installing Go here: https://golang.org/doc/install. REST API Implementation First, let’s initialize the application module with: ...

April 12, 2023 · 4 min · Alex Popescu