Commit Graph

13214 Commits

Author SHA1 Message Date
Hui Zhu
81c7a968ed Makefile: Set ARCH in GOPATH not set mode
In GOPATH not set mode got:
make: go: Command not found
Makefile:38: arch/-options.mk: No such file or directory
make: go: Command not found
Makefile:237: *** "ERROR: No hypervisors known for architecture  (looked for: firecracker qemu)".  Stop.

The root cause is GOPATH not set mode is not set ARCH.
Set it to fix the issue.

Fixes: #1224

Signed-off-by: Hui Zhu <teawater@hyper.sh>
2019-02-11 17:06:16 +08:00
fupan
96e524d2a0 shimv2: Send task events to containerd/cri
The Runtime v2 supports an async event model. In order for the an upstream
caller (such as Docker) to get these events in the correct order a Runtime
v2 shim MUST implement some events.

For much more info, please see:
https://github.com/containerd/containerd/blob/master/runtime/v2/README.md#events

Fixes:#1204

Signed-off-by: fupan <lifupan@gmail.com>
2019-02-11 11:49:10 +08:00
nitkon
bc7d96998d
docs: Fix a typo in how-to docs
Fix Typo

Fixes: #379

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2019-02-11 01:05:11 +05:30
James O. D. Hunt
d48ccf4816
Merge pull request #333 from jschintag/qemu_configure_s390x
s390x: add support to build qemu
2019-02-07 17:20:59 +00:00
James O. D. Hunt
56f1044e12
Merge pull request #229 from grahamwhaley/20190206_remove_pullapprove
pullapprove: remove it
2019-02-07 17:19:48 +00:00
GabyCT
1f87f86812
Merge pull request #377 from grahamwhaley/20190206_remove_pullapprove
pullapprove: remove config file
2019-02-07 10:26:30 -06:00
jschintag
5a6b92b711 s390x: add support to build qemu
This commit adds the s390x specific build flags to the configure-hypervisor.sh

Fixes: #324

Signed-off-by: Jan Schintag <jan.schintag@de.ibm.com>
2019-02-07 16:49:57 +01:00
Samuel Ortiz
bb99e4152b virtcontainers: Fix Store related vm factory leak
We are creating Store directories but never removing them.
Calling into a VM factory created vm Stop() will now clean the VM Store
artifacts up.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-07 00:59:33 +01:00
Samuel Ortiz
7b0376f3d3 virtcontainers: Fix container.go cyclomatic complexity
With the Stores conversion, the newContainer() cyclomatic complexity
went over 15. We fix that by extracting the block devices creation
routine out of newContainer.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-07 00:59:33 +01:00
Samuel Ortiz
f8e7e308c3 virtcontainers: Remove the resource storage original implementation
Now that we converted the virtcontainers code to the store package, we
can remove all the resource storage old code.

Fixes: #1099

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-07 00:59:33 +01:00
Samuel Ortiz
fad23ea54e virtcontainers: Conversion to Stores
We convert the whole virtcontainers code to use the store package
instead of the resource_storage one. The resource_storage removal will
happen in a separate change for a more logical split.

This change is fairly big but mostly does not change the code logic.
What really changes is when we create a store for a container or a
sandbox. We now need to explictly do so instead of just assigning a
filesystem{} instance. Other than that, the logic is kept intact.

Fixes: #1099

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-07 00:59:29 +01:00
Graham Whaley
fc2957ca4a pullapprove: remove it
We are moving off pullapprove. Remove its config file.

Fixes: #35

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-02-06 17:05:53 +00:00
Graham Whaley
8963b8e3c9 pullapprove: remove it
We are moving off pullapprove. Remove its config file.

Fixes: #228

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-02-06 16:14:24 +00:00
Graham Whaley
0d0c525672 pullapprove: remove it
We are moving off pullapprove. remove its config file.

Fixes: #331

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-02-06 16:11:23 +00:00
Graham Whaley
d53675125b pullapprove: remove config file
We are moving off pullapprove. Remove its config file.

Fixes: #376

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-02-06 15:55:28 +00:00
Graham Whaley
962e1e6566 pullapprove: remove it
We are moving off pullapprove. Remove its config file.

