Commit Graph

71 Commits

Author SHA1 Message Date
Mikko Ylinen
39f4a16db3 images: set 0.18.1 tag for the release
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-09-23 16:41:23 +03:00
Mikko Ylinen
fdc4703597 images: set 0.18.0 tag for the release
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-07-03 12:17:47 +03:00
Dmitry Rozhkov
e87d94d4fb fpga: finalize plugin kustomization
closes #318
2020-07-01 11:57:45 +03:00
linjiach
9cdb9a1446 add mappings for d5005-matrix-mult-orchestrated 2020-06-29 14:01:00 +00:00
Ed Bartosh
0c9831bf5c mapping-collection: add mappings for arria10.dcp1.2-nlb3-preprogrammed
This mapping will be used in the new demo screencast for FPGA plugin
deployment in preprogrammed mode.
2020-06-29 12:01:17 +03:00
Mikko Ylinen
2f16509fe3
Merge pull request #376 from rojkov/operator-v3
operator: initial version with gpu and qat controllers
2020-06-25 15:49:49 +03:00
Dmitry Rozhkov
6b2fa0a264 operator: initial version with gpu and qat controllers 2020-06-25 13:48:41 +03:00
linjiach
179a70179d
extend afu id length to 40 for aocx unique id
OpenCL bitstream .aocx has longer than 32 unique ID. Extend to 40 to accommodate it.
2020-06-25 00:31:50 -07:00
Dmitry Rozhkov
7177409f19 fpga webhook: rework deployment to use kustomize
Contributes to #318
2020-06-23 15:53:36 +03:00
Mikko Ylinen
c8ed2bb798 deployments: qat: add an overlay for Apparmor annotations
Some Ubuntu systems may run with Apparmor LSM policy enformements making
the default QAT daemonset to fail with (un)bind errors.

This commit adds a sample kustomize overlay to deploy the QAT daemonset with
Apparmor uconfined policy.

Fixes: #381

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-06-01 07:50:35 +03:00
Ed Bartosh
8b429fd99d
Merge pull request #358 from rojkov/webhook-modeless
fpga: make admission webhook mode-less
2020-05-05 10:24:13 +03:00
Dmitry Rozhkov
c63dbf61b8 fpgawebhook: move to v2 API of fpga.intel.com group 2020-05-04 15:43:20 +03:00
Dmitry Rozhkov
99fcb69d33 fpga: compress fpga AF resource names 2020-04-29 11:59:50 +03:00
Dan Garfield
3be22ab9af
Add node selector to restrict to x86
Without the node selector this will deploy on arm nodes with a constantly retrying pod.
2020-04-23 20:55:20 -06:00
Dmitry Rozhkov
6c2eacfae5 webhook: remove mode of operation
fpga: make AFU resource name 63 char long

webhook: drop mode from README

webhook: extend mappings description

webhook: tighten CRD definitions

webhook: drop mapping to non-existing afuId

explicitly state mappings names can be in any format

use consistent terminology across fpga webhook and plugin
2020-04-22 13:55:43 +03:00
Dmitry Rozhkov
bb03a8916f
Merge pull request #359 from bart0sh/PR0080-fpga-e2e-tests
implement e2e tests for FPGA plugin
2020-04-14 16:01:25 +03:00
Ed Bartosh
182601bdf7 run fpga plugin in arbitrary namespace 2020-04-09 17:01:56 +03:00
Ed Bartosh
7d8a33c30f fpga webhook: fix deployment issue
Webhook uses region CRDs even if run in preprogrammed mode.

Adding them to the base configuration should fix this deployment error:
  Failed to list *v1.FpgaRegion: the server could not find the requested resource

Fixes: #361
2020-04-09 15:21:33 +03:00
Ed Bartosh
1ce6a1fb89 fix flag provided but not defined error again
The same fix as previous:
  The `-v 1` arg is treated as single word thus klog throws
  "flag provided but not defined: -v 1" error.

This time it's in the webhook kustomize base.
2020-04-09 10:58:31 +03:00
Dmitry Rozhkov
7a86e8416f fix flag provided but not defined error
The `-v 1` arg is treated as single word thus klog throws
"flag provided but not defined: -v 1" error.
2020-04-06 11:38:59 +03:00
Graham Whaley
71d08224ee fpga: move to using klog for logs and debug
Move all the fpga components to using klog for logging
and debug. This includes replacing our homebrew 'fatal()'
with klog.Error().

