Commit Graph

10701 Commits

Author SHA1 Message Date
Peng Tao
b244410443
Merge pull request #505 from bergwolf/create_factory
cli: create vm factory if failed to load existing one
2018-07-24 10:43:41 +08:00
Peng Tao
8bdceb92be
Merge pull request #496 from grahamwhaley/20180713_clean_tests
Ensure tests clean their tempfiles
2018-07-24 10:38:05 +08:00
Jose Carlos Venegas Munoz
ea00f29133 config: Add missing config needed for Istio.
Istio require additional networking configuration.

Suggested-by: Sebastien Boeuf <sebastien.boeuf@intel.com>

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-23 17:03:07 -05:00
Jose Carlos Venegas Munoz
933c2031a4 ci: Test kata on new Kernel changes.
Add testing to make sure new kernel changes does not break Kata.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-23 17:02:38 -05:00
Jose Carlos Venegas Munoz
7b5d62fb74 ci: Fix kernel config version check.
Make sure kernel config version is validated on test.

Also, increse Kata Kernel config version.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-23 17:02:23 -05:00
Jose Carlos Venegas Munoz
03fc1e3e9d docs: kernel: Add README.
Add README to explain how to build kernel

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-23 17:01:58 -05:00
Eric Ernst
12d2049579
Merge pull request #188 from jodh-intel/doc-reqs-filenames
docs: Requirements for filenames and commands
2018-07-23 14:59:11 -07:00
Jose Carlos Venegas Munoz
139ed64bf3 kernel: Add script to build kernel
Today we have instructions to build the kernel
but there are a lot of manual steps to get one kernel.

This tries to automate the process to setup a kernel
for kata.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-23 16:59:05 -05:00
Eric Ernst
21b4e09ccc
Merge pull request #182 from grahamwhaley/20180629_journald_setup
Dev: Document journald limitations and workarounds
2018-07-23 14:58:33 -07:00
Eric Ernst
473c450c5e
Merge pull request #190 from jodh-intel/doc-reqs-images
docs: Document image requirements
2018-07-23 14:55:49 -07:00
Graham Whaley
50b445cf35 cli: tests: Clarify who cleans up tmpdir
Add a comment to clarify that the caller of
testRunContainerSetup() cleans up the tmpdir.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2018-07-23 17:32:52 +01:00
Graham Whaley
73c8286c7e cli: tests: remove the tmpdir to the config.json
We were defer removing the temporary config.json files
but not the tmpdir path we had created to store them in.
Expose that path out so we can defer removeall it.

Fixes: #480

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2018-07-23 17:32:52 +01:00
Graham Whaley
d6d38dae13 cli: update_test: defer remove tmpfile
Ensure we remove the tmpfile used for testing.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2018-07-23 17:32:52 +01:00
Peng Tao
d69fbcf17f sandbox: add stateful sandbox config
When enabled, do not release in memory sandbox resources in VC APIs,
and callers are expected to call sandbox.Release() to release the in
memory resources.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-07-23 09:54:02 +08:00
Peng Tao
4656a72b92 cli: create vm factory if failed to load existing one
When vm factory is enabled, create vm factory automatically
during creation.

Fixes: #504

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-07-23 08:46:53 +08:00
Peng Tao
7a6f205970 virtcontainers: keep qmp connection when possible
For each time a sandbox structure is created, we ensure s.Release()
is called. Then we can keep the qmp connection as long as Sandbox
pointer is alive.

All VC interfaces are still stateless as s.Release() is called before
each API returns.

OTOH, for VCSandbox APIs, FetchSandbox() must be paired with s.Release,
the same as before.

Fixes: #500

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-07-23 08:37:55 +08:00
Peng Tao
c9bd12aa19 qemu: cleanup qmp channel setup and teardown
Unify qmp channel setup and teardown. This also fixes the issue that
sometimes qmp pointer is not reset after qmp is shutdown.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-07-23 08:36:58 +08:00
Lai Jiangshan
14d25b82a4
Merge pull request #303 from bergwolf/vmfactory
add vm factory support
2018-07-22 06:47:34 +08:00
Peng Tao
0a11230bfb factory: add UTs
Add UTs to all factory components.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-07-19 12:44:58 +08:00
Peng Tao
7cdc0fe912 cli: do not set ip based kernel parameter
For one thing, it is not used by any kata components. For another thing,
it breaks vm factory hypervisor config check.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-07-19 12:44:58 +08:00
Peng Tao
0309e59cf8 cli: add vm factory management subcommand
Add enable_template option to the config file.
When it is set, enable the vm template factory.

cache factory cannot be used by kata cli directly because
it requires a running daemon to maintain the cache VMs.

`kata-runtime factory init` would initialize the vm factory and
`kata-runtime factory destroy` would destroy the vm factory.

When configured, a vm factory is loaded before creating new sandboxes.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-07-19 12:44:58 +08:00
Peng Tao
a7d888febc virtconainers: add SetFactory API
Add SetFactory to allow virtcontainers consumers to set a vm factory.
And use it to create new VMs whenever the factory is set.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-07-19 12:44:58 +08:00
Peng Tao
bdd5c66fc5 virtcontainers: add vm factory support
Add vm factory support per design in the VM Factory plugin section.
The vm factory controls how a new vm is created:

1. direct: vm is created directly
2. template: vm is created via vm template. A template vm is pre-created
   and saved. Later vm is just a clone of the template vm so that they
   readonly share a portion of initial memory (including kernel, initramfs
   and the kata agent). CPU and memory are hot plugged when necessary.
3. cache: vm is created via vm caches. A set of cached vm are pre-created
   and maintained alive. New vms are created by just picking a cached vm.
   CPU and memory are hot plugged when necessary.

