Skip to content

feat(cumulocity): set up a tenant with a c8y-tenant-sync bundle - #46

Merged
reubenmiller merged 5 commits into
mainfrom
ci/tenant-sync-bundle
Nov 25, 2026
Merged

reubenmiller merged 5 commits into
mainfrom
ci/tenant-sync-bundle

Conversation

@reubenmiller

@reubenmiller reubenmiller commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

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:

c8y tenant-sync run https://github.com/thin-edge/tiny-edge/releases/latest/download/tiny-edge-tenant.tar.gz --dry

Changes

  • cumulocity/tenant.yaml: a c8y-tenant-sync manifest with everything the devices need:

    • features: mqtt-service.smartrest, certificate-authority, data-prep.ui-visibility
    • microservices: mqtt-service, data-prep-ctrl, dtm, device-parameter
    • applications: Data Preparation, Digital Twin Manager
    • DTM property definitions from cumulocity/dtm/*.json
    • every Smart Function package in cumulocity/smart-functions/

    The applications are owned by the management tenant. A tenant which may not subscribe them itself reports them as skipped (not failed), and its parent tenant subscribes them.

  • release-please.yml: a tenant-bundle job, which runs after a release is published. It installs go-c8y-cli and c8y-tenant-sync v0.11.1 with reubenmiller/setup-go-c8y-cli, bundles the manifest with its files, and uploads tiny-edge-tenant.tar.gz. The name has no version, so releases/latest/download/… always works. It needs no Cumulocity credentials.

  • cumulocity/README.md: "Set up a tenant" uses c8y-tenant-sync: run the latest bundle, run tenant.yaml from 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.sh and cumulocity/dtm/register.sh: the manifest replaces them. Anyone who scripted them needs to switch to c8y 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.
  • A dry run of the bundle (--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.
  • The dependency names come from a tenant which has DTM and Data Preparation. A dry run of the features and subscriptions against a tenant has not been done yet.
  • The release job itself runs only on the next release.

🤖 Generated with Claude Code

reubenmiller and others added 5 commits November 25, 2026 19:23
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>
@reubenmiller reubenmiller changed the title feat(cumulocity): attach a c8y-tenant-sync bundle to each release feat(cumulocity): set up a tenant with a c8y-tenant-sync bundle Nov 25, 2026
@reubenmiller
reubenmiller merged commit bc547bb into main Nov 25, 2026
21 checks passed
@reubenmiller
reubenmiller deleted the ci/tenant-sync-bundle branch November 25, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant