This patchset provides the implementation of dex-aio function, which is used to deploy Dex through a Helm operator, e.g., flux/helm-operator. A test site (dex-test-site) has been included, which contains manifests to run the following phase plan: clusterctl-init-ephemeral controlplane-ephemeral initinfra-target clusterctl-init-target clusterctl-move workers-target helm-operator-target helm-collator-target dex-release-target The first six phases are used to deploy a target cluster on Azure cloud while the remaining three are for deploying Dex through a Helm operator. The 'helm-collator-target' phase requires an existing "airshipctl" repo supporting the function 'helm-chart-collator', which is provide by a different patchset. Change-Id: I7057d9a5c78cbcef26bac89a9f5bf06fd0d3ac4d
3.7 KiB
Deploy Dex on Target Cluster (Azure cloud)
This test site provides the manifests to customize and deploy a target cluster on Azure named edge-5g-cluster. Once the target cluster has been deployed, manifest in target/workload can be used to deploy the Helm operator, Helm Collator (Helm repository), and Dex itself.
Dex-AIO Function
The dex-aio function provides the manifests to deploy Dex through a Helm Operator.
Dex Test Site
The dex-test-site provides the manifests to deploy a Target cluster on Azure cloud, and workload manifests for the Helm operator, Helm Chart Collator (a.k.a., Helm repository based on ChartMuseum), and Dex.
See dex-test-site directory structure below:
dex-test-site/
├── config
│ └── variable-catalogue.yaml
├── ephemeral
│ └── controlplane
├── metadata.yaml
├── phases
└── target
├── initinfra
├── workers
└── workload
├── dex-helm-release
├── helm-chart-collator
└── helm-operator
This test site relies on the Replacement transformer to customize it. All customizable values can be found at *config/variable-catalogue.yaml" file.
Deploying the Target Cluster
The manifests for deploying the Target cluster through airshipctl phase run are located in the following tree structure:
dex-test-site/
├── ephemeral
│ └── controlplane
└── target
├── initinfra
└── workers
The sequence for deploying the Target cluster is provided below:
- Initialize Airship config file: invokde
tools/deployment/22_test_configs.sh
- Create ephemeral cluster: invoke script
../airshipctl/tools/document/start_kind.sh
- Initialize Ephemeral cluster with CAPI/CAPZ components: invoke script
tools/deployment/phases/phase-clusterctl-init-ephemeral-script.sh
- Deploy Target control plane node(s): invoke script
tools/deployment/phases/phase-controlplane-ephemeral-script.sh
- Deploy Calico CNI: invoke script
tools/deployment/phases/phase-initinfra-target-script.sh
- Initialize Target cluster with CAPI/CAPZ components: invoke script
tools/deployment/phases/phase-clusterctl-init-target-script.sh
- Move CAPI resources to Target cluster:
tools/deployment/phases/phase-clusterctl-move-script.sh
- Deploy Target worker node(s):
tools/deployment/phases/phase-workers-target-script.sh
Deploying the Workload Services
The manifests for deploying the workload services are located under target/workload directory:
dex-test-site/
└── target
└── workload
├── dex-helm-release
├── helm-chart-collator
└── helm-operator
In order to test and validate Dex deployment, you need to first deploy the Helm operator (manifest/composite/flux-helm) from airshipctl project, as well as the Helm Chart Collator (manifest/function/helm-chart-collator) from the same project. These two services are referenced by the kustomization file in target/workload/helm-operator and target/workload/helm-chart-collator, respectively.
The kustomization file for deploying Dex service is located in target/workload/dex-helm-release folder.
New phases have been implemented to deploy the Helm operator, Helm repository and Dex. The corresponding phase manifest can be found in phases/phases.yaml.
- Deploy Helm operator service: invoke script
tools/deployment/phases/phase-helm-operator-target-script.sh
- Deploy Helm Chart Collator service: invoke script
tools/deployment/phases/phase-helm-collator-target-script.sh
- Deploy Dex service: invoke script
tools/deployment/phases/phase-dex-release-target-script.sh