Skip to content

Update kernel install UX#19

Closed
adityaramani wants to merge 18 commits intomainfrom
users/a_ramani/install-ux
Closed

Update kernel install UX#19
adityaramani wants to merge 18 commits intomainfrom
users/a_ramani/install-ux

Conversation

@adityaramani
Copy link
Contributor

This change updates the UX when we install required dependencies at first launch

Fresh install - respond y to prompt

➜ bin/container system start
Verifying apiserver is running...
Installing base container filesystem...
No default kernel configured.
Install the recommended default kernel from [https://github.com/kata-containers/kata-containers/releases/download/3.17.0/kata-static-3.17.0-arm64.tar.xz]? [Y/n]: y
Installing kernel...

Fresh install - respond n to prompt and then run the provided command

➜ bin/container system start
Verifying apiserver is running...
No default kernel configured.
Install the recommended default kernel from [https://github.com/kata-containers/kata-containers/releases/download/3.17.0/kata-static-3.17.0-arm64.tar.xz]? [Y/n]: n
Please use the `container system kernel set --recommended` command to configure the default kernel

➜ bin/container system kernel set --recommended
Installing the recommended kernel from https://github.com/kata-containers/kata-containers/releases/download/3.17.0/kata-static-3.17.0-arm64.tar.xz...

Fresh install - respond n to prompt and then run a container

➜ bin/container system start
Verifying apiserver is running...
Installing base container filesystem...
No default kernel configured.
Install the recommended default kernel from [https://github.com/kata-containers/kata-containers/releases/download/3.17.0/kata-static-3.17.0-arm64.tar.xz]? [Y/n]: n
Please use the `container system kernel set --recommended` command to configure the default kernel

➜ bin/container run alpine uname
Error: notFound: "Default kernel not configured for architecture arm64. Please use the `container system kernel set` command to configure it

katiewasnothere and others added 18 commits June 3, 2025 15:23
Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
* Format the codebase (#50)

Signed-off-by: Aditya Ramani <a_ramani@apple.com>

* Update packages before going public (#48)

---------

Signed-off-by: Aditya Ramani <a_ramani@apple.com>
Co-authored-by: Aditya Ramani <a_ramani@apple.com>
Co-authored-by: dkovba <dkovba@apple.com>
* Addresses remaining TODO items in user documentation.

* Add functional model diagram.
This PR resolves warnings:
```
…/.build/checkouts/swift-docc-plugin/Plugins/Swift-DocC Preview/Symbolic Links/SwiftDocCPluginUtilities/BuildGraph/DocumentationBuildGraph.swift:106:17: warning: capture of non-sendable type 'Target.Type' in an isolated closure
104 |             // Copy the closure and the target into a block operation object
105 |             let new = BlockOperation { [work, task] in
106 |                 work(task)
    |                 `- warning: capture of non-sendable type 'Target.Type' in an isolated closure
107 |             }
108 |             operationsByID[task.id] = new

…/.build/checkouts/swift-docc-plugin/Plugins/Swift-DocC Preview/Symbolic Links/SwiftDocCPluginUtilities/BuildGraph/DocumentationBuildGraph.swift:105:41: warning: capture of non-sendable type 'Target.Type' in an isolated closure
103 |             }
104 |             // Copy the closure and the target into a block operation object
105 |             let new = BlockOperation { [work, task] in
    |                                         `- warning: capture of non-sendable type 'Target.Type' in an isolated closure
106 |                 work(task)
107 |             }
```
The added lines mirror the ones in containerization.
Its a bit weird to have to pass `--http` when pulling / pushing images
if we are trying to do so from a local registry

This PR adds a `RequestScheme` enum type which tries to detect if the
connection to the registry should be over http or https. This auto
detection is the default behavior and can be overridden by passing the
`--scheme http/https` flag to the `run` ,`pull`, `push` `login` and
`registry default` command

The auto detection works by looking at the hostname / IP. HTTP is used
in the following cases
 - If the hostname starts with `localhost` or  is `127.x.x.x`
 - if the host looks like an IP from the private address space
 - If the host ends with the current default dns domain name

Also in this PR:
- Removing some used CLI flag groups and TODOs
- Better error messages when registry credentials are not found for a
host

Signed-off-by: Aditya Ramani <a_ramani@apple.com>
Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
The output now looks like the following

#### When build against a tagged HEAD in `RELEASE` mode
```
container --version
container CLI version 0.0.2 (build: release, commit: ed4a4cb)
```
…ut` (#18)

This PR resolves a race with `\u{001B}[2K`, but not with `\r`, which
will be addressed in a separate PR by moving progress updates to
`stdout`. Please test it in a small window in your terminal application
on the `users/a_ramani/install-ux` branch using commands:
```
bin/container system stop
make cleancontent
bin/container system start
```
You should see the prompt:
> Install the recommended default kernel from
[https://github.com/kata-containers/kata-containers/releases/download/3.17.0/kata-static-3.17.0-arm64.tar.xz]?
[Y/n]:
- break up readme into separate files
- rework hedaings on Code of Conduct
- Add a CONTRIBUTORS.txt
Signed-off-by: Aditya Ramani <a_ramani@apple.com>
@mavenugo
Copy link
Contributor

mavenugo commented Jun 5, 2025

am sure it is a typo ... but I see that the following text is missing in the "Fresh install - respond n to prompt and then run the provided command" section :

Installing base container filesystem...

@adityaramani
Copy link
Contributor Author

Yes you are right - it was a typo.

am sure it is a typo ... but I see that the following text is missing in the "Fresh install - respond n to prompt and then run the provided command" section :

Installing base container filesystem...

@adityaramani
Copy link
Contributor Author

Reopened : #22

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.

6 participants