Commit Graph

4 Commits

Author SHA1 Message Date
Michał Dulko 78102c9984 Use virtualenv to build kuryr-cni Docker image
This commit changes the way we produce kuryr-cni Docker image. Previously we've
distributed the kuryr-driver as pyinstaller binary that contained Python 3
interpreter and all the dependencies. This binary was called from CNI. That
approach had some disadvantages, the major being complicated build procedure
and having to see false-positive BrokenPipeError tracebacks in kubelet
logs.

This commit implements distributing kuryr-driver as a virtualenv with
kuryr-kubernetes and all the dependecies installed. That virtualenv is then
copied onto the host system and CNI can easily activate it and run kuryr-cni
binary. This should solve issues caused by pyinstaller.

Closes-Bug: 1747058

Change-Id: I65b01ba27cbe39b66f0a972d12f3abc166934e62
2018-02-02 19:55:44 +01:00
Michał Dulko 18db649943 Support kuryr-daemon when running containerized
This commit implements kuryr-daemon support when
KURYR_K8S_CONTAINERIZED_DEPLOYMENT=True. It's done by:

* CNI docker image installs Kuryr-Kubernetes pip package and adds
  exectution of kuryr-daemon into entrypoint script.
* Hosts /proc and /var/run/openvswitch are mounted into the CNI
  container.
* Code is changed to use /host_proc instead of /proc when in a container
  (it's impossible to mount host's /proc into container's /proc).

Implements: blueprint cni-split-exec-daemon

Change-Id: I9155a2cba28f578cee129a4c40066209f7ab543d
2017-12-13 11:45:22 +01:00
Michał Dulko eb428c1170 Clean up ENV vars mistmatches in Dockerfiles
Containerized deployment through DevStack had two bugs related to
mismatches in handling environment variables in Dockerfiles:

1. cni.Dockerfile was using ENV vars to define CNI bin and conf
directories, but when DevStack was building them it wasn't setting them
correctly. This resulted in CNI binaries and configs ending up
in wrong directories when deploying through DevStack. This is fixed by
passing $CNI_BIN_DIR and $CNI_CONF_DIR into the build function.
2. cni_builder script used $CNI_BIN_DIR_PATH, but it was only defined in
cni.Dockerfile and was is missing from cni_builder.Dockerfile. This
resulted in malformed kuryr-cni script, that pointed to non-existing
"/kuryr-cni-bin" file. This is fixed by adding those ENV vars to
cni_builder.Dockerfile

Change-Id: I4833124231f256b74f80bd5fee732686bffab77e
Closes-Bug: 1718137
2017-09-20 10:35:36 +02:00
vikaschoudhary16 632d32be89 Add support to install Kuryr as a network addon
Implements blueprint kubeadminstallable

Change-Id: I38cbc88ee7ee7b544ec15ee8f6ef9e0a0f474c2a
Co-Authored-By: Antoni Segura Puimedon <antonisp@celebdor.com>
Co-Authored-By: Michal Dulko <mdulko@redhat.com>
2017-09-14 13:33:53 +02:00