2 ## Copyright (c) 2019 Intel Corporation
4 ## Licensed under the Apache License, Version 2.0 (the "License");
5 ## you may not use this file except in compliance with the License.
6 ## You may obtain a copy of the License at
8 ## http://www.apache.org/licenses/LICENSE-2.0
10 ## Unless required by applicable law or agreed to in writing, software
11 ## distributed under the License is distributed on an "AS IS" BASIS,
12 ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ## See the License for the specific language governing permissions and
14 ## limitations under the License.
17 ###############################################################################
19 ###############################################################################
20 1. Working Kubernetes cluster. It can be set up using Intel Container Bare
21 Metal Reference Architecture https://github.com/intel/container-experience-kits
23 2. 1024x 2M hugepages must be configured on the nodes
25 3. SRIOV Network Device Plugin for Kubernetes installed
26 https://github.com/intel/sriov-network-device-plugin.
28 4. SRIOV VFs configured and rebind to the vfio-pci module
29 As an example, SRIOV VFs (rebind to the vfio-pci driver) pool is named as
30 intel.com/intel_sriov_vfio.
32 Network attachment definition is named as
33 k8s.v1.cni.cncf.io/networks: intel-sriov-vfio.
35 5. PROX image created and pushed to the local registry or distributed and
36 loaded on all of the testing nodes.
38 ###############################################################################
40 ###############################################################################
42 # dockerimage.sh build
45 After the successfull build prox.tar will be created and can be used to load
46 image on the k8s nodes or it can be pushed to the local repository using
49 ###############################################################################
51 ###############################################################################
52 1. Edit rapidpods file and set the right name (nodeSelector_hostname) for the
53 nodes on which you want to execute test PODs.
55 # kubectl get nodes -o wide
56 NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
57 k8s-master1 Ready master 7d13h v1.13.5 10.10.0.10 <none> CentOS Linux 7 (Core) 3.10.0-1062.4.1.el7.x86_64 docker://18.6.2
58 k8s-node1 Ready node 7d13h v1.13.5 10.10.0.12 <none> CentOS Linux 7 (Core) 3.10.0-1062.4.1.el7.x86_64 docker://18.6.2
59 k8s-node2 Ready node 7d13h v1.13.5 10.10.0.13 <none> CentOS Linux 7 (Core) 3.10.0-1062.4.1.el7.x86_64 docker://18.6.2
61 Set the right IP addresses (dp_ip) to use by the PODs for the Dataplane network.
63 2. Edit pod-rapid.yaml file and set correct
64 - image name (image: localhost:5000/prox:latest)
65 - network attachment definition in metadata->annotation section
66 (k8s.v1.cni.cncf.io/networks: intel-sriov-vfio)
67 - SRIOV VFs resources attached to the vfio-pci driver
68 (intel.com/intel_sriov_vfio: '1')
70 3. Copy SSH private key in the rapid_rsa_key file
72 4. Run createrapidk8s.py to create test PODs according to the configuration from
77 Check for rapid PODs. They should be up and running.
79 # kubectl get pods -o wide
80 NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
81 pod-rapid-1 1/1 Running 0 18h 10.244.2.87 k8s-node1 <none> <none>
82 pod-rapid-2 1/1 Running 0 18h 10.244.1.40 k8s-node2 <none> <none>
83 pod-rapid-3 1/1 Running 0 18h 10.244.1.39 k8s-node2 <none> <none>
87 # ./runrapid.py --test basicrapid.test
89 ###############################################################################
91 ###############################################################################
92 If layer 2 tests are planned to be executed MAC adresses must be
93 preconfigured for the SRIOV VFs to avoid issues with randomly generated MACs
94 each time when the PROX starts.