Assemblies
The kdb Insights Command Line Interface is used to manage assemblies.
Assemblies are defined within yaml
files and deployed using the CLI. Samples are available to download.
Below is the head of the sdk_sample_assembly.yaml
example:
apiVersion: insights.kx.com/v1
kind: Assembly
metadata:
name: sdk-sample-assembly
labels:
assemblyname: sdk-sample-assembly
spec:
attach: false
...
To manage assemblies, you must first configure the CLI to authenticate with the application. This involves:
- creating a service account client ID and secret
- providing the client ID and secret to
kxi configure
Assembly Deploy
To deploy an assembly, run the following:
kxi assembly deploy --filepath sdk_sample_assembly.yaml
Custom assembly resource sdk-sample-assembly created!
To update your assembly:
- Update your yaml file
- Teardown the assembly
- Redeploy it again
Assembly List
Once deployed, you may view all assemblies by running:
kxi assembly list
ASSEMBLY NAME READY
dfx-assembly True
iot-assembly False
sdk-sample-assembly True
Assembly Status
Assemblies may consist of a number of components. You can use the kxi assembly status
command
to check the status of the deployed components.
For a quick view of the created resources, get the assembly status:
kxi assembly status --name sdk-sample-assembly
{
"id": "",
"name": "sdk-sample-assembly",
"editable": false,
"running": true,
"ready": true,
"syncStatus": false,
"k8sStatus": [
{
"status": "True",
"type": "MountReady"
},
{
"lastTransitionTime": "2022-12-19T15:06:31Z",
"lastUpdateTime": "2022-12-19T15:06:31Z",
"status": "True",
"type": "StorageManagerReady"
},
{
"lastTransitionTime": "2022-12-19T15:06:24Z",
"lastUpdateTime": "2022-12-19T15:06:24Z",
"status": "True",
"type": "DataAccessReady"
},
{
"lastTransitionTime": "2022-12-19T15:06:52Z",
"lastUpdateTime": "2022-12-19T15:06:52Z",
"status": "True",
"type": "SequencerReady"
},
{
"lastTransitionTime": "2022-12-19T15:06:39Z",
"lastUpdateTime": "2022-12-19T15:06:39Z",
"status": "True",
"type": "PipelineReady"
},
{
"lastTransitionTime": "2022-12-19T15:06:24Z",
"lastUpdateTime": "2022-12-19T15:06:24Z",
"status": "True",
"type": "QueryEnvironmentReady"
},
{
"lastTransitionTime": "2022-12-19T15:06:52Z",
"lastUpdateTime": "2022-12-19T15:06:52Z",
"status": "True",
"type": "AssemblyReady"
}
]
}
Teardown Assembly
You can stop an assembly using the teardown
command.
Note
This teardown process does not remove the persisted application data. These remain as Persisted Volumes (PVCs) within the Kubernetes cluster.
kxi assembly teardown --name sdk-sample-assembly
Tearing down assembly sdk-sample-assembly
Are you sure you want to teardown sdk-sample-assembly [y/N]: y
After you have torn down a YAML assembly, it will be removed from the kxi assembly list
response.
You can also teardown UI-managed assemblies and this will flip their status.
The example below shows a YAML assembly being removed from the list
output.
kxi assembly list
ASSEMBLY NAME READY
dfx-assembly True
iot-assembly False