Building the SPM application
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
cd c:\IBM\Curam\DevelopmentSetEnvironment.bat
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 installedas.vendor=WLP# The username and password for the administrator rolesecurity.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
cd %SERVER_DIR%build.bat configtest
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
:
<?xml version="1.0" encoding="UTF-8"?><APP_CONFIG><STATIC_CONTENT_SERVER><URL>/CuramStatic/</URL></STATIC_CONTENT_SERVER></APP_CONFIG>
Build the SPM server
To build the SPM server, run the following command:
./build.sh clean server
build.bat clean server
Build the database
To build the SPM database, run the following command:
./build.sh database prepare.application.data
build.bat database prepare.application.data
Build the SPM client
To build the SPM client, run the following commands:
cd $CLIENT_DIR./build.sh clean client
cd %CLIENT_DIR%build.bat clean client
Build StaticContent.zip
To build SPM StaticContent.zip
, run the following commands:
cd $CLIENT_DIR./build.sh zip-static-content
cd %CLIENT_DIR%build.bat 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
cd %SERVER_DIR%build.bat libertyEAR -Dcuram.ejbserver.app.name=CuramServerCodebuild.bat 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.
./build.sh precompilejsp -Dear.file=$SERVER_DIR/build/ear/WLP/Curam.ear
build.bat 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
build.bat 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.