Commit Graph

197 Commits

Author SHA1 Message Date
Marco Vedovati
d5087c07ca osbuilder: Increase Travis CI build timeout
Increase the build timeout to 50 minutes, this is required to allow more
distros to be built.

Fixes: #160

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2018-09-20 17:52:06 +02:00
Marco Vedovati
dd687223e3 osbuilder: Add support for debian rootfs
Fixes: #160

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2018-09-20 17:52:06 +02:00
Jose Carlos Venegas Munoz
c3230c2561
Merge pull request #165 from marcov/reformat-usage
Reformat usage output in test_image.sh
2018-09-18 09:49:06 -05:00
Graham Whaley
f099e2997f
Merge pull request #164 from marcov/clean-testimage
osbuilder: Remove redundant argument to test_image.sh
2018-09-18 10:43:34 +01:00
Jose Carlos Venegas Munoz
886bef2e3d
Merge pull request #163 from jodh-intel/tests-show-image-sizes
tests: Show summary of image sizes
2018-09-13 20:47:18 -05:00
Eric Ernst
830b1a90c8
Merge pull request #167 from jcvenegas/1.3.0-rc1-branch-bump
# Kata Containers 1.3.0-rc1
2018-09-12 12:50:52 -04:00
Marco Vedovati
2b187c30d0 tests: Reformat usage output in test_image.sh
Reformat the usage output displayed with `help` command or `-h` option.
Trap exit codes only after options parsing, as that is used to
generate a test report.

Fixes: #169

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2018-09-12 16:55:12 +02:00
Jose Carlos Venegas Munoz
8a0b1ca1b5 release: Kata Containers 1.3.0-rc1
- Makefile: update targets to better track build artifacts
- OSbuilder : Add support for Ubuntu rootfs
- rootfs: Include libseccomp support in rootfs
- rootfs-fedora: bump Fedora release to 28
- rootfs: Fail on non existing agent version.

344a37c Makefile: update targets to better track build artifacts
f19da63 rootfs: Include libseccomp support in rootfs
3075de4 OSbuilder : Add support for Ubuntu rootfs
89bca97 rootfs: dockerfile: Fix fedora 28 build.
5a1d946 rootfs: Fail on non existing agent version.
1ac9c07 rootfs-fedora: bump Fedora release to 28

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-09-11 15:53:51 -05:00
Marco Vedovati
6a307ed322 osbuilder: Remove redundant argument to test_image.sh
Remove the redundant `--distro` argument; when needed, the distro can be
specified using a positional argument.

Fixes: #158

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2018-09-10 16:15:55 +02:00
James O. D. Hunt
9f2461061f tests: Show summary of image sizes
At the end of the tests, show a summary of the size of all the rootfs's,
images and initrd's.

Fixes #162.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-09-10 14:44:02 +01:00
James O. D. Hunt
93ad0491ef
Merge pull request #159 from marcov/upmakefile
Makefile: update targets to better track build artifacts
2018-09-07 14:03:31 +01:00
Marco Vedovati
344a37c03c Makefile: update targets to better track build artifacts
Update Makefile so that build artifacts are actually tracked as make
targets. This is to enforce a strict prerequisite ordering and better
handle parallel builds.

Fixes: #157

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2018-09-06 12:35:38 +02:00
Archana Shinde
62aab2f872
Merge pull request #144 from ydjainopensource/ubuntu
OSbuilder : Add support for Ubuntu rootfs
2018-09-04 09:01:52 -07:00
Jose Carlos Venegas Munoz
67dba890cd
Merge pull request #154 from nitkon/seccomp
rootfs: Include libseccomp support in rootfs
2018-09-03 12:47:50 -05:00
Nitesh Konkar
f19da6360d rootfs: Include libseccomp support in rootfs
Ensure the image used on the guest does include libseccomp,
otherwise when a seccomp profile is passed by the runtime, it
will end up with boot failure on the guest.

Fixes: #153

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-09-03 11:52:15 +05:30
Yash Jain
3075de446f OSbuilder : Add support for Ubuntu rootfs
Fixes #32 #141

