Build resource similar to AWS Provided Resource in Cloudformation

Why do we need AWS resource type

AWS Introduced custom resource type that allowed us to create third party resources in the cloudformation.

Although it served us well, the management of the custom resources were difficult — lambda code is either written in-line or shared from s3 bucket. The resources could not be shared across template and did not allow creation and modification of resource properties.

It is also a black box for Cloudformation Engine since it has no visibility into the inputs and outputs of the resource. …


Launch GUI App from WSL

Overview

I wanted to run an login app (aws-azure-login) from WSL which display GUI, but it could not run showing the following error — Unable to Open X-Display

Since WSL distro does not come with GUI, we need to install a X-Server on our Windows Host and Connect to it from WSL.

Install and configure

Follow the steps below to install and configure X-Server.

  1. Download and Install VcXsrv Windows X Server which is available from https://sourceforge.net/projects/vcxsrv/
  2. Configure according to screenshots below:


Manually install wsl2 when locked in Microsoft Store

Introduction

Microsoft offers running Linux in Windows using technology was WSL (Windows Subsystem for Linux). The new version of wsl which is called wsl2 allow to run a Microsoft customized Linux Kernel with distro of your choice. In this article, I will use Ubuntu distro.

To update to WSL 2, you must be running Windows 10.

  • For x64 systems: Version 1903 or higher, with Build 18362 or higher.
  • For ARM64 systems: Version 2004 or higher, with Build 19041 or higher.
  • Builds lower than 18362 do not support WSL 2.

To check your version…


How to automatically change to default shell

Visual Studio Code a.k.a VSCode, allows local and remote development. I am a Windows 10 user but I love developing in Linux using WSL.

When I changed to use WSL for my remote development, it was not switching shell automatically to bash.

After digging more, I have found %userprofile%/AppData/Roming/Code/User/settings.josn file which I modified like below. So when I connect to WSL/SSH Remote, bash is set automatically as default shell and powershell in Windows.

{
"remote.SSH.remotePlatform":
{
"ubntu": "linux"
},
"editor.tabSize": 2,
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"remote.WSL.fileWatcher.polling": true,
"terminal.external.windowsExec": "C:\\Windows\\sysnative\\wsl.exe",
"terminal.integrated.shell.linux": "bash",
"terminal.integrated.shell.windows": "powershell.exe"
}

Hopefully the above will help you too.


A Getting Started Guide

Overview

Cluster API is beautiful Kubernetes project which allows provisioning, upgrading, and operating multiple Kubernetes clusters using declarative APIs.

Kind is another beautiful project to build Kubernetes cluster on docker.

Both of the above projects are blessings for someone like me who wants to build cluster dynamically for development purpose. But the journey was not smooth when I stared using using using cluster-api version 3.8. Lot of hacks need to be made to make it working.

Although cluster api new version (at the time of writing it was v0.3.14) improves it a lot, the quick-start guide provided…


Plan, Design and Migrate from your existing Organization

Overview

With introduction of AWS Control Tower to provision and manage multi- account AWS Environment, AWS has made it simpler to crate new AWS account and thus eliminating the need to manage AWS provided complex landing zone or any home grown solution.

AWS Control Tower combines and integrates the capabilities of several other AWS Services, including AWS Organizations, AWS Single Sign-on, and AWS Service Catalog.

AWS Control Tower has the following features:

  • Landing zone — A landing zone is a well-architected, multi-account AWS environment that’s based on security and compliance best practices. …


Kubernetes version 1.16 and higher are removing deprecated API

Overview

As the Kubernetes API evolves, APIs are periodically reorganized or upgraded. When APIs evolve, the old API is deprecated and eventually removed.

To have deal with that situation, we need to have continuous plan to detect and fix the issue. In this article, I would go over how to detect it and fix the API in the deployment/release before upgrading the Kubernetes Version.

When deprecated you will find error below when you install the application e.g. helm install — name my-nginx stable/nginx-ingress — version 0.9.0

Error: validation failed: unable to recognize…


Provide granular IAM permission to AWS Services

Overview

With introduction of IAM permissions to Kubernetes service accounts in EKS, AWS provides fine-grained, pod level access control when running clusters with multiple co-located services.

Previously, when running a Kubernetes cluster on AWS, you could only associate IAM roles to an EC2 node in the cluster, and every pod that ran on the node inherited the same IAM role. This made it hard to run pods with different access control requirements on the same set of nodes.

The IAM roles for service accounts feature is available on new Amazon EKS Kubernetes version 1.14…


Build an EchoBot and integrate with Microsoft Teams

Overview

Microsoft Bot Framework makes it easy to build and integrate your ChatBot.

In this article I will build the Web App using Bot Framework SDK for JavaScript, host it on my laptop and use ngrok to allow access from Internet. Then register it in Azure using Bot Channels Registration and test it using Web Chat from Azure. Finally crate and deploy an App for Microsoft Team to use the Bot. The solution will look like the following -

The steps are as below -

  1. Setup tunneling using ngrok
  2. Register your web app…

Cordon and Drain the Nodes before it gets terminated by ASG in AWS

Overview

When you do patching and/or updating Nodes in Kubernetes, it is required to stop scheduling to that node and drain the pods running on that node.

To drain a node e.g. worker (stop schedule to that node and evict pods from that node), Kubernetes provides the following commands -

Drain a single worker node:

kubectl drain node_name --ignore-daemonsets

Note: Replace node_name with your value.

To undo the isolation, run the following commands:

kubectl uncordon node_name

Note: Replace node_name with your value.

This works well for static set…

Ripon Banik

Everything is Code

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store