Configure the attach debug for Quarkus in Visual Studio Code

This blog post is a short cheat sheet for:

  • How to simply organize workspaces and the debugging configuration separated from source code saved in GitHub.
  • How to simply configure attach debug for Quarkus in Visual Studio Code

The advantage with that organization is:

You can easily delete the source code saved in GitHub from your local machine, but you don’t lose the debugging or other configurations you did.

In case that you will work again on the source code of the deleted GitHub project, you don’t need to setup these configurations again, because you can just add/link cloned GitHub source code project once more to your Visual Studio Code workspace project, which is still on your local machine.

Continue reading

How to setup a self-signed SSL certificate for a Cloud Foundry application on IBM Cloud

This blog post is about, how to setup a self-signed SSL certificate for an encrypted (https) communication with a Cloud Foundry application on IBM Cloud, if you are at a Hackathon. Keep in mind you don’t need to implement additional code inside of your Cloud Foundry application in this scenario. All is managed by IBM Cloud and you don’t need to modify your source-code. You need to have installed OpenSSL on your local machine and this example shows the setup on MacOS and Safari. You also need a Pay-As-You-Go or Trial-Account for the IBM Cloud to setup custom domain and ssl.

Motivation

In my example situation I want to access my Node-RED instance with a custom domain and a self-signed SSL certificate.

Normally you would create a certificate signing request to get public key certificate to encrypt the communication with https provided by a certificate authority for example “Let’s encrypt”, as you see simplified in the image below.

A certificate from a certificate authority can be costly, if you aren’t able to use a free certificate authority like for example “Let’s encrypt” supported by your domain provider. In my case the domain provider GoDaddy doesn’t support to request certificates directly from “Let’s encrypt”.

One easy solution to avoid additional costs is to create a self-signed certificate. This solution works well, if you only want to test and develop during a Hackathon and you have a very small count of users and you can give them the guidance to use the self-signed SSL certificate in their browser.
As you can see you need to upload self-signed SSL certificate in this simplified picture.

Overview of the needed steps

Here is an overview of the major needed steps:

  1. Create a custom domain and map it with the CNAME (this will result in the fully qualified domain name)
  2. Register the created custom domain in your Cloud Foundry org and region
  3. Create a route with your custom domain for your Cloud Foundry app
  4. Create a self-signed SSL certificate for custom domain
  5. Upload the self-signed certificate to IBM Cloud
  6. Invoke URL in a browser on a machine
  7. Copy the self-signed certificate from your browser to your computer
  8. Import the self-signed SSL certificate to the keychain of your operating-system on your local machine
  9. Restart the browser and see now your communication is encrypted
Continue reading

How to setup a custom Domain for a Node-RED instance on IBM Cloud

This blog post is a short cheat sheet, how easy it is to configure/setup a custom domain for a Node-RED example instance on IBM Cloud for a Cloud Foundry App. To do this you need a Pay-As-You-Go or Trial-Account for the IBM Cloud.

The image below shows my Node-RED Node.js instance in IBM Cloud and the invocation in a browser.

Cloud Foundry App InstanceNode-RED invocation in a browser
Continue reading

Cheat sheet to get started with the implementation of unit tests for REST endpoints in Node.js

This blog post is a cheat sheet to get started with the initial technical implementation of unit tests for REST endpoints implemented in Node.js and is structured in following sections:

  • Short overview
  • Installation of Mocha and Supertest
  • Unit test implementation perperation on the Node.js server
  • Unit test implementation itself
  • Execute the unit test
  • Summary
Continue reading

How to configure the IBM Cloud Operator for an existing Cloudant service?

Kubernetes Operators are an awesome way to simplify work for developers to setup and maintain complex applications in Kubernetes or Red Hat OpenShift.

The IBM Cloud Operator provides you the ability to bind IBM Cloud services to your applications running in Kubernetes or RedHat OpenShift and create, update, and delete IBM Cloud services from within the cluster by calling Kubernetes APIs, instead of needing to use several IBM Cloud APIs in addition to configuring your app for Kubernetes.

That example shows how to bind an existing Cloudant service instance in IBM Cloud to an application running in Red Hat OpenShift. The content of the example is related to the usage of the Red Hat OpenShift with IBM Cloud Open Labs. In these labs you can use a preconfigured OpenShift environment for four hours at no charge to run workshops by your own. By the way, here you can find the related source code for the examples.

Continue reading

Write your first simple Kubernetes Operator

Ask your human Operator to do all the complicated ugly work for you!

… or write your own Operator, if you are the expert and you know how the complicated ugly work, works in detail. This is how you can make sure it works in the future 😉

For those of you who don’t know Kubernetes Operators in combination with Ansible, let me just give you a very simplified description from my point of view:

Even a student with minimal knowledge of Kubernetes should be able to install a highly complex container-based application on top of Kubernetes or OpenShift. Eliminate the manual interaction effort as much as possible to deploy, run, and maintain your containerized application on Kubernetes or OpenShift with your Operator implementation.


During my search on the internet, how to build an own custom Kubernetes Operator, I came along to that awesome YouTube video with a talk from Keith Tenzer, he gave in 2020 on the Open Infrastructure Foundation Summit called “Building Kubernetes Operators with the Operator Framework and Ansible”.

Continue reading

Install VirtualBox and setup a virtual machine with Ubuntu on MacOS

This blog post does contain a very short cheat sheet for me and maybe it is also useful for you: How to install VirtualBox and setup a virtual machine with Ubuntu on a Mac OS host system, by using various documentation resources from the internet.

Step 1: Download and install the latest VirtualBox on your Mac (pay attention to the Oracle Licensing, when you start using VirtualBox).

Step 2: Be aware of the system security preferences settings. You can follow the instructions from this awesome very short blog post, written by Xilin Sun. That will help you to avoid following Error:

Solving VirtualBox “kernel driver not installed (rc=-1908)” Error on macOS

Step 3: Download an iso image file from the Ubuntu webpage for your installation.

Step 4: Follow these instructions which are written by the About the Biometric Research Program. The instructions are for a Windows operating system, but I would say, you can easily map the content to a Mac0S installation.

And by the way also useful to know is:


Maybe this was useful for you and let’s see what’s next?

Greetings,

Thomas

#VirtualBox, #Ubuntu

Absolute beginner Node-RED flow

The motivation for that blog post is: When I support Hackathons I notice there’s often a lack of programming knowledge and building UIs, but they have awesome ideas. If this is the case, then Node-RED is a perfect starting point to realize a prototype at a hackathon. The dashboard of Node-RED is a awesome way to build a UI, but there was a “out of the box” Node missing to simply add a table. Now I found a very useful Node that’s create a table inside a Node-RED dashboard.

That’s motivated me to create an example GitHub project, which provides an example to build a simple application from scratch.

The gif shows the simple functionality of the flow.

  • Enter a new user
  • Search for lastname
  • Inspect result
Continue reading