Skip to content

docs(features): Add instance templates reference#104

Open
JeromeJaggi wants to merge 1 commit intoprod-stagingfrom
docs/instance-templates
Open

docs(features): Add instance templates reference#104
JeromeJaggi wants to merge 1 commit intoprod-stagingfrom
docs/instance-templates

Conversation

@JeromeJaggi
Copy link
Copy Markdown
Member

Summary

  • Add new instance templates feature page documenting template chains (max depth 4), prepare vs non-prepare modes, named vs anonymous, autokill, creation API, and instance limits

Files changed

  • pages/features/templates.mdx (new)

Comment thread pages/features/templates.mdx Outdated

## Template creation modes

There are two modes for creating a template:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[write-good.ThereIs] Don't start a sentence with 'There are'.

Comment thread pages/features/templates.mdx Outdated

| Mode | Description |
|------|-------------|
| **Non-prepare (cold)** | The instance transitions directly from stopped to template state without starting. No snapshot is produced. |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[write-good.Passive] 'is produced' may be passive voice. Use active voice if you can.

Comment thread pages/features/templates.mdx Outdated

Use prepare templates when the template needs warm state (loaded code, initialized caches, established connections).

## Named vs anonymous templates
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Headings] 'Named vs anonymous templates' should use sentence-style capitalization.

Comment thread pages/features/templates.mdx Outdated
| Type | Description |
|------|-------------|
| **Named** | You provide a name. The template persists and is reusable. Concurrent requests for the same name converge to a single template. |
| **Anonymous** | No name. The template is ephemeral and Unikraft Cloud frees it after the child instance is cloned. |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[write-good.Passive] 'is cloned' may be passive voice. Use active voice if you can.

Comment thread pages/features/templates.mdx Outdated

## Template chains

Templates can be nested up to **4 levels** deep.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[write-good.Passive] 'be nested' may be passive voice. Use active voice if you can.

Comment thread pages/features/templates.mdx Outdated

Create templates in two ways:

1. **Nested creation** — Specify template parameters in the instance creation request (`POST /v1/instances`).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Dashes] Remove the spaces around ' — '.

Comment thread pages/features/templates.mdx Outdated
Create templates in two ways:

1. **Nested creation** — Specify template parameters in the instance creation request (`POST /v1/instances`).
2. **Direct conversion** — Convert an existing instance via `POST /v1/instances/templates/create`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Dashes] Remove the spaces around ' — '.

Comment thread pages/features/templates.mdx Outdated
| Max vCPUs per instance | 32 |

Templates count against the user's instance quota.
There is no dedicated template limit.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[write-good.ThereIs] Don't start a sentence with 'There is'.

Comment thread pages/features/templates.mdx Outdated

* The `kraft cloud` [command-line tool reference](/cli/)
* Unikraft Cloud's [REST API reference](/api/platform/v1)
* [Autoscale](/features/autoscale) — Autoscale uses templates for scale-out
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Dashes] Remove the spaces around ' — '.

Comment thread pages/features/templates.mdx Outdated
* The `kraft cloud` [command-line tool reference](/cli/)
* Unikraft Cloud's [REST API reference](/api/platform/v1)
* [Autoscale](/features/autoscale) — Autoscale uses templates for scale-out
* [Snapshots](/features/snapshots) — Templates use the snapshot mechanism
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Dashes] Remove the spaces around ' — '.

@JeromeJaggi JeromeJaggi force-pushed the docs/instance-templates branch from bc02fab to ce45063 Compare March 31, 2026 19:00
Signed-off-by: Jerome Jaggi <jerome@unikraft.io>
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.

2 participants