summaryrefslogtreecommitdiffstats
path: root/kud/deployment_infra
diff options
context:
space:
mode:
Diffstat (limited to 'kud/deployment_infra')
-rw-r--r--kud/deployment_infra/galaxy-requirements.yml2
-rw-r--r--kud/deployment_infra/images/multus-daemonset.yml62
-rw-r--r--kud/deployment_infra/playbooks/configure-emco-reset.yml11
-rw-r--r--kud/deployment_infra/playbooks/configure-emco.yml11
-rw-r--r--kud/deployment_infra/playbooks/configure-kud.yml5
-rw-r--r--kud/deployment_infra/playbooks/configure-onap4k8s-reset.yml11
-rw-r--r--kud/deployment_infra/playbooks/configure-onap4k8s.yml11
-rw-r--r--kud/deployment_infra/playbooks/configure-optane.yml2
-rw-r--r--kud/deployment_infra/playbooks/kud-vars.yml5
-rw-r--r--kud/deployment_infra/playbooks/preconfigure-kubespray.yml19
-rw-r--r--kud/deployment_infra/playbooks/preconfigure-optane.yml16
11 files changed, 81 insertions, 74 deletions
diff --git a/kud/deployment_infra/galaxy-requirements.yml b/kud/deployment_infra/galaxy-requirements.yml
index 3191dc19..9747dc99 100644
--- a/kud/deployment_infra/galaxy-requirements.yml
+++ b/kud/deployment_infra/galaxy-requirements.yml
@@ -10,6 +10,6 @@
- src: andrewrothstein.go
version: v2.1.15
- src: andrewrothstein.kubernetes-helm
- version: v1.2.17
+ version: v1.3.16
- src: geerlingguy.docker
version: 2.5.2
diff --git a/kud/deployment_infra/images/multus-daemonset.yml b/kud/deployment_infra/images/multus-daemonset.yml
index d6d8d533..09759360 100644
--- a/kud/deployment_infra/images/multus-daemonset.yml
+++ b/kud/deployment_infra/images/multus-daemonset.yml
@@ -1,11 +1,10 @@
---
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
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
@@ -13,16 +12,27 @@ spec:
kind: NetworkAttachmentDefinition
shortNames:
- net-attach-def
- validation:
- openAPIV3Schema:
- properties:
- spec:
+ versions:
+ - name: v1
+ served: true
+ storage: true
+ schema:
+ openAPIV3Schema:
+ description: 'NetworkAttachmentDefinition is a CRD schema specified by the Network Plumbing
+ Working Group to express the intent for attaching pods to one or more logical or physical
+ networks. More information available at: https://github.com/k8snetworkplumbingwg/multi-net-spec'
+ type: object
properties:
- config:
- type: string
+ spec:
+ description: 'NetworkAttachmentDefinition spec defines the desired state of a network attachment'
+ type: object
+ properties:
+ config:
+ description: 'NetworkAttachmentDefinition config is a JSON-formatted CNI configuration'
+ type: string
---
kind: ClusterRole
-apiVersion: rbac.authorization.k8s.io/v1beta1
+apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: multus
rules:
@@ -39,9 +49,18 @@ rules:
verbs:
- get
- update
+ - apiGroups:
+ - ""
+ - events.k8s.io
+ resources:
+ - events
+ verbs:
+ - create
+ - patch
+ - update
---
kind: ClusterRoleBinding
-apiVersion: rbac.authorization.k8s.io/v1beta1
+apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: multus
roleRef:
@@ -68,11 +87,18 @@ metadata:
tier: node
app: multus
data:
+ # NOTE: If you'd prefer to manually apply a configuration file, you may create one here.
+ # In the case you'd like to customize the Multus installation, you should change the arguments to the Multus pod
+ # change the "args" line below from
+ # - "--multus-conf-file=auto"
+ # to:
+ # "--multus-conf-file=/tmp/multus-conf/70-multus.conf"
+ # Additionally -- you should ensure that the name "70-multus.conf" is the alphabetically first name in the
+ # /etc/cni/net.d/ directory on each node, otherwise, it will not be used by the Kubelet.
cni-conf.json: |
{
"name": "multus-cni-network",
"type": "multus",
- "cniVersion": "0.3.1",
"capabilities": {
"portMappings": true
},
@@ -109,11 +135,11 @@ metadata:
labels:
tier: node
app: multus
+ name: multus
spec:
selector:
matchLabels:
- tier: node
- app: multus
+ name: multus
updateStrategy:
type: RollingUpdate
template:
@@ -121,20 +147,22 @@ spec:
labels:
tier: node
app: multus
+ name: multus
spec:
hostNetwork: true
nodeSelector:
- beta.kubernetes.io/arch: amd64
+ kubernetes.io/arch: amd64
tolerations:
- operator: Exists
effect: NoSchedule
serviceAccountName: multus
containers:
- name: kube-multus
- image: nfvpe/multus:v3.3-tp
+ image: integratedcloudnative/multus:v3.4.1-tp
command: ["/entrypoint.sh"]
args:
- - "--multus-conf-file=/tmp/multus-conf/00-multus.conf"
+ - "--multus-conf-file=auto"
+ - "--cni-version=0.3.1"
resources:
requests:
cpu: "100m"
@@ -163,4 +191,4 @@ spec:
name: multus-cni-config
items:
- key: cni-conf.json
- path: 00-multus.conf
+ path: 70-multus.conf
diff --git a/kud/deployment_infra/playbooks/configure-emco-reset.yml b/kud/deployment_infra/playbooks/configure-emco-reset.yml
index a4560cc2..7cad36e4 100644
--- a/kud/deployment_infra/playbooks/configure-emco-reset.yml
+++ b/kud/deployment_infra/playbooks/configure-emco-reset.yml
@@ -15,7 +15,7 @@
file: kud-vars.yml
- name: Change the emco directory and run helm delete
- command: /usr/local/bin/helm delete --purge emco
+ command: /usr/local/bin/helm uninstall --namespace emco emco
register: helm_delete
args:
chdir: /opt/multicloud/deployments/helm/v2/emco
@@ -41,15 +41,6 @@
- debug:
var: make_clean.stdout_lines
- - name: Change the emco directory and make repo-stop
- command: /usr/bin/make repo-stop
- register: make_repo_stop
- args:
- chdir: /opt/multicloud/deployments/helm/v2/emco
-
- - debug:
- var: make_repo_stop.stdout_lines
-
- name: clean multicloud-k8s path
file:
state: absent
diff --git a/kud/deployment_infra/playbooks/configure-emco.yml b/kud/deployment_infra/playbooks/configure-emco.yml
index 255ce6a4..eb6adcf2 100644
--- a/kud/deployment_infra/playbooks/configure-emco.yml
+++ b/kud/deployment_infra/playbooks/configure-emco.yml
@@ -27,15 +27,6 @@
yum: name=make state=present update_cache=yes
when: ansible_distribution == "CentOS"
- - name: Change the emco directory and run the command make repo
- command: /usr/bin/make repo
- register: make_repo
- args:
- chdir: /opt/multicloud/deployments/helm/v2/emco
-
- - debug:
- var: make_repo.stdout_lines
-
- name: Change the emco directory and run the command make all
command: /usr/bin/make all
register: make_all
@@ -46,7 +37,7 @@
var: make_all.stdout_lines
- name: Change the emco directory and run the command helm install
- command: /usr/local/bin/helm install dist/packages/emco-0.1.0.tgz --name emco --namespace emco
+ command: /usr/local/bin/helm install --namespace emco --create-namespace --set emco-tools.fluentd.clusterDomain={{ cluster_name.stdout }} emco dist/packages/emco-0.1.0.tgz
register: helm_install
args:
chdir: /opt/multicloud/deployments/helm/v2/emco
diff --git a/kud/deployment_infra/playbooks/configure-kud.yml b/kud/deployment_infra/playbooks/configure-kud.yml
index 6ac0477d..0e32e69d 100644
--- a/kud/deployment_infra/playbooks/configure-kud.yml
+++ b/kud/deployment_infra/playbooks/configure-kud.yml
@@ -23,11 +23,6 @@
when: helm_client.rc != 0
vars:
kubernetes_helm_ver: "v{{ helm_client_version }}"
- tasks:
- - name: Initialize helm client
- command: helm init -c
- args:
- creates: ~/.helm
- hosts: kube-node
become: yes
diff --git a/kud/deployment_infra/playbooks/configure-onap4k8s-reset.yml b/kud/deployment_infra/playbooks/configure-onap4k8s-reset.yml
index d6f2f6bc..ddfedbb4 100644
--- a/kud/deployment_infra/playbooks/configure-onap4k8s-reset.yml
+++ b/kud/deployment_infra/playbooks/configure-onap4k8s-reset.yml
@@ -15,7 +15,7 @@
file: kud-vars.yml
- name: Change the onap4k8s directory and run helm delete
- command: /usr/local/bin/helm delete --purge multicloud-onap8ks
+ command: /usr/local/bin/helm uninstall --namespace onap4k8s-ns multicloud-onap8ks
register: helm_delete
args:
chdir: /opt/multicloud/deployments/helm/onap4k8s
@@ -41,15 +41,6 @@
- debug:
var: make_clean.stdout_lines
- - name: Change the onap4k8s directory and make repo-stop
- command: /usr/bin/make repo-stop
- register: make_repo_stop
- args:
- chdir: /opt/multicloud/deployments/helm/onap4k8s
-
- - debug:
- var: make_repo_stop.stdout_lines
-
- name: clean multicloud-k8s path
file:
state: absent
diff --git a/kud/deployment_infra/playbooks/configure-onap4k8s.yml b/kud/deployment_infra/playbooks/configure-onap4k8s.yml
index 11729171..c016cf1c 100644
--- a/kud/deployment_infra/playbooks/configure-onap4k8s.yml
+++ b/kud/deployment_infra/playbooks/configure-onap4k8s.yml
@@ -27,15 +27,6 @@
yum: name=make state=present update_cache=yes
when: ansible_distribution == "CentOS"
- - name: Change the onap4k8s directory and run the command make repo
- command: /usr/bin/make repo
- register: make_repo
- args:
- chdir: /opt/multicloud/deployments/helm/onap4k8s
-
- - debug:
- var: make_repo.stdout_lines
-
- name: Change the onap4k8s directory and run the command make all
command: /usr/bin/make all
register: make_all
@@ -46,7 +37,7 @@
var: make_all.stdout_lines
- name: Change the onap4k8s directory and run the command helm install
- command: /usr/local/bin/helm install dist/packages/multicloud-k8s-5.0.0.tgz --name multicloud-onap8ks --namespace onap4k8s-ns --set service.type=NodePort
+ command: /usr/local/bin/helm install --namespace onap4k8s-ns --create-namespace --set service.type=NodePort multicloud-onap8ks dist/packages/multicloud-k8s-5.0.0.tgz
register: helm_install
args:
chdir: /opt/multicloud/deployments/helm/onap4k8s
diff --git a/kud/deployment_infra/playbooks/configure-optane.yml b/kud/deployment_infra/playbooks/configure-optane.yml
index 8e000aa4..01189808 100644
--- a/kud/deployment_infra/playbooks/configure-optane.yml
+++ b/kud/deployment_infra/playbooks/configure-optane.yml
@@ -12,4 +12,4 @@
- hosts: localhost
tasks:
- name: Apply Optane PMEM CSI Daemonset
- command: "{{ base_dest }}/optane/deploy_optane.sh"
+ command: "{{ optane_dest }}/deploy_optane.sh"
diff --git a/kud/deployment_infra/playbooks/kud-vars.yml b/kud/deployment_infra/playbooks/kud-vars.yml
index 8f8ff5c3..51607020 100644
--- a/kud/deployment_infra/playbooks/kud-vars.yml
+++ b/kud/deployment_infra/playbooks/kud-vars.yml
@@ -57,8 +57,9 @@ cmk_untaint_required: true
#cmk_exclusive_mode: packed # choose between: packed, spread, default: packed
go_version: '1.12.5'
-kubespray_version: 2.12.6
-helm_client_version: 2.13.1
+kubespray_version: 2.14.1
+# This matches the helm_version from kubespray defaults
+helm_client_version: 3.2.4
# kud playbooks not compatible with 2.8.0 - see MULTICLOUD-634
ansible_version: 2.9.7
diff --git a/kud/deployment_infra/playbooks/preconfigure-kubespray.yml b/kud/deployment_infra/playbooks/preconfigure-kubespray.yml
new file mode 100644
index 00000000..78e7eda6
--- /dev/null
+++ b/kud/deployment_infra/playbooks/preconfigure-kubespray.yml
@@ -0,0 +1,19 @@
+---
+# The mitogen module used in kubespray requires python2 on the nodes.
+# On some distributions (i.e. Ubuntu 18.04), the default version of
+# python is python3.
+#
+# When python2 is not present a failure message similar to "bash:
+# /usr/bin/python: No such file or directory" will be reported.
+#
+# Note the use of "strategy: linear" below to temporarily bypass
+# mitogen.
+#
+- name: Install python2
+ hosts: k8s-cluster
+ strategy: linear
+ tasks:
+ - name: Install python2
+ package:
+ name: python
+ state: present
diff --git a/kud/deployment_infra/playbooks/preconfigure-optane.yml b/kud/deployment_infra/playbooks/preconfigure-optane.yml
index 64622895..135371ea 100644
--- a/kud/deployment_infra/playbooks/preconfigure-optane.yml
+++ b/kud/deployment_infra/playbooks/preconfigure-optane.yml
@@ -22,6 +22,14 @@
state: directory
path: "{{ optane_dest }}"
ignore_errors: yes
+ - copy:
+ src: "{{ playbook_dir }}/deploy_optane.sh"
+ dest: "{{ optane_dest }}"
+ - name: Changing perm of "sh", adding "+x"
+ shell: "chmod +x deploy_optane.sh"
+ args:
+ chdir: "{{ optane_dest }}"
+ warn: False
- hosts: kube-node
become: yes
@@ -61,14 +69,6 @@
chdir: "optane"
warn: False
- copy:
- src: "{{ playbook_dir }}/deploy_optane.sh"
- dest: optane
- - name: Changing perm of "sh", adding "+x"
- shell: "chmod +x deploy_optane.sh"
- args:
- chdir: "optane"
- warn: False
- - copy:
src: "{{ playbook_dir }}/../images/pmem-csi-lvm.yaml"
dest: optane
- copy: