Commit Graph

32 Commits

Author SHA1 Message Date
Julio Montes
24fff57c23 snap: make curl commands consistent
remove -k and -Ssf from curl commands

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-10-19 08:36:06 -05:00
Julio Montes
2b9f79cfc9 snap: add cloud-hypervisor and experimental kernel
Add cloud-hypervisor and experimental kernel as part of the kata snap

fixes #2852

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-10-19 08:35:06 -05:00
David Gibson
041a513f80 versions: Update qemu to v6.1.0
We need qemu-6.1 for ACPI PCI hotplug support for the q35 machine.  At the
moment qemu will use SHPC hotplug under the PCIe to PCI bridge on q35.
SHPC is too slow to use for our purposes (it requires a 5s delay).

Update the qemu version to v6.1.0.  This leaves the experimental version
*older* than the normal version, but we'll fix that up later.

We also need to tweak the snapcraft.yaml, since the location for configs
has changed in the new qemu version.

fixes #1691

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2021-09-11 16:43:22 +10:00
David Gibson
4996f9b7da snap: Test variable instead of executing "branch"
In snapcraft.yaml we have a case statement on $(branch) - that is on the
output of executing a command "branch".  From the selections it appears
that what it actually wants is to simply select on the contents of the
$branch variable, which should be ${branch} instead.

fixes #2558

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2021-09-02 14:38:15 +10:00
Jianyong Wu
6871aeaa60 snap: enable snap build for arm64
snap build for arm64 fail for a long time, here we enable it.
the changes:
1. correct the variable of "branch"
2. add v5.1.0 under tag_patchs

Fixes: #2194
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2021-08-06 17:11:58 +08:00
James O. D. Hunt
4f0726bc49 docs: Remove table of contents
Removed all TOCs now that GitHub auto-generates them.

Also updated the documentation requirements doc removing the requirement
to add a TOC.

Fixes: #2022.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-07-30 10:58:22 +01:00
Fabiano Fidêncio
2d142bc92d
Merge pull request #2155 from jcvenegas/kata-deploy-2021-06-29
kata-deploy: Allow build  kata-deploy  tarball from HEAD
2021-07-29 22:50:03 +02:00
Carlos Venegas
3533a5b61d Packaging: stop using GOPATH for yq.
Use the yq installed in the env.  Needed
to build kata from docker. The container builder
has not an initial Go env.

Signed-off-by: Carlos Venegas <jos.c.venegas.munoz@intel.com>
2021-07-28 19:45:35 +00:00
Jakob Naucke
8e9ffe6f3a
snap: Substitute image configuration with initrd
rather than removing the other line because configuration only contains
the image line ever more and this is how we already do it in tests.

Fixes: #2330
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-07-27 18:39:14 +02:00
Jakob Naucke
9c0b8a7f5b
snap: do not export agent version
This causes the repository to be checked out to a version tag, which is
inconsistent with how we build runtime, and reverts us to a buggy
`snap/snapcraft.yaml`.

Fixes: #2313
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-07-26 17:32:18 +02:00
Julio Montes
5512da1739
Merge pull request #2280 from YchauWang/wyc-arm-qemu
snap: fixed snap aarch64 qemu patches dir in snapcraft.yaml file
2021-07-20 07:33:39 -05:00
wangyongchao.bj
a8649acfd0 snap: fixed snap aarch64 qemu patches dir in snapcraft.yaml file
fixed arm qemu patches dir in snap part. Clear the old `packaging/obs-packaging` path.

Fixes: #2279

Signed-off-by: wangyongchao.bj <wangyongchao.bj@inspur.com>
2021-07-20 15:24:42 +08:00
Jakob Naucke
558f1be62d
snap: Remove QEMU before clone
If you snap in an environment where you previously snapped,
`git clone`ing QEMU will fail. Remove the checkout directory.

Fixes: #2249
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-07-15 12:22:21 +02:00
Julio Montes
8d6dd2ad61 snap: support golang 1.16.x
Fix build process, set GO111MODULE environment variable to "auto"

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-07-13 12:22:33 -05:00
Jakob Naucke
007a656173
snap: Build initrd on ppc64le & s390x
instead of image, does not require privileged containers since `losetup`
is not used and is thus more portable for various build environments.

Fixes: #2218
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-07-12 15:17:30 +02:00
Jakob Naucke
2cc9006c26
snap: Miscellaneous s390x fixes
- Ported from https://github.com/kata-containers/tests/pull/3612:
  Install protobuf-compiler for agent build on ppc64le & s390x
- Fixes in image target for ppc64le & s390x
  - Install image instead of initrd since it's preferred
  - Use Ubuntu as base since Alpine requires a musl agent (cannot be
    built on ppc64le & s390x because there is no such Rust target)
- Ported from
  https://github.com/kata-containers/kata-containers/pull/1265:
  Fix vmlinux install path
- Install libseccomp-dev on all architectures, not just x86_64

Fixes: #2192
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-07-08 15:02:47 +02:00
Carlos Venegas
5a3ee7d7e9 snap: Use qemu.version to build snap
Use only one key to refer the version used by kata.

