aboutsummaryrefslogtreecommitdiffstats
path: root/kud
diff options
context:
space:
mode:
Diffstat (limited to 'kud')
-rw-r--r--kud/deployment_infra/emco/composite-app.yaml110
-rw-r--r--kud/deployment_infra/emco/examples/00-controllers.yaml52
-rw-r--r--kud/deployment_infra/emco/examples/01-cluster.yaml29
-rw-r--r--kud/deployment_infra/emco/examples/02-project.yaml40
-rw-r--r--kud/deployment_infra/emco/examples/03-addons-app.yaml110
-rw-r--r--kud/deployment_infra/emco/examples/04-addon-resources-app.yaml110
-rw-r--r--kud/deployment_infra/emco/examples/README.md27
-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.example36
-rw-r--r--kud/hosting_providers/containerized/addons/README.md.tmpl34
-rw-r--r--kud/hosting_providers/containerized/addons/values-resources.yaml.tmpl19
-rw-r--r--kud/hosting_providers/containerized/addons/values.yaml.tmpl36
-rwxr-xr-xkud/hosting_providers/containerized/installer.sh5
14 files changed, 426 insertions, 314 deletions
diff --git a/kud/deployment_infra/emco/composite-app.yaml b/kud/deployment_infra/emco/composite-app.yaml
deleted file mode 100644
index 869447ad..00000000
--- a/kud/deployment_infra/emco/composite-app.yaml
+++ /dev/null
@@ -1,110 +0,0 @@
-# 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/00-controllers.yaml b/kud/deployment_infra/emco/examples/00-controllers.yaml
new file mode 100644
index 00000000..c023ab87
--- /dev/null
+++ b/kud/deployment_infra/emco/examples/00-controllers.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: Apache-2.0
+# Copyright (c) 2020 Intel Corporation
+
+---
+#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
diff --git a/kud/deployment_infra/emco/examples/01-cluster.yaml b/kud/deployment_infra/emco/examples/01-cluster.yaml
new file mode 100644
index 00000000..6f7ce4ba
--- /dev/null
+++ b/kud/deployment_infra/emco/examples/01-cluster.yaml
@@ -0,0 +1,29 @@
+# SPDX-License-Identifier: Apache-2.0
+# Copyright (c) 2020 Intel Corporation
+
+---
+#creating cluster provider
+version: emco/v2
+resourceContext:
+ anchor: cluster-providers
+metadata :
+ name: {{ .ClusterProvider }}
+
+{{- range $index, $cluster := .Clusters }}
+---
+#creating cluster
+version: emco/v2
+resourceContext:
+ anchor: cluster-providers/{{ $.ClusterProvider }}/clusters
+metadata :
+ name: {{ $cluster.Name }}
+file:
+ {{ $cluster.KubeConfig }}
+
+---
+#Add label cluster
+version: emco/v2
+resourceContext:
+ anchor: cluster-providers/{{ $.ClusterProvider }}/clusters/{{ $cluster.Name }}/labels
+label-name: {{ $.ClustersLabel }}
+{{- end }} \ No newline at end of file
diff --git a/kud/deployment_infra/emco/examples/02-project.yaml b/kud/deployment_infra/emco/examples/02-project.yaml
new file mode 100644
index 00000000..98ecfdb4
--- /dev/null
+++ b/kud/deployment_infra/emco/examples/02-project.yaml
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: Apache-2.0
+# Copyright (c) 2020 Intel Corporation
+
+---
+#create project
+version: emco/v2
+resourceContext:
+ anchor: projects
+metadata :
+ name: {{ .ProjectName }}
+
+---
+#create default logical cloud with admin permissions
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/logical-clouds
+metadata:
+ name: {{ .LogicalCloud }}
+spec:
+ level: "0"
+
+{{- range $index, $cluster := .Clusters }}
+---
+#add cluster reference to logical cloud
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ $.ProjectName }}/logical-clouds/{{ $.LogicalCloud }}/cluster-references
+metadata:
+ name: {{ $cluster.Name }}
+spec:
+ cluster-provider: {{ $.ClusterProvider }}
+ cluster-name: {{ $cluster.Name }}
+ loadbalancer-ip: "0.0.0.0"
+{{- end }}
+
+---
+#instantiate logical cloud
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/logical-clouds/{{ .LogicalCloud }}/instantiate
diff --git a/kud/deployment_infra/emco/examples/03-addons-app.yaml b/kud/deployment_infra/emco/examples/03-addons-app.yaml
new file mode 100644
index 00000000..0fd15e0f
--- /dev/null
+++ b/kud/deployment_infra/emco/examples/03-addons-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: {{ .AddonsApp }}
+ description: "KUD addons"
+spec:
+ version: v1
+
+{{- range $index, $addon := .Addons }}
+---
+#adding app to the composite app
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ $.ProjectName }}/composite-apps/{{ $.AddonsApp }}/v1/apps
+metadata :
+ name: {{ $addon }}
+file:
+ {{ $.PackagesPath }}/{{ $addon }}.tar.gz
+{{- end }}
+
+---
+#creating composite profile entry
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/composite-apps/{{ .AddonsApp }}/v1/composite-profiles
+metadata :
+ name: {{ .AddonsProfile }}
+
+{{- range $index, $addon := .Addons }}
+---
+#adding app profiles to the composite profile
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ $.ProjectName }}/composite-apps/{{ $.AddonsApp }}/v1/composite-profiles/{{ $.AddonsProfile }}/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/{{ .AddonsApp }}/v1/deployment-intent-groups
+metadata :
+ name: {{ .AddonsDeploymentIntentGroup }}
+ description: "description"
+spec:
+ profile: {{ .AddonsProfile }}
+ version: r1
+ logical-cloud: {{ .LogicalCloud }}
+ override-values: []
+
+---
+#create intent in deployment intent group
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/composite-apps/{{ .AddonsApp }}/v1/deployment-intent-groups/{{ .AddonsDeploymentIntentGroup }}/intents
+metadata :
+ name: {{ .AddonsDeploymentIntent }}
+spec:
+ intent:
+ genericPlacementIntent: {{ .AddonsPlacementIntent }}
+
+---
+#create the generic placement intent
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/composite-apps/{{ .AddonsApp }}/v1/deployment-intent-groups/{{ .AddonsDeploymentIntentGroup }}/generic-placement-intents
+metadata :
+ name: {{ .AddonsPlacementIntent }}
+spec:
+ logical-cloud: {{ .LogicalCloud }}
+
+{{- range $index, $addon := .Addons }}
+---
+#add the app placement intent to the generic placement intent
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ $.ProjectName }}/composite-apps/{{ $.AddonsApp }}/v1/deployment-intent-groups/{{ $.AddonsDeploymentIntentGroup }}/generic-placement-intents/{{ $.AddonsPlacementIntent }}/app-intents
+metadata:
+ name: {{ $addon }}-placement-intent
+spec:
+ app-name: {{ $addon }}
+ intent:
+ allOf:
+ - provider-name: {{ $.ClusterProvider }}
+ cluster-label-name: {{ $.ClustersLabel }}
+{{- end }}
+
+---
+#Approve
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/composite-apps/{{ .AddonsApp }}/v1/deployment-intent-groups/{{ .AddonsDeploymentIntentGroup }}/approve
+
+---
+#Instantiate
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/composite-apps/{{ .AddonsApp }}/v1/deployment-intent-groups/{{ .AddonsDeploymentIntentGroup }}/instantiate
diff --git a/kud/deployment_infra/emco/examples/04-addon-resources-app.yaml b/kud/deployment_infra/emco/examples/04-addon-resources-app.yaml
new file mode 100644
index 00000000..92fd9539
--- /dev/null
+++ b/kud/deployment_infra/emco/examples/04-addon-resources-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: {{ .AddonResourcesApp }}
+ description: "KUD addons"
+spec:
+ version: v1
+
+{{- range $index, $addon := .AddonResources }}
+---
+#adding app to the composite app
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ $.ProjectName }}/composite-apps/{{ $.AddonResourcesApp }}/v1/apps
+metadata :
+ name: {{ $addon }}
+file:
+ {{ $.PackagesPath }}/{{ $addon }}.tar.gz
+{{- end }}
+
+---
+#creating composite profile entry
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/composite-apps/{{ .AddonResourcesApp }}/v1/composite-profiles
+metadata :
+ name: {{ .AddonResourcesProfile }}
+
+{{- range $index, $addon := .AddonResources }}
+---
+#adding app profiles to the composite profile
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ $.ProjectName }}/composite-apps/{{ $.AddonResourcesApp }}/v1/composite-profiles/{{ $.AddonResourcesProfile }}/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/{{ .AddonResourcesApp }}/v1/deployment-intent-groups
+metadata :
+ name: {{ .AddonResourcesDeploymentIntentGroup }}
+ description: "description"
+spec:
+ profile: {{ .AddonResourcesProfile }}
+ version: r1
+ logical-cloud: {{ .LogicalCloud }}
+ override-values: []
+
+---
+#create intent in deployment intent group
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/composite-apps/{{ .AddonResourcesApp }}/v1/deployment-intent-groups/{{ .AddonResourcesDeploymentIntentGroup }}/intents
+metadata :
+ name: {{ .AddonResourcesDeploymentIntent }}
+spec:
+ intent:
+ genericPlacementIntent: {{ .AddonResourcesPlacementIntent }}
+
+---
+#create the generic placement intent
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/composite-apps/{{ .AddonResourcesApp }}/v1/deployment-intent-groups/{{ .AddonResourcesDeploymentIntentGroup }}/generic-placement-intents
+metadata :
+ name: {{ .AddonResourcesPlacementIntent }}
+spec:
+ logical-cloud: {{ .LogicalCloud }}
+
+{{- range $index, $addon := .AddonResources }}
+---
+#add the app placement intent to the generic placement intent
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ $.ProjectName }}/composite-apps/{{ $.AddonResourcesApp }}/v1/deployment-intent-groups/{{ $.AddonResourcesDeploymentIntentGroup }}/generic-placement-intents/{{ $.AddonResourcesPlacementIntent }}/app-intents
+metadata:
+ name: {{ $addon }}-placement-intent
+spec:
+ app-name: {{ $addon }}
+ intent:
+ allOf:
+ - provider-name: {{ $.ClusterProvider }}
+ cluster-label-name: {{ $.ClustersLabel }}
+{{- end }}
+
+---
+#Approve
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/composite-apps/{{ .AddonResourcesApp }}/v1/deployment-intent-groups/{{ .AddonResourcesDeploymentIntentGroup }}/approve
+
+---
+#Instantiate
+version: emco/v2
+resourceContext:
+ anchor: projects/{{ .ProjectName }}/composite-apps/{{ .AddonResourcesApp }}/v1/deployment-intent-groups/{{ .AddonResourcesDeploymentIntentGroup }}/instantiate
diff --git a/kud/deployment_infra/emco/examples/README.md b/kud/deployment_infra/emco/examples/README.md
index b91cce10..203b83fd 100644
--- a/kud/deployment_infra/emco/examples/README.md
+++ b/kud/deployment_infra/emco/examples/README.md
@@ -27,33 +27,36 @@ needs to be installed and configured for the edge cluster.
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.
+Apply the prerequisites. This creates the controllers, one or more
+clusters, one project, and one default logical cloud. This step is
+required to be done only once.
- `$ emcoctl apply -f prerequisites.yaml -v values.yaml`
+ `$ emcoctl apply -f 00-controllers.yaml -v values.yaml`
+ `$ emcoctl apply -f 01-cluster.yaml -v values.yaml`
+ `$ emcoctl apply -f 02-project.yaml -v values.yaml`
## Deploying addons
-Apply composite-app.yaml. This deploys the addons listed in the `Apps`
-value.
+This deploys the applications listed in the `Addons` and
+`AddonResources` values.
- `$ emcoctl apply -f ../output/composite-app.yaml -v values.yaml`
- `$ emcoctl apply -f ../output/composite-app.yaml -v values-resources.yaml`
+ `$ emcoctl apply -f 03-addons-app.yaml -v values.yaml`
+ `$ emcoctl apply -f 04-addon-resources-app.yaml -v values.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`
+ `$ emcoctl delete -f 04-addon-resources-app.yaml -v values.yaml`
+ `$ emcoctl delete -f 03-addons-app.yaml -v values.yaml`
2. Cleanup prerequisites.
- `$ emcoctl delete -f prerequisites.yaml -v values.yaml`
+ `$ emcoctl delete -f 02-project.yaml -v values.yaml`
+ `$ emcoctl delete -f 01-cluster.yaml -v values.yaml`
+ `$ emcoctl delete -f 00-controllers.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
deleted file mode 100644
index a44546e0..00000000
--- a/kud/deployment_infra/emco/examples/prerequisites.yaml
+++ /dev/null
@@ -1,113 +0,0 @@
-# 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
deleted file mode 100644
index acfd903c..00000000
--- a/kud/deployment_infra/emco/examples/values-resources.yaml.example
+++ /dev/null
@@ -1,19 +0,0 @@
-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
index 37ddacf6..4f5e45ed 100644
--- a/kud/deployment_infra/emco/examples/values.yaml.example
+++ b/kud/deployment_infra/emco/examples/values.yaml.example
@@ -1,24 +1,36 @@
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
+
+ClusterProvider: kud
+ClustersLabel: kud-cluster
+Clusters:
+- KubeConfig: $KUBE_PATH
+ Name: cluster
+
+ProjectName: kud
LogicalCloud: default
-CompositeApp: addons
-CompositeProfile: addons-profile
-DeploymentIntentGroup: addons-deployment-intent-group
-DeploymentIntent: addons-deployment-intent
-GenericPlacementIntent: addons-placement-intent
-Apps:
+
+PackagesPath: $PWD/../output/packages
+AddonsApp: addons
+AddonsProfile: addons-profile
+AddonsDeploymentIntentGroup: addons-deployment-intent-group
+AddonsDeploymentIntent: addons-deployment-intent
+AddonsPlacementIntent: addons-placement-intent
+Addons:
- multus-cni
- ovn4nfv
- node-feature-discovery
- sriov-network-operator
- qat-device-plugin
- cpu-manager
+
+AddonResourcesApp: addon-resources
+AddonResourcesProfile: addon-resources-profile
+AddonResourcesDeploymentIntentGroup: addon-resources-deployment-intent-group
+AddonResourcesDeploymentIntent: addon-resources-deployment-intent
+AddonResourcesPlacementIntent: addon-resources-placement-intent
+AddonResources:
+- sriov-network
diff --git a/kud/hosting_providers/containerized/addons/README.md.tmpl b/kud/hosting_providers/containerized/addons/README.md.tmpl
index 8ab16104..0cef7923 100644
--- a/kud/hosting_providers/containerized/addons/README.md.tmpl
+++ b/kud/hosting_providers/containerized/addons/README.md.tmpl
@@ -1,43 +1,47 @@
# Installing KUD addons with emcoctl
-1. Customize values.yaml and values-resources.yaml as needed
+1. Customize values.yaml as needed
To create a customized profile for a specific addon, edit the profile
as needed, and then (for example, cpu-manager):
```
tar -czf /opt/kud/multi-cluster/addons/cpu-manager.tar.gz -C /opt/kud/multi-cluster/addons/cpu-manager/helm .
- tar -czf /opt/kud/multi-cluster/addons/collectd_profile.tar.gz -C /opt/kud/multi-cluster/addons/cpu-manager/profile .
+ tar -czf /opt/kud/multi-cluster/addons/cpu-manager_profile.tar.gz -C /opt/kud/multi-cluster/addons/cpu-manager/profile .
```
2. Create prerequisites to deploy addons
-Apply prerequisites.yaml. This step is optional. If there are
-existing resources in the cluster, it is sufficient to customize
-values.yaml with the values of those resources. The supplied
-prequisites.yaml creates controllers, one project, one cluster, and
-one logical cloud.
+Apply prerequisites. This step is optional. If there are existing
+resources in the cluster, it is sufficient to customize values.yaml
+with the values of those resources. The supplied YAML files creates
+the controllers, one or more clusters, one project, and one logical
+cloud.
- \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh apply -f prerequisites.yaml -v values.yaml\`
+ \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh apply -f 00-controllers.yaml -v values.yaml\`
+ \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh apply -f 01-cluster.yaml -v values.yaml\`
+ \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh apply -f 02-project.yaml -v values.yaml\`
3. Deploy addons
-Apply addons.yaml. This deploys the addons listed in the \`Addons\`
-value in values.yaml.
+This deploys the addons listed in the \`Addons\` and
+\`AddonResources\` values in values.yaml.
- \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh apply -f composite-app.yaml -v values.yaml\`
- \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh apply -f composite-app.yaml -v values-resources.yaml\`
+ \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh apply -f 03-addons-app.yaml -v values.yaml\`
+ \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh apply -f 04-addon-resources-app.yaml -v values.yaml\`
# Uninstalling KUD addons with emcoctl
1. Delete addons
- \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh delete -f composite-app.yaml -v values-resources.yaml\`
- \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh delete -f composite-app.yaml -v values.yaml\`
+ \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh delete -f 04-addon-resources-app.yaml -v values.yaml\`
+ \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh delete -f 03-addons-app.yaml -v values.yaml\`
2. Cleanup prerequisites
- \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh delete -f prerequisites.yaml -v values.yaml\`
+ \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh delete -f 02-project.yaml -v values.yaml\`
+ \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh delete -f 01-cluster.yaml -v values.yaml\`
+ \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh delete -f 00-controllers.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
diff --git a/kud/hosting_providers/containerized/addons/values-resources.yaml.tmpl b/kud/hosting_providers/containerized/addons/values-resources.yaml.tmpl
deleted file mode 100644
index ed568238..00000000
--- a/kud/hosting_providers/containerized/addons/values-resources.yaml.tmpl
+++ /dev/null
@@ -1,19 +0,0 @@
-HostIP: ${HOST_IP}
-KubeConfig: ${KUBE_PATH}
-PackagesPath: ${PACKAGES_PATH}
-ProjectName: proj1
-RsyncPort: 30441
-GacPort: 30493
-OvnPort: 30473
-DtcPort: 30483
-ClusterProvider: provider1
-Cluster1: cluster1
-ClusterLabel: edge-cluster
-LogicalCloud: default
-Apps:
-- sriov-network
-CompositeApp: addon-resources
-CompositeProfile: addon-resources-profile
-DeploymentIntentGroup: addon-resources-deployment-intent-group
-DeploymentIntent: addon-resources-deployment-intent
-GenericPlacementIntent: addon-resources-placement-intent
diff --git a/kud/hosting_providers/containerized/addons/values.yaml.tmpl b/kud/hosting_providers/containerized/addons/values.yaml.tmpl
index 62936beb..f4f0b76c 100644
--- a/kud/hosting_providers/containerized/addons/values.yaml.tmpl
+++ b/kud/hosting_providers/containerized/addons/values.yaml.tmpl
@@ -1,24 +1,36 @@
HostIP: ${HOST_IP}
-KubeConfig: ${KUBE_PATH}
-PackagesPath: ${PACKAGES_PATH}
-ProjectName: proj1
RsyncPort: 30441
GacPort: 30493
OvnPort: 30473
DtcPort: 30483
-ClusterProvider: provider1
-Cluster1: cluster1
-ClusterLabel: edge-cluster
+
+ClusterProvider: kud
+ClustersLabel: kud-cluster
+Clusters:
+- KubeConfig: ${KUBE_PATH}
+ Name: cluster
+
+ProjectName: kud
LogicalCloud: default
-Apps:
+
+PackagesPath: ${PACKAGES_PATH}
+AddonsApp: addons
+AddonsProfile: addons-profile
+AddonsDeploymentIntentGroup: addons-deployment-intent-group
+AddonsDeploymentIntent: addons-deployment-intent
+AddonsPlacementIntent: addons-placement-intent
+Addons:
- multus-cni
- ovn4nfv
- node-feature-discovery
- sriov-network-operator
- qat-device-plugin
- cpu-manager
-CompositeApp: addons
-CompositeProfile: addons-profile
-DeploymentIntentGroup: addons-deployment-intent-group
-DeploymentIntent: addons-deployment-intent
-GenericPlacementIntent: addons-placement-intent
+
+AddonResourcesApp: addon-resources
+AddonResourcesProfile: addon-resources-profile
+AddonResourcesDeploymentIntentGroup: addon-resources-deployment-intent-group
+AddonResourcesDeploymentIntent: addon-resources-deployment-intent
+AddonResourcesPlacementIntent: addon-resources-placement-intent
+AddonResources:
+- sriov-network
diff --git a/kud/hosting_providers/containerized/installer.sh b/kud/hosting_providers/containerized/installer.sh
index 6ae12dc9..928ed425 100755
--- a/kud/hosting_providers/containerized/installer.sh
+++ b/kud/hosting_providers/containerized/installer.sh
@@ -238,8 +238,9 @@ function install_host_artifacts {
cp -rf ${kud_inventory_folder}/artifacts/* ${host_artifacts_dir}
mkdir -p ${host_artifacts_dir}/addons
- cp ${kud_infra_folder}/emco/examples/prerequisites.yaml ${host_artifacts_dir}/addons
- cp ${kud_infra_folder}/emco/composite-app.yaml ${host_artifacts_dir}/addons
+ for yaml in ${kud_infra_folder}/emco/examples/*.yaml; do
+ cp ${yaml} ${host_artifacts_dir}/addons
+ done
for template in addons/*.tmpl; do
CLUSTER_NAME="${cluster_name}" \
HOST_IP="$(master_ip)" \