Commit Graph

439 Commits

Author SHA1 Message Date
Cole Robinson
1ae392285e tests: Have DEBUG=1 set bash xtrace
This is similarly used in image_builder.sh and can be handy to
determine what is happening. Unfold the 'set' short options while
we are at it

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-03-02 14:55:53 -05:00
Cole Robinson
555ddf331a tests: Remove unused USE_DOCKER export
We now explicitly pass this to every make target we invoke, so
this is redundant

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-03-02 14:55:53 -05:00
Cole Robinson
0e6a12ce3c tests: Pass DOCKER_RUNTIME to osbuilder scripts
The rootfs and image builder scripts are wired up to handle the
DOCKER_RUNTIME, so pass our value down to those scripts

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-03-02 14:55:53 -05:00
Cole Robinson
e8624d89d9 tests: Rename docker_build_runtime -> DOCKER_RUNTIME
DOCKER_RUNTIME is the naming used in the actual osbuilder scripts
for this value. Change the test code to match

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-03-02 14:55:53 -05:00
Cole Robinson
cd46d09e0c tests: Remove hardcoded 'runc' reference
Replace it with docker_build_runtime which serves a similar purpose

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-03-02 14:55:53 -05:00
Cole Robinson
c574ec0528 tests: Remove dead unset images_dir check
This value is set globally, so this condition will never trigger.
`mkdir -p` would error anyways if it was unspecified

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-03-02 14:55:53 -05:00
Cole Robinson
44f29318dd tests: Remove unused test_func_prefix
This has been unused since 562be909

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-03-02 14:55:53 -05:00
Archana Shinde
8a9aa41247
Merge pull request #410 from amshinde/1.11.0-alpha0-branch-bump
# Kata Containers 1.11.0-alpha0
2020-02-19 17:46:28 -08:00
Archana Shinde
c54e5caf37 release: Kata Containers 1.11.0-alpha0
- Rootfs builder: build rust agent using osbuilder
- image-builder: make docker runtime configurable
- image_builder: Remove nsdax binary after its usage

1a7b735 rootfs-builder: build rust agent using osbuilder
c407421 image-builder: make docker runtime configurable
98ac62d image_builder: Remove nsdax binary after its usage

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2020-02-18 19:37:05 +00:00
Yang Bo
11a1cf53c2
Merge pull request #361 from yyyeerbo/wip
Rootfs builder: build rust agent using osbuilder
2020-02-10 10:57:19 +08:00
Yang Bo
1a7b735c3c rootfs-builder: build rust agent using osbuilder
Build rust agent and go agent using the same rootfs bulder image.
When building rust agent, just add RUST_AGENT=yes before command line.
The documentation will be updated later

Depends-on: github.com/kata-containers/tests#2287

Fixes: #360

Signed-off-by: Yang Bo <bo@hyper.sh>
2020-02-07 21:47:33 +08:00
Julio Montes
7526f4957d
Merge pull request #398 from devimc/topic/imagebuilder/configureDockerRuntime
image-builder: make docker runtime configurable
2020-01-20 16:19:37 -06:00
Julio Montes
c407421a26 image-builder: make docker runtime configurable
Add DOCKER_RUNTIME variable to change container runtime depending on the
CI/environment.

fixes #397

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-01-20 20:39:04 +00:00
Julio Montes
0e4c497c68
Merge pull request #395 from fidencio/wip/cleanup_nsdax
image_builder: Remove nsdax binary after its usage
2020-01-17 10:33:28 -06:00
Fabiano Fidêncio
98ac62dec9 image_builder: Remove nsdax binary after its usage
Leaving nsdax behind may create some isses for the distro packages
of kata-osbuilder, as every package would have to take care of purging
the file on each distro.

Knowing that, we better remove the file as part of the script, mainly
because the file is already regenerated everytime in any case.

Fixes: #394

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2020-01-17 13:30:11 +01:00
GabyCT
dbbf16082d
Merge pull request #389 from katabuilder/1.10.0-rc0-branch-bump
# Kata Containers 1.10.0-rc0
2019-12-09 13:01:21 -06:00
katacontainersbot
640fee2e2a release: Kata Containers 1.10.0-rc0
- make: use `cd` instead of '--directory' option of `cpio`

38d0be3 make: use `cd` instead of '--directory' option of `cpio`

Signed-off-by: katacontainersbot <katacontainersbot@gmail.com>
2019-12-09 17:18:03 +00:00
Salvador Fuentes
df7982b95f
Merge pull request #385 from shiloong/master
make: use `cd` instead of '--directory' option of `cpio`
2019-12-04 06:34:59 -06:00
Shile Zhang
38d0be3824 make: use cd instead of '--directory' option of cpio
Due to the option '--directory' just added from 'cpio' v2.12, so the
osbuilder will failed with old version 'cpio' before v2.12, such as in
Centos 7 with v2.11.
Fix it by replacing this option with '(cd ...; cat ...)'.

Fixes: #384

