Skip to content

Commit

Permalink
chore: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Randoooom committed Jul 9, 2024
1 parent 6391ee4 commit f5a004b
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 22 deletions.
3 changes: 1 addition & 2 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
]
},
{
Expand Down
29 changes: 29 additions & 0 deletions docs/docs/deployment/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:<version>`.
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 <network> \
-e OIDC_PROVIDER=<oidc_provider> \
-e OIDC_CLIENT_ID=<oidc_client_id> \
-e OIDC_CLIENT_SECRET=<oidc_client_secret> \
-e GRPC_ENDPOINT=<grpc_endpoint>
--name feedback-fusion-integration-test \
--rm \
ghcr.io/onelitefeathernet/feedback-fusion-integrtion:<version>
```

### On finish

You should now reset your database as the integration test does not delete everything it created.
36 changes: 36 additions & 0 deletions docs/docs/deployment/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 <namespace> secret generic feedback-fusion-integration-test \
--from-literal=OIDC_PROVIDER=<oidc_provider_url> \
--from-literal=OIDC_CLIENT_ID=<client_id> \
--from-literal=OIDC_CLIENT_SECRET=<client_secret> \
--from-literal=GRPC_ENDPOINT=<grpc_endpoint>
```

### Run the tests

```sh
helm test -n <namespace> <release>
```

### On finish

You should now reset your database as the integration test does not delete everything it created.
20 changes: 0 additions & 20 deletions docs/docs/deployment/verify.md

This file was deleted.

0 comments on commit f5a004b

Please sign in to comment.