X-Git-Url: https://gerrit.nordix.org/gitweb?p=infra%2Fstack%2Fkubernetes.git;a=blobdiff_plain;f=scenarios%2Fk8-eno-ovs.yaml;fp=scenarios%2Fk8-eno-ovs.yaml;h=ea53be5f83e87cee24f22cd0281e93aa7fab45cb;hp=0000000000000000000000000000000000000000;hb=bc521a1ec1127b1c41ee76e9301009b8ed084f69;hpb=abd49dbf6fdde52d549c92969e222b70efae24db diff --git a/scenarios/k8-eno-ovs.yaml b/scenarios/k8-eno-ovs.yaml new file mode 100644 index 0000000..ea53be5 --- /dev/null +++ b/scenarios/k8-eno-ovs.yaml @@ -0,0 +1,90 @@ +--- +# ============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: