Technical Cheat Sheets for Developers

Over the past few months, we’ve been building and releasing a variety of technical cheat sheets and we’ve been getting many requests for more.  We are working on new cheat sheets every day, ok maybe not weekends, but almost every day. Here are the cheat sheets available today: Linux Commands Cheat SheetAdvanced Linux Commands Cheat SheetWildfly Swarm Cheat SheetContainers Cheat SheetMongoDB Cheat SheetKubernetes Cheat Sheet and the Eclipse Vert.x Cheat Sheet.

Continue reading “Technical Cheat Sheets for Developers”


Join the Red Hat Developer Program (it’s free) and get access to related cheat sheets, books, and product downloads.

 

Take advantage of your Red Hat Developers membership and download RHEL today at no cost.

Share

Manage your Mongo Databases in RHMAP with Mongo Express

Red Hat Mobile Application Platform (RHMAP) supports an agile approach to developing, integrating, and deploying enterprise mobile applications. Most likely, your mobile apps will include one or more cloud apps which will require persistence support such as a Mongo Database. But managing databases is not always easy, as command line support for this databases is complex and not always available.

To ease this pain, Mongo Express can be used as an database GUI. For the mongo databases in your cloud apps, it is a powerful and intuitive tool which can be used in conjunction or as substitute for the default database browser. The main benefits from using “Mongo Express” instead of “Data Browser” are:

  • Can run complex queries
  • In-depth stats for every view
  • Supports BSON types as TimeStamp() or DBRef()

IMPORTANT: there are some implications when using Mongo Express as a database manager:

  • Mongo Express can only manage the databases in one Cloud App and environment at a time
  • There is no authentication by default when using Mongo Express as explained in this article so take into account all the security issues that this may arise [1]
  • Users running the platform on the RHMAP should upgrade their databases if it was not upgraded before

[1] Check the Annex ‘how to add authentication’ to overcome this issue

Continue reading “Manage your Mongo Databases in RHMAP with Mongo Express”


Join the Red Hat Developer Program (it’s free) and get access to related cheat sheets, books, and product downloads.

 

Share

A Lesson in Debugging: Big Projects Have Critical Bugs Too

I recently had an interesting problem which served as a great learning experience. It involves hair-pulling levels of frustration, vicious finger-pointing, and an unexpected ending — not a TV Soap opera episode, just a day in the life of a developer.

It all started with a REST API I had built for a customer proof of concept that started refusing requests after an arbitrary period of time. Nothing was unusual in the codebase of the REST API — it was two simple CRUDL endpoints on equally simple objects.
I’d built similar many times before, and probably will many times again – but yet still, this process kept hanging, refusing requests. The time it took to fail was arbitrary — sometimes immediate, sometimes hours, sometimes days.

Eventually, through some SSH foo we discovered that the count of open file descriptors was growing inside the app’s container. I wrote a simple endpoint to query the number of open file descriptors, and it looked like this:

app.get('/fd', function(req, res){
  var fs = require('fs');

  fs.readdir('/proc/self/fd', function(err, list) {
    if (err) {
      return res.status(500).json(err);
    }
    return res.end(list.length.toString());
  });
});

Indeed, after restarting the process, it was clear that the file descriptor count would grow every few minutes, without stopping. An empty Node.js application didn’t exhibit the same problems, only this app.

Continue reading “A Lesson in Debugging: Big Projects Have Critical Bugs Too”


Join the Red Hat Developer Program (it’s free) and get access to related cheat sheets, books, and product downloads.

 

Share

Installing MongoDB on Red Hat Enterprise Linux

 

MongoDB has evolved into one of the most popular open source “NoSQL” databases—so-called because they dispense with the tabular storage schema of relational databases like MySQL and Postgres. NoSQL databases offer a variety of advantages in many cases

The biggest advantage is that MongoDB databases don’t require developers to define schemas before adding data to a database. Instead, they use a flexible document-based model, similar to Python dictionaries or Ruby hashes. With MongoDB, you don’t need to spend time creating tables before you can process your data. That makes the NoSQL approach ideal for situations where you don’t know how much data you have to handle, what form it is in, or how quickly it is going to move around.

There’s a lot more to say about what makes MongoDB, and NoSQL in general, a better fit for some situations. (I could also write a great deal about when not to use NoSQL—and that’s  important, because despite NoSQL’s current trendiness, it’s not better in all contexts.)

But that’s all fodder for a separate blog post. For now, let’s move onto the meat of this post, which is how to install MongoDB on Red Hat Enterprise Linux (RHEL) in order to take advantage of NoSQL databases.

Continue reading “Installing MongoDB on Red Hat Enterprise Linux”


Join the Red Hat Developer Program (it’s free) and get access to related cheat sheets, books, and product downloads.

 

Take advantage of your Red Hat Developers membership and download RHEL today at no cost.

Share

Database Docker images – now beta via Software Collections

“As a part of the Red Hat Software Collections offering, Red Hat provides a number of container images, which are based on the corresponding Software Collections. These include application, daemon, and database images. The provided images, currently available in the Beta version” (for more information see https://access.redhat.com/articles/1752723)

Red Hat Software Collections allows you to run newer versions of software on a stable Red Hat Enterprise Linux. These new images combine this feature with the benefits of containers.

In this post I would like to show you how to run database server from RHSCL in one command.

Continue reading “Database Docker images – now beta via Software Collections”


Join the Red Hat Developer Program (it’s free) and get access to related cheat sheets, books, and product downloads.

 

Share

Red Hat Software Collections 2.0 Docker images, Beta release

I’m very happy to announce that Docker images based on collections from Red Hat Software Collections (RHSCL) 2.0 are in beta testing.  The images are available from the Red Hat Container Registry, and we’ve got the set of collections for language, databases and web servers covered – a complete list is below.

If you’ve not tried out the Docker package from RHEL7 Extras, you need to enable the Extras channel, install the docker page, and start the docker service; an extended guide for RHEL Docker is available here.  Once you are set up, pulling the RHSCL Docker images is very simple… for example, you can fetch the Python 3.4 image as follows:

Continue reading “Red Hat Software Collections 2.0 Docker images, Beta release”


Join the Red Hat Developer Program (it’s free) and get access to related cheat sheets, books, and product downloads.

 

Take advantage of your Red Hat Developers membership and download RHEL today at no cost.

Share

Red Hat Software Collections 2 – now generally available

Excellent news – Red Hat has announced the general availability of Red Hat Software Collections 2.softwarecollections-logo-colorful

You’ll see considerable additions to support multiple language versions. For example, it includes updates to “Python 2.7, continues to support Python 3.3 and also adds Python 3.4 – providing a fully-supported language library and blending developer agility with production stability.”

Continue reading “Red Hat Software Collections 2 – now generally available”

Share