summaryrefslogtreecommitdiffstats
path: root/kud/deployment_infra/emco/examples/README.md
blob: dcf9edde45b281e56b825d5adfe3e07068bc4a91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#### 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
8. KubeVirt and CDI Operators
9. KubeVirt and CDI Instances

## 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`

## Create prerequisites to deploy addons

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 00-controllers.yaml -v values.yaml`
    `$ emcoctl apply -f 01-cluster.yaml -v values.yaml`
    `$ emcoctl apply -f 02-project.yaml -v values.yaml`

## Create addons project

This creates the project with the addons listed `CompositeApps` value.

    `$ emcoctl apply -f 03-addons-app.yaml -v values.yaml`

## Instantiate the addons

This instantiates each composite app listed in the `CompositeApps`
value.

NOTE: The ordering is important when both the sriov-network and
kubevirt addons are enabled.  The sriov-network addon will trigger a
drain of the nodes and kubevirt will prevent the drain from
completing, so kubevirt must be instantiated after sriov-network has
completed the drain.

	`$ emcoctl apply projects/kud/composite-apps/addons/v1/deployment-intent-groups/deployment/instantiate`
	`$ emcoctl apply projects/kud/composite-apps/networks/v1/deployment-intent-groups/deployment/instantiate`
	`$ emcoctl apply projects/kud/composite-apps/kubevirt/v1/deployment-intent-groups/deployment/instantiate`

## Cleanup

1. Terminate addons.

	`$ emcoctl apply projects/kud/composite-apps/kubevirt/v1/deployment-intent-groups/deployment/terminate`
	`$ emcoctl apply projects/kud/composite-apps/networks/v1/deployment-intent-groups/deployment/terminate`
	`$ emcoctl apply projects/kud/composite-apps/addons/v1/deployment-intent-groups/deployment/terminate`

2. Delete addons.

    `$ emcoctl delete -f 03-addons-app.yaml -v values.yaml`

3. Cleanup prerequisites.

    `$ 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.