> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enkryptai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Post Installation

> Follow these steps after installing the helm chart.

After a successful installation of Helm chart, you need to perform the following steps to configure the OpenFGA.

you can use the provided automation script to configure OpenFGA automatically.

Run the following command to update the values

```bash theme={"system"}
curl -sSL https://raw.githubusercontent.com/enkryptai/helm-charts/main/utils/post-installation.sh | bash
```

Or You can configure it manully by below steps

### 1. Retrieve Store ID and Authorization Model ID

Run the following command to get the `store_id` and `authorization_model_id` from the OpenFGA logs:

```bash theme={"system"}
kubectl logs -l app.kubernetes.io/name=openfga,app.kubernetes.io/instance=enkryptai -n enkryptai-stack | grep -oP '(store_id|authorization_model_id)":"[^"]*'
```

This command will output something similar to the following:

```
store_id":"01KCV38V1BTHC2R4W5E8Q3FZW9
authorization_model_id":"01KCV38V1Q7KQP4KPR6TS5KYWN
```

Take note of these values as you will need them in the next step.

### 2. Update Kubernetes Secrets

You now need to update the Kubernetes secrets with the `store_id` and `authorization_model_id` you just retrieved. The following table summarizes the secrets and keys that need to be updated in the `enkryptai-stack` namespace.

| Secret Name           | Key                                   | Value from Logs          |
| --------------------- | ------------------------------------- | ------------------------ |
| `gateway-env-secret`  | `DECK_OPENFGA_AUTHORIZATION_MODEL_ID` | `authorization_model_id` |
| `gateway-env-secret`  | `DECK_OPENFGA_STORE_ID`               | `store_id`               |
| `frontend-env-secret` | `FGA_MODEL_ID`                        | `authorization_model_id` |
| `frontend-env-secret` | `FGA_STORE_ID`                        | `store_id`               |

### 3. Restart Deployments

After updating the secrets, you need to restart the `frontend` and `gateway-kong` deployments to apply the changes.

```bash theme={"system"}
kubectl rollout restart deployment frontend -n enkryptai-stack
kubectl rollout restart deployment gateway-kong -n enkryptai-stack
```

**Note:** Wait for the `frontend` and `gateway-kong` pods to be in a running state before attempting to use the Enkrypt AI stack. You can monitor the status of the pods using the following command:

```bash theme={"system"}
kubectl get pods -n enkryptai-stack -w
```