Signed-off-by: Shile Zhang <shile.zhang@linux.alibaba.com>
2019-12-04 09:27:07 +08:00
Archana Shinde
36a9dc5c72
Merge pull request #381 from amshinde/1.10.0-alpha1-branch-bump
# Kata Containers 1.10.0-alpha1
2019-11-19 20:06:18 -08:00
Archana Shinde
75392a744f release: Kata Containers 1.10.0-alpha1
- rootfs-builder/alpine: use latest stable

50c9378 rootfs-builder/alpine: use latest stable

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-11-20 00:12:51 +00:00
James O. D. Hunt
4ec9dd3593
Merge pull request #380 from devimc/topic/initrd/fixAlpineCVEs
rootfs-builder/alpine: use latest stable
2019-11-11 11:11:03 +00:00
Julio Montes
50c9378659 rootfs-builder/alpine: use latest stable
use latest stable to fix CVEs

fixes #379

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-11-08 14:27:50 +00:00
Eric Ernst
5f6e642bb7
Merge pull request #377 from egernst/1.10.0-alpha0-branch-bump
# Kata Containers 1.10.0-alpha0
2019-10-31 15:41:13 -07:00
Eric Ernst
f2e4edc068 release: Kata Containers 1.10.0-alpha0
Version bump no changes

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-10-31 12:58:23 -07:00
Archana Shinde
bf8793adad
Merge pull request #373 from katabuilder/1.9.0-rc0-branch-bump
# Kata Containers 1.9.0-rc0
2019-10-08 18:48:30 -07:00
katacontainersbot
6fa3063e68 release: Kata Containers 1.9.0-rc0
- osbuilder: Add USE_PODMAN as an alternate for USE_DOCKER
- README: Update how to use DEBUG variable
- Fix yq
- initrd_builder: Create empty resolv.conf in rootfs
- rootfs: update fedora to 29 for arm64.

1599601 osbuilder: Update README about `USE_PODMAN` variable
d1751a3 osbuilder: Add USE_PODMAN as an alternate for USE_DOCKER
d2d029c README: Update how to use DEBUG variable
9e10b34 rootfs_builder: Create /etc/resolv.conf in rootfs
5982e48 lib.sh: Fix curl error when using curl+yq
05428a6 rootfs: Install yq if not found instead of error
1eec032 rootfs: update fedora to 29 for arm64.

Signed-off-by: katacontainersbot <katacontainersbot@gmail.com>
2019-10-08 21:38:20 +00:00
Salvador Fuentes
494272b0ac
Merge pull request #371 from nitkon/master
osbuilder: Add USE_PODMAN as an alternate for USE_DOCKER
2019-10-02 13:51:57 -05:00
Nitesh Konkar
15996014db osbuilder: Update README about USE_PODMAN variable
`USE_PODMAN` variable needs to be set for the osbuilder
scripts to use podman as a containerization engine to
build initrd/rootfs images. If both are set, `USE_DOCKER`
would take precedence over `USE_PODMAN`

Fixes: #370

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2019-10-02 21:58:41 +05:30
Nitesh Konkar
d1751a35e1 osbuilder: Add USE_PODMAN as an alternate for USE_DOCKER
In case a user wants to use podman instead of
docker to build initrd/rootfs images, facilitate
it by setting the variable `USE_PODMAN=true`.

Fixes: #370

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2019-10-02 21:58:02 +05:30
Julio Montes
d1fdf4083e
Merge pull request #369 from nitkon/patch-2
README: Update how to use DEBUG variable
2019-10-01 09:11:38 -05:00
GabyCT
9a9a8978f5
Merge pull request #364 from nitkon/fix_yq
Fix yq
2019-09-30 12:32:34 -05:00
nitkon
d2d029ce47
README: Update how to use DEBUG variable
Update osbuilder README to use DEBUG
environment variable for executing scripts in
debug mode.

Fixes:  #368

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2019-09-28 23:12:20 +05:30
Salvador Fuentes
3e4b381248
Merge pull request #366 from nitkon/dns_initrd
initrd_builder: Create empty resolv.conf in rootfs
2019-09-26 12:04:39 -05:00
Nitesh Konkar
9e10b341d6 rootfs_builder: Create /etc/resolv.conf in rootfs
Create an empty /etc/resolv.conf in rootfs if
it does not already exists else preserve it if
not a symlink. This would allow the agent to bind
mount it for DNS in kata VM.

Fixes: #365

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2019-09-26 20:17:41 +05:30
Nitesh Konkar
5982e48774 lib.sh: Fix curl error when using curl+yq
When you curl versions.yaml file and pipe into
yq, sometimes the piped program
closes the read pipe before the previous program
is finished leading to "curl: (23) Failed writing
body (1337 != 1371)". As a workaround we pipe the
stream through double "tac", an intermediary program
that always reads the whole page before feeding it
to the next program.

