Category

Server administration

PowerShell, Server administration

Creating a PowerShell DSC extension for your custom tasks

Following my post on automating your mundane Azure Virtual Machine Windows provisioning tasks with PowerShell DSC, it may happen that you have custom tasks that you want to do that that are not already available on PowerShell gallery. You may also have custom complex logic that you want to reuse across many different DSC scripts that you would like to centralize. This is where extensions come into play. It allows you to create custom resource operations that you can use within your nodes provisioning. There are a few ways to create extensions: Using MOF-based resources in PowerShell Using Class-based resources in PowerShell Using Composite resources in PowerShell Using MOF-based resources in C# Using the Resource Designer Tool Today, I will…

Read more
Azure, Server administration

Automating your mundane Azure Virtual Machine Windows provisioning tasks with PowerShell DSC

I’ve been working in various projects and helping different people with their tasks when it comes to provisioning their Azure Windows Servers or Windows 10 virtual machines. One thing that I realized, is how much time is spent post provisioning for repetitive tasks that could be done through automation. I can say that I am proud of the fact that, after discussing with me, they all start embracing Infrastructure As Code (IaC) through ARM. Well most of them that is hahaha! Side note, if you are doing ARM, checkout Bicep; this will save you so much time in writing your ARM templates and there’s great linting and code completion when used in Visual Studio Code with the extension! But what…

Read more
Server administration

Adding HAProxy as load balancer to the Kubernetes cluster

As I mentioned in my Kubernetes homelab setup post, I initially setup Kemp Free load balancer as an easy quick solution.While Kemp did me good, I’ve had experience playing with HAProxy and figured it could be a good alternative to the extensive options Kemp offers. It could also be a good start if I wanted to have HAProxy as an ingress in my cluster at some point. There’s a few things here we need in order to make this work: 1 – Make HAProxy load balance on 6443 2- Make HAProxy health check our nodes on the /healthz path Configuring HAProxy Since I’m using debian 10 (buster), I will install HAProxy using apt install haproxy -y Next step is to configure HAProxy. Its…

Read more
Docker, Kubernetes, Server administration

Installing a Kubernetes cluster on VMware vSphere and what I’ve learned

The topic of containers has been a hot topic for some time now. As a developer and architect, I want to be able to include them in my development SDLC for the various reasons you guys know. I won’t go in detail about them in this article, because after all you came to see how it was done right? :-). After having some container images waiting in a registry and awaiting to be used, I asked myself, how do I manage the deployment, management, scaling, and networking of these images when they will be spanned in containers? Using an orchestrator of course! Kubernetes (k8s) has become one of the widely used orchestrator for the management of the lifecycle of containers….

Read more
Server administration

Connecting to Windows Server 2019 core through WinRM and Windows Admin Center

If you’re familiar with the Microsoft offering, Windows Server 2019 Datacenter Core does not have a UI. My goal was to be able to connect to it remotely, without having to remote desktop on it (the remote desktop is only a command line prompt). There’s plenty of articles around the internet about WinRM, but I wanted demonstrate here a quick way of getting started without researching too much. Thanks to Scott Sutherland WinRM cheatsheet and Matt Wrock post on understand and troubleshooting WinRM. For this demo I provisioned a VM on Azure, using the Windows Server 2019 Datacenter Core Image. I also installed the Windows Admin Center, which you can download from here. TL;DR Open PowerShell Enable WinRM: Enable-PsRemoting -Force Make…

Read more
Server administration

Having IIS and Tomcat running side by side on Windows

It has been an interesting week for me as I’ve been doing a lot of DevOps and migrating a lot of the internal tools that we use. One problem I faced with was to make IIS and Tomcat friends. It must be easy right? Setup IIS, setup Tomcat, bind each to a respective IP address so they can run on the regular ports (80/443). You start IIS, you start Tomcat and then you look at the logs of Tomcat and you get the famous java.net.BindException: Address already in use exception. There’s a solution. By default, IIS goes through HTTP.sys and binds to all available IP addresses. You have to tell it which addresses it can be bound to. To do that,…

Read more