Tear Down a Package

This page explains how to tear down a package in kdb Insights Enterprise using the CLI.

The teardown command enables you to:

  • Terminate packages in RUNNING state, and take the databases and pipelines offline.

  • [Optionally] Remove persistent application data from disk.

Tear down a package

The teardown command can take the name or id of the package deployed on kdb Insights Enterprise. If the package is found and in a running state, it is taken offline.

To tear down a package run the following command:

bash

Copy
kxi pm teardown mypackage

Note

You can use the help command to provide information regarding the additional options

console

Copy
 Usage: kxi pm teardown [OPTIONS] PACKAGE                                       
 Teardown a deployed package running on an insights instance                    
╭─ Authentication option overrides ────────────────────────────────────────────╮
│ --hostname,--url                  TEXT  Insights URL                         │
│ --realm                           TEXT  Realm                                │
│ --client-id                       TEXT  Client id                            │
│ --client-secret                   TEXT  Client secret                        │
│ --auth-enabled/--auth-disabled          Retrieve Bearer Token                │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --rm-data                                      Remove the data associated    │
│                                                with the deployment           │
│ --output-format   -o  [json|table|csv|simple]  Output format for the list    │
│                                                command                       │
│ --db                  TEXT                     Teardown a database in the    │
│                                                package                       │
│ --pipeline            TEXT                     Teardown a pipeline in the    │
│                                                package                       │
│ --server-timeout      INTEGER                  Timeout for Insights server   │
│                                                calls                         │
│ --help                                         Show this message and exit.   │
╰──────────────────────────────────────────────────────────────────────────────╯

Tear down a specific pipeline

To tear down a single pipeline instead of the full package, specify the name of the pipeline you want to tear down. For example:

bash

Copy
kxi pm teardown mypackage --pipeline pipe1

To tear down multiple pipelines, run the kxi pm teardown command as follows:

bash

Copy
kxi pm teardown mypackage --pipeline pipe1 --pipeline pipe2

To remove persistent application data when you tear down a package or a pipeline, add --rm-data when running the command. For example:

  • To remove persistent data for the package, run the command as follows

    bash

    Copy
    kxi pm teardown mypackage --rm-data

  • To remove persistent data for the pipeline alone, run the command as follows

    bash

    Copy
    kxi pm teardown mypackage --pipeline pipe1 --rm-data

Warning

The --rm-data command can only be used as part of the teardown action. It is not possible to remove specific persistent data after the pipeline/database has been torn down.

Note

kdb Insights Enterprise has both a web interface and command line interface (CLI). You can use either one to tear down a package. For information on how to tear down packages using the web interface, refer to the web interface documentation.

Next Steps

Delete a package