Fixes: #363

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2019-09-24 23:32:21 +05:30
Nitesh Konkar
05428a6424 rootfs: Install yq if not found instead of error
When building rootfs, yq is needed to parse
the version from versions.yaml file. If yq
is not found, it fails. In this PR, we install
yq if not found.

Fixes: #363

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2019-09-24 23:31:45 +05:30
Julio Montes
c33068de10
Merge pull request #350 from jongwu/29
rootfs: update fedora to 29 for arm64.
2019-09-20 08:46:40 -05:00
Jianyong Wu
1eec032c63 rootfs: update fedora to 29 for arm64.
there is issue in fedora:28 when start systemd service.
update fedora to 29 will bypass this issue.

Fixes: #349
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2019-09-19 21:11:43 -04:00
Eric Ernst
46785d86cc
Merge pull request #358 from egernst/1.9.0-alpha2-branch-bump
# Kata Containers 1.9.0-alpha2
2019-09-17 07:48:20 -07:00
Eric Ernst
4287ba639b release: Kata Containers 1.9.0-alpha2
- dracut: increase base.conf priority from 00 to 05
- make: use bash to fetch dracut conf 'drivers' list

dec8013 make: use bash to fetch dracut conf 'drivers' list
6daec98 make: Move comment about dracut --no-kernel
2950b37 dracut: increase base.conf priority from 00 to 05

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-09-16 11:31:43 -07:00
GabyCT
83b89d8773
Merge pull request #355 from crobinso/dracut-conf-priority
dracut: increase base.conf priority from 00 to 05
2019-09-11 09:59:16 -05:00
GabyCT
c8e6054843
Merge pull request #357 from crobinso/dracut-drivers-parse
make: use bash to fetch dracut conf 'drivers' list
2019-09-10 09:10:30 -05:00
Cole Robinson
dec8013748 make: use bash to fetch dracut conf 'drivers' list
dracut will process conf files with bash, and in fact it's common to
use idioms like += in conf files for string concatenation. The current
grep usage in the Makefile won't catch all possible valid 'drivers'
variable cases.

Instead, use bash to parse and echo the 'drivers' content

Fixes: #356

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-09-09 13:17:58 -04:00
Cole Robinson
6daec98aaf make: Move comment about dracut --no-kernel
The current placement is confusing IMO, let's move it close to the
code it's describing

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-09-09 13:17:58 -04:00
Cole Robinson
2950b37028 dracut: increase base.conf priority from 00 to 05
The Makefile invokes dracut with a custom confdir. However dracut will
still pull site configuration from /usr/lib/dracut/dracut.conf.d/, which
on Fedora contains a 01-dist.conf that sets among other things
early_microcode="yes".

Because 01-dist.conf is processed after 00-base.conf, kata's
early_microcode="no" is overridden, which isn't intended.

Rename 00-base.conf to 05-base.conf to sidestep this

Fixes: #354

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-09-09 12:44:29 -04:00
Eric Ernst
48540146b6
Merge pull request #351 from katabuilder/1.9.0-alpha1-branch-bump
# Kata Containers 1.9.0-alpha1
2019-09-06 10:55:46 -07:00
Salvador Fuentes
2b785044a2 ci: travis: allow failures on ppc64le
travis ppc64le has been very unstable when running
apt-get commands and are not allowing us to run the
job successfully.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-09-06 09:19:12 -05:00
katacontainersbot
f9cfa172ab release: Kata Containers 1.9.0-alpha1
- image_builder: create /etc/resolv.conf
- Add kmod package
- dracut: improve host distro support
- Allow to override build date with SOURCE_DATE_EPOCH
- image-builder: check /sbin/init when AGENT_INIT=yes
- chrony-service: re-patch PR#265
- image-builder: get mount directory size with Mb format
- osbuilder: add dracut build method
- fedora-rootfs: using fedora 28 on aarch64

862b077 image_builder: create /etc/resolv.conf
ce20d72 dracut: improve host distro support
495a92d rootfs-builder: add kmod package
87af599 rootfs-builder/clearlinux: reduce image size when AGENT_INIT=yes
dacd2d3 scripts/lib: Allow to override build date
9afe931 chrony-service: re-patch PR#265
b1b8ce4 image-builder: check /sbin/init when AGENT_INIT=yes
934422f tests: fix background job failure detection
317bfba travis: use Ubuntu bionic distro version
a5a3343 ci: use .ci/setup.sh from tests repo
1e5746a tests: add dracut initrd and image tests
6d5aef5 osbuilder: Get mount directory size with Mb format
2f55017 osbuilder: add dracut build method
9bfc083 fedora-rootfs: using fedora 28 on aarch64
8ebaac0 rootfs: move code from rootfs.sh to lib.sh
39370c2 rootfs-builder: support provisioning existing rootfs

Signed-off-by: katacontainersbot <katacontainersbot@gmail.com>
2019-09-03 17:34:10 +00:00
Peng Tao
64caa3f4d3
Merge pull request #346 from nitkon/master
image_builder: create /etc/resolv.conf
2019-08-22 14:39:34 +08:00