Thursday, October 26, 2017

Cloud Foundry Logging Sources Deciphered

Ever deployed a cloud foundry app and ran into errors? I did and still do. My typical reaction is to request the recent app logs and to analyse them for the root cause. The logs contain those strange (if you don't know them) codes, e.g., RTR, STG, APP, PROC, WEB or more. Here is how to decipher them and use them to your advantage.
Happy Cloud Debugging

The codes above denote the Cloud Foundry component emitting the log entry. You can find a list of those component identifiers in the Cloud Foundry documentation or in the IBM Cloud (Bluemix) documentation on Log Sources. There are many component names. I found that remembering the following helps a lot:
  • RTR: This is the router which channels HTTP requests to an app. Here you find information about the request itself including client information.
  • STG: The staging phase has details about the deployment and restaging of an app. They help with initial errors.
  • APP: If your app writes information to stderr or stdout, then you will find it here. For some apps this could be the well-known "printf debugging".
The log entries have either an OUT if the information is from stdout or ERR if from stderr. Else there is not much to remember. Happy Debugging. If you have feedback, suggestions, or questions about this post, please reach out to me on Twitter (@data_henrik) or LinkedIn.

Wednesday, October 25, 2017

Use Db2 as Cloud SQL Database with Python

Load Data into IBM Db2 on Cloud
Over the Summer I learned that Python is top in the IEEE programming languages ranking. It is also my favorite language for quickly coding tools, web apps and analyzing data with notebooks (e.g., on IBM Data Science Experience). Did you know that IBM provides four (4) different Db2 drivers for Python? There is a driver with the native Db2 API, one that supports the official Python DBI (database interface), one for the popular SQLAlchemy Python SQL Toolkit, and for the Python-based Django Web Framework. In an older blog I showed you how to use SQLAlchemy with Db2. Today, I am going to demonstrate you how simple it is to create a SQL database-backed web app in the IBM Cloud, utilizing the native Db2 API.

Friday, October 13, 2017

Security-Related News for the IBM Bluemix Cloud Platform


Security News
I have been traveling, spoken at a conference about database and cloud security and busy with behind-the-scenes work. Before going into the weekend I wanted to point you to some exciting news around services on the IBM Bluemix Cloud Platform. Are you ready for it? Here we go...

That's it for now, enjoy the weekend!

If you have feedback, suggestions, or questions about this post, please reach out to me on Twitter (@data_henrik) or LinkedIn.