Rollbase Scalability – Part Three

Progress-logo-Rollbase-whitebackground

 

 

Ok. Now that we have built our servers, setup our Database Server and Apache Server (the latter to provide the web tier), let’s now get Rollbase into production!

Recap: Initial Scalable Installation

We are building an architecture that has:

  • One Apache Server acting as the web tier and using mod_jk.
  • A Main Server with all the services listed above except the database and production services
  • One (optionally two) servers to provide Production Server functionality – PROD1 and, optionally, PROD2
  • A single Database Server

See the diagram below for what this architecture will look like:

Scalability-Architecture-One

I am going to assume now that you have done your homework as well as followed the steps in Part Two.

This stage consists of six parts:

  • Modify the shared.properties file on the Main Server to include the email server details
  • Configure a Tomcat service on the Main Server
  • Set the environment variables on the Main Server
  • Configure component files on the Main Server
  • Add and configure the Production Server system(s)
  • Start up and test the services

Modify the shared.properties file on the Main Server to include the email server details

In this part, you will configure the shared.properties file on the Main Server to add the email server details.

shared.properties is a configuration file used by Rollbase at startup to customise system wide settings. The email server details are used by Rollbase to send notifications as well a emails such as welcoming emails, etc.

  • Navigate to the directory $ROLLBASE$/rollbase/config ($ROLLBASE$ is the directory you downloaded and extracted the Rollbase Application files during Part Two)
  • Open the shared.properties file in a text editor.
  • Specify in the AdminEmail parameter the appropriate email address as the Rollbase server administrator’s email.
  • Specify the email server details of your email address: MailHost, MailPort, and MailUseSSL. Refer to the Rollbase documentation for details if you need to.
  • Specify your email credentials as the emails sender in the MailUser and MailPassword
  • Specify an email address in the AutoReplyAddress. This email address will be used to reply-to when no other address is provided.
  • Specify an email address in the EmergencyAddress. This email address will be used to receive emergency notifications.
  • Save the file.

Below is some sample data

##############################################
# Must be filled before first server start #
##############################################
# Email address of first admin user
AdminEmail=sample@example.com

# Email server - can use gmail by default
MailHost=smtp.example.com
MailPort=465
MailUseSSL=1
MailTimeoutSec=10
MaxEmailQueueSize=100

# User name and password for emails sender
MailUser=sample
MailPassword=myPassw0rd1sSecure!

#Enable Custom Email configuration settings (default is true)
EmailSettingsOverrideAtCustomer=true

# Email address used as reply-to when no other address is provided.
AutoReplyAddress=noreply@example.com

# Email address to receive emergency notifications
EmergencyAddress=emergencyIT@example.com

Configure the Tomcat service on the Main Server

In this part, install all the Rollbase execution binaries and supporting files into the Tomcat service on the Main Server.

Important! Make sure that tomcat is NOT running. Check with your local tomcat documentation on how to ensure this. We do not want tomcat running until all configurations on all systems have been made, so this is an important step.

  • Copy all the files located in the $ROLLBASE$/webapps directory, except for prod1.war and paste them into the Tomcat webapps directory on your Main Server. We will move the prod1.war file to our Production Server(s).
  • Copy all the files located in the $ROLLBASE$/lib directory and paste them into the Tomcat lib directory on your Main Server.

Setting Environment Variables on the Main Server

Now, you will set values for the environment variables ROLLBASE_HOME and JRE_HOME. The former will tell the tomcat environment where the directory containing the rollbase configuration, etc is, whilst the latter will point to the required Java installation. I have provided instructions for Windows and Linux.

Windows

  • From the Start Menu, right-click My Computer/Computer and select Properties.
  • Click Advanced System Settings.
  • Click Environment Variables.
  • Click New under the list of System variables.
  • Enter ROLLBASE_HOME as the variable name, and enter the full path to the root directory of your Rollbase installation as the variable value. For example, if you extracted rollbase.zip into the C:\Progress directory, the full path would be C:\Progress\rollbase.
  • Click OK.
  • Click New under the list of System variables.
  • Enter JRE_HOME as the variable name, and enter the full path to the jre directory of your Java installation as the variable value. For example, if Java is installed in the C:\Java directory, the full path would be C:\Java\jre\<version>.
  • Click OK.

