Installing the Cloud Pak for Data command-line
interface (cpd-cli)
Upgrade to IBM Software Hub Version 5.1 before IBM Cloud Pak for Data Version 4.7 reaches end of support. For more information, see Upgrading IBM Software Hub in the IBM Software Hub Version 5.1 documentation.
To administer IBM Cloud Pak for Data, you can
install the Cloud Pak for Data command-line interface
(cpd-cli) on your workstation.
Before you begin
Ensure that the workstation meets the requirements in Setting up a client workstation.
About this task
You must install the cpd-cli on a client workstation that can connect
to your cluster.
Procedure
To install the cpd-cli:
-
Download Version 13.0.4 of the
cpd-clifrom theIBM/cpd-clirepository on GitHub.Ensure that you download the correct package based on the Cloud Pak for Data license that you purchased and the operating system on the client workstation:
Workstation operating system Enterprise Edition Standard Edition Linux® cpd-cli-linux-EE-13.0.4.tgzcpd-cli-linux-SE-13.0.4.tgzMac OS cpd-cli-darwin-EE-13.0.4.tgzcpd-cli-darwin-SE-13.0.4.tgzWindows You must download the Linux package and run it in Windows Subsystem for Linux:
cpd-cli-linux-EE-13.0.4.tgzYou must download the Linux package and run it in Windows Subsystem for Linux:
cpd-cli-linux-SE-13.0.4.tgzRestriction: Do not download the Power® (ppc64le) or IBM Z® (s390x) packages if you plan to use the client to run an installation or upgrade. Thecpd-cli managecommands cannot be run on these operating systems. - Extract the contents of the package to the directory where you want to
run the
cpd-cli. - On Mac OS, you must trust the following components of the
cpd-cli:- cpd-cli
- plugins/lib/darwin/config
- plugins/lib/darwin/cpdbr
- plugins/lib/darwin/cpdbr-oadp
- plugins/lib/darwin/cpdctl
- plugins/lib/darwin/cpdtool
- plugins/lib/darwin/manage
- plugins/lib/darwin/migrate
- plugins/lib/darwin/platform-diag
- plugins/lib/darwin/platform-mgmt
For each component:- Right-click the component and select Open.
You will see a message with the following format:
macOS cannot verify the developer of component-name. Are you sure you want to open it?
- Click Open.
- Best practice Make the
cpd-cliexecutable from any directory.By default, you must either change to the directory where the
cpd-cliis located or specify the fully qualified path of thecpd-clito run the commands.However, you can make the
cpd-cliexecutable from any directory so that you only need to typecpd-cli command-nameto run the commands.Workstation operating system Details Linux Add the following line to your ~/.bashrc file: export PATH=<fully-qualified-path-to-the-cpd-cli>:$PATHMac OS Add the following line to your ~/.bash_profile or ~/.zshrc file: export PATH=<fully-qualified-path-to-the-cpd-cli>:$PATHWindows From the Windows Subsystem for Linux, add the following line to your ~/.bashrc file: export PATH=<fully-qualified-path-to-the-cpd-cli>:$PATH - Best practice Determine whether you need to
set any of the following environment variables for the
cpd-cliCPD_CLI_MANAGE_WORKSPACE-
By default, the first time you run a
cpd-cli managecommand, thecpd-cliautomatically creates thecpd-cli-workspace/olm-utils-workspace/workdirectory.The location of the directory depends on several factors:
- If you made the
cpd-cliexecutable from any directory, the directory is created in the directory where you run thecpd-clicommands. - If you did not make the
cpd-cliexecutable from any directory, the directory is created in the directory where thecpd-cliis installed.
You can set the
CPD_CLI_MANAGE_WORKSPACEenvironment variable to override the default location.The
CPD_CLI_MANAGE_WORKSPACEenvironment variable is especially useful if you made thecpd-cliexecutable from any directory. When you set the environment variable, it ensures that the files are located in one directory.- Default value
- No default value. The directory is created based on the factors described in the preceding text.
- Valid values
- The fully qualified path where you want the
cpd-clito create theworkdirectory. For example, if you specify/root/cpd-cli/, thecpd-cli manageplug-in stores files in the/root/cpd-cli/workdirectory.
To set theCPD_CLI_MANAGE_WORKSPACEenvironment variable, run:export CPD_CLI_MANAGE_WORKSPACE=<fully-qualified-directory> - If you made the
OLM_UTILS_LAUNCH_ARGS-
If your environment includes certificates that the
cpd-climust use, you can use theOLM_UTILS_LAUNCH_ARGSenvironment variable to mount the certificates in the container that thecpd-cliuses.For example:- CA certificates
- Mount CA certificates if you need to reach an external HTTPS endpoint that uses a self-signed
certificate. Tip: Typically the CA certificates are in the
/etc/pki/ca-trustdirectory on the workstation. If you need additional information on adding certificates to a workstation, run:man update-ca-trustDetermine the correct argument for your environment:- If the certificates on the client workstation are in the
/etc/pki/ca-trustdirectory, the argument is:" -v /etc/pki/ca-trust:/etc/pki/ca-trust"
- If the certificates on the client workstation are in a different directory, replace
<ca-loc>with the appropriate location on the client workstation:" -v <ca-loc>:/etc/pki/ca-trust"
- If the certificates on the client workstation are in the
- Kubernetes certificates
- Mount Kubernetes certificates if you need to
use a certificate to connect to the Kubernetes API
server.
The argument depends on the location of the certificates on the client workstation. Replace
<k8-loc>with the appropriate location on the client workstation:" -v <k8-loc>:/etc/k8scert --env K8S_AUTH_SSL_CA_CERT=/etc/k8scert"
- Default value
- No default value. The directory is created based on the factors described in the preceding text.
- Valid values
- The valid values depend on the arguments that you need to pass to the
OLM_UTILS_LAUNCH_ARGSenvironment variable.- To pass CA certificates, specify:
" -v <ca-loc>:/etc/pki/ca-trust"
- To pass Kubernetes certificates,
specify:
" -v <k8-loc>:/etc/k8scert --env K8S_AUTH_SSL_CA_CERT=/etc/k8scert"
- To pass both CA certificates and Kubernetes
certificates, specify:
" -v <ca-loc>:/etc/pki/ca-trust -v <k8-loc>:/etc/k8scert --env K8S_AUTH_SSL_CA_CERT=/etc/k8scert"
- To pass CA certificates, specify:
To set theOLM_UTILS_LAUNCH_ARGSenvironment variable, run:export OLM_UTILS_LAUNCH_ARGS=" <arguments>"
Important: If you set either of these environment variables, ensure that you add them to your installation environment variables script.