Commit Graph

691 Commits

Author SHA1 Message Date
Jose Carlos Venegas Munoz
eb10d79fa8 tag_repos.sh: fix typo
Fix variable name that breaks the script when creating releases.

Fixes: #121

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-08-08 14:40:00 -05:00
Peng Tao
47835a8fd3
Merge pull request #104 from devimc/topic/fixMemConstraints
kernel/configs: enable swap extension (CONFIG_MEMCG_SWAP)
2018-08-02 10:09:15 +08:00
Julio Montes
3b18544a99 kernel/configs: enable swap extension (CONFIG_MEMCG_SWAP)
libcontainer limits the memory+swap usage by writing the limit at
/sys/fs/cgroup/memory/docker/$CONTID/memory.memsw.limit_in_bytes, this path
doesn't exist if CONFIG_MEMCG_SWAP and CONFIG_MEMCG_SWAP_ENABLED are not
enabled.

fixes #103

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-08-01 11:42:53 -05:00
Julio Montes
4af56db0ea
Merge pull request #114 from nitkon/master
ppc64le: Use powerpc as prefix for kernel config file
2018-08-01 07:07:18 -05:00
Nitesh Konkar
65c00dc29a ppc64le: Use powerpc as prefix for kernel config file
Post Fix #111, the kernel config name is
expected is to be prefixed with powerpc instead
of ppc64le. Just rename the file to suit the scripts.

Fixes: #113

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-08-01 14:46:10 +05:30
Julio Montes
edda8cc68a
Merge pull request #117 from jcvenegas/fix-ci
ci: Fix ci when tmp_dir is not set.
2018-07-31 15:37:40 -05:00
Jose Carlos Venegas Munoz
b4a6303b14 ci: Fix ci when tmp_dir is not set.
When tmp_dir is not set and lib.sh is sourced
could lead to fail.

Fix: #116

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-31 15:21:20 -05:00
Jose Carlos Venegas Munoz
6e69deba7f
Merge pull request #108 from jcvenegas/github-release
release: Create github release after create tag.
2018-07-31 12:30:59 -05:00
James O. D. Hunt
78c79ce138
Merge pull request #102 from nitkon/master
packaging: Get packaging for ppc64le
2018-07-31 16:56:35 +01:00
Jose Carlos Venegas Munoz
f65fd94583 tag_repos: Create github release.
After create a tag craete a github release.

Fixes: #107

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-31 10:23:55 -05:00
Jose Carlos Venegas Munoz
dfddde813d lib: move build_hub to lib
hub will be used by other script move it.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-31 10:22:52 -05:00
Nitesh Konkar
dae14ddefd packaging: Add packaging support for ppc64le
Fixes:  #74

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-07-31 19:58:21 +05:30
James O. D. Hunt
90fa9305e0
Merge pull request #112 from Weichen81/master
Kernel: Normalize target-arch for setup-kernel function
2018-07-31 13:33:31 +01:00
Wei Chen
0e64f2a8c6 kernel: Update kata_config_version to trace issue#111
Signed-off-by: Wei Chen <wei.chen@arm.com>
2018-07-31 06:48:16 +00:00
Wei Chen
6f4023f6e2 kernel: Remove redundant slash of default_kernel_config_dir
Run new script in arm server to build kernel, then find a minor
typo. An extra "/" in the end of default_kernel_config_dir will
cause error:
ERROR: failed to find default config
../src/github.com/kata-containers/packaging/kernel/configs//aarch64_kata_kvm_4.14.x

Signed-off-by: Wei Chen <wei.chen@arm.com>
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2018-07-31 06:48:14 +00:00
Wei Chen
195b5744ea kernel: Normalize target-arch for setup-kernel function
As we had dicussed in issue#140:
https://github.com/kata-containers/documentation/issues/140
We have normalized output for x86_64, arm64 and ppc64. And
James had implemented a kata-arch.sh in tests/.ci :
https://github.com/kata-containers/tests/blob/master/.ci/kata-arch.sh
But in build-kernel.sh the setup-kernel function had used the
"uname -m" output as target-arch directly, this will cause the
following scripts can't find kernel config files.

Fixed #111

Signed-off-by: Wei Chen <wei.chen@arm.com>
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2018-07-31 06:48:07 +00:00
James O. D. Hunt
f0e1d9dc4d
Merge pull request #110 from nitkon/build_kernel
build_image.sh: OPTIND prevent unwanted word-splitting
2018-07-30 15:42:48 +01:00
Nitesh Konkar
eedacc1572 build_image.sh: OPTIND prevent unwanted word-splitting
shift $((OPTIND-1)) can be unsafe.To prevent unwanted
word-splitting all parameter expansions should be
double-quoted. Use the safe form for the command:
shift "$((OPTIND-1))"

Fixes: #109

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-07-30 19:55:37 +05:30
James O. D. Hunt
d4f233eca7
Merge pull request #105 from Weichen81/master
configs: Update arm64 kernel config to latest 4.14.x kernel
2018-07-30 14:02:24 +01:00
Wei Chen
65315e9eba kernel: Trace kernel change of aarch64 config file
Update kata_config_version to trace the change of aarch64
config file update.

Change-Id: Ic70cf4bf2288fe3d9113e21c1d100cd51e4cc6a6
Signed-off-by: Wei Chen <wei.chen@arm.com>
2018-07-27 03:18:19 +00:00
Wei Chen
79c8eb20ff configs: Update arm64 kernel config to latest 4.14.x kernel
After upgrading the kernel to latest 4.14.x kernel, there are new
kconfig options that need users to select in install-kata-kernel.sh.
the prompt will block the script. We update this config file to give
user a good defined default config.

