aboutsummaryrefslogtreecommitdiffstats
path: root/vagrant/playbooks/configure-multus.yml
diff options
context:
space:
mode:
authorAkhila Kishore <akhila.kishore@intel.com>2019-03-06 06:34:09 -0800
committerAkhila Kishore <akhila.kishore@intel.com>2019-03-22 07:28:00 -0700
commit1fd5b3964a142be6c176dcc886d79a614c04ce70 (patch)
tree90e4c44d0c18ea51e1787627960556c6a1dcbe79 /vagrant/playbooks/configure-multus.yml
parent7830bf49fbdcf1b726dc8dc3aca3638fb2195e66 (diff)
Restructuring the repo.
The idea is to restructure the existing repo create a deployment independent of Vagrant or other hosting providers. Renamed KRD to KUbernetes Deploy(Kud) including the ansible scripts Added new path to functional tests. Moved samples pdfs to sites. Minor changes to Readme. Updated aio.sh, moved sample config Corrected other nits. Updated and verified test cases. Addressed comments and changes associated with it. Updated Readme and minor change in Vagrantfile. Validated test cases again. Moved aio.sh into vagrant folder. Added new README for each hosting provider and project on the whole. Updated the installer script with relative path. Updated the name to deployment_infra, moved the cFW sripcts to tests. Updated the gitignore file. Issue-ID: MULTICLOUD-301 Change-Id: Ie48c26b12ab58b604493fba58a9c5b9f8ba10942 Signed-off-by: Akhila Kishore <akhila.kishore@intel.com>
Diffstat (limited to 'vagrant/playbooks/configure-multus.yml')
-rw-r--r--vagrant/playbooks/configure-multus.yml120
1 files changed, 0 insertions, 120 deletions
diff --git a/vagrant/playbooks/configure-multus.yml b/vagrant/playbooks/configure-multus.yml
deleted file mode 100644
index 23fe546a..00000000
--- a/vagrant/playbooks/configure-multus.yml
+++ /dev/null
@@ -1,120 +0,0 @@
----
-# SPDX-license-identifier: Apache-2.0
-##############################################################################
-# Copyright (c) 2018
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-- hosts: kube-node
- become: yes
- pre_tasks:
- - name: Load krd variables
- include_vars:
- file: krd-vars.yml
- roles:
- - role: andrewrothstein.go
- go_ver: "{{ go_version }}"
- when: multus_source_type == "source"
- environment:
- PATH: "{{ ansible_env.PATH }}:/usr/local/go/bin/"
- tasks:
- - name: create multus binary folder
- file:
- state: directory
- path: "{{ item }}"
- with_items:
- - /opt/cni/bin
- - "{{ multus_dest }}"
- - name: getting source code
- block:
- - name: clone Multus repo
- git:
- repo: "{{ multus_url }}"
- dest: "{{ multus_dest }}"
- version: "{{ multus_version }}"
- force: yes
- - name: build multus source code
- command: ./build
- args:
- chdir: "{{ multus_dest }}"
- - name: copy multus binary to opt folder
- command: "mv {{ multus_dest }}/bin/multus /opt/cni/bin/multus"
- when: multus_source_type == "source"
- - name: getting binary
- block:
- - name: download Multus tarball
- get_url:
- url: "{{ multus_url }}"
- dest: "/tmp/multus.tar.gz"
- - name: extract multus source code
- unarchive:
- src: "/tmp/multus.tar.gz"
- dest: "{{ multus_dest }}"
- remote_src: yes
- - name: copy multus binary to opt folder
- command: "mv {{ multus_dest }}/multus-cni_v{{ multus_version }}_linux_amd64/multus-cni /opt/cni/bin/multus"
- when: multus_source_type == "tarball"
- - name: create multus configuration file
- blockinfile:
- marker: ""
- path: /etc/cni/net.d/00-multus.conf
- create: yes
- block: |
- {
- "type": "multus",
- "name": "multus-cni",
- "cniVersion": "0.3.1",
- "kubeconfig": "/etc/kubernetes/admin.conf",
- "delegates": [
- {
- "type": "flannel",
- "cniVersion": "0.3.1",
- "masterplugin": true,
- "delegate": {
- "isDefaultGateway": true
- }
- }
- ]
- }
-
-- hosts: localhost
- pre_tasks:
- - name: Load krd variables
- include_vars:
- file: krd-vars.yml
- roles:
- - role: andrewrothstein.kubectl
- kubectl_ver: "v{{ kubectl_version }}"
- tasks:
- - name: define a CRD network object specification
- blockinfile:
- path: /tmp/crdnetwork.yml
- create: yes
- block: |
- apiVersion: apiextensions.k8s.io/v1beta1
- kind: CustomResourceDefinition
- metadata:
- name: network-attachment-definitions.k8s.cni.cncf.io
- spec:
- group: k8s.cni.cncf.io
- version: v1
- scope: Namespaced
- names:
- plural: network-attachment-definitions
- singular: network-attachment-definition
- kind: NetworkAttachmentDefinition
- shortNames:
- - net-attach-def
- validation:
- openAPIV3Schema:
- properties:
- spec:
- properties:
- config:
- type: string
-
- - name: create network objects
- shell: "/usr/local/bin/kubectl apply -f /tmp/crdnetwork.yml"
- ignore_errors: True