[FEATURE] Integration Templating CLI #1451
Labels
enhancement
New feature or request
integration
Integration project
integration-cli
Integration command line Interface
Milestone
integrations-demo.mp4
Integrations CLI Design
Purpose
Provide the user a simple UI to work with integrations, including: creation, packaging, and publishing.
Background
Users don’t have access to a simple workflow to initialize, deploy, and publish Integrations. Maintaining integrations is hard, as it requires a configuration file and multiple directories with correctly set-up resources. To make the process easier for users, we will develop a CLI tool that enables:
YELLOW
should suffice.The CLI is primarily meant for ease-of-use with regard to the integrations ecosystem. There are 3 use cases being targeted.
For now, the integrations CLI is a part of the Observability repository. When integrations are moved to their own repo, the CLI will move with it.
Requirements
integrations-cli create
info
,dataset
,labels
,schema
.input_type
that the user further selects. The input type defines how the data should be interpreted, for example, alogfile
.integrations-cli check
integrations-cli package
_integration/repository
endpoint.pyinstaller
.Design Considerations
Consolidated Validation Logic
The project will have two components that need to work together. Consolidating the logic for the two components is important to avoid inconsistent results.
To facilitate consistent logic for each component, we need to settle on using a standard system for organizing that logic. After consideration, we've settled on:
-06
).In addition to JSON validation, there is more complicated version checking logic that we’ll have to write. How do we maintain consistency with this logic? Some options:
Commands
There has historically been a lot of disagreement on what the different verbs regarding this process mean. Please see the glossary at the end of this document. The exact usage of these verbs must be communicated to the users.
For processing CLI arguments, we will be using the
click
library, for consistency with existing OS CLI tools.CLI Precise Description
integrations-cli --help
integrations-cli create --help
create
is run without a preset, the user is interactively shown the following prompts:integrations-cli check --help
integrations-cli package --help
Tests
A difficult part of testing will be ensuring that the front-end validator does not certify an integration that the API will reject. Using a stable JSON Schema library for the task will be critical, but there should also be integration tests that check the CLI upload against a running cluster with Observability.
To ensure validation is functioning as intended, we should find and include a fuzzing framework, such as JSON Schema to Elm.
New endpoints will need Pen Testing.
Implementation Plan
Short-Term Deliverable
json
module.Goals for 2.7
Goals for 2.8+
Glossary
Build (= Package): Packaging a folder containing an integration into a zip file. The zip should be able to be deployed to the cluster as-is.
Check (= Validate): Ensuring that the integration is correct and will be accepted by the server.
Deploy (= Import): Moving a built integration from a local filesystem to a remote cluster. After this step, all references to the integration should be via a cluster index.
Install: Putting an integration in a local filesystem that will be loaded.
Integration: a folder containing resources that define how to process and display information generated by a data source.
Creation: Creating a new integration in an empty directory, using a template and user input.
Publish: Committing and pushing a local integration as a PR.
The text was updated successfully, but these errors were encountered: