Commit Graph

45 Commits

Author SHA1 Message Date
Antti Kervinen
5fe8174077 fpga_plugin: add kustomization files
- Add script/fpga-plugin-prepare-for-kustomization.sh, creates contents
  for the secret needed by the fpga plugin webhook.
- Single-command fpga plugin + webhook deployment for both modes:
  - `kubectl create -k deployments/fpga_plugin/overlays/af`
  - `kubectl create -k deployments/fpga_plugin/overlays/region`
- Change intel-fpga-plugin image CMD to ENTRYPOINT.
2020-02-24 16:32:26 +02:00
Antti Kervinen
d568f050c5 gpu_plugin: add kustomizations
- Default deployment: `kubectl apply -k deployments/gpu_plugin`
- Default deployment does not specify namespace anymore
  (was: `kube-system`).
- Variant: deploy only on nodes with Intel GPU label by NFD:
  `kubectl apply -k deployments/gpu_plugin/overlays/nfd_labeled_nodes`
- Variant: deploy to `kube-system` instead of user-defined namespace
  (or "default"):
  `kubectl apply -k deployments/gpu_plugin/overlays/namespace_kube-system`
- GPU plugin README updated.

Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
2020-02-07 14:56:52 +02:00
Mikko Ylinen
f036b72cff
Merge pull request #286 from askervin/kustomize
qat_plugin: add kustomizations
2020-02-06 13:53:08 +02:00
Antti Kervinen
ec8eef6daa qat_plugin: add kustomizations
- Default deployment: `kubectl apply -k deployments/qat_plugin`
- Debug variant: `kubectl apply -k deployments/qat_plugin/overlays/debug`
- Single-resource `yaml` naming convention:
  applying x-y-z.yaml configures k8s resource named x-y-z.
- QAT plugin README updated.

Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
2020-02-05 15:48:57 +02:00
Mikko Ylinen
df7492d763 crypto-perf: fix readonly rootfs deployment
We had securityContext specified twice and the latter was overwriting
readOnlyRootFilesystem=true.

With this commit, the container is properly mounted readonly. However,
we need a tmpfs for DPDK runtime data so an emptyDir volume is added
(NB: see kubernetes/issues/48912 for discussion on emptyDir mount options).

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-02-04 13:39:07 +02:00
Alek Du
887e56e780 VPU: Add Intel Movidius MyriadX VPU plugin support
This patch is to support Intel VCAC-A card (with MyriadX 2485 VPUs), for other
later on VPUs, we will reuse this plugin and add support.

VCAC-A board info is at:
https://www.intel.com/content/dam/www/public/us/en/documents/datasheets/media-analytics-vcac-a-accelerator-card-by-celestica-datasheet.pdf

Also add openvino HDDL VPU demo for Intel VCAC-A card.

Signed-off-by: Alek Du <alek.du@intel.com>
2020-01-28 23:17:50 +08:00
Dmitry Rozhkov
a44fc06b21
Merge pull request #242 from bart0sh/PR0066-secure-fpga-weebhook
Secure fpga weebhook
2020-01-15 10:22:42 +02:00
Ed Bartosh
368f34c76b fpga: run webhook container with user privileges
Modified deployment template and script to run admission controller
webhook with user credentials.
2020-01-14 16:31:32 +02:00
Ed Bartosh
1b1206e39a fpga: change webhook service port
Changed port webhook is listening on from 443 to 8443 to be able
to bind to it from non-root user account.
2020-01-14 16:31:12 +02:00
Ed Bartosh
205d32a6c6 fpga_plugin: move termination-log out of /dev
runtime uses /dev/termination-log to write container termination
messages. If this file doesn't exist on the host the runtime tries
to create it. As /dev is read-only for intel-fpga-plugin container
attempt to create /dev/termination-log fails with this error:

Warning Failed kubelet, device-plugins-kubernetes-clearlinux-14-4.novalocal  Error:
  container create failed: container_linux.go:345: starting container process caused
  "process_linux.go:430: container init caused \"rootfs_linux.go:58:
  mounting \\\"/var/lib/kubelet/pods/d7262db5-e3fc-4b7b-bc2e-da245f600c4b/containers/intel-fpga-plugin/cddd0f76\\\"
  to rootfs \\\"/var/lib/containers/storage/overlay/edd75bb94b1b4cf93ae1ea5c064945169fb329d0abdb56b7621cddfc721f6eda/merged\\\"
  at \\\"/var/lib/containers/storage/overlay/edd75bb94b1b4cf93ae1ea5c064945169fb329d0abdb56b7621cddfc721f6eda/merged/dev/termination-log\\\"
  caused \\\"open /var/lib/containers/storage/overlay/edd75bb94b1b4cf93ae1ea5c064945169fb329d0abdb56b7621cddfc721f6eda/merged/dev/termination-log: read-only file system\\\"\""

Setting terminationMessagePath to rw-mounted file system
/tmp/termination-log for the plugin container should fix this.

Fixes: #259
2020-01-14 11:58:44 +02:00
Ed Bartosh
1930d02edb
Merge pull request #241 from hectoragb/migration-webhook-deployment
fpga: Migrate webhook deployment to use the apps/v1 API
2019-12-20 15:04:23 +02:00
Hector Augusto Garcia Baleon
f4bb37dc9e fpga: Migrate webhook deployment to use the apps/v1 API
Since Kubernetes v1.16 release, DaemonSet, Deployment, StatefulSet, and ReplicaSet in the extensions/v1beta1 and apps/v1beta2 API groups have been deprecated. This PR migrates the webhook deployment to use apps/v1 instead of extensions/v1beta1 and add the selector part also required by the migration.

Signed-off-by: Hector Augusto Garcia Baleon <hector.augusto.garcia.baleon@intel.com>
2019-12-18 11:29:53 -06:00
Ed Bartosh
06c07a5961 deployments/fpga_plugin: limit host mounts
The default deployment gives rather wide host mounts.

Limited sysfs mount only to the subdirectory the plugin
needs.

Mounted sysfs and dev  mounts read-only.

Added notes that FPGA plugin can be run as non-root user.
2019-12-12 13:07:19 +02:00
Mikko Ylinen
fd631fc31c deployments/gpu_plugin: limit host mounts
The default deployment gives rather wide host mounts. We can limit
the mounts only to the subdirectories the plugin needs and mount
them read-only.

Also, add notes that both QAT and GPU plugins can be run as non-root
user.

Fixes: #228

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2019-12-11 12:54:36 +02:00
Mikko Ylinen
7a8ff9ccc1 deployments: set readOnlyRootFilesystem
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2019-08-30 12:53:17 +03:00
Mikko Ylinen
bfcac03e48 deployments: fix QAT plugin command path
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2019-08-29 13:21:42 +03:00
Mikko Ylinen
d06f98690f images: tag with intel prefix
In preparations to get some of the images to hub.docker.com/intel,
start using intel/ prefix.

Moreover, set the Makefile variables so that the images built
by make [images|demos] can easily be pushed to any registry/org
by 'docker push' (e.g., by Jenkins).

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2019-08-29 13:21:19 +03:00
Alexander D. Kanevskiy
9d585ea0b8
Merge pull request #209 from bart0sh/PR0061-fix-deployment-setup
fpga: fix deployment setup
2019-08-27 16:26:13 +03:00
Ed Bartosh
a4c124777a fpga: fix deployment setup
- used ENTRYPOINT instead of CMD in plugin and admission webhook
  Dockerfiles to avoid duplicating commands in the pod yamls
- fixed path to deploy.sh script in fpga initcontainer Dockerfile
2019-08-27 11:03:03 +03:00
Ed Bartosh
a2a4ef7cce fpga: update mapping collection
- Ordered collection in DCP release/region/afus order for simpler
maintenance.

- Got rid of ambiguous entries without dcp releases, e.g. Arria10,
Arria10-nlb3 etc.
2019-08-26 15:13:37 +03:00
Alexander Kanevskiy
6395b1626d FPGA example mappings update
- For AOCX files, afuId should be set to unique UUID
  (can be seen via fpga_tool)
- arria10 now points to DCP 1.2 release
- added mappings for Stratix10 based D5005 PAC card
2019-08-25 02:37:07 +03:00
Alexander Kanevskiy
6fd729f12c Cleanup and fixes for FPGA initcontainer
- Simplify initcontainer, we don't need OPAE anymore
- Remove old initcontainer related files
2019-08-25 02:37:07 +03:00
Mikko Ylinen
e1399b5947 crypto-perf: move to clearlinux:base and add QAT test cases
Clear Linux enables DPDK QAT PMD so we can move to use everything from
there. This saves maintenance efforts and we get more up-to-date DPDK.
The DPDK version in this update gives a tool for compress perf too, for
instance.

The commit also adds kustomize scripts that overlay the original DPDK
demo deployment to run dpdk-test-[compress|crypto|-perf test cases:

$ kubectl apply -k deployments/qat_dpdk_app/test-compress1/
$ kubectl apply -f deployments/qat_dpdk_app/test-crypto1/

New test cases ('ptest's with varying parameters) can be easily added
by following the pattern in test-[crypto|compress]1 directories.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2019-08-20 22:01:44 +03:00
Mikko Ylinen
832e4aaf3c crypto-perf: add kustomization and move to deployments
We plan to use crypto-perf for simple QAT testing. This commit adds
kustomization to make the deployment easier. The original .yaml is
also moved to deployments/ with some changes.

For instance, it turns out also vfio-pci mode with DPDK needs CAP_SYS_ADMIN
(See PR: #187 which states that only igb_uio would need it).

kustomize is available part of kubectl since kubernetes v1.14.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2019-08-20 22:01:44 +03:00
Alexander Kanevskiy
6b74f87770 Update for init container image
- Updated OpenCL SDK runtime to 1.2 release
- Minimize result container image
2019-06-17 20:09:42 +03:00
Ubuntu
ded152e8a4 Move FPGA plugin to Distroless and Clearlinux
Signed-off-by: Ubuntu <hector.augusto.garcia.baleon@intel.com>
2019-06-14 18:11:32 +00:00
Dmitry Rozhkov
ca569b0f70 qat: initial support for openssl QAT engine 2019-04-25 14:14:09 +03:00
Ed Bartosh
eb9f50c977 fpga: add mappings for dpc1.0 resources
Current mappings break admissionwebhook deployment with this
kind of errors:
  Invalid value: "arria10_dcp1.0": a DNS-1123 subdomain must consist of
  lower case alphanumeric characters, '-' or '.', and must start and end
    with an alphanumeric character (e.g. 'example.com', regex used for
    validation is
    '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'

New mappings conform DNS-1123 regexp. They have been tested by the
compression demo and known to work.
2018-11-28 20:01:36 +02:00
Mikko Ylinen
187f8040f0 qat_plugin: use vfio-pci as the default driver
vfio-pci uses IOMMU memory protection and is a safer default.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2018-11-28 10:32:31 +02:00
Mikko Ylinen
00bbe922de qat: deployment: set parameters via ConfigMap
For easier deployments, fetch plugin command line arguments from ConfigMap.
When using ConfigMaps, qat_plugin.yaml needs no changes and can always
be used as is.

qat_plugin_default_configmap.yaml uses built-in defaults.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2018-11-20 13:43:00 +02:00
Ed Bartosh
471ef9bca3 fpga: add support for Arria10 DCP 1.0
Added DCP 1.0 Arria10 region and compress AFU ids
to the mapping collection to be able to work with
DCP 1.0 bitstreams.

This is also an enabler for FPGA demo that uses compress.aocx,
which is not compilable by aoc compiler from DCP 1.1
2018-11-16 17:24:27 +02:00
Dmitry Rozhkov
4fb7848af6 fpga: update to dcp 1.1 2018-10-17 12:26:53 +03:00
Ed Bartosh
891d69de83 Use buildah to build images
Added alternative builder for project images: buildah
https://github.com/containers/buildah

Considering that some of our plugins use CRI-O runtime it could be
a good idea to get rid of docker as a builder. It should allow us
not to run docker daemon at all, even for build purposes.

Kubernetes also goes this way encouraging users to switch to CRI
runtimes (CRI-O and containerd), so having non-docker builds supported
looks good from this perspective too.
2018-09-28 17:21:12 +03:00
Ed Bartosh
14b4168cbd add GPU plugin deployment
Added DaemonSet yaml
Added deployment instructions to plugin's README
2018-09-14 13:55:08 +03:00
Ed Bartosh
c446c6cd8d fix CRI hook configuration in initcontainer
Current configuration has incorrect keywords that caused
CRI not to call prestart hook.
2018-09-11 15:34:38 +03:00
Ed Bartosh
5a3aae9d12 mapping-collection: add mappings for arria10-compress
Added compress.aocx bitstream to the mapping collection.
This is an enabler for OpenCL gzip compression workload.
2018-09-04 17:18:36 +03:00
Ed Bartosh
835cc54942 create initcontainer for FPGA plugin daemonset
Fixes: #76
2018-08-27 12:56:38 +03:00
Dmitry Rozhkov
eccd70c600 replace glog with simpler home-grown debug logging 2018-08-16 17:40:16 +03:00
Dmitry Rozhkov
5de8d18638 webhook: add --namespace option to deployment script 2018-08-10 15:57:55 +03:00
Dmitry Rozhkov
763d229f65 webhook: adjust deployment script to accommodate CRDs 2018-08-08 17:58:18 +03:00
Dmitry Rozhkov
271bc0d29a webhook: add dynamically configured mappings
Currently we have hardcoded mapping from human readable names of
AFs and FPGA regions like arria10-nlb0 to the resource names
produced by the FPGA device plugin. This is not sustainable
long term solution.

Implement CRD based mappings so that a new mapping can be added or
removed dynamically by cluster admins with CRD resources.
2018-08-08 17:58:18 +03:00
ssehgal
3eb2b10f75 Enabling support for QuickAssist Devices 2018-07-23 17:35:37 +01:00
Dmitry Rozhkov
3082d453ad extend webhook-deploy.sh to accept --mode
Since the webhook can operate in two modes, either `preprogrammed`
or `orchestrated`, extend the deploying script to support these
modes.
2018-06-29 16:30:36 +03:00
Dmitry Rozhkov
62a8c50f6c automate FPGA webhook deployment 2018-06-20 14:54:49 +03:00
Dmitry Rozhkov
861b23308d Check node's annotations to set mode of FPGA plugin 2018-06-20 09:45:43 +03:00