Auto-generating news and publishing it to WordPress with Apache Camel

With the release of Apache Camel 2.21, some new components were added to the project and Camel WordPress was one of them. Camel is one of the upstream community projects for Red Hat Fuse. In this article, we will see how to use this new component to publish an auto-generated news post based on a soccer statistics API. The example consumes the statistics API, generates the text based on a Natural Language Generation (NLG) library and then publishes it to the WordPress blog.

WordPress is one of the most used open source tools for creating websites. More than 30% of the web is built on top of WordPress. Besides creating websites, blogs, and apps, WordPress leverages a huge plugin repository maintained by a passionate community. There are even plugins that can turn a WordPress website into an e-commerce platform.

Since version 4.7, WordPress exposes a REST API capable of interacting with its resources, for example, users, categories, pages, posts, and custom types. Now it’s possible for third parties to integrate with the WordPress platform and perform almost anything with their resources.

Some companies implement internal websites, blogs, and project sites using WordPress. Integrating such platforms with another company’s components—such as CRM, ERP, LDAP, and Calendar Services—would add extra value to WordPress-based projects. Camel WordPress can help integrate those components easily. To get started using this new component, nothing is better than a demo.

Continue reading “Auto-generating news and publishing it to WordPress with Apache Camel”

Share

Eclipse MicroProfile and Red Hat Update: Thorntail and SmallRye

During the last three months, there have been some changes regarding Eclipse MicroProfile at Red Hat. If you haven’t been following the details, this post recaps what’s changed and introduces Thorntail and SmallRye.

Bye-bye WildFly Swarm! Hello Thorntail!

You may have missed this important news. Our MicroProfile implementation changed its name two months ago.

After a lot of feedback from the community, we decided to rename “WildFly Swarm” to Thorntail. While the former name was nice, we found that the “Swarm” term was a bit overloaded in the IT industry and could be confusing. It’s the same for the “WildFly” part; sharing this name with our Java EE application server was a source of confusion for some users, making them think it was a subproject of WildFly.

Continue reading “Eclipse MicroProfile and Red Hat Update: Thorntail and SmallRye”

Share

Reducing data inconsistencies with Red Hat Process Automation Manager

Managing data reconciliation through a specific process is a common necessity for projects that require Digital Process Automation (formerly known as Business Process Management), and Red Hat Process Automation Manager helps to address such a requirement. This article provides good practices and a technique for satisfying data reconciliation in a structured and clean way.

Red Hat Process Automation Manager was formerly known as Red Hat JBoss BPM Suite, so it’s worth mentioning that jBPM is the upstream project that fuels Process Automation Manager. The blog post From BPM and business automation to digital automation platforms explains the reasons behind the new name and shares exciting news for this major release.

Continue reading “Reducing data inconsistencies with Red Hat Process Automation Manager”

Share

How to integrate A-MQ 6.3 on Red Hat JBoss EAP 7

This article describes in detail how to integrate Red Hat A-MQ 6.3 on Red Hat JBoss Enterprise Application Platform (EAP) 7 and covers in detail the admin-object configuration, especially the pool-name configuration. The attribute pool-name for the admin-object explanation can lead to confusion. In this post, I will try to clarify many of the steps, give an overview of the components, and how they fit together.

The JBoss EAP requires the configuration of a resource adapter as a central component for integration with the A-MQ 6.3. In addition, the MDBs configuration on the EAP is required to enable the JMS consumers. On the A-MQ 6.3, the configuration of the Transport Connectors is required to open the communication channel with the EAP.

All the steps required to configure EAP 7 to use A-MQ 6.3 as an external JMS broker are described here:

Continue reading “How to integrate A-MQ 6.3 on Red Hat JBoss EAP 7”

Share

How to enable sudo on RHEL

You’ve probably seen tutorials that use sudo for running administrative commands as root. However when you try it, you get told your user ID is “not in the sudoers file, this incident will be reported.”  For developers, sudo can be very useful for running steps that require root access in build scripts.

This article covers:

  • How to configure sudo access on Red Hat Enterprise Linux (RHEL) so you won’t need to use su and keep entering the root password
  • Configuring sudo to not ask for your password
  • How to enable sudo during system installation
  • Why sudo seems to work out of the box for some users and not others

Continue reading “How to enable sudo on RHEL”

Share

Improving rsync performance with GlusterFS

