--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+- hosts: baremetal
+ gather_facts: true
+ become: true
+
+ roles:
+ - role: install
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+- name: Make sure k8s-addons directory exists
+ file:
+ path: "/root/k8s-addons"
+ state: directory
+
+- name: Make sure eno directory exists
+ file:
+ path: "/root/k8s-addons/eno"
+ state: directory
+
+- name: Install build-essential package
+ apt:
+ name: build-essential
+ state: present
+ update_cache: true
+
+- name: Clone ENO App GIT Repository
+ git:
+ repo: https://github.com/Nordix/eno.git
+ dest: /root/k8s-addons/eno
+ version: master
+
+- name: Make install eno-controller Docker image
+ command: "make eno-docker-build -C k8s-addons/eno/"
+ changed_when: true
+
+- name: Make install ovs-fabric-plugin Docker image
+ command: "make ovs-plugin-docker-build -C k8s-addons/eno/"
+ changed_when: true
+
+- name: Install ENO Application - ENO Controller Manager
+ command: "make eno-setup -C k8s-addons/eno/"
+ changed_when: true
+
+- name: Install ENO Application - ENO OVS Fabric Plugin
+ command: "make ovs-plugin-setup -C k8s-addons/eno/"
+ changed_when: true
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+- name: Make sure k8s-addons directory exists
+ file:
+ path: "/root/k8s-addons"
+ state: directory
+
+- name: Make sure eno directory exists
+ file:
+ path: "/root/k8s-addons/eno"
+ state: directory
+
+- name: Install build-essential package
+ apt:
+ name: build-essential
+ state: present
+ update_cache: true
+
+- name: Clone ENO App GIT Repository
+ git:
+ repo: https://github.com/Nordix/eno.git
+ dest: /root/k8s-addons/eno
+ version: master
+
+- name: Make install eno-controller Docker image
+ command: "make eno-docker-build -C k8s-addons/eno/"
+ changed_when: true
+
+- name: Make install ovs-fabric-plugin Docker image
+ command: "make ovs-plugin-docker-build -C k8s-addons/eno/"
+ changed_when: true
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+- name: Install ENO Application requirements on worker node
+ include: install-app-worker.yml
+ when:
+ - inventory_hostname == 'node0'
+
+- name: Install ENO Application from master node
+ include: install-app-master.yml
+ when:
+ - inventory_hostname == 'master0'
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+- hosts: baremetal
+ gather_facts: true
+ become: true
+
+ roles:
+ - role: install
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+- name: Make sure k8s-addons directory exists
+ file:
+ path: "/root/k8s-addons"
+ state: directory
+
+- name: Make sure network-resources-injector directory exists
+ file:
+ path: "/root/k8s-addons/network-resources-injector"
+ state: directory
+
+- name: Clone Network Resources Injector App GIT Repository
+ git:
+ repo: https://github.com/k8snetworkplumbingwg/network-resources-injector.git
+ dest: /root/k8s-addons/network-resources-injector
+ version: master
+
+- name: Set python3.6 as default
+ alternatives:
+ name: python
+ link: /usr/bin/python
+ path: /usr/bin/python3.6
+ changed_when: true
+
+- name: Install upgrade pip openshift
+ pip:
+ name: openshift==0.11.0
+ extra_args: -Iv --user
+ executable: pip3
+ changed_when: true
+
+- name: Install Network Resources Injector Application - Auth
+ command: "kubectl apply -f k8s-addons/network-resources-injector/deployments/auth.yaml"
+ changed_when: true
+
+- name: Install Network Resources Injector Application - Server
+ k8s:
+ state: present
+ definition: "{{ lookup('template', 'nri_server.yaml.j2') }}"
+
+- name: Set back python2.7 as default
+ alternatives:
+ name: python
+ link: /usr/bin/python
+ path: /usr/bin/python2.7
+ changed_when: true
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+- name: Make sure k8s-addons directory exists
+ file:
+ path: "/root/k8s-addons"
+ state: directory
+
+- name: Make sure network-resources-injector directory exists
+ file:
+ path: "/root/k8s-addons/network-resources-injector"
+ state: directory
+
+- name: Install build-essential package
+ apt:
+ name: build-essential
+ state: present
+ update_cache: true
+
+- name: Clone Network Resources Injector App GIT Repository
+ git:
+ repo: https://github.com/k8snetworkplumbingwg/network-resources-injector.git
+ dest: /root/k8s-addons/network-resources-injector
+ version: master
+
+- name: Make install Docker image
+ command: "make image -C k8s-addons/network-resources-injector/"
+ changed_when: true
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+- name: Install Network Resources Injector Application requirements on worker node
+ include: install-app-worker.yml
+ when:
+ - inventory_hostname == 'node0'
+
+- name: Install Network Resources Injector Application from master node
+ include: install-app-master.yml
+ when:
+ - inventory_hostname == 'master0'
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# Copyright (c) 2019 Intel Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http:#www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+---
+apiVersion: v1
+kind: Pod
+metadata:
+ labels:
+ app: network-resources-injector
+ name: network-resources-injector
+ namespace: kube-system
+spec:
+ serviceAccount: network-resources-injector-sa
+ containers:
+ - name: webhook-server
+ image: network-resources-injector:latest
+ imagePullPolicy: IfNotPresent
+ command:
+ - webhook
+ args:
+ - -bind-address=0.0.0.0
+ - -port=8443
+ - -tls-private-key-file=/etc/tls/tls.key
+ - -tls-cert-file=/etc/tls/tls.crt
+ - -logtostderr
+ - -insecure
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ securityContext:
+ runAsUser: 10000
+ runAsGroup: 10000
+ capabilities:
+ drop:
+ - ALL
+ add: ["NET_BIND_SERVICE"]
+ readOnlyRootFilesystem: true
+ allowPrivilegeEscalation: false
+ volumeMounts:
+ - mountPath: /etc/tls
+ name: tls
+ resources:
+ requests:
+ memory: "50Mi"
+ cpu: "250m"
+ limits:
+ memory: "200Mi"
+ cpu: "500m"
+ initContainers:
+ - name: installer
+ image: network-resources-injector:latest
+ imagePullPolicy: IfNotPresent
+ command:
+ - installer
+ args:
+ - -name=network-resources-injector
+ - -namespace=kube-system
+ - -alsologtostderr
+ securityContext:
+ runAsUser: 10000
+ runAsGroup: 10000
+ volumeMounts:
+ - name: tls
+ mountPath: /etc/tls
+ volumes:
+ - name: tls
+ emptyDir: {}
+
+# For third-party certificate, use secret resource
+# instead of self-generated one from installer as below:
+#
+# 1) Remove initContainers from Pod spec.
+# 2) Replace `emptyDir: {}` with below config
+#
+# secret:
+# secretName: network-resources-injector-secret
+
--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+- hosts: baremetal
+ gather_facts: true
+ become: true
+
+ roles:
+ - role: install
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+- name: Make sure k8s-addons directory exists
+ file:
+ path: "/root/k8s-addons"
+ state: directory
+
+- name: Make sure ovs-cni directory exists
+ file:
+ path: "/root/k8s-addons/ovs-cni"
+ state: directory
+
+- name: Install build-essential package
+ apt:
+ name: build-essential
+ state: present
+ update_cache: true
+
+- name: Clone Open vSwitch CNI Plugin GIT Repository
+ git:
+ repo: https://github.com/k8snetworkplumbingwg/ovs-cni.git
+ dest: /root/k8s-addons/ovs-cni
+ version: main
+
+- name: Make install
+ command: "make -C k8s-addons/ovs-cni/"
+ changed_when: true
+
+- name: Make install Docker
+ command: "make docker-build -C k8s-addons/ovs-cni/"
+ changed_when: true
+
+- name: Install OVS CNI Plugin
+ command: "kubectl create -f k8s-addons/ovs-cni/examples/ovs-cni.yml"
+ changed_when: true
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+- name: Install Open vSwitch CNI Plugin from master node
+ include: install-plugin.yml
+ when:
+ - inventory_hostname == 'master0'
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+- hosts: baremetal
+ gather_facts: true
+ become: true
+
+ roles:
+ - role: install
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+- name: Make sure k8s-addons directory exists
+ file:
+ path: "/root/k8s-addons"
+ state: directory
+
+- name: Make sure sriov-network-device-plugin directory exists
+ file:
+ path: "/root/k8s-addons/sriov-network-device-plugin"
+ state: directory
+
+- name: Install build-essential package
+ apt:
+ name: build-essential
+ state: present
+ update_cache: true
+
+- name: Clone SR-IOV Network Device Plugin GIT Repository
+ git:
+ repo: https://github.com/k8snetworkplumbingwg/sriov-network-device-plugin.git
+ dest: /root/k8s-addons/sriov-network-device-plugin
+ version: master
+
+- name: Make install Docker image
+ command: "make image -C k8s-addons/sriov-network-device-plugin/"
+ changed_when: true
+
+- name: Set python3.6 as default
+ alternatives:
+ name: python
+ link: /usr/bin/python
+ path: /usr/bin/python3.6
+ changed_when: true
+
+- name: Install upgrade pip openshift
+ pip:
+ name: openshift==0.11.0
+ extra_args: -Iv --user
+ executable: pip3
+ changed_when: true
+
+- name: Install SR-IOV ConfigMap
+ k8s:
+ state: present
+ definition: "{{ lookup('template', 'sriov_configMap.yaml.j2') }}"
+
+- name: Install SR-IOV Network Device Plugin
+ command: "kubectl create -f k8s-addons/sriov-network-device-plugin/deployments/k8s-v1.16/sriovdp-daemonset.yaml"
+ changed_when: true
+
+- name: Set back python2.7 as default
+ alternatives:
+ name: python
+ link: /usr/bin/python
+ path: /usr/bin/python2.7
+ changed_when: true
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+- name: Install SR-IOV Network Device Plugin from master node
+ include: install-plugin.yml
+ when:
+ - inventory_hostname == 'master0'
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: sriovdp-config
+ namespace: kube-system
+data:
+ config.json: |
+ {
+ "resourceList": [{
+ "resourceName": "virtio_net_device",
+ "selectors":{
+ "vendors": ["1af4"],
+ "devices": ["1000"],
+ "drivers": ["virtio-pci"],
+ "pciAddresses": ["0000:00:0a.0", "0000:00:0b.0","0000:00:0c.0","0000:00:0d.0"]
+ }
+ }
+ ]
+ }
+
--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+- hosts: baremetal
+ gather_facts: true
+ become: true
+
+ roles:
+ - role: install
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+- name: Make sure k8s-addons directory exists
+ file:
+ path: "/root/k8s-addons"
+ state: directory
+
+- name: Make sure whereabouts directory exists
+ file:
+ path: "/root/k8s-addons/whereabouts"
+ state: directory
+
+- name: Clone Whereabouts Plugin GIT Repository
+ git:
+ repo: https://github.com/k8snetworkplumbingwg/whereabouts.git
+ dest: /root/k8s-addons/whereabouts
+ version: master
+
+- name: Install Whereabouts IPAM Plugin
+ command: "kubectl apply -f k8s-addons/whereabouts/doc/daemonset-install.yaml -f k8s-addons/whereabouts/doc/whereabouts.cni.cncf.io_ippools.yaml"
+ changed_when: true
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+- name: Install Whereabouts IPAM Plugin from master node
+ include: install-plugin.yml
+ when:
+ - inventory_hostname == 'master0'
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+# run common postinstall tasks
+# NOTE: The common post-deployment tasks is currently applicable only to
+# simple k8s and openstack scenarios.
+# in future, when statement could be moved to tasks in role if the current
+# tasks become relevant or new tasks are added.
+- hosts: kube-master
+ gather_facts: true
+ become: true
+
+ roles:
+ - role: postinstall-eno
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+- name: Label master node
+ command: "kubectl label nodes master0 node-pool=ovs-pool"
+ changed_when: true
+
+- name: Label worker node
+ command: "kubectl label nodes node0 node-pool=virtio-pool"
+ changed_when: true
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+- name: Install openvswitch package
+ apt:
+ name: openvswitch-switch
+ state: present
+ update_cache: true
+
+- name: Create br-trunk OVS Bridge
+ openvswitch_bridge:
+ bridge: br-trunk
+ state: present
+
+- name: Create br-data OVS Bridge
+ openvswitch_bridge:
+ bridge: br-data
+ state: present
+
+- name: Add port to br-trunk OVS Bridge
+ openvswitch_port:
+ bridge: br-trunk
+ port: ens26
+ state: present
+
+- name: Add port to br-data OVS Bridge
+ openvswitch_port:
+ bridge: br-data
+ port: ens27
+ state: present
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+# NOTE: Install OpenShift and configure kubectl & helm on localhost
+# we operate against Kubernetes cluster from localhost
+
+- name: Install additional requirements only on master node
+ include_tasks: install-additional-requirements-master.yml
+
+- name: Add required labels to master and worker nodes
+ include_tasks: add-required-labels.yml
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+# NOTE (fdegir): scenario specific preinstall tasks
+- hosts: localhost
+ connection: local
+ gather_facts: false
+ become: false
+ tags:
+ - preinstall
+
+ tasks:
+ # set master plugin to calico for multus to use as the primary network plugin
+ - name: Configure Multus to use Calico as the primary network plugin
+ lineinfile:
+ path: "{{ engine_cache }}/repos/kubespray/inventory/engine/group_vars/k8s-cluster/k8s-cluster.yml"
+ regexp: "^kube_network_plugin:.*"
+ line: "kube_network_plugin: calico"
+
+ # configure multus to use ca
+ - name: Enable Multus network plugin
+ lineinfile:
+ path: "{{ engine_cache }}/repos/kubespray/inventory/engine/group_vars/k8s-cluster/k8s-cluster.yml"
+ regexp: "^kube_network_plugin_multus:.*"
+ line: "kube_network_plugin_multus: true"
+
+# NOTE (fdegir): common postinstall tasks
+- name: Execute common postinstall tasks
+ import_playbook: "../playbooks/postinstall.yaml"
+ tags: postinstall
+
+# NOTE (fdegir): scenario specific postinstall tasks
+
+- name: Execute ENO postinstall tasks
+ import_playbook: "../playbooks/postinstall-eno.yaml"
+ tags: postinstall
+
+- name: Install SR-IOV Network Device Plugin
+ import_playbook: "../apps/sriov-network-device-plugin/kubespray/playbooks/install.yml"
+ tags: postinstall
+
+- name: Install Open vSwitch CNI Plugin
+ import_playbook: "../apps/ovs-cni/kubespray/playbooks/install.yml"
+ tags: postinstall
+
+- name: Install Whereabouts IPAM Plugin
+ import_playbook: "../apps/whereabouts/kubespray/playbooks/install.yml"
+ tags: postinstall
+
+- name: Install Network Resources Injector Application
+ import_playbook: "../apps/network-resources-injector/kubespray/playbooks/install.yml"
+ tags: postinstall
+
+- name: Install ENO Application
+ import_playbook: "../apps/eno/kubespray/playbooks/install.yml"
+ tags: postinstall
+
+
+- hosts: k8s-cluster
+ gather_facts: false
+ become: false
+ tags:
+ - postinstall
+
+ tasks:
+ - name: Include Kubespray vars
+ include_vars: "{{ item }}"
+ with_items:
+ - "{{ engine_cache }}/repos/kubespray/roles/kubespray-defaults/defaults/main.yaml"
+ - "{{ engine_cache }}/repos/kubespray/roles/download/defaults/main.yml"
+
+ - include_tasks: "{{ engine_cache }}/repos/kubespray/roles/network_plugin/cni/tasks/main.yml"
+
+# vim: set ts=2 sw=2 expandtab:
- k8-multus-dualstack
- k8-multus-nofeature
- k8-multus-plugins
+ - k8-eno-ovs
- k8-weave-nofeature
# NOTE (fdegir): set default deploy scenario for the stack