Commit Graph

12 Commits

Author SHA1 Message Date
Michał Dulko 28b27c5de2 Remove Python 2 support
Ussuri release is the one in which we drop Python 2 support, as its EOL
is pretty close now. This commit does so in kuryr-kubernetes by
removing Python 2 unit test jobs, switching all tempest jobs to Python
3, removing specific jobs for Python 3 and updating Dockerfiles to
centos:8 that includes Python 3 from the box.

Also CentOS 7 job is removed from check queue as it seems it doesn't
play well with Python 3. A CentOS 8 job will get created soon.

Change-Id: Id9983d2fd83cef89e3198b2760816cf4a851008b
2019-11-19 12:34:54 +01:00
pengyuesheng 663300ba91 Update the constraints url
For more detail, see http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: I16c4cc72870e1a2d495a2385b0cd21f8969ad474
2019-09-23 15:59:22 +08:00
Zuul 2caa1fb3af Merge "Add `yum/dnf clean all` to dockerfiles" 2019-07-01 08:44:12 +00:00
Michał Dulko e685d72800 Add `yum/dnf clean all` to dockerfiles
In a rather desperate try to shrink our container images this commit
adds `yum/dnf clean all` as part of the building process. This helps to
save around 100 MB in case of centos-based images.

Change-Id: I2aaadab4ffec6e0ad744e82fc9145cd86e14a224
2019-06-21 17:21:24 +02:00
Michał Dulko 245eb078f4 Implement kuryr-cni in golang
This commit reimplements the kuryr-cni, that is the actual CNI plugin
that gets called by kubelet and passes the request to kuryr-daemon, in
golang. This means that it can injected as a binary without any
dependencies, instead of using a bash script that looks for ID of
kuryr-daemon container and does `docker exec` to run Python kuryr-cni
inside. The obvious advantage of that is removing a constraint of
python, curl and docker/runc binaries being available on any K8s host
that runs Kuryr. This enables integration with Magnum, where kubelet
runs in such a minimal container. Besides that injecting a binary is way
more elegant and less error-prone.

The golang implementation should keep the compatibility with Python one.
Also currently only containerized jobs are switched to use it, so Python
implementation is still kept in the repo. I'm not against removing it in
very near future.

Please note that there is an important limitation in comparison to the
Python implementation - i.e. in case of golang binary running on K8s
host, we don't have an easy access to kuryr.conf, meaning that
localhost:50036 is currently hardcoded as the kuryr-daemon endpoint.
This should be fixed by putting the configured endpoint into
10-kuryr.conf file that gets injected onto the host by cni_ds_init
script.

Implements: blueprint golang-kuryr-cni
Change-Id: Ia241fb5b2937c63d3ed6e3de1ac3003e370e4db6
2019-06-17 12:58:37 +02:00
Zuul 1fc669c3d6 Merge "Update Python 3 containers to Fedora 30" 2019-06-13 20:50:16 +00:00
Michał Dulko ddfa9e6cca Update upper-constraints references in Dockerfile
We use git.openstack.org/cgit to fetch global upper-constraints.txt file
in our Dockerfiles. That is currently only a redirect and we should get
it switched to use opendev.org infra. This commit does so.

Change-Id: I32945c6b5426b6274c180a4a90dad09c414977b2
2019-06-05 17:21:57 +02:00
Michał Dulko 45be6d622e Update Python 3 containers to Fedora 30
Fedora 30 was released for more than a month now, so let's see if we can
upgrade the Python 3 containers to use it.

Change-Id: If878ff94b1319b748e3003f991c8556f3ac38806
2019-06-04 17:53:23 +02:00
Ilya Maximets 685f4c456a Add PodResources service client
PodResources client could be used by sriov cni to obtain devices
allocated for container by sriov device-plugin.

KubeletPodResources service is still in alpha, so it should be
explicitly enabled in kubelet feature-gates:
    kubelet --feature-gates KubeletPodResources=true

New config option 'kubelet_root_dir' added to 'sriov' section
that defaults to kubelet default root-dir '/var/lib/kulelet'.
In case kubelet started with non-default root directory passed
via '--root-dir' option, the same value should be configured
in 'kubelet_root_dir'.
Note that if sriov binding driver will be used inside container
'kubelet_root_dir'/pod-resources directory should be mounted
to this container in order to allow communication with kubelet
via gRPC protocol over the unix domain socket.

Partial-Bug: 1826865
Depends-On: https://review.openstack.org/#/c/652629
Change-Id: Icf088b839db079efe9c7647c31be4ead867ed32b
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
2019-05-20 14:16:04 +03:00
Michał Dulko da76fb1f5c Update Python 3 containers to use Fedora 29
Please note that it still forces Python 3.6 as eventlet doesn't work
with Python 3.7, which is the default Python in 29.

Change-Id: If5ac58274c2edec9881fef60ac9f3bf0377aa5f4
2019-04-25 08:25:37 +00:00
Michał Dulko 8b76509514 Clean up Dockerfiles and how we build them
This commit does several cleanups to the Dockerfiles that we have:

* git is removed from the images after Kuryr packages installation
* jq and wget is removed from kuryr-cni image as those ar no longer used
* explicit setuptools installation is no longer required
* raw Kuryr code is removed from images after it's `pip install`ed
* unnecessary VOLUME line is removed from kuryr-cni Dockerfile
* CNI_CONFIG_DIR and CNI_BIN_DIR build arguments are removed from
  kuryr-cni Dockerfile as they are not used anywhere. Initially we've
  kept them to allow deployer to tell where host's /etc/cni/net.d and
  /opt/cni/bin will be mounted, but one of the refactorings of
  cni_ds_init must have stopped depending on them and we simply started
  to expect the mounts to be in the same paths as on host. We can
  continue to do that.

The build_cni_daemonset_image script was created back in the time when
we have had multi-stage build of the kuryr-cni image. This is no longer
the case and building the image is as easy as:

    `docker build -f cni.Dockerfile .`

Given that this commit removes the script and updates documentation to
recommend using `docker build` directly.

Change-Id: Ib1807344ede11ec6845e5f09c5a87c29a779af03
2018-12-17 10:40:50 +01:00
Antoni Segura Puimedon e20dcadb1f Add support for python3 containerized kuryr-kubernetes
This patch adds dockerfiles and helper scripts to build the Kuryr-Kubernetes
containers using Python3 and get it automated in devstack.

Implements: blueprint goal-python36
Change-Id: I2066aacfebc7339d5a86b717327bdad428b0e54c
Signed-off-by: Antoni Segura Puimedon <celebdor@gmail.com>
2018-09-12 14:10:23 -06:00