Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packaging: Add the kata manager script #9091

Merged

Conversation

jodh-intel
Copy link
Contributor

Add kata-manager.sh to the release packages.

Fixes: #9066.

Signed-off-by: James O. D. Hunt james.o.hunt@intel.com

@katacontainersbot katacontainersbot added the size/medium Average sized task label Feb 13, 2024
@fidencio
Copy link
Member

@jodh-intel, what's included as part of the release is actually in https://github.com/kata-containers/kata-containers/blob/main/.github/workflows/build-kata-static-tarball-amd64.yaml#L29

Now, the question whether we want to ship as part of the tarball, or as its own file uploaded to github as part of the release. Let's sync about this Tomorrow, @jodh-intel.

@jodh-intel jodh-intel force-pushed the packaging-add-kata-manager-script branch 2 times, most recently from 87fbdf8 to 4840ee6 Compare February 14, 2024 15:59
@jodh-intel
Copy link
Contributor Author

Branch updated to resolve merge conflict.

@jodh-intel
Copy link
Contributor Author

@fidencio - Thanks, I've also updated the YAML config file now 😄


For a bit more detail on why this PR is useful...

Once #9059 lands, you'll be able to switch hypervisor config by running a "one line" command using kata-manager. As shown in the kata-manager docs, you need to call the script using bash and curl to bootstrap your system. But once you've used it to install a working Kata system by running that single command, to switch the hypervisor config, you could either run something like this, to switch your configured hypervisor to Cloud Hypervisor :

$ bash -c "$(curl -fsSL https://raw.githubusercontent.com/kata-containers/kata-containers/main/utils/kata-manager.sh) -S clh

... or, when this PR lands and gets into a release, you could do the same thing by running simply:

$ kata-manager -S clh

Which is a lot easier to remember and type 😄

@fidencio
Copy link
Member

So, I tried to run make kata-manager-tarball and this is the result that I got:

make kata-manager-tarball
make: *** No rule to make target 'kata-manager-tarball'.  Stop.

After adding the patch below it works as expected:

diff --git a/tools/packaging/kata-deploy/local-build/Makefile b/tools/packaging/kata-deploy/local-build/Makefile
index d85382fd1..a6986191f 100644
--- a/tools/packaging/kata-deploy/local-build/Makefile
+++ b/tools/packaging/kata-deploy/local-build/Makefile
@@ -111,6 +111,9 @@ pause-image-tarball:
 kata-ctl-tarball:
        ${MAKE} $@-build
 
+kata-manager-tarball:
+       ${MAKE} $@-build
+
 kernel-dragonball-experimental-tarball:
        ${MAKE} $@-build

Remove some unnecessary whitespace from a couple of `kata-deploy` files.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>

whitespace

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Create a variable for the default binary permissions.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Add `kata-manager.sh` to the release packages.

Fixes: kata-containers#9066.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
@jodh-intel jodh-intel force-pushed the packaging-add-kata-manager-script branch from 4840ee6 to 8c51e02 Compare February 14, 2024 17:44
@jodh-intel
Copy link
Contributor Author

Thanks, @fidencio! Branch updated.

Copy link
Member

@fidencio fidencio left a comment

Choose a reason for hiding this comment

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

lgtm, thanks @jodh-intel.

There are a bunch of whitespace changes that are not related to this PR, but let it be. :-)

Copy link
Contributor

@cmaf cmaf left a comment

Choose a reason for hiding this comment

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

thanks @jodh-intel

@jodh-intel jodh-intel added safe-to-test Add to PR after manually reviewing to allow certain extra checks to run ok-to-test labels Feb 15, 2024
@jodh-intel
Copy link
Contributor Author

/test

@jodh-intel jodh-intel merged commit d1513b2 into kata-containers:main Feb 15, 2024
291 of 300 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test safe-to-test Add to PR after manually reviewing to allow certain extra checks to run size/medium Average sized task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

packaging: Add kata-manager script
4 participants