Commit Graph

71 Commits

Author SHA1 Message Date
James O. D. Hunt
d4d65bed38 manager: Add option to enable component debug
Added a `-d` option to `kata-manager` to enable Kata Containers
and containerd debug.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-03-10 09:19:29 +00:00
James O. D. Hunt
019da91d79 manager: Whitespace fix
Remove additional blank line in the `kata-manager`.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-03-10 09:19:29 +00:00
James O. D. Hunt
d234cb76b5 manager: Create containerd link
Make the `kata-manager` create a `containerd` link to ensure the
downloaded containerd systemd service file can find the daemon when
using the GitHub packaged version of containerd.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-03-10 09:19:29 +00:00
James O. D. Hunt
493ebc8ca5 utils: Update kata manager docs
Update the `kata-manager.sh` README to recommend users view the
available options before running the script.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-02-15 16:05:54 +00:00
James O. D. Hunt
34b2e67d48 utils: Added more kata manager cli options
Added CLI options to the `kata-manager.sh` script to:

- Force installation
- Disable cleanup (retain downloaded files)
- Only install Kata (don't consider containerd).

> **Note:**
>
> This change introduces a subtle behaviour difference:
>
> - Previously, the script would error if containerd was already installed.
>
> - Now, the script will detect the existing installation and skip
>   trying to install containerd.
>
> This new behaviour makes more sense for most users but if you wish
> to use the old behaviour, you (now) need to run the script specifying
> the `-f` (force) option.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-02-15 16:05:54 +00:00
James O. D. Hunt
714c9f56fd utils: Improve containerd configuration
`kata-manager.sh` improvements for containerd:

- Fixed containerd default branch (which is now `main`).
- Only install service file if it doesn't already exist.
- Enable the containerd service to ensure it can be started.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-02-15 16:05:54 +00:00
James O. D. Hunt
c464f32676 utils: kata-manager: Force containerd sym link creation
For consistency with the rest of the script force the creation of a
symbolic link for containerd in `kata-manager.sh`.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-02-15 16:05:54 +00:00
James O. D. Hunt
4755d004a7 utils: Fix unused parameter
Actually make use of the `requested_version` parameter in
`kata-manager.sh` and added a comment.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-02-15 16:05:54 +00:00
James O. D. Hunt
601be4e63b utils: Fix containerd installation
Fix bug introduced inadvertently on #3330 which fixes the Kata
installation, but unfortunately breaks installing containerd.

The new approach is to check that the download URL matches a
project-specific regular expression.

Also improves the architecture test to handle the containerd
architecture name (`amd64` rather than `x86_64`).

Fixes: #3674.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-02-15 16:05:54 +00:00
James O. D. Hunt
ae21fcc799 utils: Fix Kata tar archive check
The static tar archive published on GitHub (now) contains `./` which is
being being flagged as an "unknown path" and resulting in the
`kata-manager.sh` script failing.

Partially fixes: #3674.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-02-15 16:05:54 +00:00
James O. D. Hunt
f4d1e45c33 utils: Add kata-manager CLI options for kata and containerd
Add options to `kata-manager.sh` to allow the version of Kata and
containerd to be specified.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-02-15 16:05:52 +00:00
James O. D. Hunt
3f87835a0e utils: Switch kata manager to use getopts
Use `getopts(1)` for command line argument parsing in
`kata-manager.sh`.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-02-15 08:55:54 +00:00
Sebastian Hasler
adffd3f8b6 scripts: Use shebang /usr/bin/env bash
Not all distros have `/bin/bash`, e.g. NixOS.

Fixes: #3450

Signed-off-by: Sebastian Hasler <sebastian.hasler@stuvus.uni-stuttgart.de>
2022-01-13 22:53:28 +01:00
Bin Liu
b2166560fa
Merge pull request #3375 from zhaojizhuang/debianrootfs
osbuilder: Restore Debian as a rootfs
2022-01-05 10:27:47 +08:00
zhaojizhuang
3093f93a6f osbuilder: Restore Debian as a rootfs
Restore Debian as a rootfs.
1. revert of #3154, but some change
2. update debian version to 10.11
3. update  `libstdc++-6-dev` to `libstdc++-8-dev`
4.  changes discarded in QAT are not restored

Fixes: #3372
Signed-off-by: zhaojizhuang <571130360@qq.com>
2022-01-04 11:54:34 +08:00
Jakob Naucke
cb5c948a0a
kata-manager: Retrieve static tarball
In `utils/kata-manager.sh`, we download the first asset listed for the
release, which used to be the static x86_64 tarball. If that happened to
not match the system architecture, we would abort. Besides that logic
being invalid for !x86_64 (despite not distributing other tarballs at
the moment), the first asset listed is also not the static tarball any
more, it is the vendored source tarball. Retrieve all _static_ tarballs
and select the appropriate one depending on architecture.

Fixes: #3254
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-12-15 14:34:14 +01:00
Gabriela Cervantes
923e098db6 osbuilder: Remove debian as a rootfs
Currently we do not have debian as part of the kata CI as we
do not have a mantainer, this PR removes debian as a supported
rootfs in order to have only the distros that we are supporting
and mantainining.

Fixes #3153

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2021-11-30 19:31:33 +00:00
Binbin Zhang
4d7ddffe6f utils: kata-manager: Update kata-manager.sh for new containerd config
update script for new containerd config

Fixes: #2188

Signed-off-by: Binbin Zhang <binbin36520@gmail.com>
2021-09-05 17:15:15 +08:00
Peng Tao
fd5592d4d5 branch: change 2.0-dev to main
Change all mentioning of 2.0-dev to main so that we can rename the
default branch to main.

Fixes: #1310
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2021-01-22 15:49:35 +08:00
Daniel Knittl-Frank
d2fe709174 cli: Use new subcommand forms in kata-manager script
Update the `kata-manager` script to call the new subcommand forms
without `kata-` prefix.

Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com>
2020-10-24 15:27:32 +02:00
James O. D. Hunt
43d70a32df docs: Add containerd install guide
Create a containerd installation guide and a new `kata-manager` script
for 2.0 that automated the steps outlined in the guide.

Also cleaned up and improved the installation documentation in various
ways, the most significant being:

- Added legacy install link for 1.x installs.
- Official packages section:
  - Removed "Contact" column (since it was empty!)
  - Reworded "Versions" column to clarify the versions are a minimum
    (to reduce maintenance burden).
  - Add a column to show which installation methods receive automatic updates.
  - Modified order of installation options in table and document to
    de-emphasise automatic installation and promote official packages
    and snap more.
- Removed sections no longer relevant for 2.0.

Fixes: #738.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-10-12 17:54:53 +01:00