Skip to content

Add Persisten Volume Example for Unikraft Cloud#440

Open
Dan-Andrei-Simionescu wants to merge 1 commit into
unikraft-cloud:mainfrom
Dan-Andrei-Simionescu:persisten_volume_example
Open

Add Persisten Volume Example for Unikraft Cloud#440
Dan-Andrei-Simionescu wants to merge 1 commit into
unikraft-cloud:mainfrom
Dan-Andrei-Simionescu:persisten_volume_example

Conversation

@Dan-Andrei-Simionescu

Copy link
Copy Markdown

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a new “persistent volume” walkthrough under persistent_volume_example/, showing how to provision and attach block volumes on Unikraft Cloud using Kraft CLI, Unikraft CLI, and direct API calls.

Changes:

  • Introduces a minimal C app + container/rootfs packaging for demonstrating state persisted under /data.
  • Adds a step-by-step README for volume lifecycle operations (create/list/attach/inspect/delete).
  • Adds helper shell scripts for interacting with the Unikraft Cloud volumes/instances API.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
persistent_volume_example/README.md End-to-end tutorial and command snippets for persistent volumes via CLI/API.
persistent_volume_example/ukc.config Environment variable exports for user/metro/token used by the example.
persistent_volume_example/Kraftfile Kraft packaging configuration for the example unikernel image.
persistent_volume_example/Dockerfile Builds and packages the demo C binary into a minimal image.
persistent_volume_example/app_storage.c Demo app that reads/writes a counter to /data/counter.txt.
persistent_volume_example/api/create-volume.sh API helper to create a volume.
persistent_volume_example/api/list-volumes.sh API helper to list volumes.
persistent_volume_example/api/attach-volume-deploy.sh API helper to deploy an instance with an attached volume.
persistent_volume_example/api/get-volume-info.sh API helper to fetch volume info.
persistent_volume_example/api/delete-volume.sh API helper to delete a volume.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread persistent_volume_example/api/create-volume.sh Outdated
Comment thread persistent_volume_example/api/create-volume.sh Outdated
Comment thread persistent_volume_example/api/list-volumes.sh Outdated
Comment thread persistent_volume_example/api/get-volume-info.sh Outdated
Comment thread persistent_volume_example/api/delete-volume.sh Outdated
Comment thread persistent_volume_example/README.md Outdated
Comment thread persistent_volume_example/README.md Outdated
Comment thread persistent_volume_example/README.md Outdated
Comment thread persistent_volume_example/README.md Outdated
Comment thread persistent_volume_example/ukc.config Outdated

@Antonio-88 Antonio-88 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pretty good example using persistent volumes, I find that the inclusion of api/ often comes in handy. Also, the README is extensive and coherent .

@Roxanacmaria

Copy link
Copy Markdown

I reviewed the changes and tested the project. Everything worked correctly, and I didn’t encounter any issues. The implementation is clear and easy to follow.

@Dan-Andrei-Simionescu Dan-Andrei-Simionescu marked this pull request as ready for review July 11, 2026 11:39
@razvand razvand self-assigned this Jul 11, 2026

@razvand razvand left a comment

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.

Thanks, @Dan-Andrei-Simionescu . Loosk good. Some comments.

  1. Start your commit line with capital. I recommend you use the verb Introduce, as in Introduce persistent volume example.
  2. Add additional in the commit message (i.e. commit body) where you detail the content of the commit.
  3. Sign-off your commit.
  4. Use a blank line after each section heading.
  5. For commands and code snippets use triple backticks, followed by the the content type (json, console, etc.). See information here.
  6. Remove trainling whitespaces on lines (if any).
  7. Use the name persistent-volume/ as directory name (with - - minus) instead of persistent_volume_example/.

Comment thread persistent_volume_example/README.md Outdated
Comment thread persistent_volume_example/README.md Outdated
Comment thread persistent-volume/README.md
Comment thread persistent_volume_example/README.md Outdated
Comment thread persistent_volume_example/README.md Outdated
Comment thread persistent_volume_example/README.md Outdated
@Dan-Andrei-Simionescu Dan-Andrei-Simionescu marked this pull request as draft July 12, 2026 20:13
This example demonstrates how to provision, attach, and manage persistent block storage for Unikraft Cloud instances. It includes a C application that logs execution counts to a mounted volume, alongside Kraftfile configurations and detailed README instructions for both CLI and API usage.

Signed-off-by: Dan-Andrei-Simionescu <andreidas04@gmail.com>
@Dan-Andrei-Simionescu Dan-Andrei-Simionescu marked this pull request as ready for review July 12, 2026 20:26
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.

5 participants