You use the res-setup Ant task to configure each artifact for which you want to enable metering.
You can enable the metering feature for the following Decision Server runtime features:
The metering parameters are described in Setting up Decision Server to integrate with the metering services.
Procedure
Run the res-setup Ant task as described below for the following Decision Server runtime features.
Hosted Transparent Decision Service
The following command generates a DecisionService.war file with the metering feature enabled.
cd <odm_install_dir>/executionserver/bin
<odm_install_dir>/shared/tools/ant/bin/ant -f ressetup.xml -Dmetering.war.in=../applicationservers/WLP/DecisionService.war -Dmetering.war.out=<my_output_dir>/DecisionService.war -Dmetering.enable=true -Dmetering.server.url=http://<odmmeteringservicehost>:<odmmeteringserviceport> -Dmetering.api.key=<irrelevant,putanything> -Dmetering.instance.identifier=<meteringclientID> -Dmetering.send.usages=true setup-metering
Testing and simulation
The following command generates a DecisionRunner.war file with the metering feature enabled.
cd <odm_install_dir>/executionserver/bin
<odm_install_dir>/shared/tools/ant/bin/ant -f ressetup.xml -Dmetering.war.in=../applicationservers/WLP/DecisionRunner.war -Dmetering.war.out=<my_output_dir>/DecisionRunner.war -Dmetering.enable=true -Dmetering.server.url=http://<odmmeteringservicehost>:<odmmeteringserviceport> -Dmetering.api.key=<irrelevant,putanything> -Dmetering.instance.identifier=<meteringclientID> -Dmetering.send.usages=true setup-metering
The following command generates a testing.war file with the metering feature enabled.
cd <odm_install_dir>/executionserver/bin
<odm_install_dir>/shared/tools/ant/bin/ant -f ressetup.xml -Dmetering.war.in=../applicationservers/WLP/testing.war -Dmetering.war.out=<my_output_dir>/testing.war -Dmetering.enable=true -Dmetering.server.url=http://<odmmeteringservicehost>:<odmmeteringserviceport> -Dmetering.api.key=<irrelevant,putanything> -Dmetering.instance.identifier=<meteringclientID> -Dmetering.send.usages=true setup-metering
As part of the metering setup, you must distribute an SSL certificate to the clients.
Procedure
Extract an SSL certificate from a keystore:
keytool -export -keystore keystore.p12 -alias client -file myCertificate.crt
Import the SSL certificate into the default truststore of the Liberty server:
keytool -importcert -file myCertificate.crt -alias client -keystore $WLP_HOME/usr/servers/odm<version>/resources/security/truststore.jks
Enable SSL communication in the Liberty server by adding SSL entries in the $WLP_HOME/usr/servers/odm
<sslDefault sslRef="tls12" />
<ssl id="tls12" keyStoreRef="defaultKeyStore" trustStoreRef="defaultTrustStore" serverKeyAlias="localhost" sslProtocol="TLSv1.2" />
<ssl id="tlsall" keyStoreRef="defaultKeyStore" sslProtocol="SSL_TLSv2" />
<keyStore id="defaultKeyStore" password="changeit" location="keystore.jks" />
<keyStore id="defaultTrustStore" password="changeit" location="truststore.jks" />
Start the Liberty server:
$WLP_HOME/bin/start odm<version>
The Decision Server data is now sent to your metering service.
Back to Setting up Decision Server to integrate with the metering services
© Copyright IBM Corporation 2024