Repository navigation
feat(cumulocity): set up a tenant with a c8y-tenant-sync bundle - #46
Merged
Merged
Conversation
Add cumulocity/tenant-sync.yaml, a c8y-tenant-sync manifest with the DTM parameter sets and the Smart Functions, and a release job which bundles it with its files as tiny-edge-tenant-sync_<version>.tar.gz. A tenant's manifest can include the bundle from the release, or run it as it is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lead the tenant setup with a tenant manifest which enables the features and includes the release bundle. setup-tenant.sh and dtm/register.sh stay as the way without the extension. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
c8y-tenant-sync now sets up a tenant from cumulocity/tenant-sync.yaml, so the scripts which did the same are no longer needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cumulocity/tenant.yaml enables the tenant features and includes the tenant-sync bundle of its own release. release-please pins that release in each release PR, and the release job attaches the file as tiny-edge-tenant.yaml, so one URL sets up a tenant: c8y tenant-sync run https://github.com/thin-edge/tiny-edge/releases/latest/download/tiny-edge-tenant.yaml Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge tenant-sync.yaml into cumulocity/tenant.yaml, which now also declares the dependencies: the data-prep.ui-visibility feature, the mqtt-service, data-prep-ctrl, dtm and device-parameter microservices, and the Data Preparation and Digital Twin Manager applications. Each release carries it as tiny-edge-tenant.tar.gz, with no version in the name, so releases/latest/download/tiny-edge-tenant.tar.gz always works. The standalone tiny-edge-tenant.yaml and its release-please pin are no longer needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Set up a Cumulocity tenant for tiny-edge with c8y-tenant-sync instead of the shell scripts. Each release carries the setup as one bundle,
tiny-edge-tenant.tar.gz, so one command sets up a tenant:Changes
cumulocity/tenant.yaml: a c8y-tenant-sync manifest with everything the devices need:mqtt-service.smartrest,certificate-authority,data-prep.ui-visibilitymqtt-service,data-prep-ctrl,dtm,device-parametercumulocity/dtm/*.jsoncumulocity/smart-functions/The applications are owned by the
managementtenant. A tenant which may not subscribe them itself reports them as skipped (not failed), and its parent tenant subscribes them.release-please.yml: atenant-bundlejob, which runs after a release is published. It installs go-c8y-cli and c8y-tenant-syncv0.11.1withreubenmiller/setup-go-c8y-cli, bundles the manifest with its files, and uploadstiny-edge-tenant.tar.gz. The name has no version, soreleases/latest/download/…always works. It needs no Cumulocity credentials.cumulocity/README.md: "Set up a tenant" uses c8y-tenant-sync: run the latest bundle, runtenant.yamlfrom a checkout, or include a pinned release's bundle from the tenant's own manifest, where an application also adds its own DTM sets.Removed
cumulocity/setup-tenant.shandcumulocity/dtm/register.sh: the manifest replaces them. Anyone who scripted them needs to switch toc8y tenant-sync run. The per-rule Smart Function packages and the curl example for deploying one by hand stay.Testing
c8y tenant-sync validate cumulocity/tenant.yaml: valid, with 3 features, 4 microservices, 2 applications, and the DTM and Smart Function sources.c8y tenant-sync bundle: the bundle holds the manifest, both DTM files and all 4 Smart Function packages.--only digitalTwin,smartFunctions, no tenant) plans 2 DTM property definitions and 4 Smart Function rules. Earlier, a manifest fetched over HTTP that includes the bundle by URL planned the same.🤖 Generated with Claude Code