How to create a single virtual server instance (VSI) in a virtual private cloud (VPC) infrastructure on IBM Cloud

This is a “simple” cheat sheet, how to create a single virtual server instance (VSI) in the virtual private cloud (VPC) infrastructure on IBM Cloud.

The blog post has four major sections:

  1. Example architecture
  2. Setup of a VPC network
  3. Setup and configure the virtual server instance inside the VPC network
  4. Access the virtual server instance from a local machine

For more information, please visit the VPC IBM Cloud documentation.

Keep in mind: The objective is not to show all awesome additional capabilities the virtual private cloud on IBM Cloud has. The objective is just to provide a simple cheat sheet to create one simple virtual server instance.

Continue reading

Use environment variables to make a containerized Vue.js frontend application more flexible and deploy it to Code Engine

This blog post addresses the topic, how to use environment variables to make a containerized Vue.js frontend application more flexible. We will touch following technologies Vue.jsNGINXJavaScriptDockerfile and Code Engine.

When you run a containerized application on a container orchestration platform like KubernetesOpen Shift or on a serverless frameworks like Knative or Code Engine or other platforms, it’s helpful to pass endpoints to other applications to the containerized application by using environment variables. When the container will be restarted, these variables can be provided to the container and no adjustment in the source code is necessary. You can use configmaps or in Code Engine simply the environment variable itself.

The example source code you find in this workshop.

In addition, it’s useful when you take a look into this awesome blog post: Externalise and Configure Frontend Environment Variables on Kubernetes which was used for the starting point for the configuration.

Continue reading

How to use environment variables to make a containerized Quarkus application more flexible

This blog post addresses the topic, how to use environment variables to make a containized Quarkus application more flexible. We will touch following technologies QuarkusOpenJ9 Java runtimeMicroProfileDockerfile definition and Code Engine.

When you run a containerized application on a container orchestration platform like KubernetesOpen Shift or with a serverless framework like Knative or Code Engine or on other platforms, it is helpful to pass endpoints to other applications to the containerized application by using environment variables. When the container will be restarted, these variables can be provided to the container and no adjustment in the source code is necessary. You can use configmaps or in Code Engine simple the environment variable itself.

We will follow along an application example for the implementation and the example source code you find in the Get started to deploy a Java Microservices application to Code Engine workshop. (or the direct link to the used file in the GitHub repository is provided in the blog post itself)

Continue reading

New hands-on workshop: Get started to deploy a Java Microservices application to Code Engine

Code Engine is build to create modern, source-centric, containerized, and serverless apps and jobs.
Take a quiz to get started with the Code Engine terminology.

The topic batch jobs is more related to AI and machine learning, and run AI model training temporarily with highly workload, and thats at the moment not so much in my scope.

My starting point with Code Engine was in my YouTube video: Code Engine, Containerized Application, Node-RED Starter Kit and Scale To Zero. With that in mind, from my perspective Code Engine is a very good starting point for smaller containerized applications, because you can precisely control costs with scale to zero. … and by the way, it’s easy of use.

That motivated me to create a simple hands-on workshop, where you are guided to deploy the Cloud Native Starter security example application to Code Engine. The source code of the example application is included to the GitHub project of the workshop.

Continue reading

Simply logout from Keycloak

This blog post is about the logout from Keycloak in a Vue.js application using the keycloak-js SDK/javascript-adapter.

As you maybe know we (Niklas, Harald and I) created an example project called Cloud Native Starter that contains example implementations related to Cloud Native applications with Microservices. I will use one of the example implementations in that blog post.

I structured the blog post in following sections.

  • The simplified solution
  • The basics
  • The example implementation in a Vue.js fronted application
Continue reading

How to debug the Javascript code of a Vue.js application using Visual Studio Code

This blog post is a short cheat sheet, how to setup Vue.js debugging in Visual Studio Code, when you run the application in a Chrome Browser. I used the example source code of the Cloud Native Starter project.

If you debug a Vue.js application, you usually need two kinds of debugging.

First debug and inspect the frontend page itself: such as HtmlCss and so on.

Second debug the logic of the Javascript code for the application.

Continue reading

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.

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