Signed-off-by: Carlos Venegas <jos.c.venegas.munoz@intel.com>
2021-03-24 17:52:52 +00:00
Wainer dos Santos Moschetta
224c50f420 snap: Package virtiofsd and fix path
This contain to fixes for the virtiofsd on snap:
 * removed the "-/usr/libexec" so that virtiofsd is copied to prime
 * The configuration.toml expects virtiofsd in /usr/libexec/kata-qemu so it should be passed "kata-qemu"
   to configure_hypervisor.sh script and it wil configure to install the executable onto the right directory.

Fixes #1238
Depends-on: github.com/kata-containers/kata-containers#1349
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-03-10 11:16:52 -03:00
Wainer dos Santos Moschetta
85601cd360 snap: Update for QEMU 5.2.0
QEMU 5.2.0 needs ninja-build package installed on the build environment.

The default-configs were copied to $QEMU_SRC/default-configs but that does
take any effect, so instead it is now copied to $QEMU_SRC/default-configs/devices
and the configs for i386 were updated.

Also it had to change some arguments being passed to configure as Meson was failing
due inconsistent paths:

  ./meson.build:1:0: ERROR: The value of the 'libdir' option is '/usr/lib/qemu' which must be a subdir of the prefix '/snap/kata-containers/current/usr'.
  Note that if you pass a relative path, it is assumed to be a subdir of prefix.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-03-01 16:57:58 -05:00
Julio Montes
919d51274d snap: fix kernel setup
kernel setup fails when `yes "n"` is used and `make oldconfig` doesn't
read anything from STDIN, `yes "n"` was added in the past as a
workaround to fix incomplete kernel configs.
Enable `build-kernel.sh` debug.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-02-12 09:16:09 -06:00
Julio Montes
d054841430 ci: snap: build targets that not need sudo first
`sudo` is required to build the image, once the image has been built
the permission of some directories may change, let's build first the
targerts that not need `sudo`

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-02-12 09:05:42 -06:00
Julio Montes
a115338ddd ci: snap: define proxy variables
define proxy variables before using them to fix `unbound variable`
error

fixes #1386

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-02-12 09:05:42 -06:00
Julio Montes
5ce74bab41 snap: tag yq version
yq major releases are not backward compatible, install the same
major version used in the CI to avoid conflics building the kata
components.
We should update yq when the CI updates it, not before.

fixes #1232

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-01-14 11:44:39 -06:00
Julio Montes
ef1feaf38f revert: "snap: Fix yq error in build"
This reverts commit 6cc1920c37.

Instead of updating the syntax of yq, let's use yq 3.x, otherwise
yq must be updated in the CI and the syntax updated in all the
tools (osbuilder, packging).

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-01-14 11:36:44 -06:00
James O. D. Hunt
6cc1920c37 snap: Fix yq error in build
The snap build pulls the latest release of `yq`, but `yq` version 4
changed the CLI syntax for reading a YAML file.

Update the snap config file to use the new `yq` v4 syntax.

Fixes: #1232.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-01-11 11:24:46 +00:00
Julio Montes
13a8e4e39e snap: update apps section
Add `kata-runtime` and `kata-collect-data.sh` commands to the apps
section, these two command will be accessible through the commands
`kata-containers.runtime` and `kata-containers.collect-data`
respectively.
Henceforth the snap command for `containerd-shim-kata-v2` will be
`kata-containers.shim`

fixes #1122

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-11-17 11:31:08 -06:00
Julio Montes
5b079a3ba7 snap: add GH actions jobs to release the snap package
Use Github actions to build and release the snap package automatically
when a new tag is pushed.

fixes #1006

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-10-20 14:34:59 -05:00
Peng Tao
0f8949868c snap: install libseccomp-dev
To build qemu with virtio-fs support.

Fixes: #982
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-10-17 17:44:56 +08:00
Julio Montes
3e56de8101 snap: specify python version
In order to avoid `unmet dependencies` error in the CI,
the python version must be specified in the yaml.

fixes #877

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-10-08 10:53:20 -05:00
Peng Tao
1569b3b32a docs: fix static check errors
Somehow we are not running static checks for a long time.
And that ended up with a lot for errors.

* Ensure debug options are valid is dropped
* fix snap links
* drop extra CONTRIBUTING.md
* reference kata-pkgsync
* move CODEOWNERS to proper place
* remove extra CODE_OF_CONDUCT.md.
* fix spell checker error on Developer-Guide.md

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-09-28 11:01:03 +08:00
Julio Montes
1de9bc0fa7 snap: reimplement snapcraft.yaml to support kata 2.0
Add snap package for 2.0

fixes #666

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-03 12:13:34 -05:00
Julio Montes
85642c328d snap: move snapcraft.yaml to the right place
In order to use a build systemd like launchpad, the snapcraft.yaml file
must be in the root directory of the project or under the `snap`
directory, that way launchpad detects that this project can be build
using the `snapcraft` command

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-03 08:09:05 -05:00