Overview
Kelvin SDK (or simply KSDK) features a command line interface (CLI) to create, package, and deploy apps to dedicated nodes.
By default, Kelvin applications are written in Python. Kelvin SDK will build them into Docker images that can be deployed anywhere. These Apps process incoming data and generate diagnostics and control changes for a variety of devices and interfaces.
Installation¶
To run Kelvin SDK on your local machine, the following requirements are necessary:
- Python
- Docker
Please refer to the following links for installation instructions:
Many Kelvin SDK commands required Docker to be running.
First Contact with Kelvin SDK¶
The entrypoint command for Kelvin SDK is kelvin.
For historical reasons, ksdk is still available and is an alias to kelvin. Both will work interchangeably.
# type `kelvin` or `ksdk`
kelvin
This will be the first interaction:
Usage: kelvin [OPTIONS] COMMAND [ARGS]...
Kelvin SDK
The complete tool to interact with the Kelvin Ecosystem.
Options:
--info Provide system information and the currently logged platform.
--version 6.2.0
--docs Open the kelvin-sdk documentation webpage.
--tree Display all available commands in a tree structure.
--help Show this message and exit.
Commands:
app Create, build and manage applications.
appregistry Manage the platform's Application Registry.
asset Manage and view assets.
auth Platform authentication.
bridge Manage and view bridges.
client Launch an IPython session ready to access data on the...
configuration Local configurations that enhance the usage of this tool.
datatype Manage and view data types.
emulation Emulate and test applications locally.
label Manage labels on the platform.
node Manage and view nodes.
report Report the user's system information and log records for...
schema General schema operations.
secret Manage platform 'secrets'.
server Run Kelvin as an accessible API Server.
studio Kelvin Studio integration that allows the modification of...
workload Manage and view application workloads.
The command tree¶
Kelvin SDK provides a --tree utility that displays an overview of all operations:
kelvin --tree
Success
Kelvin Command Overview.
node:
└── list: List all the available nodes in the platform.
└── search: Search for specific nodes based on a query.
└── show: Show the details of an node.
└── delete: Delete a node from the platform.
└── provision-script: Add a node to the Kelvin platform in 2 easy steps.
app:
└── create: Create a new application based on the specified parameters.
└── build: Build a local application into a packaged image.
└── migrate: Migrate an application to the latest configuration.
└── images:
└── list: List all locally built applications.
└── remove: Remove an application from the local applications list.
└── unpack: Extract the content of an application from its built image into the specified directory.
└── config: Extract the app configuration file (app.yaml) from a built image into a specific directory.
appregistry:
└── list: List all the available applications on the platform's Application registry.
└── search: Search for specific apps on the platform's Application Registry.
└── show: Show the platform details and configurations for a specific application.
└── upload: Upload an application to the platform's Application Registry.
└── download: Download an application from the platform and make it available locally.
└── delete: Delete an application from the platform's Application Registry.
asset:
└── list: List all the available assets in the platform.
└── search: Search for specific assets based on a query.
└── show: Show the details of an Asset.
└── create: Create a new Asset based on the specified parameters.
└── delete: Delete an Asset from the platform.
└── type:
└── list: List all the available Asset types in the platform.
└── search: Search for specific Asset types in the platform.
└── create: Create a new Asset type based on the specified parameters.
└── delete: Delete Asset types from the platform.
auth:
└── reset: Reset all authentication and configuration cache.
└── login: Login on the platform.
└── logout: Logout from the platform.
└── token: Obtain an authentication token for the platform.
bridge:
└── list: List all available bridges in the platform.
└── search: Search for specific bridges based on a query.
└── show: Show the details of a bridge.
└── assets: List all assets associated with a specific bridge.
└── streams: List all data streams associated with a specific bridge.
└── metrics: List all metrics associated with a specific bridge.
client: Launch an IPython session ready to access data on the platform.
configuration:
└── list: List all the available configurations for this tool.
└── set: Set a local configuration for this tool.
└── unset: Unset a local configuration for this tool.
└── autocomplete: Generate command-completion configuration for KSDK commands.
label:
└── create: Create a label on the platform.
└── list: List all the available labels on the platform.
└── delete: Delete labels on the platform.
datatype:
└── list: List the data types available on the platform.
└── search: Search for specific data types available on the platform.
└── create: Create a basic data type spec file from the provided name.
└── show: Displays the details on a specific datatype.
└── upload: Upload data types to the platform.
└── download: Download a data type from the platform.
emulation:
└── start: Start an application in the emulation system.
└── stop: Stop an application running in the application system.
└── reset: Reset the emulation system.
└── logs: Show the logs of an application running in the emulation system.
└── list: List all applications available on the Emulation System.
report: Report the user's system information and log records for support purposes.
schema:
└── validate: Validate a file against a schema.
secret:
└── create: Create a secret on the platform.
└── list: List all the available secrets on the platform.
└── delete: Delete secrets on the platform.
server:
└── start: Jumpstart the Kelvin Server and access kelvin commands through API calls.
└── stop: Stop the Kelvin Server.
studio:
└── start: Start Kelvin Studio and configure an application.
└── stop: Stop Kelvin Studio.
workload:
└── list: List the workloads available on the platform.
└── search: Search for specific workloads.
└── show: Show the details of a specific workload.
└── deploy: Deploy a workload with specified parameters.
└── update: Update a specific workload based with new configurations.
└── logs: Display the logs of a specific workload.
└── undeploy: Undeploy and delete a workload.
└── start: Start a workload on a node.
└── stop: Stop a running workload.
└── deploy-bulk: Deploy workloads in bulk.
The '--help' command utility¶
At any point in the Kelvin SDK command chain, there is --help available.
kelvin auth login --help
More will information on the kelvin auth command will be displayed:
Usage: kelvin auth [OPTIONS] COMMAND [ARGS]...
Platform authentication.
Options:
--help Show this message and exit.
Commands:
login Login on the platform.
logout Logout from the platform.
reset Reset all authentication and configuration cache.
token Obtain an authentication token for the platform.
The 'info' command¶
kelvin --info is the command responsible for condensing generic operative system information into a single command.
Success
ksdk --info
Current session: No current session available.
System Information:
Python version: 3.8.2 (default, Mar 29 2020, 14:09:55)
Python (path): /path/to/project/repo/my-app/venv
Platform: Darwin
Platform release: 19.6.0
Platform version: Darwin Kernel Version 19.6.0
Architecture: x86_64
Processor: i386
RAM: 16 GB
Next steps¶
You are now ready to:
For advanced users:
- Skip Kelvin apps and connect directly to the Kelvin Broker
- Extract data from Nodes and workloads through Kelvin's API
- Directly deploy through Kelvin's API