Fixes: #1215

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-02-06 15:50:31 +00:00
Samuel Ortiz
2ecffda170 virtcontainers: store: Add a ItemLock API
The ItemLock API allows for taking shared and exclusive locks on all
items.
For virtcontainers, this is specialized into taking locks on the Lock
item, and will be used for sandbox locking.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-06 14:19:18 +01:00
Samuel Ortiz
6e9256f483 virtcontainers: store: Add a Raw API
The Raw API creates a raw item, i.e. an item that must be handled
directly by the caller. A raw item is one that's not defined by the
store.Item enum, i.e. it is a custom, caller defined one.
The caller gets a URL back and is responsible for handling the item
directly from this URL.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-06 14:19:18 +01:00
Samuel Ortiz
c25c60898b virtcontainers: store: Add a VC specific Store
This is basically a Store dispatcher, for storing items into their right
Store (either configuration or state).
There's very little logic here, except for finding out which store an
item belongs to in the virtcontainers context.

vc.go also provides virtcontainers specific utilities.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-06 14:19:18 +01:00
Samuel Ortiz
ef11bf52a6 virtcontainers: store: Add a Delete API
It's going to be used to completely clean a Store away.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-06 14:19:18 +01:00
Samuel Ortiz
f2ab58d841 virtcontainers: store: Implement the filesystem backend
new() only creates the backend and initialized the first layout.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-06 14:19:18 +01:00
Samuel Ortiz
d22cdf2dd9 virtcontainers: store: Add an internal backend interface
All Store backends will have to implement that simple interface.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-06 14:19:18 +01:00
Samuel Ortiz
6b87ecfc1b virtcontainers: store: Keep track of newly created Stores
When a component creates a new store from a given root path, we add it
to the store manager and return it back when another component asks for
it.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-06 14:19:18 +01:00
Samuel Ortiz
efd50ecac9 virtcontainers: Add a Store manager
Each virtcontainers module/component should be able to get a handler on
a Store for loading component specific items. The Store manager is an
internal Store layer for tracking all created Stores.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-06 14:19:18 +01:00
Samuel Ortiz
4be76e9969 virtcontainers: Initial Store implementation
Store is a replacement for the current resource storage virtcontainers
implementation and the Manager is the front-end for it. The back-ends
will provide actual storage capabilities and the first one will be the
filesystem one, for storing virtcontainers Items on a local filesystem.

The main design goals for Store are the following ones:

- Simplicity: The API should be short and simple.
- Transparency: The core virtcontainers code should not care about
  the storage backend details.
- Extensibility: It should be easily extensible to add non local and in
  memory backends.

Manger provides a very short and simple API for the rest of the virtcontainers
code base to consume:

New: Creates a new Store, if needed.
Load: Loads an Item from a Store
Store: Stores an Item into a Store.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-06 14:19:18 +01:00
Manohar Castelino
1666474b45
Merge pull request #330 from egernst/fix-329
kata-deploy: fix yaml example for install/remove commands
2019-02-05 17:15:36 -08:00
Eric Ernst
02729c5c6e kata-deploy: fix yaml example for install/remove commands
There was a bug in the script invocation in the YAML.  Fixed.

Fixes: #329

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-02-05 15:20:38 -08:00
Eric Ernst
d3c63e66e3
Merge pull request #1212 from sameo/topic/ut-noise
Reduce virtcontainers unit test noise
2019-02-05 14:43:29 -08:00
Julio Montes
f92ca1d98d
Merge pull request #1199 from devimc/topic/snapBanner
snap: add snapcraft store banner
2019-02-05 14:34:25 -06:00
Samuel Ortiz
2affa1fe26 virtcontainers: Reduce hyperstart agent test noise
We need to pass a context to the filesystem handle.

Fixes: #1211

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-05 16:33:06 +01:00
Samuel Ortiz
a3eff87e80 virtcontainers: Make proxy startup sequence less noisy
We only want to know which proxy started when debugging.

Fixes: #1211

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-05 16:33:06 +01:00
Samuel Ortiz
f0312f607b virtcontainers: Reduce filesystem test noise
We need to set the context before calling into the API.

Fixes: #1211

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-05 16:33:06 +01:00
Samuel Ortiz
e402601cf8 virtcontainers: Reduce sandbox test noise
We need to set the sandbox context before calling into its API.

Fixes: #1211

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-05 16:33:06 +01:00
Samuel Ortiz
799ac6edf6 virtcontainers: Reduce qemu test noise
We only need to set the context before calling into qemu's API.