Rsync is a particularly tough workload for GlusterFS because with its defaults, it exercises some of the worst case operations for GlusterFS. GlusterFS is the core of Red Hat Gluster’s scale-out storage solution. Gluster is an open, software-defined storage (SDS) platform that is designed to scale out to handle data intensive tasks across many servers in physical, virtual, or cloud deployments. Since GlusterFS is a POSIX compatible distributed file system, getting the best performance from rsync requires some tuning/tweaking on both sides.

In this post, I will go through some of the pain points and the different tunables for working around the pain points.  Getting rsync to run as fast on GlusterFS as it would on a local file system is not really feasible given its architecture, but below I describe how to get as close as possible.

Continue reading “Improving rsync performance with GlusterFS”

Share

How to install Python 3 on Red Hat Enterprise Linux

This article shows how to install Python 3, pip, venv, virtualenv, and pipenv on Red Hat Enterprise Linux 7. After following the steps in this article, you should be in a good position to follow many Python guides and tutorials using RHEL.

Using Python virtual environments is a best practice to isolate project-specific dependencies and create reproducible environments. Other tips and FAQs for working with Python and software collections on RHEL 7 are also covered.

There are a number of different ways to get Python 3 installed on RHEL. This article uses Red Hat Software Collections because these give you a current Python installation that is built and supported by Red Hat. During development, support might not seem that important to you. However, support is important to those who have to deploy and operate the applications you write. To understand why this is important, consider what happens when your application is in production and a critical security vulnerability in a core library (for example SSL/TLS) is discovered. This type of scenario is why many enterprises use Red Hat.

Python 3.6 is used in this article. It was the most recent, stable release when this was written. However, you should be able to use these instructions for any of the versions of Python in Red Hat Software Collections including 2.7, 3.4, 3.5, and future collections such as 3.7.

Continue reading “How to install Python 3 on Red Hat Enterprise Linux”

Share

Firewalld: The Future is nftables

Firewalld, the default firewall management tool in Red Hat Enterprise Linux and Fedora, has gained long sought support for nftables. This was announced in detail on firewalld’s project blog. The feature landed in the firewalld 0.6.0 release as the new default firewall backend.

The benefits of nftables have been outlined on the Red Hat Developer Blog:

There are many longstanding issues with firewalld that we can address with nftables that were not possible with the old iptables backend. The nftables backend allows the following improvements:

Continue reading “Firewalld: The Future is nftables”

Share
Red Hat OpenShift

Autoscaling the Red Hat Cache Service on OpenShift

Earlier this year, Red Hat announced the Red Hat Cache Service which is a distributed in-memory caching service that runs on Red Hat OpenShift.  Red Hat Data Grid is used as the core of the cache service. The cache service is one of the things you can easily install on OpenShift through the OpenShift Service Catalog. You can find the cache service in the Red Hat OpenShift Online Pro tier.  (Alternatively, you can install the Cache Service on your own Red Hat OpenShift Container Platform installation by following the installation manual.)

The Cache Service automatically calculates the amount of user storage based on the container size it’s scheduled on. Typically, it’s 512MB. What’s more interesting is that the Cache Service can operate near the full memory capacity (~97–98 %).

The automatic memory adjustment gives you a nice opportunity to try out the new Horizontal Pod Autoscaler (which now supports memory and custom metrics-based autoscaling). The autoscaler monitors the amount of memory used by the container and adds or removes Cache Service pods based on this measurement.

Continue reading “Autoscaling the Red Hat Cache Service on OpenShift”

Share

Setting up RBAC on Red Hat AMQ Broker

One thing that is common in the enterprise world, especially in highly regulated industries, is to have separation of duties. Role-based access controls (RBAC) have built-in support for separation of duties. Roles determine what operations a user can and cannot perform. This post provides an example of how to configure proper RBAC on top of Red Hat AMQ, a flexible, high-performance messaging platform based on the open source Apache ActiveMQ Artemis project.

In most of the cases, separation of duties on Red Hat AMQ can be divided into three primary roles:

  1. Administrator role, which will have all permissions
  2. Application role, which will have permission to publish, consume, or produce messages to a specific address, subscribe to topics or queues, or create and delete addresses.
  3. Operation role, which will have read-only permission via the web console or supported protocols

To implement those roles, Red Hat AMQ has several security features that need be configured, as described in the following sections.

Continue reading “Setting up RBAC on Red Hat AMQ Broker”

Share