Sunimal Herath

Automation, Scalability, and Reliability – DevOps Unleashed.

  • Web Application Deployment Then and Now

    Around 2005, I went with two colleagues and our team leader to present (or maybe deploy, I can’t remember exactly) the in-house web application we had built for the client. It was built using ASP.Net WebForms and connects with a MS SQL Server instance. I remember installing IIS, transferring the application successfully, but it didn’t work as expected because something was missing (I don’t remember what exactly, since it’s been nearly 20 years) and I remember calling another colleague who’s already in the office to bring another CD (not the application) to fix the issue. The environment we built the application in wasn’t the same as the one we deployed it to, so we ran into all sorts of unexpected errors we had to fix on-site.

    This is where container technology really comes in handy. Now we can deploy web

    applications in containers that package everything they need such as code-base, runtime, libraries, etc. into a single unit (a container image). All you need is a container engine, and it can run anywhere and guaranteed to behave the same as it did on the developed machine.

    Even though container technology eases the headache of deployment, it’s still not enough for modern micro-service architecture. Each micro-service, running in its own container, needs to be managed, preventing outages, spinning up new instances when demand spikes, and so on. That’s where Kubernetes comes in. With Kubernetes, we can now automate, manage, and scale containerized applications up or down as needed.

  • Installing Docker Engine on Ubuntu (WSL2)

    I’m running Ubuntu on WSL2 and was looking to install docker in it. I found this article, “Docker Desktop WSL 2 backend on Windows“, but it is for installing docker on Windows and use WSL2 as the back end.

    What I wanted is to install Docker on Ubuntu running on WSL2. So, I followed the article “Install Docker Engine on Ubuntu” and it worked.

    The default user in Ubuntu (WSL2) does not have the permission to run any docker commands, so, it’s better to add user to the “docker” group like below, otherwise, you need to execute every Docker commands with sudo.

    usermod -aG1 docker2 <username>

    newgrp3 <username>

    1. -a for append, -G for groups. ↩︎
    2. docker – name of the group. ↩︎
    3. This changes the user’s group to the group specified in the -G. ↩︎