Chapter 4. Specifics of Individual Software Collections

This chapter is focused on the specifics of certain Software Collections and provides additional details concerning these components.

4.1. Red Hat Developer Toolset

Red Hat Developer Toolset is designed for developers working on the Red Hat Enterprise Linux platform. Red Hat Developer Toolset provides current versions of the GNU Compiler Collection, GNU Debugger, Eclipse development platform, and other development, debugging, and performance monitoring tools. Similarly to other Software Collections, an additional set of tools is installed into the /opt/ directory. These tools are enabled by the user on demand using the supplied scl utility. Similarly to other Software Collections, these do not replace the Red Hat Enterprise Linux system versions of these tools, nor will they be used in preference to those system versions unless explicitly invoked using the scl utility.
For an overview of features, refer to the Main Features section of the Red Hat Developer Toolset Release Notes.
For a complete list of components, see the Red Hat Developer Toolset Components table in the Red Hat Developer Toolset User Guide.
Note that since Red Hat Developer Toolset 3.1, Red Hat Developer Toolset requires the rh-java-common Software Collection.

4.2. Thermostat 1

The Thermostat Software Collection provides a monitoring and instrumentation tool for the OpenJDK HotSpot JVM, with support for monitoring multiple JVM instances. The system is made up of two components: an Agent, which collects data, and a Client, which allows users to visualize collected data. These components communicate via a storage layer: either directly via MongoDB or indirectly via a Web layer for increased security. A pluggable agent and GUI framework allows for collection and visualization of performance data beyond what is included out of the box.
To install the thermostat1 collection, type the following command as root:
yum install thermostat1
Note that since Red Hat Software Collections 2.0, the thermostat1 Software Collection requires the rh-java-common Collection.
To enable the thermostat1 collection, type the following command at a shell prompt:
scl enable thermostat1 bash
For more information, please refer to the Thermostat User Guide. In order to deploy Thermostat securely, see the Configuration and Administration Guide.

4.3. Ruby on Rails 4.1

This Software Collection adds the rh-ruby22 package together with the rh-ror41 package. The Ruby on Rails Collection can be enabled by the following command, which will automatically enable rh-ruby22:
scl enable rh-ror41 bash
These two collections are supported together.

4.4. MongoDB 2.6

To install the rh-mongodb26 collection, type the following command as root:
yum install rh-mongodb26
Note that since Red Hat Software Collections 2.0, the rh-mongodb26 Software Collection requires the rh-java-common Collection.
To run the MongoDB shell utility, type the following command:
scl enable rh-mongodb26 'mongo'

4.4.1. MongoDB 2.6 on Red Hat Enterprise Linux 6

If you are using Red Hat Enterprise Linux 6, the following instructions apply to your system.
To start the MongoDB daemon, type the following command as root:
service rh-mongodb26-mongod start
To start the MongoDB daemon on boot, type this command as root:
chkconfig rh-mongodb26-mongod on
To start the MongoDB sharding server, type this command as root:
service rh-mongodb26-mongos start
To start the MongoDB sharding server on boot, type the following command as root:
chkconfig rh-mongodb26-mongos on
Note that the MongoDB sharding server does not work unless the user starts at least one configuration server and specifies it in the mongos.conf file.

4.4.2. MongoDB 2.6 on Red Hat Enterprise Linux 7

When using Red Hat Enterprise Linux 7, the following commands are applicable.
To start the MongoDB daemon, type the following command as root:
systemctl start rh-mongodb26-mongod.service
To start the MongoDB daemon on boot, type this command as root:
systemctl enable rh-mongodb26-mongod.service
To start the MongoDB sharding server, type the following command as root:
systemctl start rh-mongodb26-mongos.service
To start the MongoDB sharding server on boot, type this command as root:
systemctl enable rh-mongodb26-mongos.service
Note that the MongoDB sharding server does not work unless the user starts at least one configuration server and specifies it in the mongos.conf file.

4.5. DevAssistant

DevAssistant is a tool designed to assist developers with creating and setting up basic projects in various programming languages, installing dependencies, setting up a development environment, and working with source control. The devassist09 Software Collection supports several programming languages, namely C, C++, Java, and Python. Additionally, DevAssistant is able to support working with any other language, framework, or tool due to its modular architecture.
DevAssistant is a framework that runs plug-ins called assistants. Each assistant can have several subassistants.

4.5.1. Getting Started with DevAssistant

To install the devassist09 Software Collection, type the following command as root:
yum install devassist09
To enable this collection, type the following command at a shell prompt:
scl enable devassist09 bash
To get help for DevAssistant, use the following command:
devassistant --help
or the shorter variant of the same command:
da -h
It is advisable to use the --help option on each level to list your possible next steps, until you reach the level of an executable subassistant (see Example 4.1, “Creating a New Python Library Project”).
To access the graphical user interface, type this command at a shell prompt:
devassistant-gui
or the shortened variant:
da-gui
Please note that the GUI is available only if you install the devassist09 Software Collection on Red Hat Enterprise Linux 7. The functionalities and procedures are the same as when using the command line interface.
Note that the devassistant and da commands are equal. Further in the text, we will use only the shorter variant, the da command.

4.5.2. Running Assistants

DevAssistant provides the following functionalities: create, modify, prepare, and task. To run an assistant, use the following command:
da [--debug] {create,modify,prepare,task} [assistant [arguments]] ...
The four basic commands and descriptions related to these functionalities are listed in the following table:

Table 4.1. Functionalities of DevAssistant

