Setting up CRA to work with the IBM WebSphere Liberty server
The following procedures are available:
- Before you begin
- To customize the CRA application to work with the API
- To configure the JSON Web Tokens secret key
- Where to go from here
Before you begin
- Make sure that you have installed WebSphere Liberty server.
Make sure that Java 17 is installed on your system and the JAVA_HOME environment variable is set correctly. In addition, perform the following steps:
- In your installed WebSphere Liberty Server location, go to the dropins folder and create a folder named spring .
- From the root directory of the BMC file path, which you provided during installation, copy the following files:
- Copy the cra.war file to the newly created spring folder.
- Copy the cralog4j2.xml, cra_custom.properties, and configurations.json files to your configuration folder (config.folder) on WebSphere Liberty server.
To customize the CRA application to work with the API
Edit the server.env file that is located on the USS directory of your WebSphere Liberty server to set the following custom properties:
Parameter
Default value
Description
CRA_HOME
/shrd/wlp/usr/servers/WLPSR2EJ
The installation path of your WebSphere Liberty server
config.folder
config
Enter the name of your configuration folder on WebSphere Liberty server
JAVA_HOME
/usr/lpp/java/J17.0_64
Enter the path for a 64-bit Java home directory that exists on your WebSphere Liberty server
- Restart the WebSphere Liberty server started task from the proclib .
You can now run the CRA application on your WebSphere Liberty server.
To configure the JSON Web Tokens secret key
CRA uses JSON Web Tokens (JWT) to manage the login token. After installation, the JWT key becomes static across the systems. Therefore, we recommend performing the following steps to update the key to make it unique and secure for your system:
- Open the cra_custom.properties file that is located on on your configuration folder (config.folder) on WebSphere Liberty server.
Add the jwt.secret key.
e recommend changing the default value in accordance with your environment.
W- Restart the server.
Where to go from here
When you finish setting up CRA , you can do one or more of the following tasks:
If you are not seeing the data you expect, see Troubleshooting-Common-REST-API-issues.