The new kconfig options are about, “Meltdown” and “Spectre”. So I
selected them to yes by default in this config file:
CONFIG_ARM64_ERRATUM_1024718=y
CONFIG_QCOM_FALKOR_ERRATUM_E1041=y
CONFIG_UNMAP_KERNEL_AT_EL0=y
CONFIG_HARDEN_BRANCH_PREDICTOR=y
CONFIG_ARM64_SSBD=y

Fixed #106

Signed-off-by: Wei Chen <wei.chen@arm.com>
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2018-07-27 03:18:19 +00:00
Eric Ernst
8ed7e397e1
Merge pull request #90 from jcvenegas/build-image-fixes.sh
image build: Improve image generation
2018-07-26 11:36:44 -07:00
Jose Carlos Venegas Munoz
6fa5b7945e pkgs: image: Get image version from version.yaml
Build image with agent and osbuilder with master by default.

If want to build a release tag just use -v <version> and
will use that osbuilder and agent tag.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-26 13:04:23 -05:00
James O. D. Hunt
5d2a95b515
Merge pull request #94 from Pennyzct/qemu
ci: refine qemu-options for arm64
2018-07-26 14:58:48 +01:00
Penny Zheng
f275127791 ci: refine qemu-options for arm64
a few qemu options generated by configure-hypervisor.sh were only
suitable for amd64, leading compilation err in aarch64.

Fixes: #92

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Signed-off-by: Wei Chen <Wei.Chen@arm.com>
2018-07-25 08:47:11 +00:00
Eric Ernst
66e165a2f9
Merge pull request #79 from jcvenegas/build-kernel
kernel: Add script to setup, build and install a kernel for Kata.
2018-07-24 08:17:13 -07: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
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
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
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
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
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
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
Eric Ernst
0be8a5cb03
Merge pull request #86 from jcvenegas/update-repository-version
Update repository version
2018-07-10 14:43:47 -07:00
Eric Ernst
e642e32ed5 kata-deploy: add support for deploying Kata on K8S
A Dockerfile is created and reference daemonsets are also
provided for deploying Kata Containers onto a running Kubernetes
cluster. A few daemonsets are introduced:

1) runtime-labeler: This daemonset will create a label on each node in
the cluster identifying the CRI shim in use. For example,
container-runtime=crio or container-runtime=containerd.

2) crio and containerd kata installer: Assuming either CRIO or
containerd is the CRI runtime on the node (determined based on label
from (1),, either the crio or containerd variant will execute.  These daemonsets
will install the VM artifacts and host binaries required for using
Kata Containers.  Once installed, it will add a node label kata-runtime=true
and reconfigure either crio or containerd to make use of Kata for untrusted workloads.
As a final step it will restart the CRI shim and kubelet.  Upon deletion,
the daemonset will remove the kata binaries and VM artifacts and update
the label to kata-runtime=cleanup.

3) crio and containerd cleanup: Either of these two daemonsets will run,
pending the container-runtime label value and if the node has label
kata-runtime=cleanup.  This daemonset simply restarts crio/containerd as
well as kubelet. This was not feasible in a preStepHook, hence the
seperate cleanup step.

An RBAC is created to allow the daemonsets to modify labels on the node.

To deploy kata:
kubectl apply -f kata-rbac.yaml
kubectl apply -f kata-deploy.yaml

To remove kata:
kubectl delete -f kata-deploy.yaml
kubectl apply -f kata-cleanup.yaml
kubectl delete -f kata-cleanup.yaml
kubectl delete -f kata-rbac.yaml

This initial commit is based on contributions by a few folks on
github.com/egernst/kata-deploy

Also-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
Signed-off-by: Jon Olson <jonolson@google.com>
Signed-off-by: Ricardo Aravena <raravena@branch.io>
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2018-07-10 18:52:05 +00:00
Jose Carlos Venegas Munoz
4eb3a3dcd1 test: Add test update-repository-version.sh
Add some basic test to verify the script works.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-09 13:14:47 -05:00
Jose Carlos Venegas Munoz
d9736af0ba docs: Add information about new release tool.
Add docs about the version bump script.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-09 13:14:47 -05:00
Jose Carlos Venegas Munoz
4fef836ffd release: Add make target to bump repos.
Add a target to bump all repos in one command.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-09 13:14:47 -05:00
Jose Carlos Venegas Munoz
e12f1df807 release: add script to bump repositories
Add script that will help to bump versions for all the projects.

Fixes: #49

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-09 13:14:47 -05:00
Jose Carlos Venegas Munoz
540d3a26be
Merge pull request #82 from devimc/topic/snap
snap: add yaml to build snap image
2018-07-05 10:19:54 -05:00
Julio Montes
38a82d725e snap: add yaml to build snap image
the yaml file is the recipe to build a snap image
with all Kata Containers components inside.

fixes #81

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-07-04 15:59:33 -05:00
Julio Montes
ce470dc8af
Merge pull request #87 from jcvenegas/kata-1.1.0
Kata 1.1.0
2018-07-04 15:52:04 -05:00
Jose Carlos Venegas Munoz
ad6faf0d59 ci: Skip pkgs test on CI.
The zypper still hangs in the CI.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-04 15:26:17 -05:00
Jose Carlos Venegas Munoz
9e93b510e2 Makefile: fix test path.
obs scripts are now in a new directory.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-04 14:32:07 -05:00