Track prepaid usage of cloud resources in your cluster by installing and configuring
IBM Spectrum LSF Suite for HPC on Linux® hosts to upload usage metrics
to IBM Cloud Private. With variable use licensing for the cloud, CPU core and socket, GPU socket, and host count
metrics are uploaded through an external load index monitor (ELIM) in IBM Spectrum LSF Suite for HPC to a metering service in IBM Cloud Private. You can
then audit IBM Spectrum LSF Suite for HPC resource usage from the metering dashboard in IBM Cloud Private.
Before you begin
- Install an IBM Cloud Private cluster. An
existing installation of IBM Cloud Private 3.1 or
higher is required to track prepaid usage for IBM Spectrum LSF Suite for HPC.
- Install an IBM Spectrum LSF Suite for HPC cluster. Prepaid monitoring can be installed on your
existing 10.2
cluster.
- Download the variable use licensing package for Linux
from IBM
Passport Advantage®. It can be found
under IBM Spectrum LSF Suite for HPC 10.2.0.x (with x being the latest version available).
Note: IBM Spectrum LSF Suite for HPC supports the variable use installer for
Linux2.6-glibc2.3-x86_64 only.
About this task
Follow this task to install and configure variable use licensing in your cluster.
Procedure
-
Log on to the LSF
management host as
root.
-
Set your environment:
- For csh or tcsh:
% source LSF_TOP/conf/cshrc.lsf
- For sh, ksh, or bash:
$ . LSF_TOP/conf/profile.lsf
-
Install the variable use licensing package that you downloaded from Passport Advantage. This package specifies
licensing terms and extracts the files to install prepaid monitoring in your cluster.
-
Go to the patch install directory: cd $LSF_ENVDIR/../10.1/install/
-
Copy the patch file to the installation directory:
$LSF_ENVDIR/../10.1/install/
-
Extract the patch file.
-
Run zcat <patch tar file>|tar xvf -.
-
Copy elim.icp.uploader to the
/opt/ibm/lsfsuite/lsf/10.1/<system version>/etc directory.
-
Generate an API key for the IBM Cloud Private 3.1
metering service.
-
Log on to the IBM Cloud Private boot node
and obtain the cluster configuration details according to step 3 in
https://www.ibm.com/support/knowledgecenter/SSBS6K_3.1.0/manage_cluster/cfc_cli.html.
-
Using the following cloudctl commands, log in as the administrator (admin)
and generate an API key, substituting the current node's IP address for <my_icp_IP>:
- cloudctl login -a https://<my_icp_IP>:8443 -u admin -p admin -n default
--skip-ssl-validation
- cloudctl iam service-id-create spectrumserviceid-default-1 -d "SPECTRUM serviceid in
default namespace, number 1"
- cloudctl iam service-api-key-create spectrumapikey-default-1
spectrumserviceid-default-1
The output of the last command displays the API key, which is similar to the following:
OiiJ1q3gjIDk2JJGxHK6xeZwU5mrIHyu2nUv38SzrQSA
Note: Save the API key to add to the icpup.json file in the following step.
-
Configure IBM Spectrum LSF to upload
usage data to IBM Cloud Private.
-
Log in to the LSF
management host as
root, edit the $LSF_ENVDIR/lsf.shared configuration file, and add the following
line to the Resource section:
totalcores Numeric 15 Y (Total CPU cores in the cluster)
-
Edit the $LSF_ENVDIR/lsf.cluster.* configuration file and add the
following line to the Resource Map section
-
Create the new $LSF_ENVDIR/icpup.json file and insert the following
contents, replacing <my_icp_IP> and <my_API_key> with actual values:
{
"icpUrl": "https://<my_icp_IP>:8443",
"apiKey": "<my_API_key>",
"logLevel": "LOG_INFO"
}
To set the log level, change the logLevel parameter to any of the following
values: LOG_INFO, LOG_WARNING,
LOG_ERR, or LOG_DEBUG.
-
Restart
lim
on LSF
management host.
For IBM Spectrum LSF Suite for HPC clusters running version 10.2, run the systemctl restart lsfd
command.
-
Check the ELIM status.
For IBM Spectrum LSF Suite for HPC clusters look in the
/opt/ibm/lsflogs/elim.icpup.log.<hostname> file.
-
Log in to the IBM Cloud Private console and
navigate to the Metering page to see the uploaded usage data. For more
information, see https://www.ibm.com/support/knowledgecenter/SSBS6K_3.1.0/manage_metrics/metering_service.html.
The following metrics are uploaded to
IBM Cloud Private:
- Total Hosts: Total number of available and closed hosts in the cluster. The other metrics are
for these reported hosts and do not include unavailable hosts.
- Total Cores: Total number of CPU cores on the reported hosts.
- Total GPUs: Total number of GPU processors on the reported hosts.
- Total Sockets: Total number of CPU sockets on the reported hosts.
CPU core and GPU socket data for the previous two days are immediately uploaded to the
Metering page. Host and socket usage is uploaded from the current time. The
system collects metrics every 5 minutes and uploads to the metering service every 15 minutes.