feat: Introduce guide on updating the command line args#251
Conversation
There was a problem hiding this comment.
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), plusDockerfile,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.
8d4d7b1 to
9fe5586
Compare
9fe5586 to
7d66c07
Compare
7d66c07 to
02692cc
Compare
02692cc to
7f01129
Compare
7f01129 to
e5703aa
Compare
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>
e5703aa to
4d17d08
Compare
nurof3n
left a comment
There was a problem hiding this comment.
LGTM!
Reviewed-by: Alex-Andrei Cioc andrei.cioc@unikraft.io
Approved-by: Alex-Andrei Cioc andrei.cioc@unikraft.io
craciunoiuc
left a comment
There was a problem hiding this comment.
All good here. Thanks!
Reviewed-by: Cezar Craciunoiu cezar.craciunoiu@unikraft.com
Approved-by: Cezar Craciunoiu cezar.craciunoiu@unikraft.com
No description provided.