Chapter 2. Installing the Middleware Management Server

The Red Hat Middleware Management installation consists of two Linux container images.

Important

Do not perform the installation as the ROOT user; create a non-root user.

2.1. Install and Configure Cassandra

The middleware management services require a running Cassandra instance.

  1. Run the Cassandra container and configure the Cassandra data location. By default the Cassandra container creates a volume under /opt/apache-cassandra/data. This container directory automatically maps to a unique local directory which you can view using docker inspect <container-id>. You can use the -v option to map the Cassandra data volume to a specific host directory.

    Important

    CASSANDRA_START_RPC must be set to true. If this option is set to false the middleware manager services cannot connect to Cassandra.

    Note

    The Z option is necessary on Red Hat Enterprise Linux/Fedora based systems to correctly set the SELinux permissions.

    docker run --name mwmanager-cassandra -d -e CASSANDRA_START_RPC=true -v /var/mydatastore:/opt/apache-cassandra/data:Z registry.access.redhat.com/jboss-mm-7-tech-preview/middleware-manager-datastore:latest
  2. Verify that the server is running.

    docker ps

    Result

    CONTAINER ID   IMAGE                                                                         COMMAND                  CREATED          STATUS          PORTS                                         NAMES
    34a75ba45be8   registry.access.redhat.com/jboss-mm-7-tech-preview/middleware-manager-datastore:latest   "/docker-entrypoint.s"   44 seconds ago   Up 44 seconds   7000-7001/tcp, 7199/tcp, 9042/tcp, 9160/tcp   mwmanager-cassandra

  3. View the node information.

    docker exec -it <container_id> /opt/apache-cassandra/bin/nodetool info

2.1.1. Running Cassandra with a Non-default User

You can run the Cassandra container with an arbitrary user ID, however, that user must have permissions to write to the Cassandra data volume.

Note

The Z option is necessary on Red Hat Enterprise Linux/Fedora based systems to correctly set the SELinux permissions.

chown myuser:myuser /var/mydatastore
docker run --name mwmanager-cassandra -d -e CASSANDRA_START_RPC=true --user $(id -u myuser) -v /var/mydatastore:/opt/apache-cassandra/data:Z registry.access.redhat.com/jboss-mm-7-tech-preview/middleware-manager-datastore:latest

2.2. Starting the Middleware Manager Services

  1. Start the mwmanager-services and link it to the running Cassandra instance. By default the middleware manager container creates a volume under /var/opt/hawkular/data. As with the Cassandra container, you can use the -v option to map the middleware manager data volume to a specific host directory.

    Note

    The Z option is necessary on Red Hat Enterprise Linux/Fedora based systems to correctly set the SELinux permissions.

    docker run -d --link=mwmanager-cassandra \
    -e CASSANDRA_NODES=mwmanager-cassandra \
    -e HAWKULAR_BACKEND=remote \
    -p 8080:8080 -p 8443:8443 -p 9990:9990 \
    -v /var/opt/mwmanager-data:/var/opt/hawkular/data:Z registry.access.redhat.com/jboss-mm-7-tech-preview/middleware-manager:latest
  2. Run the Middleware Manager container and tell it to connect to Cassandra. If desired, you can specify a combination of username/password for HAWKULAR_USER and HAWKULAR_PASSWORD. If you do not specify a user name and password, one will be automatically generated when you start the container.

    docker run --name mwmanager  -d \
              -e HAWKULAR_BACKEND=remote   \
              -e CASSANDRA_NODES=mwmanager-cassandra \
              -e HAWKULAR_USE_SSL=true \
              -e HAWKULAR_USER=my_mwmanager_username \
              -e HAWKULAR_PASSWORD=my_mwmanager_password \
              -p 8080:8080 -p 8443:8443 -p 9990:9990 \
              --link=mwmanager-cassandra \
              registry.access.redhat.com/jboss-mm-7-tech-preview/middleware-manager:latest

    Table 2.1. Service Options

    NameDefaultDescription

    CASSANDRA_NODES

    myCassandra

    The host name or IP of Cassandra

    DB_TIMEOUT

    -

    If set, will wait for specified number of seconds for Cassandra to start and become ready before starting the middleware management services.

    HAWKULAR_BACKEND

    remote

    Indicates that the middleware manager services connects to a Cassandra server that is installed remotely.

    HAWKULAR_METRICS_TTL

    17

     

    HAWKULAR_USER

     

    User name for the new user. If you do not specify a user name, one will be automatically generated. To view the generated user name, run the following command: docker exec <containerID> bash -c 'echo "$HAWKULAR_USER"'

    HAWKULAR_PASSWORD

     

    Password for the new user. If you do not specify a password, one will be automatically generated. To view the generated password, run the following command: docker exec <containerID> bash -c 'echo "$HAWKULAR_PASSWORD"'

    HAWKULAR_USE_SSL

    false

    Whether to use secure socket layer (SSL) to establish an encrypted link between CloudForms and the middleware manager server.

  3. Verify the middleware management installation by launching a browser and navigating to http://my_mwmanager_host:8080/. After a minute or two, you should see the middleware manager status page.
Middleware Manager Status Page