Skip to main contentMerative SPM on Kubernetes

Building the SPM application

Note: Before proceeding with the following steps, ensure that the steps defined in Create the SPM Database are completed. This action should be only a one-off set-up.

Building Merative Social Program Management (SPM) for deployment to Kubernetes is similar to on-premises SPM builds with some differences. Notably, because the application server for the cloud environment is IBM® WebSphere® Liberty some target names are changed or are not supported.

Take the following steps to build SPM:

Source the SPM environment variables

Enter the directory where SPM is installed and source the SetEnvironment script; for example:

cd /opt/IBM/Curam/Development
. SetEnvironment.sh

Set up AppServer.properties and verify the configuration

Before you build SPM, add an AppServer.properties file to $SERVER_DIR/project/properties. AppServer.properties must specify as.vendor=WLP; for example:

# Property to indicate that WebSphere Liberty is installed
as.vendor=WLP
# The username and password for the administrator role
security.username=websphere
# Encrypt the plain-text password using 'build encrypt -Dpassword=<password>'
# The encryption for the default password ("websphere") is as follows:
security.password=websphere

To confirm your configuration, run the configtest Ant target using the following commands:

cd $SERVER_DIR
./build.sh configtest

Note: When running the configtest Ant target you may experience a failed build with an Unsupported version: error in relation to the WebSphere Liberty version.

If this happens please refer to the Prerequisite software for the correct list of supported WebSphere Liberty versions.

Set up static content

The static content server feature allows static content to be hosted on a separate web server. This feature allows the web server that hosts the static content to be tuned for the static content and reduces the load on the main SPM application servers. The option enables the relocation of static content to a separate server to allow for performance optimizations.

To enable static content, create a file called curam-config.xml in the following location $CLIENT_DIR/components/custom/.

Add the following to curam-config.xml:

Note: The guidelines assume that the relative URL /CuramStatic/ is being used.

<?xml version="1.0" encoding="UTF-8"?>
<APP_CONFIG>
<STATIC_CONTENT_SERVER>
<URL>/CuramStatic/</URL>
</STATIC_CONTENT_SERVER>
</APP_CONFIG>

Note: For more information about SPM static content, see Static Content Server in the Social Program Management Web Client Reference Manual.

Build the SPM server

To build the SPM server, run the following command:

./build.sh clean server

Build the database

To build the SPM database, run the following command:

./build.sh database prepare.application.data

Build the SPM client

To build the SPM client, run the following commands:

cd $CLIENT_DIR
./build.sh clean client

Build StaticContent.zip

To build SPM StaticContent.zip, run the following commands:

cd $CLIENT_DIR
./build.sh zip-static-content

The StaticContent.zip file that is created is in the $CLIENT_DIR/build folder and is needed for the steps in Setting up the Docker® context.

Build the Cúram EAR files for WebSphere Liberty

Modify the requireServer setting in the $SERVER_DIR/project/config/deployment_packaging.xml file. This command works on multiple platforms:

sed -i 's/name="Curam" requireServer="true"/name="Curam" requireServer="false"/g' \
$SERVER_DIR/project/config/deployment_packaging.xml

To build the application EAR files for WebSphere Liberty, run the following commands:

cd $SERVER_DIR
./build.sh libertyEAR -Dcuram.ejbserver.app.name=CuramServerCode
./build.sh libertyEAR -Dserver.only=true \
-Dear.name=CuramServerCode \
-DSERVER_MODEL_NAME=CuramServerCode \
-Dcuram.ejbserver.app.name=CuramServerCode

Precompiling JSPs

To improve initial page load performance, use the precompile target to precompile the JSPs in an application EAR file before deployment. Run the following target for each EAR file.

Note: The precompile target can take up to several hours to complete. Ensure that your environment is not significantly restricted regarding available CPU, memory, and free space in the $CURAMSDEJ file system.

Note: It is not required to run the precompile target on the CuramServerCode.ear, CuramWebServices.ear or Rest.ear.

./build.sh precompilejsp -Dear.file=$SERVER_DIR/build/ear/WLP/Curam.ear

Package an SPM release.zip file

To package the build into a release.zip file, run the following command:

./build.sh release -Dcreate.zip=true

The .zip file that is created is in the $SERVER_DIR/release folder and is needed for the steps in Setting up the Docker environment.

Note: Check the zip file in later stages to ensure that its integrity or size are unchanged when copying to different directories or machines.

On OSX and Red Hat, a zip file ends with .zip and looks like a white file.

On Windows, a zip file ends with .zip and looks like a folder.