Fixes: #1211

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-05 16:33:06 +01:00
Samuel Ortiz
560902c8f1 virtcontainers: Reduce kata_agent test noise
We only need to set the agent context before calling into its API.

Fixes: #1211

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-05 16:33:05 +01:00
Samuel Ortiz
2093fe6bfd virtcontainers: Reduce cc_proxy mock test noise
We don't need that many logs, especially for the positive path.

Fixes: #1211

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-05 16:33:05 +01:00
Samuel Ortiz
79ed0886c6 virtcontainers: Reduce hyperstart mock test noise
We don't need that many logs, especially for the positive path.

Fixes: #1211

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-02-05 16:32:58 +01:00
Marco Vedovati
c3282958f2 ccloudvm: update kata install URL
Update the kata install commands to point to the correct repository URL.

Fixes: #326

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-02-04 17:25:05 +01:00
Nitesh Konkar
be0726ce50 runtime: Do not error if only initrd/rootfs image installed
If only initrd or rootfs image is installed,
allow to start Kata Containers without erroring
out.

Fixes:  #1174

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2019-02-04 18:01:00 +05:30
Julio Montes
7222f533b8 snap: add snapcraft store banner
add snapcraft store banner

fixes #1198

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-02-01 11:20:49 -06:00
James O. D. Hunt
970b26c349
Merge pull request #304 from egernst/kata-deploy-1.5.0-rc2
kata deploy rewrites
2019-02-01 09:17:21 +00:00
Eric Ernst
b4ba52d432 kata-deploy: s/kata-containers.io/katacontainers.io
To be consistent with project URL, use katacontainers.io
instead of kata-containers.io

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-01-31 21:13:00 -08:00
Eric Ernst
5f955968e6 kata-deploy: update documentation after 1.5 rewrite
With the 1.5 release, we made several changes:
-simplification of daemonsets
-introduction of runtimeClass

Update documentation to take this into account.

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-01-31 21:12:40 -08:00
Eric Ernst
53115c0de9 kata-deploy: add docker details to readme
Add details for Docker configuration to the kata-deploy README

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-01-31 21:12:40 -08:00
Eric Ernst
c0cdc045a5 kata-deploy: add script for configuring Docker
Before the kata-deploy container image was intended to be
used with only Kubernetes.  This commit adds a script for configuring
Kata to run with Docker.

This assumes > release 1.5 of Kata, as Firecracker is being configured
as well as QEMU based Kata. Note, in order for this to work, Docker must
be configured to use a block-based storage driver.

To succeed, it the following directories must be mounted:
- /opt/kata - this is the location that the kata artifacts are stored
- /run/systemd - for reloading the docker service
- /var/run/dbus - for reloading the docker service
- /etc/docker - for updating the docker configuration (daemon.json)

usage: kata-deploy-kata [install | remove]

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-01-31 21:12:40 -08:00
Eric Ernst
471415b245 kata-deploy: updates for Dockerfile
Additional packages are necessary and/or were removed from the base
image.

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-01-31 21:12:40 -08:00
Eric Ernst
5db1ba5710 kata-deploy: add support for runtime class, firecracker
Simplify the yaml and combine the prior scripts. The resulting script,
kata-deploy.sh, is used for  install and configuration and
removal for CRI-O and containerd. While this could be used standalone
outside of daemonsets, today it will sleep infinity after processing the
request, since it is assumed to be called by a daemon.

By checking the CRI runtime within the script itself, we no longer need
to support many daemonsets for deploy - just a single. Still requires a
seperate cleanup daemonset (for restarting the CRI runtime), and an
RBAC.

Verified with CRI-O -- containerd testing WIP

Throwing this up now for feedback since I do not bash good.

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-01-31 21:12:40 -08:00
Julio Montes
e12442bc65 snap: release 1.5.0
release kata containers 1.5.0

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-01-31 21:12:40 -08:00
Julio Montes
7e312f833b snap: use new GOPATH to build image
Use a new GOPATH to build image in order to avoid clashes with user's GOPATH,
otherwise user's kata agent will be used causing problem if that repository is
not up to date.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-01-31 21:12:40 -08:00
Julio Montes
51f5c22409 snap: remove commands used for debugging
remove set and env commands that were used for debugging

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-01-31 21:12:40 -08:00