Introducing Cloud Foundry CLI Plugin for Managing Predix Analytics Catalog
Analytics Catalog is a service in GE Predix that provides a repository for hosting and exposing analytic assets. Today, we’re introducing a Cloud Foundry command-line interface (CF CLI) plugin that enables you to access Predix Analytics Catalog features via the CLI.
For instance, one can add “an analytic” to the catalog, delete it, test it in a Cloud Foundry environment, and download an analytic’s artifact through the CF CLI.
Building from code sources:
- Clone the repository.
- Go to the repository directory.
Binaries or URL:
- Copy the URL or download the binary for your platform from the latest release page.
cf install-pluginwith either the copied URL or the downloaded binary:
cf install-plugin [URL|binary]
To install the plugin from the repository of the Cloud Foundry Community, run the following commands:
cf add-plugin-repo CF-Community https://plugins.cloudfoundry.org/ cf install-plugin cf-predix-analytics-plugin -r CF-Community
To manage analytics, the plugin provides the following commands:
|Displays the list of analytics|
|Adds an analytic to the catalog|
|Deletes the specified analytic|
|Validates the analytic|
|Deploys the analytic|
|Runs the analytic|
|Gets the recent analytic logs|
Here are some of the commands in action:
Managing analytic’s artifacts
To manage the artifacts of an analytic catalog entry, the plugin provides the following commands:
|Lists the analytic artifacts|
|Downloads the specified analytic artifact|
|Uploads the specified file as an analytic artifact|
|Deletes the specified analytic artifact|
Managing analytics taxonomy
To manage the taxonomy, the plugin provides the following commands:
|Retrieves the full taxonomy structure|
|Adds a taxonomy to the catalog|
The plugin also provides the
analytics-curl command that allows you to execute requests to the targeted Analytics Catalog API endpoint.
For the source code of the solution, visit the plugin’s repository. If you have any questions about working with it, just let me know.