Question about Subscribe Custom Extensions

Product: Ecosystem > Applications > Administration
Version: 1020.26.2

I’m new to Cumulocity IoT.

Can I please ask if we could subscribe custom extension for child tenants so that new packages can be automatically pushed down when management tenant receives a new package? Like the way we subscribe applications for child tenants.

If yes, could you please point me to the documentation or CLI for installing an extension to an application?

Hi @leonard_chu,

Installing an extension to an application is described here: Managing the ecosystem - Cumulocity IoT documentation

Depending on the availability that you’ve selected while uploading your extension, your extension will be available to subtenants automatically.
In case the availability is set to shared, the extension will be visible to all subtenants. If it is set to private, it will only be visible to the tenant you’ve uploaded it to. If is is set to market, it will be available to subtenants where you have explicitly subscribed it to.

Regards,
Tristan

1 Like

Hi @Tristan_Bastian,

Thanks for your reply.
I had a look at the documentation and in our management tenant portal.

I can see extension availability selection while adding extension via the portal.
I’m going to do some test.

Now, the extension is created via c8ycli deploy command, and I can’t seem to find options for setting availability with c8ycli. Neither can I see or update this in the portal.

Could you please provide me some direction?

Thanks,
Leonard

When uploading via the UI, you can set the availability either directly in the upload dialog:

Or you do that afterwards in the upper right corner:

The c8ycli is near it’s end of life. The new approach (Web SDK 1019.0.0+) is to use angular CLI. With the angular CLI you can change the availability by defining it in your application options.

Regards,
Tristan

I see.
Updating via UI could work for our case.
Will give it a try.
Thanks again for your help.

Hi @Tristan_Bastian, do you have any example for setting availability using angular CLI during deploy or as a post deploy step?

go-c8y-cli might be a good fit here to deploy the UI plugin to Cumulocity IoT. It is perfect for the CI/CD environment if you want to automate common admin tasks with Cumulocity.

For example:

If you just want to change the availability of an already deployed ui plugin (aka UI Extension), then you can just use this command which sets the availability to MARKET.

c8y ui plugins update --id tedge-container-plugin-ui --availability MARKET

Where the --id flag accepts either the really plugin’s id or name.

Alternatively, you can also use go-c8y-cli to deploy the new ui plugin version after building the zip file. This command will either create or update a UI extension (so it does all of the required steps to create/update the “application” placeholder, uploads the zip file (as a version), and then sets the given tags.

c8y ui plugins create --file ./cloud-http-proxy-ui.zip --availability PRIVATE --tags latest

You can read more about ui extension management via this example page:

If you’re using Github workflows, then there is also an action to easily install and run c8y commands: GitHub - reubenmiller/setup-go-c8y-cli: Setup go-c8y-cli for use in GitHub workflows

Disclosure I am the author of go-c8y-cli

Thanks for the suggestion @Reuben_Miller2 . I will have a go.