In an offline or air-gapped environment IBM Usage Metering Service (UMS) cannot connect
to IBM Software Central. To send your usage metrics to Software Central, download the data and
manually upload it.
About this task
When the IBMUsageMetering instance has the
softwareCentral.enable parameter set to false, no upload occurs
automatically. Use the UMS download endpoint to get a usage snapshot and then upload the metrics to
Software Central.
Procedure
- Access the UMS API endpoint and download the usage data for offline upload.
curl --header "Authorization: Bearer <UMS_TOKEN>" --cacert ca.crt \
--output "swc_payload.tar.gz" "<UMS_URL>/api/v1/swc"
Where
<UMS_TOKEN> is the upload token from UMS (the token value from the
ibm-usage-metering-upload-token secret).
- The ca.crt file is the certificate that you created
(
ca.crt value from the kube-root-ca.crt ConfigMap). If you want to
use an insecure configuration, you can replace -cacert ca.crt with
-insecure.
<UMS_URL> is the UMS fetch route (the location value from
ibm-usage-metering-fetch route).
- Transfer the downloaded swc_payload.tar.gz file to a system with
access to Software Central.
- Upload the tar.gz file to Software Central.
curl -X POST "https://<SWC_URL>/metering/api/v2/metrics" \
-H "Authorization: Bearer <IEK>" -F "file=@swc_payload.tar.gz;type=application/gzip"
Where
<SWC_URL> is swc.saas.ibm.com for production environments
and sandbox.swc.saas.ibm.com for test environments.
<IEK> is your IBM Entitlement Key.
Note: Failed uploads are retried automatically up to 3 times.