Signed-off-by: Yash Jain <ydjainopensource@gmail.com>
2018-08-30 21:06:06 +05:30
James O. D. Hunt
d3c99be063
Merge pull request #133 from stefanha/rootfs-fedora-28
rootfs-fedora: bump Fedora release to 28
2018-08-22 16:44:23 +01:00
Jose Carlos Venegas Munoz
89bca975a3 rootfs: dockerfile: Fix fedora 28 build.
Fedora 28 container already has coreutils-single package.

Also, the new fedora 28 container does not provide make by default.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-08-22 00:46:00 -05:00
Julio Montes
576c0bef88
Merge pull request #148 from jcvenegas/fail-on-not-agent-version
rootfs: Fail on non existing agent version.
2018-08-17 10:51:29 -05:00
Jose Carlos Venegas Munoz
5a1d946046 rootfs: Fail on non existing agent version.
Fail if we can not check out to the requested agent version.

Dont checkout to any branch by default.

Fixes: #147

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-08-16 17:00:04 -05:00
Graham Whaley
ae14163ca2
Merge pull request #146 from jcvenegas/1.2.0-branch-bump
# Kata Containers 1.2.0
2018-08-08 14:45:18 +01:00
Jose Carlos Venegas Munoz
bc9f09a3c0 release: Kata Containers 1.2.0
- tests: Add ability to restrict which tests run
- rootfs.sh: Add Platform-OS matrix to help page
- initrd-builder: make initrd_builder.sh idempotent
- travis: Enable travis ci for ppc64le
- docs: Add Platform-Compatibility matrix
- rootfs: docker: Reduce build time by not reinstalling go
- CI: Install make on Ubuntu

c5e2c0f tests: Add more messages
9f2da28 docs: Updated for new test options
0cd64fb build: Added targets to run tests
0ea8ef7 tests: Rename test script
c679cae tests: Add ability to restrict which tests run
80e1997 tests: Create new function to launch tests
f077e6e tests: Rename distro test functions
adb3f57 rootfs.sh: Add Platform-OS matrix link to help page
1e5e915 docs: Add Platform-Compatibility matrix
25e9f01 rootfs: docker: Reduce build time by not reinstalling go
abb559d CI: Install make on Ubuntu
22f04db travis: Enable travis ci for ppc64le
a7bafc5 initrd-builder: make initrd_builder.sh idempotent

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-08-07 09:43:39 -05:00
Graham Whaley
416b80cefc
Merge pull request #143 from jodh-intel/allow-running-single-test
tests: Add ability to restrict which tests run
2018-08-07 10:40:32 +01:00
Stefan Hajnoczi
1ac9c07e22 rootfs-fedora: bump Fedora release to 28
Fedora 28 was released May 1st 2018.  I have tested that the rootfs
works.

Fixes: #132
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-08-06 14:14:51 +01:00
James O. D. Hunt
c5e2c0fe88 tests: Add more messages
Add a few more informational messages to help with debugging.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-30 15:36:18 +01:00
James O. D. Hunt
9f2da28bb9 docs: Updated for new test options
Created a new README for the tests and updated the top-level README
with brief details on how to run tests.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-30 15:36:18 +01:00
James O. D. Hunt
0cd64fb5c9 build: Added targets to run tests
Updated the `Makefile` to provide the following new targets:

```
make test              # Run all tests.
make test-image-only   # Only run image tests.
make test-initrd-only  # Only run initrd tests.
```

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-30 15:36:18 +01:00
James O. D. Hunt
0ea8ef76f0 tests: Rename test script
Renamed the test script to provide a more meaningful one.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-30 15:36:18 +01:00
James O. D. Hunt
c679cae92c tests: Add ability to restrict which tests run
Added options to the test script to allow:

- all tests for a specific distro (`--distro $distro`).
- all image tests (`--test-images-only`).
- all initrd tests (`--test-initrds-only`).

Any combination of the above is also permitted. By default, all tests
will be run.