Linux / UNIX

On Linux or UNIX based systems use the commands export ROLLBASE_HOME=<PATH> and export JRE_HOME=<PATH>. For example, using the bash shell and assuming a location of /opt/Progress/rollbase, the command would be as follows:

export ROLLBASE_HOME=/opt/Progress/rollbase
export JRE_HOME=/usr/lib/jvm/default-java/jre

You may need to change the path for JRE_HOME, depending on where Java has been installed.

These commands should be placed in a setenv.sh script, in the tomcat bin directory (eg /usr/share/tomcat7/bin).

Additional Configuration

Ok at this point we are getting close – we are down to specific configuration requirements to support this solution, as well as copying a file or two to the Production Server(s).

OPEN PORT 8009 FOR TOMCAT

This enables communication between the web tier and the tomcat servers, using the AJP protocol. This allows the web tier to act as the from end, send requests to individual servers and route the responses to the client in a transparent manner.

  • On each Main Server and Production Server, navigate to the tomcat conf directory and open the file server.xml
  • Uncomment the line
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
  • Change:
<Connector port="8080" protocol="HTTP/1.1"
              connectionTimeout="20000"
              URIEncoding="UTF-8"
              redirectPort="8443" />

to

<Connector port="8830" protocol="HTTP/1.1"
              connectionTimeout="20000"
              URIEncoding="UTF-8"
              redirectPort="8443" />
  • Save the file
Modify the shared.properties and components.XML files on the master server:

Now you will modify the shared.properties file, for the specific configurations required for your unique instance of Rollbase.

On the Master Server, navigate to $ROLLBASE$/rollbase/conf.

Open shared.properties in a text editor.

  • Specify the Master Server host name as the HostName parameter.
  • Specify the Apache HTTP server host name as the value for WebsiteHTTP and WebsiteHTTPS parameters. We do this because all communication happens via the web tier. Clients do not directly connect to Rollbase. They just see one web server, even if you have dozens of back end servers handling load and functionality. As stated earlier, the web tier talks to Rollbase and relays the returned data back to the client.
  • Save the file.

Example:

SystemName=Progress Rollbase

# Default host name
HostName=ANZRBCort001:8830

# URL of corporate web site (no slash at the end)
WebSiteHTTP=http://ANZRBCort001:80
WebSiteHTTPS=https://ANZRBCort001:443

Note: The shared.properties file contains all the system-level properties that are shared among all the Rollbase components.

  • Modify the components.xml file on the Master Server
    • Navigate to $ROLLBASE$/rollbase/conf.
    • Open components.xml in a text editor.

A components.xml file describes to the system the details required to bring all your component servers into a complete installation. The layout is pretty straight forward:

<Component name="$COMPONENTNAME$" type="$COMPONENTTYPE$">
<DisplayName>$DISPLANAME{0}lt;/DisplayName>
<InternalRoot>http://$COMPONENTIP$:$PORT$/$PATH$/</InternalRoot>
<ExternalRoot>http://$APACHEIP$/$PATH$/</ExternalRoot>
<Props>
 ...
</Props>
</Component>

See the rollbase documentation for details on how these entries are configured. In summary:

  • name  is a unique identifying name in the installation (e.g. PROD1, PROD2, etc)
  • type describes the type of service provided by the component to the system, e.g. MASTER, PROD, REST, RSS, ROUTER, SEARCH, STORAGE, WORKFLOW, WEBAPI
  • DisplayName is a human readable name the component server.
  • ExternalRoot is the URL to the root of the Web component as seen from outside of your firewall. This URL is used for external access to components. For any plan other than a free evaluation, ExternalRoot must contain the HostName parameter as specified in your license.xml. You should not deploy Rollbase on a domain other than the one for which it was licensed.
    To use HTTPS for all external access, modify each ExternalRoot element to use https instead of http and modify the port number in the shared.properties file.
  • InternalRoot is the URL to the root of the web component as seen from inside your firewall (this can be the same as ExternalRoot). This URL is used for internal communication between components.
  • Props Contains component-specific properties – see Component specific properties in the documentation to determine the props entries that are required for each service.

