summaryrefslogtreecommitdiffstats
path: root/kud/deployment_infra
diff options
context:
space:
mode:
authorRitu Sood <ritu.sood@intel.com>2021-05-10 21:25:48 +0000
committerGerrit Code Review <gerrit@onap.org>2021-05-10 21:25:48 +0000
commit59a703bb8c443c2b7d6b7cdab9e8448b944e5cf2 (patch)
tree3e208cf9740d90f6e8a0bdb8a70b11707a8c9b43 /kud/deployment_infra
parent3f5cacd8a183aa9feee9fb0cdc6231215c19c206 (diff)
parentcc302424c0b129267235157640be28b45597fef2 (diff)
Merge "EMCO deploy of addons"
Diffstat (limited to 'kud/deployment_infra')
-rw-r--r--kud/deployment_infra/emco/.gitignore2
-rw-r--r--kud/deployment_infra/emco/Makefile48
-rw-r--r--kud/deployment_infra/emco/composite-app.yaml110
-rw-r--r--kud/deployment_infra/emco/examples/README.md59
-rw-r--r--kud/deployment_infra/emco/examples/prerequisites.yaml113
-rw-r--r--kud/deployment_infra/emco/examples/values-resources.yaml.example19
-rw-r--r--kud/deployment_infra/emco/examples/values.yaml.example24
-rw-r--r--kud/deployment_infra/profiles/cpu-manager/manifest.yaml4
-rw-r--r--kud/deployment_infra/profiles/cpu-manager/override_values.yaml0
-rw-r--r--kud/deployment_infra/profiles/multus-cni/manifest.yaml4
-rw-r--r--kud/deployment_infra/profiles/multus-cni/override_values.yaml0
-rw-r--r--kud/deployment_infra/profiles/node-feature-discovery/manifest.yaml4
-rw-r--r--kud/deployment_infra/profiles/node-feature-discovery/override_values.yaml0
-rw-r--r--kud/deployment_infra/profiles/ovn4nfv/manifest.yaml4
-rw-r--r--kud/deployment_infra/profiles/ovn4nfv/override_values.yaml0
-rw-r--r--kud/deployment_infra/profiles/qat-device-plugin/manifest.yaml4
-rw-r--r--kud/deployment_infra/profiles/qat-device-plugin/override_values.yaml0
-rw-r--r--kud/deployment_infra/profiles/sriov-network-operator/manifest.yaml4
-rw-r--r--kud/deployment_infra/profiles/sriov-network-operator/override_values.yaml0
-rw-r--r--kud/deployment_infra/profiles/sriov-network/manifest.yaml4
-rw-r--r--kud/deployment_infra/profiles/sriov-network/override_values.yaml0
21 files changed, 403 insertions, 0 deletions
diff --git a/kud/deployment_infra/emco/.gitignore b/kud/deployment_infra/emco/.gitignore
new file mode 100644
index 00000000..c971bc78
--- /dev/null
+++ b/kud/deployment_infra/emco/.gitignore
@@ -0,0 +1,2 @@
+output
+examples/values.yaml
diff --git a/kud/deployment_infra/emco/Makefile b/kud/deployment_infra/emco/Makefile
new file mode 100644
index 00000000..de41bfc5
--- /dev/null
+++ b/kud/deployment_infra/emco/Makefile
@@ -0,0 +1,48 @@
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# 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.
+
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+OUTPUT_DIR := $(ROOT_DIR)/output
+PACKAGE_DIR := $(OUTPUT_DIR)/packages
+
+ADDONS := multus-cni ovn4nfv node-feature-discovery sriov-network-operator sriov-network qat-device-plugin cpu-manager
+
+.PHONY: $(ADDONS)
+
+all: $(ADDONS)
+
+$(ADDONS):
+ @echo "\n[$@]"
+ @make chart-$@
+ @make profile-$@
+
+dep-%:
+ @if grep "^dependencies:" ../helm/$*/Chart.yaml; then helm dep up ../helm/$*; fi
+
+lint-%: dep-%
+ @helm lint ../helm/$*
+
+chart-%: lint-%
+ @mkdir -p $(PACKAGE_DIR)
+ @tar -czf $(PACKAGE_DIR)/$*.tar.gz -C ../helm $*
+
+profile-%:
+ @mkdir -p $(PACKAGE_DIR)
+ @tar -czf $(PACKAGE_DIR)/$*_profile.tar.gz -C ../profiles/$* .
+
+clean:
+ @rm -rf $(OUTPUT_DIR)
+
+%:
+ @:
diff --git a/kud/deployment_infra/emco/composite-app.yaml b/kud/deployment_infra/emco/composite-app.yaml
new file mode 100644
index 00000000..869447ad
--- /dev/null
+++ b/kud/deployment_infra/emco/composite-app.yaml
@@ -0,0 +1,110 @@
+# SPDX-License-Identifier: Apache-2.0
+# Copyright (c) 2020 Intel Corporation
+
+---
+#creating composite app entry
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/composite-apps
+metadata :
+ name: {{ .CompositeApp }}
+ description: "KUD addons"
+spec:
+ version: v1
+
+{{- range $index, $addon := .Apps }}
+---
+#adding app to the composite app
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ $.ProjectName }}/composite-apps/{{ $.CompositeApp }}/v1/apps
+metadata :
+ name: {{ $addon }}
+file:
+ {{ $.PackagesPath }}/{{ $addon }}.tar.gz
+{{- end }}
+
+---
+#creating composite profile entry
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/composite-apps/{{ .CompositeApp }}/v1/composite-profiles
+metadata :
+ name: {{ .CompositeProfile }}
+
+{{- range $index, $addon := .Apps }}
+---
+#adding app profiles to the composite profile
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ $.ProjectName }}/composite-apps/{{ $.CompositeApp }}/v1/composite-profiles/{{ $.CompositeProfile }}/profiles
+metadata :
+ name: {{ $addon }}-profile
+spec:
+ app-name: {{ $addon }}
+file:
+ {{ $.PackagesPath }}/{{ $addon }}_profile.tar.gz
+{{- end }}
+
+---
+#create deployment intent group
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/composite-apps/{{ .CompositeApp }}/v1/deployment-intent-groups
+metadata :
+ name: {{ .DeploymentIntentGroup }}
+ description: "description"
+spec:
+ profile: {{ .CompositeProfile }}
+ version: r1
+ logical-cloud: {{ .LogicalCloud }}
+ override-values: []
+
+---
+#create intent in deployment intent group
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/composite-apps/{{ .CompositeApp }}/v1/deployment-intent-groups/{{ .DeploymentIntentGroup }}/intents
+metadata :
+ name: {{ .DeploymentIntent }}
+spec:
+ intent:
+ genericPlacementIntent: {{ .GenericPlacementIntent }}
+
+---
+#create the generic placement intent
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/composite-apps/{{ .CompositeApp }}/v1/deployment-intent-groups/{{ .DeploymentIntentGroup }}/generic-placement-intents
+metadata :
+ name: {{ .GenericPlacementIntent }}
+spec:
+ logical-cloud: {{ .LogicalCloud }}
+
+{{- range $index, $addon := .Apps }}
+---
+#add the app placement intent to the generic placement intent
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ $.ProjectName }}/composite-apps/{{ $.CompositeApp }}/v1/deployment-intent-groups/{{ $.DeploymentIntentGroup }}/generic-placement-intents/{{ $.GenericPlacementIntent }}/app-intents
+metadata:
+ name: {{ $addon }}-placement-intent
+spec:
+ app-name: {{ $addon }}
+ intent:
+ allOf:
+ - provider-name: {{ $.ClusterProvider }}
+ cluster-label-name: {{ $.ClusterLabel }}
+{{- end }}
+
+---
+#Approve
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/composite-apps/{{ .CompositeApp }}/v1/deployment-intent-groups/{{ .DeploymentIntentGroup }}/approve
+
+---
+#Instantiate
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/composite-apps/{{ .CompositeApp }}/v1/deployment-intent-groups/{{ .DeploymentIntentGroup }}/instantiate
diff --git a/kud/deployment_infra/emco/examples/README.md b/kud/deployment_infra/emco/examples/README.md
new file mode 100644
index 00000000..b91cce10
--- /dev/null
+++ b/kud/deployment_infra/emco/examples/README.md
@@ -0,0 +1,59 @@
+#### SPDX-License-Identifier: Apache-2.0
+#### Copyright (c) 2021 Intel Corporation
+
+# Installing KUD addons with emcoctl
+
+This folder contains KUD addons to deploy with EMCO. The example
+configuration assumes one edge cluster to deploy to. EMCO needs to be
+installed on the cluster before deploying these addons and emcoctl
+needs to be installed and configured for the edge cluster.
+
+1. Multus CNI
+2. OVN4NFV K8s Plugin
+3. Node Feature Discovery
+4. SR-IOV Network Operator
+5. SR-IOV Network
+6. QuickAssist Technology (QAT) Device Plugin
+7. CPU Manager for Kubernetes
+
+## Setup environment to deploy addons
+
+1. Export environment variables
+ - KUBE_PATH: where the kubeconfig for edge cluster is located, and
+ - HOST_IP: IP address of the cluster where EMCO is installed.
+
+#### NOTE: For HOST_IP, assuming here that nodeports are used to access all EMCO services both from outside and between the EMCO services.
+
+2. Customize values.yaml.
+
+ `$ envsubst < values.yaml.example > values.yaml`
+ `$ envsubst < values-resources.yaml.example > values-resources.yaml`
+
+## Create prerequisites to deploy addons
+
+Apply prerequisites.yaml. This creates controllers, one project, one
+cluster, and default logical cloud. This step is required to be done
+only once.
+
+ `$ emcoctl apply -f prerequisites.yaml -v values.yaml`
+
+## Deploying addons
+
+Apply composite-app.yaml. This deploys the addons listed in the `Apps`
+value.
+
+ `$ emcoctl apply -f ../output/composite-app.yaml -v values.yaml`
+ `$ emcoctl apply -f ../output/composite-app.yaml -v values-resources.yaml`
+
+## Cleanup
+
+1. Delete addons.
+
+ `$ emcoctl delete -f ../output/composite-app.yaml -v values-resources.yaml`
+ `$ emcoctl delete -f ../output/composite-app.yaml -v values.yaml`
+
+2. Cleanup prerequisites.
+
+ `$ emcoctl delete -f prerequisites.yaml -v values.yaml`
+
+#### NOTE: Known issue: Deletion of the resources fails sometimes as some resources can't be deleted before others are deleted. This can happen due to timing issue. In that case try deleting again and the deletion should succeed.
diff --git a/kud/deployment_infra/emco/examples/prerequisites.yaml b/kud/deployment_infra/emco/examples/prerequisites.yaml
new file mode 100644
index 00000000..a44546e0
--- /dev/null
+++ b/kud/deployment_infra/emco/examples/prerequisites.yaml
@@ -0,0 +1,113 @@
+# SPDX-License-Identifier: Apache-2.0
+# Copyright (c) 2020 Intel Corporation
+
+---
+#create project
+version: emco/v2
+resourceContext:
+ anchor: projects
+metadata :
+ name: {{ .ProjectName }}
+---
+#creating controller entries
+version: emco/v2
+resourceContext:
+ anchor: controllers
+metadata :
+ name: rsync
+spec:
+ host: {{ .HostIP }}
+ port: {{ .RsyncPort }}
+
+---
+#creating controller entries
+version: emco/v2
+resourceContext:
+ anchor: controllers
+metadata :
+ name: gac
+spec:
+ host: {{ .HostIP }}
+ port: {{ .GacPort }}
+ type: "action"
+ priority: 1
+
+---
+#creating controller entries
+version: emco/v2
+resourceContext:
+ anchor: controllers
+metadata :
+ name: ovnaction
+spec:
+ host: {{ .HostIP }}
+ port: {{ .OvnPort }}
+ type: "action"
+ priority: 1
+
+---
+#creating controller entries
+version: emco/v2
+resourceContext:
+ anchor: controllers
+metadata :
+ name: dtc
+spec:
+ host: {{ .HostIP }}
+ port: {{ .DtcPort }}
+ type: "action"
+ priority: 1
+
+---
+#creating cluster provider
+version: emco/v2
+resourceContext:
+ anchor: cluster-providers
+metadata :
+ name: {{ .ClusterProvider }}
+
+---
+#creating cluster
+version: emco/v2
+resourceContext:
+ anchor: cluster-providers/{{ .ClusterProvider }}/clusters
+metadata :
+ name: {{ .Cluster1 }}
+file:
+ {{ .KubeConfig }}
+
+---
+#Add label cluster
+version: emco/v2
+resourceContext:
+ anchor: cluster-providers/{{ .ClusterProvider }}/clusters/{{ .Cluster1 }}/labels
+label-name: {{ .ClusterLabel }}
+
+---
+#create default logical cloud with admin permissions
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/logical-clouds
+metadata:
+ name: {{ .LogicalCloud }}
+spec:
+ level: "0"
+
+---
+#add cluster reference to logical cloud
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/logical-clouds/{{ .LogicalCloud }}/cluster-references
+metadata:
+ name: lc-cl-1
+spec:
+ cluster-provider: {{ .ClusterProvider }}
+ cluster-name: {{ .Cluster1 }}
+ loadbalancer-ip: "0.0.0.0"
+
+---
+#instantiate logical cloud
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/logical-clouds/{{ .LogicalCloud }}/instantiate
+
diff --git a/kud/deployment_infra/emco/examples/values-resources.yaml.example b/kud/deployment_infra/emco/examples/values-resources.yaml.example
new file mode 100644
index 00000000..acfd903c
--- /dev/null
+++ b/kud/deployment_infra/emco/examples/values-resources.yaml.example
@@ -0,0 +1,19 @@
+HostIP: $HOST_IP
+KubeConfig: $KUBE_PATH
+PackagesPath: $PWD/../output/packages
+ProjectName: proj1
+RsyncPort: 30441
+GacPort: 30493
+OvnPort: 30473
+DtcPort: 30483
+ClusterProvider: provider1
+Cluster1: cluster1
+ClusterLabel: edge-cluster
+LogicalCloud: default
+CompositeApp: addon-resources
+CompositeProfile: addon-resources-profile
+DeploymentIntentGroup: addon-resources-deployment-intent-group
+DeploymentIntent: addon-resources-deployment-intent
+GenericPlacementIntent: addon-resources-placement-intent
+Apps:
+- sriov-network
diff --git a/kud/deployment_infra/emco/examples/values.yaml.example b/kud/deployment_infra/emco/examples/values.yaml.example
new file mode 100644
index 00000000..37ddacf6
--- /dev/null
+++ b/kud/deployment_infra/emco/examples/values.yaml.example
@@ -0,0 +1,24 @@
+HostIP: $HOST_IP
+KubeConfig: $KUBE_PATH
+PackagesPath: $PWD/../output/packages
+ProjectName: proj1
+RsyncPort: 30441
+GacPort: 30493
+OvnPort: 30473
+DtcPort: 30483
+ClusterProvider: provider1
+Cluster1: cluster1
+ClusterLabel: edge-cluster
+LogicalCloud: default
+CompositeApp: addons
+CompositeProfile: addons-profile
+DeploymentIntentGroup: addons-deployment-intent-group
+DeploymentIntent: addons-deployment-intent
+GenericPlacementIntent: addons-placement-intent
+Apps:
+- multus-cni
+- ovn4nfv
+- node-feature-discovery
+- sriov-network-operator
+- qat-device-plugin
+- cpu-manager
diff --git a/kud/deployment_infra/profiles/cpu-manager/manifest.yaml b/kud/deployment_infra/profiles/cpu-manager/manifest.yaml
new file mode 100644
index 00000000..4d381d02
--- /dev/null
+++ b/kud/deployment_infra/profiles/cpu-manager/manifest.yaml
@@ -0,0 +1,4 @@
+---
+version: v1
+type:
+ values: "override_values.yaml"
diff --git a/kud/deployment_infra/profiles/cpu-manager/override_values.yaml b/kud/deployment_infra/profiles/cpu-manager/override_values.yaml
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/kud/deployment_infra/profiles/cpu-manager/override_values.yaml
diff --git a/kud/deployment_infra/profiles/multus-cni/manifest.yaml b/kud/deployment_infra/profiles/multus-cni/manifest.yaml
new file mode 100644
index 00000000..4d381d02
--- /dev/null
+++ b/kud/deployment_infra/profiles/multus-cni/manifest.yaml
@@ -0,0 +1,4 @@
+---
+version: v1
+type:
+ values: "override_values.yaml"
diff --git a/kud/deployment_infra/profiles/multus-cni/override_values.yaml b/kud/deployment_infra/profiles/multus-cni/override_values.yaml
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/kud/deployment_infra/profiles/multus-cni/override_values.yaml
diff --git a/kud/deployment_infra/profiles/node-feature-discovery/manifest.yaml b/kud/deployment_infra/profiles/node-feature-discovery/manifest.yaml
new file mode 100644
index 00000000..4d381d02
--- /dev/null
+++ b/kud/deployment_infra/profiles/node-feature-discovery/manifest.yaml
@@ -0,0 +1,4 @@
+---
+version: v1
+type:
+ values: "override_values.yaml"
diff --git a/kud/deployment_infra/profiles/node-feature-discovery/override_values.yaml b/kud/deployment_infra/profiles/node-feature-discovery/override_values.yaml
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/kud/deployment_infra/profiles/node-feature-discovery/override_values.yaml
diff --git a/kud/deployment_infra/profiles/ovn4nfv/manifest.yaml b/kud/deployment_infra/profiles/ovn4nfv/manifest.yaml
new file mode 100644
index 00000000..4d381d02
--- /dev/null
+++ b/kud/deployment_infra/profiles/ovn4nfv/manifest.yaml
@@ -0,0 +1,4 @@
+---
+version: v1
+type:
+ values: "override_values.yaml"
diff --git a/kud/deployment_infra/profiles/ovn4nfv/override_values.yaml b/kud/deployment_infra/profiles/ovn4nfv/override_values.yaml
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/kud/deployment_infra/profiles/ovn4nfv/override_values.yaml
diff --git a/kud/deployment_infra/profiles/qat-device-plugin/manifest.yaml b/kud/deployment_infra/profiles/qat-device-plugin/manifest.yaml
new file mode 100644
index 00000000..4d381d02
--- /dev/null
+++ b/kud/deployment_infra/profiles/qat-device-plugin/manifest.yaml
@@ -0,0 +1,4 @@
+---
+version: v1
+type:
+ values: "override_values.yaml"
diff --git a/kud/deployment_infra/profiles/qat-device-plugin/override_values.yaml b/kud/deployment_infra/profiles/qat-device-plugin/override_values.yaml
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/kud/deployment_infra/profiles/qat-device-plugin/override_values.yaml
diff --git a/kud/deployment_infra/profiles/sriov-network-operator/manifest.yaml b/kud/deployment_infra/profiles/sriov-network-operator/manifest.yaml
new file mode 100644
index 00000000..4d381d02
--- /dev/null
+++ b/kud/deployment_infra/profiles/sriov-network-operator/manifest.yaml
@@ -0,0 +1,4 @@
+---
+version: v1
+type:
+ values: "override_values.yaml"
diff --git a/kud/deployment_infra/profiles/sriov-network-operator/override_values.yaml b/kud/deployment_infra/profiles/sriov-network-operator/override_values.yaml
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/kud/deployment_infra/profiles/sriov-network-operator/override_values.yaml
diff --git a/kud/deployment_infra/profiles/sriov-network/manifest.yaml b/kud/deployment_infra/profiles/sriov-network/manifest.yaml
new file mode 100644
index 00000000..4d381d02
--- /dev/null
+++ b/kud/deployment_infra/profiles/sriov-network/manifest.yaml
@@ -0,0 +1,4 @@
+---
+version: v1
+type:
+ values: "override_values.yaml"
diff --git a/kud/deployment_infra/profiles/sriov-network/override_values.yaml b/kud/deployment_infra/profiles/sriov-network/override_values.yaml
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/kud/deployment_infra/profiles/sriov-network/override_values.yaml