Skip to content

feat: Introduce guide on updating the command line args#251

Merged
craciunoiuc merged 1 commit into
mainfrom
razvand/feature/change-instance-cmd
Mar 26, 2026
Merged

feat: Introduce guide on updating the command line args#251
craciunoiuc merged 1 commit into
mainfrom
razvand/feature/change-instance-cmd

Conversation

@razvand

@razvand razvand commented Mar 23, 2026

Copy link
Copy Markdown
Contributor

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 feature-change-instance-cmd/ guide that demonstrates deploying a simple C HTTP server to Unikraft Cloud and creating an instance with updated command-line arguments (via API scripts, plus supporting config/build files).

Changes:

  • Introduces two minimal C HTTP server examples (one fixed reply, one parameterized via argv).
  • Adds shell scripts under api/ to package/push an image and create/start/stop/query/delete instances via the platform API.
  • Adds guide configuration templates (ukc.config.template, app.config), plus Dockerfile, Kraftfile, and README.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
feature-change-instance-cmd/ukc.config.template Adds template env vars for Unikraft Cloud credentials/metro.
feature-change-instance-cmd/http_server_args.c Adds HTTP server variant that uses argv[1] as response body.
feature-change-instance-cmd/http_server.c Adds baseline “Hello, World!” HTTP server.
feature-change-instance-cmd/app.config Adds app/image/instance naming configuration for scripts.
feature-change-instance-cmd/api/stop-instance.sh Adds API script to stop an instance.
feature-change-instance-cmd/api/start-instance.sh Adds API script to start an instance.
feature-change-instance-cmd/api/query.sh Adds helper to query the instance FQDN.
feature-change-instance-cmd/api/push-image.sh Adds script to push the image to the registry.
feature-change-instance-cmd/api/pkg-image.sh Adds script to package the image for kraftcloud.
feature-change-instance-cmd/api/list-services.sh Adds script to list services via API.
feature-change-instance-cmd/api/list-instances.sh Adds script to list instances via API.
feature-change-instance-cmd/api/list-images.sh Adds script to list images via API.
feature-change-instance-cmd/api/get-instance-logs.sh Adds script to fetch/decode instance logs.
feature-change-instance-cmd/api/get-instance-info.sh Adds script intended to fetch instance info.
feature-change-instance-cmd/api/get-image-sha.sh Adds script to find image index/SHA via kraft pkg ls.
feature-change-instance-cmd/api/delete-instance.sh Adds script to delete an instance via API.
feature-change-instance-cmd/api/create-instance.sh Adds script to create an instance from the image.
feature-change-instance-cmd/api/create-instance-with-args.sh Adds script to create an instance with overridden args.
feature-change-instance-cmd/api/create-instance-with-args-old.sh Adds an “old” variant of instance creation with args.
feature-change-instance-cmd/README.md Adds documentation for the guide and command sequence.
feature-change-instance-cmd/Kraftfile Adds kraft spec to build/run the image with a default cmd.
feature-change-instance-cmd/Dockerfile Adds multi-stage build producing a scratch-based image with the binaries + glibc loader.
feature-change-instance-cmd/.gitignore Ignores ukc.config in the guide directory.

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

Comment thread feature-change-instance-cmd/api/delete-instance.sh
Comment thread feature-change-instance-cmd/api/stop-instance.sh
Comment thread feature-change-instance-cmd/api/create-instance-with-args-old.sh Outdated
Comment thread feature-change-instance-cmd/api/get-instance-logs.sh
Comment thread feature-change-instance-cmd/README.md Outdated
Comment thread feature-change-instance-cmd/http_server_args.c Outdated
Comment thread feature-change-instance-cmd/README.md Outdated
Comment thread feature-change-instance-cmd/api/create-instance.sh Outdated
Comment thread feature-change-instance-cmd/api/create-instance-with-args.sh
Comment thread feature-change-instance-cmd/api/get-instance-info.sh
@nurof3n nurof3n force-pushed the razvand/feature/change-instance-cmd branch from 8d4d7b1 to 9fe5586 Compare March 24, 2026 21:16
@razvand razvand marked this pull request as ready for review March 24, 2026 21:17
@nurof3n nurof3n force-pushed the razvand/feature/change-instance-cmd branch from 9fe5586 to 7d66c07 Compare March 24, 2026 21:26
@dragosgheorghioiu dragosgheorghioiu force-pushed the razvand/feature/change-instance-cmd branch from 7d66c07 to 02692cc Compare March 25, 2026 07:18
Comment thread feature-change-instance-cmd/api/create-instance-with-args.sh Outdated
@nurof3n nurof3n force-pushed the razvand/feature/change-instance-cmd branch from 02692cc to 7f01129 Compare March 25, 2026 09:51
@nurof3n nurof3n force-pushed the razvand/feature/change-instance-cmd branch from 7f01129 to e5703aa Compare March 25, 2026 09:53
This guide shows how to create an instance with an updated command line
from the original image.

The guide explains how to do the above basic operations both using the
`kraft` CLI tool and directly using the underlying Unikraft Cloud
platform API.

The target application we use in this guide is a simple C HTTP server.
There are two binary applications to be added in the image:
- `http_server`: a basic HTTP-reply server
- `http_server_args`: a basic HTTP-reply server that can receive as
  argument the message to be sent out

The image is built to use `/http_server` as the entry point / start
command. The guide demonstrates how start an instance that overrides the
start command in the image with a new one: `/http_server_args "Bye,
World!"`.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
@nurof3n nurof3n force-pushed the razvand/feature/change-instance-cmd branch from e5703aa to 4d17d08 Compare March 25, 2026 09:53
Comment thread feature-change-instance-cmd/api/pkg-image.sh
Comment thread feature-change-instance-cmd/api/push-image.sh
Comment thread feature-change-instance-cmd/api/pkg-image.sh
Comment thread feature-change-instance-cmd/api/list-images.sh
Comment thread feature-change-instance-cmd/README.md
Comment thread feature-change-instance-cmd/README.md
Comment thread feature-change-instance-cmd/README.md
Comment thread feature-change-instance-cmd/README.md
Comment thread feature-change-instance-cmd/README.md
Comment thread feature-change-instance-cmd/README.md
@razvand razvand requested review from craciunoiuc and nurof3n March 25, 2026 21:31

@nurof3n nurof3n 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.

LGTM!

Reviewed-by: Alex-Andrei Cioc andrei.cioc@unikraft.io
Approved-by: Alex-Andrei Cioc andrei.cioc@unikraft.io

@craciunoiuc craciunoiuc 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.

All good here. Thanks!

Reviewed-by: Cezar Craciunoiu cezar.craciunoiu@unikraft.com
Approved-by: Cezar Craciunoiu cezar.craciunoiu@unikraft.com

@craciunoiuc craciunoiuc merged commit 81bc413 into main Mar 26, 2026
7 checks passed
@craciunoiuc craciunoiuc deleted the razvand/feature/change-instance-cmd branch April 15, 2026 09:24
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