Commit Graph

14950 Commits

Author SHA1 Message Date
Jose Carlos Venegas Munoz
336aa93e6c versions: Add cri-containerd to versions file.
- Add latest release from cri-containerd.

Fixes: #239

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-04-23 20:06:54 -05:00
Sebastien Boeuf
76af465724
Merge pull request #243 from jodh-intel/fix-TestIsHostDevice-test
virtcontainers: Fix TestIsHostDevice test as non-root
2018-04-23 11:27:55 -07:00
James O. D. Hunt
53d73e56e0 virtcontainers: Fix TestIsHostDevice test as non-root
Don't Attempt to create file below `/dev` when running as non-`root`.

Move the logic into a new `TestIsHostDeviceCreateFile` test and skip
unless `root.`

Fixes #242.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-23 14:29:13 +01:00
James O. D. Hunt
3e0e112e2b docs: Move TOC to top
Move the table of contents to the top of the page.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-23 09:16:16 +01:00
James O. D. Hunt
a070f18c2e docs: Add Release process docs
Add a document providing an overview of releases along with the
all-important release checklist.

Fixes #32.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-23 09:04:03 +01:00
Eric Ernst
d3e8d9c0e4
Merge pull request #16 from jcvenegas/tag_repos
release: Add script to tag repos
2018-04-22 21:04:10 -07:00
Sebastien Boeuf
de32be7eed
Merge pull request #211 from amshinde/assign-bridge-addr
Assign address to a pci bridge while appending it
2018-04-20 14:52:31 -07:00
Jose Carlos Venegas Munoz
a099eafc60
Merge pull request #83 from jodh-intel/create-summary-file
refactor and create a summary file inside the image
2018-04-20 13:57:57 -05:00
Archana Shinde
c7ff8ccac7
Merge pull request #59 from jodh-intel/add-licensing-doc
docs: Add license strategy doc
2018-04-20 09:39:36 -07:00
Eric Ernst
9b36fa3cf5
Merge pull request #48 from jodh-intel/add-limitations-doc
Add limitations doc
2018-04-20 09:08:55 -07:00
James O. D. Hunt
9dceb3eed1 scripts: Added initrd support to collect script
The collect script is now able to extract the osbuilder metadata
from an initrd image.

Fixes #237.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-20 16:55:10 +01:00
James O. D. Hunt
72056eb89b scripts: Collect script now shows osbuilder file
Changed the collect script to display the contents of the
osbuilder metadata file which provides details of the image.

Partially fixes #237.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-20 16:55:01 +01:00
James O. D. Hunt
4281bc3543 scripts: Make collect script variable local
Added a missing `local` in `get_image_file()`.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-20 16:46:45 +01:00
James O. D. Hunt
fbd28085d3 scripts: Make more collect script variables read only
Changed some important global variables to be read-only.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-20 16:44:00 +01:00
James O. D. Hunt
f90f65247e rootfs: Create a summary file inside the image
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>
2018-04-20 11:46:55 +01:00
James O. D. Hunt
93b632c328 lib: Check rootfs parameter
Add a check on the rootfs parameter in `build_rootfs()`.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-20 11:17:55 +01:00
James O. D. Hunt
b14d117a89 image-builder: Fix incorrect error message
Fixed an error message which was referring to an incorrect rootfs
variable name.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-20 11:17:15 +01:00
James O. D. Hunt
ddb71e8ef5 initrd: Remove mention of USE_DOCKER
Removed `USE_DOCKER` from the initrd builder usage statement as that
builder does not use Docker.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-20 11:17:02 +01:00
Sebastien Boeuf
dec01c1ec0
Merge pull request #236 from devimc/cpu/cpuset
virtcontainers: kata_agent: enable cpus and mem sets
2018-04-20 00:43:43 -07:00
James O. D. Hunt
f17b5c29f3 scripts/lib: Fix whitespace
Make whitespace consistent.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-20 08:29:27 +01:00
James O. D. Hunt
5b6ced536b rootfs/clearlinux: Resolve version
If the Clear Linux `OS_VERSION` is specified as `latest`,
resolve to an actual release number.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-20 08:29:27 +01:00
James O. D. Hunt
a2a65621a1 rootfs: Simplify code
Use more variables to avoid duplication and make the code cleaner.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-20 08:29:27 +01:00
James O. D. Hunt
b8f1a68834 rootfs: Simplify code
Use a variable in `copy_kernel_modules()` to avoid the duplicated
string.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-20 08:29:27 +01:00
James O. D. Hunt
f09d4c4626 rootfs: Check function parameters
Add some checks to ensure function parameters are set.

This fixes a bug `copy_kernel_modules()` where a test would never
fail due to missing dollars.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-20 08:29:27 +01:00
James O. D. Hunt
2751de0768 rootfs: Reformat functions
For consistency with the rest of the code, put the opening brace on the
line below the function name.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-20 08:29:27 +01:00
James O. D. Hunt
48b1ddabed rootfs: Fix comments
Improve a few comments and fix a typo.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-20 08:29:27 +01:00
James O. D. Hunt
019a80f304 refactor: Move more functions to script library
Moved the display functions to the script library to avoid duplication.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-20 08:29:23 +01:00
Sebastien Boeuf
397decb051
Merge pull request #220 from amshinde/revert-dev-mount
Handle device nodes and regular files in /dev
2018-04-19 15:00:02 -07:00
Jose Carlos Venegas Munoz
23cf4f6221 release: Add script to tag repos
Add helper script to tag repos.

