From adaf47b2116b424372e5355518332994eedf6647 Mon Sep 17 00:00:00 2001 From: Alex Aperis Date: Fri, 2 Aug 2024 12:13:44 +0200 Subject: [PATCH 1/5] add charts overview readme --- charts/README.md | 88 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 charts/README.md diff --git a/charts/README.md b/charts/README.md new file mode 100644 index 000000000..4cbe698da --- /dev/null +++ b/charts/README.md @@ -0,0 +1,88 @@ +# Sensitive Data Archive Helm Charts + + + +## Charts overview + +The `neicnordic` Helm repository contains the following charts (for configuration details click on the links below): + +- [sda-svc - SDA services](https://github.com/neicnordic/sensitive-data-archive/blob/main/charts/sda-svc/README.md) + + This chart deploys the service components needed to operate the Sensitive Data Archive solution. The charts may include additional service components that might be beneficial for administrative operations or extending the Sensitive Data Archive solutions to facilitate different use cases. + +- [sda-db - SDA database](https://github.com/neicnordic/sensitive-data-archive/blob/main/charts/sda-db/README.md) + + This chart deploys a pre-configured database ([PostgreSQL](https://www.postgresql.org/)) instance for Sensitive Data Archive, the database schemas are designed to adhere to [European Genome-Phenome Archive](https://ega-archive.org/) federated archiving model. + +- [sda-mq - SDA Message broker](https://github.com/neicnordic/sensitive-data-archive/blob/main/charts/sda-mq/README.md) + + This chart deploys a pre-configured message broker ([RabbitMQ](https://www.rabbitmq.com/)) designed for [European Genome-Phenome Archive](https://ega-archive.org/) federated messaging between `CentralEGA` and Local/Federated EGAs but also configurable to support Standalone SDA deployments. + +- [sda-orch - SDA orchestrate service](https://github.com/neicnordic/sensitive-data-archive/blob/main/charts/sda-orch/README.md) + + This chart deploys an orchestration service for the Sensitive Data Archive solution. This is a helper service designed to curate the ingestion flow in an automated manner when the SDA solution is deployed and configured as standalone (non-federated). + +## Usage + +[Helm](https://helm.sh) must be installed to use the charts. +Please refer to Helm's [documentation](https://helm.sh/docs/) to get started. + +With Helm properly installed, add the `neicnordic` Helm repository as follows: + +```sh +helm repo add neicnordic https://neicnordic.github.io/sensitive-data-archive +helm repo update +``` + +You can then run + +```sh +helm search repo neicnordic +``` + +to see the available charts. + +## Installing the Charts + +To install a chart with the release name `my-release`: + +```sh +helm install my-release neicnordic/ +``` + +To configure a Helm chart with your own values, you can copy the default `values.yaml` file from the chart to your local directory and modify it as needed, or using helm: + +```sh +helm show values neicnordic/ > .yaml +``` + +Then, you can install the chart with the following command: + +```sh +helm install my-release -f .yaml neicnordic/ +``` + +Example: + +```sh +helm show values neicnordic/sda-svc > my-values.yaml +vi my-values.yaml +helm install my-release neicnordic/sda-svc -f my-values.yaml +``` + +For quick reference to Helm's chart management capabilities see [here](https://helm.sh/docs/intro/cheatsheet/#chart-management). + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```sh +helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## System requirements + + - kubernetes minimal version required for running the helm charts is `>= 1.25` + - helm minimal version required for running the charts is `>=3.5` From 9cb154f02cc139a627120b85310cfeb99bb6faea Mon Sep 17 00:00:00 2001 From: Alex Aperis Date: Fri, 2 Aug 2024 14:15:24 +0200 Subject: [PATCH 2/5] update example in README --- charts/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/charts/README.md b/charts/README.md index 4cbe698da..77d247b94 100644 --- a/charts/README.md +++ b/charts/README.md @@ -56,6 +56,8 @@ To configure a Helm chart with your own values, you can copy the default `values helm show values neicnordic/ > .yaml ``` +**Note** that Kubernetes resources, such as secrets, may be required for a chart to function properly. All necessary resources should be created in the Kubernetes cluster before installing the chart. + Then, you can install the chart with the following command: ```sh @@ -64,6 +66,24 @@ helm install my-release -f .yaml neicnordic/ Example: +First create the required crypt4gh +```sh +crypt4gh generate -n c4gh -p somepassphrase +kubectl create secret generic c4gh --from-file="c4gh.sec.pem" --from-file="c4gh.pub.pem" --from-literal=passphrase="somepassphrase" +``` + +and jwt keys + +```sh +openssl ecparam -name prime256v1 -genkey -noout -out "jwt.key" +openssl ec -in "jwt.key" -pubout -out "jwt.pub" +kubectl create secret generic jwk --from-file="jwt.key" --from-file="jwt.pub" +``` + +as secrets in the Kubernetes cluster. + +Finally, install the chart with the following command: + ```sh helm show values neicnordic/sda-svc > my-values.yaml vi my-values.yaml From 4e5285e35197245ff977972f8c6a52ecc0009bb0 Mon Sep 17 00:00:00 2001 From: Alex Aperis Date: Fri, 2 Aug 2024 14:26:28 +0200 Subject: [PATCH 3/5] add note on sda-orch chart --- charts/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/README.md b/charts/README.md index 77d247b94..c9e2f964c 100644 --- a/charts/README.md +++ b/charts/README.md @@ -21,6 +21,7 @@ The `neicnordic` Helm repository contains the following charts (for configuratio - [sda-orch - SDA orchestrate service](https://github.com/neicnordic/sensitive-data-archive/blob/main/charts/sda-orch/README.md) This chart deploys an orchestration service for the Sensitive Data Archive solution. This is a helper service designed to curate the ingestion flow in an automated manner when the SDA solution is deployed and configured as standalone (non-federated). + **Note:** The `sda-orch` chart may be out of date and is thus not guaranteed to be functional. ## Usage @@ -67,6 +68,7 @@ helm install my-release -f .yaml neicnordic/ Example: First create the required crypt4gh + ```sh crypt4gh generate -n c4gh -p somepassphrase kubectl create secret generic c4gh --from-file="c4gh.sec.pem" --from-file="c4gh.pub.pem" --from-literal=passphrase="somepassphrase" From 47c8ece61cb338434d797d05511c0b958f08d7b4 Mon Sep 17 00:00:00 2001 From: Alex Aperis Date: Wed, 7 Aug 2024 10:12:08 +0200 Subject: [PATCH 4/5] make example less verbose --- charts/README.md | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/charts/README.md b/charts/README.md index c9e2f964c..2222e0a20 100644 --- a/charts/README.md +++ b/charts/README.md @@ -67,24 +67,7 @@ helm install my-release -f .yaml neicnordic/ Example: -First create the required crypt4gh - -```sh -crypt4gh generate -n c4gh -p somepassphrase -kubectl create secret generic c4gh --from-file="c4gh.sec.pem" --from-file="c4gh.pub.pem" --from-literal=passphrase="somepassphrase" -``` - -and jwt keys - -```sh -openssl ecparam -name prime256v1 -genkey -noout -out "jwt.key" -openssl ec -in "jwt.key" -pubout -out "jwt.pub" -kubectl create secret generic jwk --from-file="jwt.key" --from-file="jwt.pub" -``` - -as secrets in the Kubernetes cluster. - -Finally, install the chart with the following command: +First create the secret containing the crypt4gh keypair and passphrase before the chart is deployed. Then edit the `values.yaml` to your liking and install the chart: ```sh helm show values neicnordic/sda-svc > my-values.yaml From 2aafd138f69cf509f21c971f8552af4b838aa659 Mon Sep 17 00:00:00 2001 From: Alex Aperis Date: Wed, 7 Aug 2024 10:54:21 +0200 Subject: [PATCH 5/5] add link for secret creation example --- charts/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/README.md b/charts/README.md index 2222e0a20..cf7118e1a 100644 --- a/charts/README.md +++ b/charts/README.md @@ -67,7 +67,7 @@ helm install my-release -f .yaml neicnordic/ Example: -First create the secret containing the crypt4gh keypair and passphrase before the chart is deployed. Then edit the `values.yaml` to your liking and install the chart: +First create the secret containing the crypt4gh keypair and passphrase before the chart is deployed (see e.g. [here](https://github.com/neicnordic/sensitive-data-archive/blob/cc66756318bfac5fd92ef22f9763e69b42ed5c3c/.github/integration/scripts/charts/dependencies.sh#L17)). Then edit the `values.yaml` to your liking and install the chart: ```sh helm show values neicnordic/sda-svc > my-values.yaml