Fixes #142.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-30 15:36:18 +01:00
James O. D. Hunt
80e1997721 tests: Create new function to launch tests
Move the calls to the individual distro tests into a separate
function called from `main()`.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-30 15:36:18 +01:00
James O. D. Hunt
f077e6efdc tests: Rename distro test functions
Give the distro test function names a better prefix.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-30 15:36:17 +01:00
Jose Carlos Venegas Munoz
db567a00f3
Merge pull request #140 from nitkon/os-platform-matrix
rootfs.sh: Add Platform-OS matrix to help page
2018-07-04 12:16:29 -05:00
Jose Carlos Venegas Munoz
ae1db5650c
Merge pull request #131 from stefanha/initrd-builder-idempotency
initrd-builder: make initrd_builder.sh idempotent
2018-07-04 10:54:37 -05:00
Nitesh Konkar
adb3f57a6b rootfs.sh: Add Platform-OS matrix link to help page
Fixes: #139

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2018-07-04 20:54:45 +05:30
Graham Whaley
86d2ab1938
Merge pull request #129 from nitkon/master
travis: Enable travis ci for ppc64le
2018-07-04 15:47:25 +01:00
Graham Whaley
49ac33ec5c
Merge pull request #137 from nitkon/comp-matrix
docs: Add Platform-Compatibility matrix
2018-07-04 13:11:07 +01:00
Nitesh Konkar
1e5e915f5a docs: Add Platform-Compatibility matrix
Fixes: #136

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2018-07-04 15:51:07 +05:30
Graham Whaley
67e7ba3584
Merge pull request #126 from jcvenegas/run-not-add-go
rootfs: docker: Reduce build time by not reinstalling go
2018-07-04 09:17:08 +01:00
Jose Carlos Venegas Munoz
25e9f01fb2 rootfs: docker: Reduce build time by not reinstalling go
Using docker we always add (ADD) the go tarball. But we can avoid do it
all the time if we install Go using RUN dockerfile instruction.

Use RUN to avoid repeat steps already done in dockerfile.

Fixes: #125

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-03 13:30:04 -05:00
Jose Carlos Venegas Munoz
b9b9410b83
Merge pull request #135 from jodh-intel/ci-add-make-for-ubuntu
CI: Install make on Ubuntu
2018-07-03 10:38:42 -05:00
James O. D. Hunt
abb559d52c CI: Install make on Ubuntu
Fix CI build failures on Ubuntu 16.04 due to `make` not being installed
before the static check script runs by:

- Installing make explicitly on Ubuntu.
- Moving the static-check script after the package install setup phase.

Fixes #134.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-03 14:30:52 +01:00
Julio Montes
7a88a7c887
Merge pull request #119 from jcvenegas/1.1.0-branch-bump
# Kata Containers 1.1.0
2018-07-02 11:05:16 -05:00
Jose Carlos Venegas Munoz
e31149077f release: Kata Containers 1.1.0
- image-builder: require root earlier for better error messages
- builder: support proxy in distros based on yum or dnf
- tests: Update kata-manager command
- CI: Fix static-checks script invocation
- Support building centos-rootfs on Arm64
- rootfs: add '-rm' to delete intermediate container
- Update README: Fix a minor space issue
- rootfs: correct rootfs script deference var value
- CI: use yum for resolving centos dependencies
- tests: Test generated images and initrd's (+ cleanups)
- rootfs: Default to host architecture
- Image require systemd
- rootfs: copy kernel modules to correct location
- rootfs: Add extra packages to summary file
- rootfs.sh: Add "${AGENT_VERSION}"/"-a" functionality
- kata/osbuilder: Add support for multiple GOPATH directories
- image-builder: fix "paratition" typo
- docs: Add a Usage section
- refactor and create a summary file inside the image