A sample components.xml file is below. In this file you can see that I have two servers. The Master Server (IP Address: 172.16.117.102) is providing most of the services except for PROD services – the other server (172.16.117.103) provides those. ANZRBCort is the FQDN in my demo environment for the server that provides the web tier (and resolves to 172.16.117.100). My MySQL server is at 172.16.117.101.

If you are setting up multiple Production Servers, then you need a <component>…</component>  for each production server, with a different name parameter along with individual DisplayName, InternalRoot and ExternalRoot entries. A sample entry for a PROD2 server is commented out in the below file.

 Sample configuration file for Progress Rollbase Private Cloud evaluation 

<Components>

<Component name="MASTER" type="MASTER">
<DisplayName>Master Server</DisplayName>
<InternalRoot>http://172.16.117.102:8830/master/</InternalRoot>
<ExternalRoot>http://ANZRBCort001/master/</ExternalRoot>
<Props>
 <ResourcesCheck>2</ResourcesCheck>
 <ExpirationDays>30</ExpirationDays>
</Props>
</Component>

<Component name="PROD1" type="PROD">
<DisplayName>Production Server 1</DisplayName>
<InternalRoot>http://172.16.117.103:8830/prod2/</InternalRoot>
<ExternalRoot>http://ANZRBCort001/prod1/</ExternalRoot>
<Props>
 <Power>1.0</Power>

</Props>
</Component>

<!--
<Component name="PROD2" type="PROD">
<DisplayName>Production Server 1</DisplayName>
<InternalRoot>http://172.16.117.104:8830/prod2/</InternalRoot>
<ExternalRoot>http://ANZRBCort001/prod2/</ExternalRoot>
<Props>
 <Power>1.0</Power>

</Props>
</Component>
-->
<Component name="REST" type="REST">
<DisplayName>REST Server</DisplayName>
<InternalRoot>http://172.16.117.102:8830/rest/</InternalRoot>
<ExternalRoot>http://ANZRBCort001/rest/</ExternalRoot>
</Component>

<Component name="RSS" type="RSS">
<DisplayName>RSS Server</DisplayName>
<InternalRoot>http://172.16.117.102:8830/rss/</InternalRoot>
<ExternalRoot>http://ANZRBCort001/rss/</ExternalRoot>
<Props>
 <MinRequestIntervalMins>60</MinRequestIntervalMins>
</Props>
</Component>

<Component name="ROUTER" type="ROUTER">
<DisplayName>Router Server</DisplayName>
<InternalRoot>http://172.16.117.102:8830/router/</InternalRoot>
<ExternalRoot>http://ANZRBCort001/router/</ExternalRoot>
<Props>
 <StatusCheckInterval>10</StatusCheckInterval>
 <CustWeight>3</CustWeight>
 <CleckLoginURL>true</CleckLoginURL>
</Props>
</Component>

<Component name="SEARCH" type="SEARCH">
<DisplayName>Search Server</DisplayName>
<InternalRoot>http://172.16.117.102:8830/search/</InternalRoot>
<ExternalRoot>http://ANZRBCort001/search/</ExternalRoot>
<Props>
 <CloseAfterMin>60</CloseAfterMin>
 <MaxSearchResults>200</MaxSearchResults>
 <LockTimeoutSec>30</LockTimeoutSec>
 <RAMBufferMB>64</RAMBufferMB>
</Props>
</Component>

