export-import init

Initialize the cpd-cli export-import command.

Syntax

cpd-cli export-import init \
[--arch=<system-cpu-architecture>] \
[--cpdconfig=<cpd-configuration-location>] \
[--aux-pod-cpu-limit=<auxiliary-pod-cpu-limit-value>] \
[--aux-pod-cpu-request=<auxiliary-pod-cpu-request-value>] \
[--aux-pod-mem-limit=<auxiliary-pod-memory-limit-value>] \
[--aux-pod-mem-request=<auxiliary-pod-memory-request-value>] \
[--image-prefix=<image-registry-prefix>] \
[--log-level=info|debug|warn|error|panic|trace] \
[--namespace=<namespace-name>] \
[--pvc-name=<persistence-volume-claim-name>] \
--profile=<profile-name> \
[--service-account=<openshift-container-platform-service-account>] \
[--verbose]

Arguments

The init command has no arguments.

Options

Table 1: Command options
Option Description
--arch The type of hardware the cluster runs on.
Status
Optional.
Syntax
--arch=${CPU_ARCH}
Default value
x86_64
Valid values
x86_64
The 64-bit version of the x86 instruction set architecture.
ppc64le
The little-endian variant of the PowerPC 64-bit architecture.
--aux-pod-cpu-limit The CPU limit for the IBM® Software Hub auxiliary pod.
Status
Optional.
Syntax
--aux-pod-cpu-limit=<auxiliary-pod-cpu-limit-value>
Default value
0 (unbounded)
Valid values
CPU limits are measured in CPU units. One CPU is equivalent to one CPU core for cloud providers and one hyper-thread on bare-metal Intel processors. An m suffix in a CPU attribute indicates milliCPU (250m is equivalent to 25% of a CPU core).
--aux-pod-cpu-request The CPU request for the IBM Software Hub auxiliary pod.
Status
Optional.
Syntax
--aux-pod-cpu-request=<auxiliary-pod-cpu-request-value>
Default value
0
Valid values
CPU requests are measured in CPU units. One CPU is equivalent to one CPU core for cloud providers and one hyper-thread on bare-metal Intel processors. An m suffix in a CPU attribute indicates milliCPU (250m is equivalent to 25% of a CPU core).
--aux-pod-mem-limit The memory limit for the IBM Software Hub auxiliary pod.
Status
Optional.
Syntax
--aux-pod-mem-limit=<auxiliary-pod-memory-limit-value>
Default value
0
Valid values
Memory can be expressed in various units, where one Mi is one IEC unit megabyte (1024^2), and one Gi is one IEC unit gigabyte (1024^3).
--aux-pod-mem-request The memory request for the IBM Software Hub auxiliary pod.
Status
Optional.
Syntax
--aux-pod-mem-request=<auxiliary-pod-memory-request-value>
Default value
0
Valid values
Memory can be expressed in various units, where one Mi is one IEC unit megabyte (1024^2), and one Gi is one IEC unit gigabyte (1024^3).
--cpdconfig The IBM Software Hub
 configuration location. For example, $HOME/.cpd-cli/config.
Status
Optional.
Syntax
--cpdconfig=<cpd-configuration-location>
Default value
$HOME/.cpd-cli/config
Valid values
A valid IBM Software Hub configuration location.

--help

-h

Display command help.
Status
Optional.
Syntax
--help
Default value
No default.
Valid values
Not applicable.
--image-prefix Specify the image registry prefix.
Status
Optional.
Syntax
--image-prefix=<image-registry-prefix>
Default value
icr.io/cpopen/cpd
Valid values
  • icr.io/cpopen/cpd
  • ${PRIVATE_REGISTRY_LOCATION}
--log-level The command log level.
Status
Optional.
Syntax
--log-level=info|debug|warn|error|panic|trace
Default value
info
Valid values
debug
Debug messages are written to the log.
error
Error messages are written to the log.
info
Informative messages are written to the log.
panic
Panic messages are written to the log.
warn
Warning messages are written to the log.
trace
Trace messages are written to the log.

--namespace

-n

The namespace name in which the utility should operate.
Status
Optional.
Syntax
--namespace=<namespace-name>
Valid values
A valid project (namespace) name. Use ${PROJECT_CPD_INST_OPERANDS}.
--profile The name of the profile that you created to store information about an instance of IBM Software Hub and your credentials for the instance.
Status
Required.
Syntax
--profile=<profile-name>
Default value
No default.
Valid values

The name of the profile that you created.

--pvc-name Specify which persistence volume claim name to use for the command.
Status
Optional.
Syntax
--pvc-name=<persistence-volume-claim-name>
Default value
No default..
Valid values
Any valid persistence volume claim name.
--service-account Specify the OpenShift® Container Platform service account.
Status
Optional.
Syntax
--service-account=<openshift-container-platform-service-account>
Default value
cpd-admin-sa
Valid values
Any valid OpenShift Container Platform service account name.
--verbose Logs include more detailed messages.
Status
Optional.
Syntax
--verbose
Default value
No default.
Valid values
Not applicable.

Examples

Note: The following examples use the recommended installation environment variables.

It is strongly recommended that you use a script to create environment variables with the correct values for your environment. For more information, see Setting up installation environment variables.

Your docker image registry might be different than the provided examples.

Red Hat® OpenShift 4.x
Initialize the cpdtool first with PVC name for storage and the user and password of the IBM Software Hub administrator.
$ cpd-cli export-import init \
--namespace=${PROJECT_CPD_INST_OPERANDS} \
--arch=x86_64 \
--pvc-name=<${PROJECT_CPD_INST_OPERANDS}-pvc> \
--profile=${CPD_PROFILE_NAME} \
--image-prefix=icr.io/cpopen/cpd

Shared volume PVC

export-import requires that a shared volume PVC is created and bounded for use with the init command. If your PV is Portworx, ensure that it is shared enabled.
oc apply -f ${PROJECT_CPD_INST_OPERANDS}-pvc.yaml

${PROJECT_CPD_INST_OPERANDS}-pvc.yaml content:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: ${PROJECT_CPD_INST_OPERANDS}-pvc
spec:
  storageClassName: nfs-client
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 200Gi