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>
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>
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>
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>
The EulerOS repository servers can be a little slower to respond than
others. This can lead to timeout issues so move the EulerOS tests to
the end to give the other tests a chance to run.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
The tests perform a lot of configuration and call other commands. Since
the tests are running under BATS, any "stdout pollution" results in the
test failing. This is too rigid for current purposes so convert the
BATS test into a `set -e` test. This will still fail if any command
fails, but does not impose the output pollution restriction. It also
makes debugging easier.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
The `kata-manger.sh` utility is changing its behaviour so that
`install-packages` *only* installs packages (no container manager).
Update the command to both install Docker and the packages.
Fixes#113.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
After building the images, perform a very basic test by configuring
the runtime to use them and creating a container.
Fixes#97.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Remove the rootfs tree before attempting to generate one to avoid
picking up any stale information if the function is run multiple times.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Moved the variable specifying the path to the osbuilder metadata file
to the top of the script and made it readonly.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Some of the globals were set as read-only variables whilst others
weren't. However, they can all be read-only.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Building an image requires systemd to be installed in the rootfs as the
init daemon, so assert that systemd is available.
Updated tests so that alpine is only tested as an initrd (it cannot be
an image as it doesn't use systemd).
Added warning note about alpine to the docs.
Fixes#98.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Create a YAML metadata file inside the rootfs image
containing information about the environment:
```
/var/lib/osbuilder/osbuilder.yaml
```
Example contents:
```
---
osbuilder:
url: "https://github.com/kata-containers/osbuilder"
version: "unknown"
rootfs-creation-time: "2018-04-19T16:19:30.254610305+0000Z"
description: "osbuilder rootfs"
file-format-version: "0.0.1"
architecture: "x86_64"
base-distro:
name: "Centos"
version: "7"
packages:
- "iptables"
- "systemd"
agent:
url: "https://github.com/kata-containers/agent"
name: "kata-agent"
version: "0.0.1-2ec0b9593845b9a5e0eab5a85b20d74c35a2ca52-dirty"
agent-is-init-daemon: "no"
```
This change adds a new `-o` option to `rootfs.sh` for
specifying the version of osbuilder to the rootfs builder.
Fixes#35.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
To simplify maintaince, create dockerfiles based on templates.
This way when golang version is updated it will be done in one place
versions.txt.
This also allow to allways intall the same version of golang in any
dockerfile.
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>