Fixes: #303

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-07-19 12:44:58 +08:00
Peng Tao
8dda2dd7a5 virtcontainers: add a vm abstraction layer
As representation of a guest without actual sandbox attached to it.
This prepares for vm factory support.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-07-19 12:44:58 +08:00
Peng Tao
28b6104710 qemu: prepare for vm templating support
1. support qemu migration save operation
2. setup vm templating parameters per hypervisor config
3. create vm storage path when it does not exist. This can happen when
an empty guest is created without a sandbox.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-07-19 12:44:58 +08:00
Peng Tao
057214f0fe agent: prepare for vm factory
There are a few changes we need on kata agent to introduce vm factory
support:
1. decouple agent creation from sandbox config
2. setup agent without creating a sandbox
3. expose vm storage path and share mount point

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-07-19 12:44:55 +08:00
Peng Tao
7f20dd89a3 hypervisor: cleanup valid method
The boolean return value is not necessary.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-07-19 10:49:25 +08:00
Peng Tao
18e6a6effc hypervisor: decouple hypervisor from sandbox
A hypervisor implementation does not need to depend on a sandbox
structure. Decouple them in preparation for vm factory.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-07-19 10:49:25 +08:00
Peng Tao
4ac675453f qemu: remove append9PVolumes
It is not used and we actully cannot append multiple 9pfs volumes to
a guest.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-07-19 10:49:25 +08:00
Graham Whaley
e0010619fc
Merge pull request #495 from bergwolf/agent_debug
kata_agent: print request details
2018-07-18 17:22:36 +01:00
Peng Tao
81c073f67d
Merge pull request #458 from harche/without_devices
virtcontainers: Add support for ephemeral volumes
2018-07-18 15:06:09 +08:00
Peng Tao
5d6da3517a kata_agent: print request details
It helps tracking each request that is sent and we can match with the
one printed by kata-agent on the guest side to find out any stack
requests in the middle.

Fixes: #494

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-07-18 11:26:50 +08:00
Harshal Patil
b821a5df4c virtcontainers: Add support for ephemeral volumes
Ephemeral volumes should not be passed at 9pfs mounts.
They should be created inside the VM.

This patch disables ephemeral volumes from getting
mounted as 9pfs from the host and instead a corresponding
tmpfs is created inside the VM.

Fixes : #61

Signed-off-by: Harshal Patil <harshal.patil@in.ibm.com>
2018-07-18 07:41:36 +05:30
Julio Montes
a9fde8201e
Merge pull request #96 from nitkon/patch-1
Kata-deploy: scrub for grammar and typos in README
2018-07-17 08:20:19 -05:00
Peng Tao
545fe0c873
Merge pull request #490 from kata-containers/makefile-fix
makefile: update PREFIX to remove redundant slash
2018-07-17 17:44:21 +08:00
Mark Ryan
db7e149611
Merge pull request #22 from devimc/topic/vsockHotplug
qemu/qmp: implement function to hotplug vsock-pci
2018-07-17 09:07:44 +01:00
Archana Shinde
555a58a807
Merge pull request #101 from kata-containers/kata-deploy-container-update
kata-deploy: update to use katadocker container image
2018-07-16 16:40:41 -07:00
Julio Montes
f700a97bee qemu/qmp: implement function to hotplug vsock-pci
Implement function to hotplug vsocks, vsocks are needed
to communicate processes are running inside the VM
with processes are running on the host.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-07-16 14:19:43 -05:00
Eric Ernst
c72a720b97 makefile: update PREFIX to remove redundant slash
Fixes: #488

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2018-07-16 11:01:33 -07:00
Julio Montes
77cbea5a42
Merge pull request #475 from grahamwhaley/20180706_env_json
kata-env: Add ability to output as JSON
2018-07-16 07:38:50 -05:00
Eric Ernst
14e34ee27e kata-deploy: update to use katadocker container image
Now that initial files for kata-deploy have merged, we
have an initial image on dockerhub.  s/egernst/katadocker

Fixes: #100

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2018-07-13 15:32:52 +00:00
Julio Montes
1434a3c5b0
Merge pull request #89 from devimc/topic/snap
snap: improve README and Makefile
2018-07-13 09:34:10 -05:00
nitkon
11d9609ce9
Kata-deploy: scrub for grammar and typos in README
Fixes:  #95

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-07-13 13:54:48 +05:30
Archana Shinde
deb38b915e
Merge pull request #65 from kata-containers/introduce-kata-deploy
kata-deploy: add support for deploying Kata on K8S
2018-07-12 14:42:04 -07:00
Archana Shinde
02056b613e
Merge pull request #482 from chavafg/topic/update-cri-o
versions: Update CRI-O supported version
2018-07-12 10:30:16 -07:00
Salvador Fuentes
bb0bab2683 versions: Update CRI-O supported version
Some test fixes were introduced into the 1.9 and 1.10 branches
of cri-o. These fixes will help us minimize random failures.

Fixes #481.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2018-07-12 09:47:03 -05:00
Julio Montes
81a41050b8 snap: improve README and Makefile
Address code review of pr #82

fixes #88

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-07-12 09:16:15 -05:00
Eric Ernst
c2024c9f87
Merge pull request #192 from scooley/kube-anchor
docs: update kube anchor in distro install guides
2018-07-11 13:59:22 -07:00
Eric Ernst
976b883501 kata-deploy: cleanup, updated for 1.1.0
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2018-07-11 20:49:47 +00:00
Sarah
748acc6683 docs: update kube anchor in distro install guides.
Fixes: #184

Signed-off-by: Sarah <scooley@microsoft.com>
2018-07-11 12:57:00 -07:00