7b1bbac image-builder: require root earlier for better error messages
52d015e builder: support proxy in distros based on yum or dnf
43a2ea4 tests: Run EulerOS tests last
7b581c2 tests: Convert bats test to shell script
5b9b69a tests: Update kata-manager command
547c477 CI: Fix static-checks script invocation
0451db9 rootfs-builder: Support building centos-rootfs on Arm64
e86380a rootfs: add '-rm' to delete intermediate container
11d1d07 docs: Update README, Fix a minor space issue
7015535 CI: Install epel-repositories for centos
9f84cc8 CI: Install bats from sources
6c8c60d CI: use yum for resolving centos dependencies
a81e771 rootfs: correct rootfs script deference var value
4ae6d31 tests: Test generated images and initrd's
340d7b2 tests: Rename function for brevity
3a8da5f tests: Pass parameters to functions
c8e7f42 tests: Remove stale rootfs tree
1c251bd tests: Move osbuilder metadata var to top
c69eb00 tests: Make all globals readonly
aeb5947 tests: Don't pass size option to image builder
60e1e7b tests: cleanup bats tests
c1d22f9 rootfs: Default to host architecture
aca45c5 image: Require systemd
171eceb image: Use variable for referring to init
fd8d9bd rootfs: copy kernel modules to correct location
7732e04 rootfs: Fix incorrect getopts call
f7f2672 rootfs:  Add "${AGENT_VERSION}"/"-a" functionality
3151f35 rootfs: Add extra packages to summary file
c3ac718 rootfs: Add support for multiple GOPATH directories
32aee00 image-builder: fix "paratition" typo
3c19ea4 docs: Add a Usage section
3e0e112 docs: Move TOC to top
f90f652 rootfs: Create a summary file inside the image
93b632c lib: Check rootfs parameter
b14d117 image-builder: Fix incorrect error message
ddb71e8 initrd: Remove mention of USE_DOCKER
f17b5c2 scripts/lib: Fix whitespace
5b6ced5 rootfs/clearlinux: Resolve version
a2a6562 rootfs: Simplify code
b8f1a68 rootfs: Simplify code
f09d4c4 rootfs: Check function parameters
2751de0 rootfs: Reformat functions
48b1dda rootfs: Fix comments
019a80f refactor: Move more functions to script library
a18753b refactor: Remove duplicate variable
f3e89d3 refactor: Simplify enabling debug

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-02 09:37:19 -05:00
Nitesh Konkar
22f04db80d travis: Enable travis ci for ppc64le
Fixes: #122

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2018-06-29 21:15:43 +05:30
Stefan Hajnoczi
a7bafc53c9 initrd-builder: make initrd_builder.sh idempotent
If initrd_builder.sh fails partway through it may not be possible to run
it again without creating a new rootfs.

This happens because initrd_builder.sh checks for the presence of
/sbin/init and refuses to run if it is missing.  Later on, the script
moves /sbin/init to /init, where the kernel expects to find it in an
initramfs.  After this step initrd_builder.sh will refuse to run again
since /sbin/init is now missing.

Create a symlink from /init to /sbin/init instead of moving the file.
This allows initrd_builder.sh to be run repeatedly on the same rootfs.

Fixes: #130
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-06-29 15:08:56 +01:00
James O. D. Hunt
4064a4ccb7
Merge pull request #128 from stefanha/image-builder-early-root-check
image-builder: require root earlier for better error messages
2018-06-29 08:38:17 +01:00
Stefan Hajnoczi
7b1bbac600 image-builder: require root earlier for better error messages
The image_builder.sh script must be run as root.  The following check is
performed before the script checks for root:

  [ "${AGENT_INIT}" == "yes" ] || [ -x "${ROOTFS}/usr/bin/${AGENT_BIN}" ] || \
      die "/usr/bin/${AGENT_BIN} is not installed in ${ROOTFS}
      use AGENT_BIN env variable to change the expected agent binary name"

The -x test is "True if the file is executable by you".  It may evaluate
to true as root and false as non-root, depending on the file
permissions.

The permissions for kata-agent given in the Developer Guide are 0550
(https://github.com/kata-containers/documentation/blob/master/Developer-Guide.md#add-a-custom-agent-to-the-image---optional).

Therefore image_builder.sh fails with "/usr/bin/${AGENT_BIN} is not
installed" when run as non-root.  This is confusing since the agent
binary is really installed!

Move the root check to the beginning of the script.  This solves the
confusing error and prevents similar problems where the script doesn't
take into account that the user may be non-root.

Fixes: #127
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-06-28 14:16:26 +01:00
Jose Carlos Venegas Munoz
ac0c29012f
Merge pull request #124 from devimc/dockerfile/supportProxy
builder: support proxy in distros based on yum or dnf
2018-06-26 10:52:43 -05:00
Julio Montes
52d015e283 builder: support proxy in distros based on yum or dnf
proxy server must be specified in configuration file
of the package manager, /etc/yum.conf for yum or
/etc/dnf/dnf.conf for dnf

fixes #123

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-06-26 10:17:07 -05:00
Salvador Fuentes
ae5b40ab88
Merge pull request #114 from jodh-intel/kata-manager-update
tests: Update kata-manager command
2018-06-25 17:49:58 -05:00