- Check all repos are in the same version
- Create annotated tags
- Push tags to the repos

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-04-19 14:44:35 -05:00
Julio Montes
e9404cc9e0 virtcontainers: kata_agent: enable cpus and mem sets
this patch is to honour docker `--cpuset-cpus` and
`--cpuset-mems` options.

fixes #221

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-04-19 13:16:46 -05:00
Archana Shinde
71c7a9c13e virtcontainers: Handle regular files in /dev
The k8s test creates a log file in /dev under
/dev/termination-log, which is not the right place to create
logs, but we need to handle this. With this commit, we handle
regular files under /dev by passing them as 9p shares. All other
special files including device files and directories
are not passed as 9p shares as these are specific to the host.
Any operations on these in the guest would fail anyways.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-04-19 10:59:26 -07:00
Archana Shinde
70c3fe9dcd virtcontainers: Remove /dev from the ignored system mounts
Since we want to handle certain files in /dev for k8s case,
remove /dev from the mounts list that we ignore.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-04-19 10:59:26 -07:00
Archana Shinde
10c596a4ff dev: Revert "Don't ignore container mounts based on their path"
This reverts commit 08909b2213.

We should not be passing any bind-mounts from /dev, /sys and /proc.
Mounting these from the host inside the container does not make
sense as these files are relevant to the host OS.

Fixes #219

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-04-19 10:46:10 -07:00
Archana Shinde
05c4ea39d0 qemu: Pass the pci/e address for qemu bridge
Pass the slot address while attaching bridges. This is needed
to determine the pci/e address of devices that are attached
to the bridge.

Fixes #210

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-04-19 10:42:19 -07:00
Archana Shinde
ee2e15c724 vendor: Vendor github.com/intel/govmm
This pulls in the following change to allow assigning
address to a bridge.

30aeacb qemu: Add qemu parameter for PCI address for a bridge.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-04-19 10:42:17 -07:00
James O. D. Hunt
d35843d190 docs: Add license strategy doc
Add a brief document explaining that the project uses SPDX license
identifiers.

Fixes #58.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-19 17:40:03 +01:00
Julio Montes
1c7a02e73d
Merge pull request #130 from devimc/virtcontainers/ImplProcessList
virtcontainers: agent: implement kata agent processListContainer
2018-04-19 11:31:09 -05:00
James O. D. Hunt
a18753b2ff refactor: Remove duplicate variable
Some of the scripts had two variables to refer to the program name.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-19 16:00:37 +01:00
James O. D. Hunt
f3e89d38a9 refactor: Simplify enabling debug
Simplify the logic to enable debug and also enable debug as early as
possible.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-19 15:55:34 +01:00
zhangwei_cs
9dea2f835b
Merge pull request #235 from jodh-intel/add-spdx-header-to-config
config: Add SPDX license header to config file
2018-04-19 17:41:01 +08:00
James O. D. Hunt
e415efb0dd config: Add SPDX license header to config file
The config file is in TOML format which supports comments, so add the
license header to it.

Fixes #234.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-19 08:13:59 +01:00
Sebastien Boeuf
ea789dbab9
Merge pull request #207 from amshinde/msize-9p
Add configuration for 9p msize
2018-04-18 11:20:44 -07:00
Julio Montes
01f3f712ac virtcontainers: kata_agent: fix unit tests
add ListProcesses to gRPCProxy to make it compatible with AgentServiceServer.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-04-18 10:40:39 -05:00
Julio Montes
11a0718b78 vendor: update kata agent
This new version of kata agent contains changes
to list the processes that are running inside the VM

Shortlog:
ff7eaa1 grpc: add unit test for ListProcesses
c394b63 mockcontainer: implement mockContainer
d208929 mockreaper: add unit tests
01bc953 grpc: implement ListProcesses

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-04-18 10:40:39 -05:00
Julio Montes
4fc974055d virtcontainers: agent: implement kata agent processListContainer
processListContainer is called by the ps command implementation to
list the processes running inside a containers, this patch implements
this function in the kata agent

fixes #129

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-04-18 10:40:39 -05:00
James O. D. Hunt
a85656b355
Merge pull request #231 from grahamwhaley/20180418_bc_SPDX
license: SPDX: update all vc files to use SPDX style
2018-04-18 15:06:04 +01:00
James O. D. Hunt
30663685ea
Merge pull request #226 from grahamwhaley/20180417_update_spdx
SPDX: update cli and arch files to use SPDX
2018-04-18 14:52:21 +01:00
Graham whaley
d6c3ec864b license: SPDX: update all vc files to use SPDX style
When imported, the vc files carried in the 'full style' apache
license text, but the standard for kata is to use SPDX style.
Update the relevant files to SPDX.

Fixes: #227

Signed-off-by: Graham whaley <graham.whaley@intel.com>
2018-04-18 13:43:15 +01:00
James O. D. Hunt
3e8400eee9 docs: Remove spec command limitation
Update the limitations document to remove the `spec` command limitation
(implemented on https://github.com/kata-containers/runtime/pull/196).

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-18 11:49:04 +01:00
James O. D. Hunt
4aa57d2e2c docs: Add links to README
Add links for the dev guide and limitations doc to the `README`.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-18 11:49:04 +01:00