<Component name="STORAGE" type="STORAGE">
<DisplayName>Storage Server</DisplayName>
<InternalRoot>http://172.16.117.102:8830/storage/</InternalRoot>
<ExternalRoot>http://ANZRBCort001/storage/</ExternalRoot>
<Props>
 <LogFormat>[%d] %m%n</LogFormat>
 <MaxBackupIndex>3</MaxBackupIndex>
 <CloseAfterMin>30</CloseAfterMin>
 <LogFileSize>300KB</LogFileSize>
 <MaxSystemBackups>5</MaxSystemBackups>
</Props>
</Component>

<Component name="WORKFLOW" type="WORKFLOW">
<DisplayName>Workflow Server</DisplayName>
<InternalRoot>http://172.16.117.102:8830/workflow/</InternalRoot>
<ExternalRoot>http://ANZRBCort001/workflow/</ExternalRoot>
<Props>
 <EventCheckMins>1</EventCheckMins>
</Props>
</Component>

<Component name="WEBAPI" type="WEBAPI">
<DisplayName>SOAP Server</DisplayName>
<InternalRoot>http://172.16.117.102:8830/webapi/</InternalRoot>
<ExternalRoot>http://ANZRBCort001/webapi/</ExternalRoot>
</Component>

</Components>

Note: Your license key (which is an XML file), needs to have a Edition entry that reads: <Edition>Cluster Server</Edition>. It also needs a <MaxServers> entry with a value greater than 1, for example <MaxServers>5</MaxServers>. The value in the MaxServers entries determines the amount of Production Servers you can deploy. If you do not have these entries in your licence key file (license.xml) please contact your Rollbase Account Manager or SE to request one.

At this point we have finished configuring the Master ServerHowever do not start up tomcat yet. We need to configure the Production Server(s) first

Add and configure the Production Server system(s)

Base Installation

  • Install and patch your chosen OS onto each server you have designated as a Production Server
  • Use the IP address you have noted for $PROD1$ (optionally $PROD2$) in the steps above. Note this does not have to be an address accessible directly from the Internet, however it MUST be accessible from your Apache Server Web Tier.
  • Install Java and Tomcat for your chosen OS

Copy and extract the Rollbase Files

  • Create a Rollbase working directory on each Production ServerFuture references to this directory will designated as $PRODROLLBASE$.
  • Create sub-directories named rollbase, lib, and web apps in each $PRODROLLBASE$ directory. Note: The rollbase sub-directory will become the root directory of the Rollbase application. You should ensure that the owner of this folder is the user under which the tomcat processes will be running. On Ubuntu, for example, that user is tomcat7 (on a tomcat7 install)
  • Copy the rollbase, lib, and webapps zip files from your Main Server‘s $ROLLBASE$ directory to each $PRODROLLBASE$.
  • Extract the files into their respective sub-directories. That is, extract the rollbase.zip file into the rollbase sub-directory, lib.zip file into the lib sub- directory, and the webapps.zip file into the webapps sub-directory.

Copy Configuration Files

  • Copy the recently updated components.xml, along with databases.xml and shared.properties files from the Master Server to their respective location on each Production Server ie – in the $PRODROLLBASE$/rollbase/conf directory.

Configure the tomcat server

Now we will install the .war files into the tomcat web apps directory on each Production Server.

  • Make sure that Tomcat is NOT running at this time on the Production Servers
  • Copy all the files located in the $PRODROLLBASE$/webapps directory and paste them into the Tomcat webapps directory on each Production Server.
  • Copy all the files located in the $PRODROLLBASE$/lib directory and paste them into the Tomcat lib directory on each Production Server
  • If you are setting upend additional server, say PROD2, rename prod1.war to prod2.war in the Tomcat webapps diretcory ion the second Production Server. When tomcat runs it will expand the prod2.war file into the directory prod2 – thus enabling that URL. Similarly when adding additional production servers, you would increment that filename (prod3.war, prod4.war and so on).

Setting Environment Variables

Now, you will set values for the environment variables ROLLBASE_HOME and JRE_HOME on the Production Server(s). The former will tell the tomcat environment where the directory containing the Rollbase configuration, etc is, whilst the latter will point to the required Java installation.

