Skip to content

feat: bootstrap tenancy on the configured domain - #105

Draft
camreeves wants to merge 22 commits into
masterfrom
PPT-526-tenancy
Draft

camreeves wants to merge 22 commits into
masterfrom
PPT-526-tenancy

Conversation

@camreeves

@camreeves camreeves commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Normal init startup enables cluster administration on the domain configured in PLACE_DOMAIN. This works on existing installations as well as fresh setups.

For an existing domain with an exclusive organisation, init marks that organisation as staff of the management partner. The organisation ID, domain, estate, configuration, grant rows and existing credentials are preserved. An unowned configured domain is attached to management staff. An already configured management domain can be bootstrapped repeatedly. Duplicate hostnames and shared organisations require explicit resolution to avoid elevating another domain.

Placeholder provisioning remains scoped to its organisation, with globally distinct names for legacy validation. Driver and repository catalogs remain shared. The branch includes current init master and pins the refreshed models tenancy branch at 26b6225, along with REST and Staff.

Validation

The tests-first run reproduced the missing management flag, the unowned domain failure and the missing shared-organisation guard on both compiler variants. The corrected startup binary compiles locally. The final specs also cover the existing admin password, unchanged sibling ownership, reuse of the management partner and rejection of duplicate authorities. Both final CI variants pass 19 examples with zero failures, errors or pending cases. Formatting and CI lint pass. The amd64 and arm64 development image was published as ghcr.io/placeos/init@sha256:e0243674fc743a3a617f519b98071a6a85d89d4876491273e5e27230c6cfb3ab. The isolated local suite also passed all 19 examples.

On the test cluster, rerun normal init with the existing PLACE_DOMAIN and verified updated init image. Sign in on that hostname and check that /api/engine/v2/organisations/current returns reach: cluster before using reconciliation.

Tracks PlaceOS/rest-api#472 and PlaceOS/rest-api#465. Depends on PlaceOS/models#332. This remains a draft.

@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Oct 7, 2026
camreeves and others added 3 commits November 6, 2026 14:59
start creates the management partner and its staff organisation and
attaches the first domain to it, so the seeded admin has cluster reach
once tenancy enforcement is on. Placeholder rows are created owned by that
organisation. Builds and clones migrations from the models tenancy branch
until models #332 merges.
Picks up pg-orm 2.5.3, which models now requires.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The spec migrator cloned models master, so specs ran without the tenancy
columns the seeding code writes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 6, 2026
On a cluster that predates tenancy the backfill migration runs before
`start` and gives the first domain an organisation of its own, so the
seeding never attached it to the staff organisation and its admins would
have no cluster reach once enforcement is on.

While that organisation is still as the backfill created it (no partner, no
other domain, the backfill's description), move everything it owns and the
grants scoped to it into the staff organisation and remove it, in one
transaction. Organisations an operator has changed are left alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 6, 2026
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 16, 2026
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 16, 2026
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 16, 2026
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 16, 2026
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 16, 2026
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 16, 2026
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 16, 2026
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 16, 2026
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 16, 2026
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 16, 2026
@stakach stakach changed the title feat: PPT-526 seed the management partner and own the placeholder estate feat: provision tenancy without adopting existing customers Nov 16, 2026
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 23, 2026
@github-actions github-actions Bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 23, 2026
@stakach stakach changed the title feat: provision tenancy without adopting existing customers feat: bootstrap tenancy on the configured domain Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement new feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants