aboutsummaryrefslogtreecommitdiffstats
path: root/kud/deployment_infra/emco/examples/03-addons-app.yaml
diff options
context:
space:
mode:
authorTodd Malsbary <todd.malsbary@intel.com>2021-06-02 16:31:22 -0700
committerTodd Malsbary <todd.malsbary@intel.com>2021-06-09 10:03:51 -0700
commit741d0b2bf25ee68eab05c5a768f60515131bb852 (patch)
tree26285c62bba41355774a62697e6bf4a25229831d /kud/deployment_infra/emco/examples/03-addons-app.yaml
parent99f2be307f194e1f6a60e4098e82f6775c8dad5b (diff)
Refactor EMCO deploy of addons
Issue-ID: MULTICLOUD-1324 Signed-off-by: Todd Malsbary <todd.malsbary@intel.com> Change-Id: I90b33cd99c42017b50f3174b6f9033a861e11dd3
Diffstat (limited to 'kud/deployment_infra/emco/examples/03-addons-app.yaml')
-rw-r--r--kud/deployment_infra/emco/examples/03-addons-app.yaml110
1 files changed, 110 insertions, 0 deletions
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