Modify the deployment files to move from `-debug` to
`-v`, and set their default level to '1' (Info), rather
than full debug mode ('4').

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2020-03-24 14:31:53 +00:00
Mikko Ylinen
15d4b10715
Merge pull request #329 from grahamwhaley/20200312_klog
klog: Add klog logging to framework and qat plugins
2020-03-19 16:59:44 +02:00
Graham Whaley
f8dbc896a1 devicemanager: qat: use klog for logging and debug
Move the framework, and the qat driver, to use `klog`
for logging and debug.

This has a some noticeable effects:

1) Our default log output gains a bunch of annotation:
From:
    QAT device plugin started in 'dpdk' mode
To:
    I0312 11:51:02.057728    6053 qat_plugin.go:64] QAT device plugin started in 'dpdk' mode

(there is now a command line option to drop those annotations if
necessary).

2) We gain a bunch of command line parameters from klog for controlling log
levels and output. We go from 5 arguments to 17:

---
Usage of ./cmd/qat_plugin/qat_plugin:
  -add_dir_header
        If true, adds the file directory to the header
  -alsologtostderr
        log to standard error as well as files
  -debug
        enable debug output
  -dpdk-driver string
        DPDK Device driver for configuring the QAT device (default "vfio-pci")
  -kernel-vf-drivers string
        Comma separated VF Device Driver of the QuickAssist Devices in the system. Devices supported: DH895xCC,C62x,C3xxx and D15xx (default "dh895xccvf,c6xxvf,c3xxxvf,d15xxvf")
  -log_backtrace_at value
        when logging hits line file:N, emit a stack trace
  -log_dir string
        If non-empty, write log files in this directory
  -log_file string
        If non-empty, use this log file
  -log_file_max_size uint
        Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
  -logtostderr
        log to standard error instead of files (default true)
  -max-num-devices int
        maximum number of QAT devices to be provided to the QuickAssist device plugin (default 32)
  -mode string
        plugin mode which can be either dpdk (default) or kernel (default "dpdk")
  -skip_headers
        If true, avoid header prefixes in the log messages
  -skip_log_headers
        If true, avoid headers when opening log files
  -stderrthreshold value
        logs at or above this threshold go to stderr (default 2)
  -v value
        number for the log level verbosity
  -vmodule value
        comma-separated list of pattern=N settings for file-filtered logging
---

3) Our `-debug` flag is now replaced by the `klog` `-v n` flag.

*NOTE:* This is potentially a minor breaking change. Applying
this debug overlay to any previous (pre-klog edit) images will
cause the container to fail to launch, as it will not recognise
the new `-v` arguments.

We also update the kustomize deployment to move from using
DEBUG env vars to adding a VERBOSITY var that controls both
the log verbosity and now the debug mode enabling.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2020-03-19 11:20:48 +00:00
Alek Du
05fee4bf41 vpu: mount myd_ion device for topology hints to work
Previously, /dev/ion device was just arbitrary string and the plugin
did not need the device for anything. After adding the checks for
topology hints, the device node must be bind mounted in the plugin
container.

Signed-off-by: Alek Du <alek.du@intel.com>
2020-03-17 10:50:59 +08:00
Mikko Ylinen
1d41852013 qat: mount VFIO devices for topology hints to work
Previously, /dev/vfio/xx devices were just arbitrary strings and the
plugin did not need the devices for anything. After adding the checks
for topology hints, we need to read the devices attached to those so
the device nodes must be bind mounted in the plugin container.

Moreover, be more verbose about any errors coming from the topology code.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-03-02 08:13:09 +02:00
Alek Du
7c2bc3bda0 vpu_plugin: add kustomizations
- Default deployment: `kubectl apply -k deployments/vpu_plugin`
- Default deployment does not specify namespace anymore
  (was: `kube-system`)
- Variant: deploy to `kube-system` instead of user-defined namespace
  (or `default`)
  `kubectl apply -k deployments/vpu_plugin/overlays/namespace_kube-system`
- VPU plugin README updated.
- Change volume mounts to readonly when possible

Signed-off-by: Alek Du <alek.du@intel.com>
2020-02-25 14:53:26 +08:00
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