Skip to content

Apply

Usage

The rapd apply command is used to apply specified configuration files to modify RAPD resources. This command can operate on a single file or multiple files within a directory and can be set to wait until the resources are fully deployed.

Terminal window
rapd apply (-f FILENAME | -f DIRECTORY) [flags]

Flags

These are the flags available for the rapd apply command:

Flag NameShort NameDefault ValueRequiredDescription
--file-fYesSpecify the configuration file or directory (recursively).
--waitNoWait for all resources to be fully deployed. Returns return code 1 if deployment is not completed within the specified time.
--timeout120NoSet the timeout period for waiting for resources to be deployed (in seconds).

Examples

Here are some examples of using the rapd apply command:

  1. Apply a single configuration file:
Terminal window
rapd apply -f config.yaml
  1. Apply all configuration files in a directory (recursively):
rapd apply -f configs/
  1. Apply a configuration file and wait for deployment to complete:
Terminal window
rapd apply -f config.yaml --wait
  1. Apply a configuration file and set a timeout of 60 seconds:
Terminal window
rapd apply -f config.yaml --wait --timeout 60
  1. Apply all configuration files in a directory and set a timeout of 120 seconds:
Terminal window
rapd apply -f configs/ --wait --timeout 120

Troubleshooting

  • If the specified file or directory path does not exist, the following error message will be returned:
    Terminal window
    stat [CONFIG_PATH]: no such file or directory
    exit status 1
  • If the —wait and —timeout flags are set and the resource deployment times out, the following error message will be returned:
    Terminal window
    Execute scheduler action function timeout. context deadline exceeded
    exit status 1

Output

Upon successful execution, the command will return output similar to the following: The number of lines depends on the number of files applied by the command.

Terminal window
Apply [CONFIG_FILEPATH] request Success

If there is a failure, the output might be:

Terminal window
[RESOURCE_TYPE] [RESOURCE_NAME] Failed [CONFIG_FILEPATH]