Tips and tricks for using APICUP
The APICUP installer in Install Assist contains built-in time saving functions.
Introduction
This section describes tips and techniques for working with the APICUP installation commands. The APICUP installer creates charts and secrets that are then managed by Helm.
Running Tiller with APICUP
export TILLER_NAMESPACE=apicEntering multiple settings per command
To configure multiple settings per command, enter a space between each setting and enter an equals sign (=) to configure the setting.
In the following examples, be sure to replace [spc] with an actual space.
apicup subsys set mgmt cassandra-max-memory-gb=9[spc]cassandra-cluster-size=3[spc]cassandra-volume-size-gb=16[spc]cassandra-backup-protocol=sftp
apicup subsys set mgmt platform-api=my.platform.com[spc]api-manager-ui=my.apim.com[spc]cloud-admin-ui=my.cloud.com[spc]consumer-api=my.consumer.comEntering multiple values
apicup subsys set mgmt dns-servers=8.8.8.8,4.4.4.4 search-domains=a.com,b.comViewing the settings for a subsystem
To view the current values that are set for a subsystem, enter the following command:
apicup subsys get <subsys_name>. For example: apicup subsys get
mgmt outputs the current values for the subsystem named mgmt and provides
a description of each value. The output from the get command is organized into
Kubernetes settings and Subsystem settings. Following is an example:
Kubernetes settings
===================
Name Value Description
---- ----- ------
extra-values-file (Optional) Path to additional configuration yml file
ingress-type ingress Ingress type (use `route` for OpenShift)
mode standard mode
namespace default K8S namespace to install into
registry Docker image registry to use
registry-secret Docker registry credentials secret
storage-class - K8S storage class for persistent storage
Subsystem settings
==================
Name Value Description
---- ----- ------
cassandra-backup-auth-pass (Optional) Server password for DB backups
cassandra-backup-auth-user (Optional) Server username for DB backups
cassandra-backup-host (Optional) FQDN for DB backups server
cassandra-backup-path /backups (Optional) path for DB backups server
cassandra-backup-port 22 (Optional) Server port for DB backups
cassandra-backup-protocol sftp (Optional) Protocol for DB backups (sftp/ftp)
cassandra-backup-schedule 0 0 * * * (Optional) Cron schedule for DB backups
cassandra-cluster-size 1 Size of DB cluster (min 3 for HA)
cassandra-max-memory-gb 9 Memory limit for DB
cassandra-volume-size-gb 50 Size of DB storage volume (not resizable)
create-crd true Create DB cluster CRDS (Required cluster admin privilege)
external-cassandra-host (Optional) Hostname of externally hosted DB
Endpoints
=========
Name Value Description
---- ----- ------
api-manager-ui FQDN of API manager UI endpoint
cloud-admin-ui FQDN of Cloud admin endpoint
consumer-api FQDN of consumer API endpoint
platform-api FQDN of platform API endpoint
Error: Subsystem validation failure. Run with --validate to see details
Validating the settings for a subsystem
The values set for a subsystem can be validated for syntax by entering the
--validate option for the get command: apicup subsys get
<subsys_name> --validate. For example: apicup subsys get mgmt
--validate validates the current values for the subsystem named mgmt. In
the following example of the output for the --validate option, the check mark
indicates a valid setting. The x indicates an invalid setting with an error message provided.
Subsystem settings
==================
Name Value
---- -----
cassandra-backup-auth-pass ✔
cassandra-backup-auth-user ✔
cassandra-backup-host ✔
cassandra-backup-path /backups ✔
cassandra-backup-port 22 ✔
cassandra-backup-protocol sftp ✔
cassandra-backup-schedule 0 0 * * * ✔
cassandra-cluster-size 1 ✔
cassandra-max-memory-gb 9 ✔
cassandra-volume-size-gb 50 ✔
create-crd true ✔
external-cassandra-host ✔
Endpoints
=========
Name Value
---- -----
api-manager-ui ✘ api-manager-ui is not a valid hostname
cloud-admin-ui ✘ cloud-admin-ui is not a valid hostname
consumer-api ✘ consumer-api is not a valid hostname
platform-api ✘ platform-api is not a valid hostname
Output an installation plan
Using APICUP, you can generate an installation plan and confirm it is correct prior to running the installation. You can then install the subsystem from the plan.
To output an installation plan, enter the following command:
apicup subsys install SUBSYS --out=install-plan
where <install-plan> is the name of the directory where the installation plan will be stored.
In the example, a directory named install-plan is created in the project directory. The myProject/install-plan directory contains the configuration parameters for the subsystem.
To install the subsystem from the install-plan, enter the following command from the project directory:
apicup subsys install SUBSYS --plan-dir=<full-path-to-plan-directory>
where <full-path-to-plan-directory> is the full qualified path to the plan directory.
Following are general rules for installing from the installation plan:
- Never edit the files in the output directory directly. Instead, if changes are needed, update the parameters using APICUP and generate a new plan.
- Always run APICUP commands from the original project directory created during the initial product installation. The project directory contains the apiconnect-up.yml file.
- You can generate the plan in any location, but the install command must be run from the project
directory. Enter the full path to the plan as the argument to
--plan-dirto perform an installation.
the project was modified since the plan was generated, regenerate plan or skip this check
with a --no-verify flag in the commandorthe certs were changed since the plan was generated, regenerate plan or skip this check with
a --no-verify flag in the commandGetting help for commands
You can get help for all commands by entering: apicup --help. Following is an
example of the output:
APIConnect Install Assist
Usage:
apicup [command]
Available Commands:
certs Subsystem certificates
completion Generates bash or zsh completion scripts
help Help about any command
hosts Commands to configure subsystem hosts
iface Commands to configure hosts interfaces
init Create a new APIConnect UP project
registry-upload Retag and upload images to custom registry
server Starts the APIConnect cluster operator
subsys Subsystem commands
version Get the APIConnect UP version
Flags:
--accept-license Accept the license for API Connect
--debug Enable debug logging
-h, --help help for apicup
Use "apicup [command] --help" for more information about a command.
Getting help on a specific command
For help on a specific command, enter --help after the command. For example,
apicup subsys get mgmt --help prints out the usage and flags for
the get command. For example:
Get subsystem properties
Usage:
apicup subsys get SUBSYS [flags]
Flags:
--endpoints List endpoints (default true)
-h, --help help for get
--platform List platform settings (default true)
--subsystem List subsystem settings (default true)
--validate Validate settings
Global Flags:
--accept-license Accept the license for API Connect
--debug Enable debug logging