In addition we need to tell each Production Server which role it will be taking on from the servers listed in the compnents.xml file. To do this we need to add a specific environment variable to each Production Server. There is a specific environment variable for each service as documented here. We will be using the PROD_SERVER environment variable. I have provided instructions for Windows and Linux. These are very similar to the same steps we followed for the Main Server, with the addition of the PROD_SERVER variable.

Windows
  • From the Start Menu, right-click My Computer/Computer and select Properties.
  • Click Advanced System Settings.
  • Click Environment Variables.
  • Click New under the list of System variables.
  • Enter ROLLBASE_HOME as the variable name, and enter the full path to the root directory of your Rollbase installation as the variable value. For example, if you extracted rollbase.zip into the C:\Progress directory, the full path would be C:\Progress\rollbase.
  • Click OK.
  • Click New under the list of System variables.
  • Enter JRE_HOME as the variable name, and enter the full path to the jre directory of your Java installation as the variable value. For example, if Java is installed in the C:\Java directory, the full path would be C:\Java\jre\<version>.
  • Click OK.
  • Click New under the list of System variables.
  • Enter PROD_SERVER as the Variable name, and enter PROD1 for Production Server 1 (and optionally PROD2 for Production Server 2)
  • Click OK.

Linux / UNIX

On Linux or UNIX based systems use the commands export ROLLBASE_HOME=<PATH>, export JRE_HOME=<PATH> and export PROD_SERVER=PROD<X>. For example, using the bash shell and assuming a Rollbase location of /opt/Progress/rollbase, the command for Production Server PROD1 would be as follows:

export ROLLBASE_HOME=/opt/Progress/rollbase
export JRE_HOME=/usr/lib/jvm/default-java/jre
export PROD_SERVER=PROD1

You may need to change the path for JRE_HOME, depending on where Java has been installed.

If you are also implementing and additional Production Server, say,  PROD2, change the value for PROD_SERVER to PROD2:

export ROLLBASE_HOME=/opt/Progress/rollbase
export JRE_HOME=/usr/lib/jvm/default-java/jre
export PROD_SERVER=PROD2

These commands should be placed in a setenv.sh script, in the tomcat bin directory (eg /usr/share/tomcat7/bin).

Additional Configuration

Open port 8009 for tomcat

This enables communication between the web tier and the tomcat servers

  • On each Production Server, navigate to the tomcat conf directory and open the file server.xml
  • Uncomment the line
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
  • Change:
<Connector port="8080" protocol="HTTP/1.1"
              connectionTimeout="20000"
              URIEncoding="UTF-8"
              redirectPort="8443" />

to

<Connector port="8830" protocol="HTTP/1.1"
              connectionTimeout="20000"
              URIEncoding="UTF-8"
              redirectPort="8443" />
  • Save the file

Configuration is now complete!

Finally: Starting the servers and logging into Rollbase

In this part, you will start all the servers and log into Rollbase.

  1. Start the database, if it is not already running
  2. Start the Apache HTTP Server using its management commands
  3. Start the master servers using tomcat startup.sh (or .bat on Windows)  in the tomcat bin directory – or however your distribution of tomcat is started.
  4. Start the production servers using tomcat startup.sh (or .bat on Windows)  in the tomcat bin directory – or however your distribution of tomcat is started.
  5. Log into Rollbase
    1. On the Apache Server, open a Web browser and enter the URL http://localhost:80/router/login/login.jsp? to log into Rollbase Private Cloud.
    2. Enter the email address and password of the first administrative user in the User Name field.

At this point, your scalable Rollbase solution should be up and running!

If you have any problems, please post in the comments below (they will be moderated) and I will respond as soon as possible.

Articles in this Series

Rollbase Scalability – Part One

Rollbase Scalability – Part Two

Rollbase Scalability – Part Three

2 thoughts on “Rollbase Scalability – Part Three”

Leave a Reply

Your email address will not be published. Required fields are marked *