From 6f45363d7bbd5a56f3581f93c06fa5d15590b2df Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Tue, 26 Sep 2023 15:33:20 +0200 Subject: [PATCH] chore(localdev): improve config and documentation (#94) - remove selfsigned.yaml and move to README because file won't be available at released chart installation - extend helm test for TLS setup - generally improve readme - extend config in values file specifically to integrate with local development --- .github/workflows/localdev-chart-test.yaml | 53 +++++- charts/localdev/README.md | 204 +++++++++++++++++---- charts/localdev/README.md.gotmpl | 183 ++++++++++++++---- charts/localdev/selfsigned.yaml | 59 ------ charts/localdev/values.yaml | 24 ++- 5 files changed, 389 insertions(+), 134 deletions(-) delete mode 100644 charts/localdev/selfsigned.yaml diff --git a/.github/workflows/localdev-chart-test.yaml b/.github/workflows/localdev-chart-test.yaml index 9761e193a..1154de59b 100644 --- a/.github/workflows/localdev-chart-test.yaml +++ b/.github/workflows/localdev-chart-test.yaml @@ -82,11 +82,62 @@ jobs: - name: Run chart-testing (lint) run: ct lint --charts charts/localdev --config charts/chart-testing-config.yaml + - name: Enalbe TLS setup on KinD cluster + run: | + helm repo add jetstack https://charts.jetstack.io + helm repo update + helm install \ + cert-manager jetstack/cert-manager \ + --namespace default \ + --version v1.13.0 \ + --set installCRDs=true + kubectl apply -f - < **Note:** -> In its current state of development, this chart as well as the following installation guide have been successfully tested on **Linux**. -> We'll test its reliability on other platforms and update the installation guide accordingly. +It's intended for the local setup of the those components in order to aid the local development. In order to integrate with the local development adapt the address values in the Values file for [Portal Frontend](./values.yaml#L23) and/or [Portal Backend](./values.yaml#L27). -To install the helm chart into the default namespace of your started Minikube cluster, make sure to clone the [portal-cd](https://github.com/eclipse-tractusx/portal-cd) repository beforehand. +## Usage -Then change to the chart directory: +The following steps describe how to setup the LocalDev chart into the default namespace of your started [**Minikube**](https://minikube.sigs.k8s.io/docs/start) cluster: -```bash -$ cd charts/localdev/ -``` +> **Note** +> +> In its current state of development, this chart as well as the following installation guide have been tested on Linux and Mac. +> +> Please be aware that most of the installed images are only available in amd64 architecture and that the installation on Mac (specifically on Apple Silicon) may come with performance issues or even crashing behavior. +> +> **Linux** is the **preferred platform** to install this chart on. +> Very generally speaking, amd64 architecture is quite common with Linux devices and also the network setup with Minikube is very straightforward on Linux. +> +> We plan to test the chart's reliability also on Windows and to update the installation guide accordingly. -Prepare the TLS setup: +> **Recommendations** +> +> Resources for Minikube +>| OS | CPU(cores) | Memory(GB) | +>| :------| :--------: | :--------: | +>| Linux | 2 | 6 | +>| Mac | 4 | 8 | +> +> Use the dashboard provided by Minikube to get an overview about the deployment on the cluster +> ```bash +> $ minikube dashboard +> ``` +1. [Prepare self-signed TLS setup](#1-prepare-self-signed-tls-setup) +2. [Prepare network setup](#2-prepare-network-setup) +3. [Install from released chart or portal-cd repository](#3-install-from-released-chart-or-portal-cd-repository) +4. [Perform first login](perform-first-login) + +### 1. Prepare self-signed TLS setup + +```bash +helm repo add jetstack https://charts.jetstack.io +helm repo update +``` ```bash helm install \ cert-manager jetstack/cert-manager \ @@ -29,42 +56,146 @@ helm install \ --version v1.13.0 \ --set installCRDs=true ``` + ```bash -kubectl apply -f selfsigned.yaml +kubectl apply -f - < **Note:** -> In its current state of development, this chart as well as the following installation guide have been successfully tested on **Linux**. -> We'll test its reliability on other platforms and update the installation guide accordingly. +It's intended for the local setup of the those components in order to aid the local development. In order to integrate with the local development adapt the address values in the Values file for [Portal Frontend](./values.yaml#L23) and/or [Portal Backend](./values.yaml#L27). -To install the helm chart into the default namespace of your started Minikube cluster, make sure to clone the [portal-cd](https://github.com/eclipse-tractusx/portal-cd) repository beforehand. +## Usage -Then change to the chart directory: +The following steps describe how to setup the LocalDev chart into the default namespace of your started [**Minikube**](https://minikube.sigs.k8s.io/docs/start) cluster: -```bash -$ cd charts/localdev/ -``` +> **Note** +> +> In its current state of development, this chart as well as the following installation guide have been tested on Linux and Mac. +> +> Please be aware that most of the installed images are only available in amd64 architecture and that the installation on Mac (specifically on Apple Silicon) may come with performance issues or even crashing behavior. +> +> **Linux** is the **preferred platform** to install this chart on. +> Very generally speaking, amd64 architecture is quite common with Linux devices and also the network setup with Minikube is very straightforward on Linux. +> +> We plan to test the chart's reliability also on Windows and to update the installation guide accordingly. -Prepare the TLS setup: +> **Recommendations** +> +> Resources for Minikube +>| OS | CPU(cores) | Memory(GB) | +>| :------| :--------: | :--------: | +>| Linux | 2 | 6 | +>| Mac | 4 | 8 | +> +> Use the dashboard provided by Minikube to get an overview about the deployment on the cluster +> ```bash +> $ minikube dashboard +> ``` +1. [Prepare self-signed TLS setup](#1-prepare-self-signed-tls-setup) +2. [Prepare network setup](#2-prepare-network-setup) +3. [Install from released chart or portal-cd repository](#3-install-from-released-chart-or-portal-cd-repository) +4. [Perform first login](perform-first-login) + +### 1. Prepare self-signed TLS setup + +```bash +helm repo add jetstack https://charts.jetstack.io +helm repo update +``` ```bash helm install \ cert-manager jetstack/cert-manager \ @@ -29,42 +56,142 @@ helm install \ --version v1.13.0 \ --set installCRDs=true ``` + ```bash -kubectl apply -f selfsigned.yaml +kubectl apply -f - <