Run a Docker image as a Cloud Foundry App on IBM Cloud

In that blog post I want to point out an awesome topic: “Run a Docker container image as a Cloud Foundry App on IBM Cloud”

Rainer Hochecker, Simon Moser and I had an interesting exchange about running a Docker image as a Cloud Foundry App on IBM Cloud.

The advantage with that approach is: you don’t need to instantiate a Kubernetes or OpenShift cluster. You can just run a single Docker image with your single application on IBM Cloud. That can be useful in different situations where you need to control the contents of your application, and the cloud foundry build-pack mechanism maybe restricts you.

IBM offers to run Cloud Foundry Apps on IBM Cloud and supports a set of build packsBut, by the fact IBM uses Cloud Foundry, you can also upload a Docker image as a Cloud Foundry application, it’s an officially supported feature. Yes there is no documentation related to that topic in the IBM Cloud documentation, but you can apply the Cloud Foundry documentation.

One impact of that situation is, you don’t see the VCAP variables and you can’t use the out of the box binding for IBM Cloud services. You have to manage the bindings to your IBM Cloud services by yourself.  

Let’s start with a short guide: How to setup a Cloud Foundry application using a Docker image.

Continue reading

A Node-RED Twitter-follower-flow

In my last blog post I did an introduction to “how use the starter kit for Node-RED on IBM Cloud” and in this new blog post I want to highlight the Node-RED Twitter-follower-flow I developed as an introduction to different topics I frequently face at hackathons. Here is the link to the “Twitter-follower-flow” GitHub project. Node-RED is very good for prototyping, that is the reason why it is often used in hackathons. If you are new to Node-RED and you start  to develop a Node-RED flow, you normally have following challenges:

  • How to …
    1. … define own REST endpoints to encapsulate an external API?
    2. … automate the authentication to that external API?
    3. … extract data from the external API?
    4. … customize data and CRUD with databases?

The Node-RED flow of that project has the objective to provide an (little advanced) introduction to the first three topics above. The CRUD (Create, Read, Update, Delete) topic is not covered here. Visit that CRUD example for more information.

  • The “Twitter-follower-flow” example …
    • … uses open technologies (Node-RED is a Project of the OpenJS foundation )
    • … creates no additional costs
    • … has following technical level:
      • Beginner to intermediate
      • Needs a basic knowledge of JavaScript and REST
    • … takes 30 – 45 min to setup the example from scratch
      1. Register on IBM Cloud
      2. Create a Node-RED instance on IBM Cloud
      3. Register at Twitter for a developer API Account
      4. Copy the existing Node-RED flow
      5. Configure the flow
      6. Run the flow

The YouTube video below gives you a 13 min more detailed introduction to the Twitter-follower-flow.

Continue reading

A short introduction of the Node-RED Starter kit on IBM Cloud for Hackathons

In that blog post I want to highlight the new way of the instantiation of a Node-RED application on  IBM Cloud with the Node-RED Starter kit. From my perspective Node-RED is a very helpful tool at hackathons. (just take a look in my blog post  How to prepare for a Hackathon with IBM Cloud?)

The Node-RED instantiation has changed and with the Node-RED Starter kit we can take the advantage of the capabilities of IBM Cloud to control the build, deployment and execution of the Node-RED application and we setup automatically all  development tools to work effectively in a small development team in our hackathon.

I want to provide a short walkthrough from my perspective and created a 13 min YouTube video in addition to that blog post.

Continue reading

Cors and Node-RED using a simple forwarding server

When you use Node-RED on IBM Cloud during hackathons you will notice REST calls in flows cannot be directly invoked from a web application. The reason for this is mostly that cors (cross-origin resource sharing) is not enabled for the Node-RED server. This blog post is a simple workaround for this problem.

By the way, you can use the IBM Cloud for free, if you simply create an IBM Lite account. Here you only need an e-mail address.

I developed this workaround to have full control and be very flexible during a hackathon, when using Node-RED for prototyping and building integrations to services and web-applications, without changing Node-RED settings or using cors browser enabler.

Continue reading