From cc302424c0b129267235157640be28b45597fef2 Mon Sep 17 00:00:00 2001 From: Todd Malsbary Date: Fri, 26 Mar 2021 14:17:49 -0700 Subject: EMCO deploy of addons An example is provided with instructions on how to install the addons with emcoctl. Addtionally, the containerized installer will populate /opt/kud/addons and /opt/kud/multi-cluster/$CLUSTER_NAME/artifacts with the files and instructions necessary as well. Issue-ID: MULTICLOUD-1324 Signed-off-by: Todd Malsbary Change-Id: I74de1c9d18a0aaec4a96e38684ec80f00ab0b940 --- .../containerized/addons/README.md.tmpl | 45 ++++++++++++++++++++++ .../addons/values-resources.yaml.tmpl | 19 +++++++++ .../containerized/addons/values.yaml.tmpl | 24 ++++++++++++ 3 files changed, 88 insertions(+) create mode 100644 kud/hosting_providers/containerized/addons/README.md.tmpl create mode 100644 kud/hosting_providers/containerized/addons/values-resources.yaml.tmpl create mode 100644 kud/hosting_providers/containerized/addons/values.yaml.tmpl (limited to 'kud/hosting_providers/containerized/addons') diff --git a/kud/hosting_providers/containerized/addons/README.md.tmpl b/kud/hosting_providers/containerized/addons/README.md.tmpl new file mode 100644 index 00000000..8ab16104 --- /dev/null +++ b/kud/hosting_providers/containerized/addons/README.md.tmpl @@ -0,0 +1,45 @@ +# Installing KUD addons with emcoctl + +1. Customize values.yaml and values-resources.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 . +``` + +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. + + \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh apply -f prerequisites.yaml -v values.yaml\` + +3. Deploy addons + +Apply addons.yaml. This deploys the addons listed in the \`Addons\` +value 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\` + +# 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\` + +2. Cleanup prerequisites + + \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh 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/hosting_providers/containerized/addons/values-resources.yaml.tmpl b/kud/hosting_providers/containerized/addons/values-resources.yaml.tmpl new file mode 100644 index 00000000..ed568238 --- /dev/null +++ b/kud/hosting_providers/containerized/addons/values-resources.yaml.tmpl @@ -0,0 +1,19 @@ +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 new file mode 100644 index 00000000..62936beb --- /dev/null +++ b/kud/hosting_providers/containerized/addons/values.yaml.tmpl @@ -0,0 +1,24 @@ +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: +- 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 -- cgit 1.2.3-korg