Command Shortened Command Description
da create da crt Creating a new project from scratch
da modify da mod Working with an existing project
da prepare da prep Preparing a development environment for an upstream project
da task Performing a custom task not related to a specific project
The devassist09 Software Collection does not include any assistants for the modify, prepare, and task functionalities. These categories are available for users who want to create their own assistants.

4.5.3. Creating Projects with DevAssistant

The devassist09 Software Collection includes the following assistants for creating projects:

Table 4.2. Assistants for Creating Projects

Assistant Subassistant Description
c app An application in C
lib A dynamically linked library in C
cpp app An application in C++
lib A dynamically linked library in C++
java maven A simple project using Maven
python lib A simple library for Python
The following example demonstrates creating a new Python library project by following instructions displayed by the --help option.

Example 4.1. Creating a New Python Library Project

To create a new Python library project, complete the following steps:
  1. Enable the devassist09 Software Collection by running this command:
    ~]$ scl enable devassist09 bash
  2. Display help about DevAssistant by using the --help option:
    ~]$ da --help
    You can either run assistants with:
    da [--debug] {create,modify,prepare,task} [ASSISTANT [ARGUMENTS]] ...
    
    Where:
    create   used for creating new projects
    modify   used for working with existing projects
    prepare  used for preparing environment for upstream projects
    task     used for performing custom tasks not related to a specific project
    You can shorten "create" to "crt", "modify" to "mod" and "prepare" to "prep".
    
    Or you can run a custom action:
    da [--debug] [ACTION] [ARGUMENTS]
    
    Available actions:
    help     Print detailed help
    version  Print version
  3. List the possible next steps for creating a project by typing:
    ~]$ da create --help
    usage:  create [-h] [--deps-only] {c,cpp,java,python} ...
    
    Kickstart new projects easily with DevAssistant.
    
    optional arguments:
      -h, --help           show this help message and exit
      --deps-only          Only install dependencies
    
    subassistants:
      Following subassistants will help you with setting up your project.
    
      {c,cpp,java,python}
  4. Display help on the python assistant by typing at a shell prompt:
    ~]$ da create python --help
    usage: create python [-h] {lib} ...
    
    This is a base Python assistant, you have to select a subassistant.
    
    optional arguments:
      -h, --help  show this help message and exit
    
    subassistants:
      Following subassistants will help you with setting up your project.
    
      {lib}
    
  5. List your choices for the only python subassistant, lib, by running this command:
    ~]$ da create python lib --help
    usage: create python lib [-h] [-e [ECLIPSE]] -n NAME
    
    Scaffolds a simple Python library project.
    
    optional arguments:
      -h, --help            show this help message and exit
      -e [ECLIPSE], --eclipse [ECLIPSE]
                            Configure as Eclipse project (uses ~/workspace or
                            specified directory)
      -n NAME, --name NAME  Name of project to create
  6. Run the assistant to create your new Python library project named mypythonlib by using the following command:
    ~]$ da create python lib -n mypythonlib
To get more information about the upstream version of DevAssistant, refer to the DevAssistant User Documentation. Please note that though the basic concept of the upstream application is the same as in the devassist09 Software Collection, individual plug-ins and their functionalities might differ.

4.5.4. Backward Compatibility in DevAssistant

The updated version of DevAssistant can cause incompatibility in assistants that have not been provided by the devassist09-devassistant-assistants-dts package, that is, in your own assistants.
  • Since DevAssistant 0.9.3, the variable names in the assistant files are no longer derived from the argument flags but from the argument names. In the following example, the $foo variable is initialized instead of the $bar variable:
    args:
       foo:
         ...
         flags: [-b, --bar]
         ...
    
  • Unknown attributes in the arguments section in the assistant file are no longer allowed. Since DevAssistant 0.9.3, an error message is returned in the following example because the unknown_attribute is not known to the parser:
    args:
       foo:
         ...
         unknown_attribute: foo bar baz
         ...
    

4.6. Maven

The maven30 Software Collection provides a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting, and documentation from a central piece of information.
To install the maven30 Collection, type the following command as root:
yum install maven30
Note that since Red Hat Software Collections 2.0, the maven30 Software Collection requires the rh-java-common Collection.
To enable this collection, type the following command at a shell prompt:
scl enable maven30 bash
Global Maven settings, such as remote repositories or mirrors, can be customized by editing the /opt/rh/maven30/root/etc/maven/settings.xml file.
For more information about using Maven, refer to the Maven documentation. To find documentation regarding individual plug-ins, please see the index of plug-ins.

4.7. Passenger

The rh-passenger40 Software Collection provides Phusion Passenger, a web and application server designed to be fast, robust and lightweight.
The rh-passenger40 Collection supports multiple versions of Ruby, particularly the ruby193, ruby200, and rh-ruby22 Software Collections together with Ruby on Rails using the ror40 or rh-ror41 Collections. Prior to using Passenger with any of the Ruby Software Collections, install the corresponding package from the rh-passenger40 Collection: the rh-passenger-ruby193, rh-passenger-ruby200, or rh-passenger-ruby22 package.
The rh-passenger40 Software Collection can also be used with Apache httpd from the httpd24 Software Collection. To do so, install the rh-passenger40-mod_passenger package. Refer to the default configuration file /opt/rh/httpd24/root/etc/httpd/conf.d/passenger.conf for an example of Apache httpd configuration, which shows how to use multiple Ruby versions in a single Apache httpd instance.
Additionally, the rh-passenger40 Software Collection can be used with the nginx 1.6 web server from the nginx16 Software Collection. To use nginx 1.6 with rh-passenger40, you can run Passenger in Standalone mode using the following command in the web appplication's directory:
scl enable nginx16 rh-passenger40 'passenger start'
Alternatively, edit the nginx16 configuration files as described in the upstream Passenger documentation.