Skip to content

Components and Versions

Note

  • Components are code repos that can be used for digital twin workflows
  • Components can have different versions

Checkout existing components

In the Dashboard you can list all components that are already on ODTP. For all these components you can select them in the tab "COMPONENT OPTIONS". There you can compare their versions between ODPT and github

Dashboard Show existing components Dashboard Select components

In the CLI you can get the metadata for a component from the Mongodb:

odtp db get --collection components
[
    {
        "_id": "66349ff5af3487ca1aace32c",
        "author": "Test",
        "componentName": "odtp-component-example",
        "repoLink": "https://github.com/odtp-org/odtp-component-example",
        "status": "active",
        "title": "Title for ComponentX",
        "type": "ephemeral",
        "description": "Description for ComponentX",
        "tags": [
        "tag1",
        "tag2"
        ],
        "created_at": "2024-05-03 08:27:33.938000",
        "updated_at": "2024-05-03 08:27:33.938000",
        "versions": [
        "66349ff5af3487ca1aace32d"
        ]
    }
]

Add a new component

Add a component:

  • Components are imported by their github url and version tag
  • you can specify ports with --ports

Note

The component will be represented by the component name and the version tag. Make sure to name the component in a way that helps to recognize it: best take the github name of the component's repository.

graph LR
odtp-component-example:v0.1.0;

Dashboard Add a new component

In the CLI you can add a new component by its version tag:

odtp new odtp-component-entry \
--name component-example \
--component-version 0.1.0 \
--repository https://github.com/odtp-org/odtp-component-example

Output:

A component version has been added
component_id_: 65c3ab02b4afbca32db08738
version_id_: 65e00bc02c01a56f2b8c95f9

Add a new version for an existing component

Under the tab "COMPONENT OPTIONS" you can also update a component by adding a new version for it from github.

Dashboard Add a new component version

odtp new odtp-component-entry \
--name component-example \
--component-version 0.1.1 \
--repository https://github.com/odtp-org/odtp-component-example
A component version has been added
component_id_: 65c3ab02b4afbca32db08738
version_id_: 65e00bc02c01a56f2b8c95f9