diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index c781472f..baa9beaf 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -20,8 +20,7 @@ export default defineConfig({ { text: "Deployment", items: [ { text: "Helm", link: "/docs/deployment/helm" }, - { text: "Docker", link: "/docs/deployment/docker" }, - { text: "Verify deployment", link: "/docs/deployment/verify" } + { text: "Docker", link: "/docs/deployment/docker" } ] }, { diff --git a/docs/docs/deployment/docker.md b/docs/docs/deployment/docker.md index 1231acde..3d8b5de9 100644 --- a/docs/docs/deployment/docker.md +++ b/docs/docs/deployment/docker.md @@ -30,3 +30,32 @@ Afterwards start the application: ```sh docker compose up -d ``` + +## Verifying Deployment + +To verify your deployment you can now run the dockerized integration tests using `ghcr.io/onelitefeathernet/feedback-fusion-integrtion:`. +The image requires the following environment variables to be set: + +| Key | Description | +|-----------------|-----------------------------------------------------| +| OIDC_PROVIDER | URL of the OIDC provider | +| OIDC_CLIENT_ID | The client ID | +| OIDC_CLIENT_SECRET | The client secret | +| GRPC_ENDPOINT | The endpoint of the deployed application | + +### Run the tests + +```sh +docker run --network \ + -e OIDC_PROVIDER= \ + -e OIDC_CLIENT_ID= \ + -e OIDC_CLIENT_SECRET= \ + -e GRPC_ENDPOINT= + --name feedback-fusion-integration-test \ + --rm \ + ghcr.io/onelitefeathernet/feedback-fusion-integrtion: +``` + +### On finish + +You should now reset your database as the integration test does not delete everything it created. diff --git a/docs/docs/deployment/helm.md b/docs/docs/deployment/helm.md index 2c48da90..6890de6e 100644 --- a/docs/docs/deployment/helm.md +++ b/docs/docs/deployment/helm.md @@ -60,6 +60,7 @@ Refer to the [configuration documentation](/docs/configuration) for the fields t | `feedbackFusion.preset.create` | Create preset configuration | `false` | | `feedbackFusion.preset.data` | Preset data | `{}` [Preset configuration](/docs/configuration#presets) | | `feedbackFusion.config.secret` | Name of the secret containing configuration | `feedback-fusion-config` | +| `feedbackFusion.testSecret` | Name of the secret containing configuration for the integration test | `feedback-fusion-integration-test` | ## Install @@ -68,3 +69,38 @@ helm install feedback-fusion feedback-fusion/feedback-fusion --wait --atomic ``` Your instance should now be up and running :) + +## Verifying Deployment with Helm Test + +To verify the deployment of the Helm chart, you can use the `helm test` command. However, before running the test, a secret must be created with the name `feedback-fusion-integration-test`. Alternatively, the name of another secret can be set via the Helm value `feedbackFusion.testSecret`. + +The secret should contain the following values: + +| Key | Description | +|-----------------|-----------------------------------------------------| +| OIDC_PROVIDER | URL of the OIDC provider | +| OIDC_CLIENT_ID | The client ID | +| OIDC_CLIENT_SECRET | The client secret | +| GRPC_ENDPOINT | The endpoint of the deployed application | + +### Creating the Secret + +To create the secret, you can use the following `kubectl` command: + +```sh +kubectl create -n secret generic feedback-fusion-integration-test \ + --from-literal=OIDC_PROVIDER= \ + --from-literal=OIDC_CLIENT_ID= \ + --from-literal=OIDC_CLIENT_SECRET= \ + --from-literal=GRPC_ENDPOINT= +``` + +### Run the tests + +```sh +helm test -n +``` + +### On finish + +You should now reset your database as the integration test does not delete everything it created. diff --git a/docs/docs/deployment/verify.md b/docs/docs/deployment/verify.md deleted file mode 100644 index 7ab759a8..00000000 --- a/docs/docs/deployment/verify.md +++ /dev/null @@ -1,20 +0,0 @@ -# Verify the deployment - -To verify and test the deployment of FeedbackFusion, you can run the integration tests. The following prerequisites and instructions will guide you through the process. - -## Prerequisites - -- **Rust** installed on your machine. -- **cargo-make** installed. You can install it using the following command: - ```sh - cargo install cargo-make - ``` -- The FeedbackFusion application must be accessible on port 8000 on the machine where the tests are executed. This can be achieved via port-forwarding if using Kubernetes. -- Override the `OIDC_PROVIDER`, `CLIENT_ID` and `CLIENT_SECRET` in the Makefile. - -## Running Integration Tests - -To run the integration tests, execute the following command: - -```sh -cargo make integration_test