|
1 | 1 | ## DevOps
|
2 | 2 |
|
3 |
| -DevOps scripts for Magistrala IoT platform |
| 3 | +Scripts for managing the Magistrala IoT platform. For installation instructions, refer to [Magistrala Kubernetes Documentation](https://docs.magistrala.abstractmachines.fr/kubernetes/). |
4 | 4 |
|
5 |
| -## Install |
| 5 | +### Autogenerating Helm Chart Documentation |
6 | 6 |
|
7 |
| -Follow the instructions in [`charts`](charts) directory. |
| 7 | +The documentation for Magistrala Helm charts in `charts/magistrala/README.md` is generated using `helm-docs`, which extracts metadata from `Chart.yaml` and `values.yaml`. To update the documentation after changes, follow these steps: |
8 | 8 |
|
9 |
| -Detailed documentation can be found [here](https://docs.magistrala.abstractmachines.fr/kubernetes/). |
| 9 | +### Prerequisites |
| 10 | + |
| 11 | +Before starting, ensure the following tools are installed: |
| 12 | + |
| 13 | +1. **Helm** |
| 14 | + Make sure [Helm](https://helm.sh) is installed on your system. If not, follow the [Helm installation guide](https://helm.sh/docs) to get started. |
| 15 | + |
| 16 | +2. **Helm Docs Tool** |
| 17 | + The documentation for the Magistrala Helm charts is autogenerated using the `helm-docs` tool. To install `helm-docs`, use the following command: |
| 18 | + |
| 19 | + ```bash |
| 20 | + go install github.com/norwoodj/helm-docs/cmd/helm-docs@latest |
| 21 | + ``` |
| 22 | + |
| 23 | + If Go is not installed, follow the [Go installation guide](https://golang.org/doc/install). |
| 24 | + |
| 25 | +### Step 1: Navigate to Your Project Directory |
| 26 | + |
| 27 | +First, move to the directory where the Helm charts are stored. For this project, the command would be: |
| 28 | + |
| 29 | +```bash |
| 30 | +cd devops |
| 31 | +``` |
| 32 | + |
| 33 | +### Step 2: Run the `helm-docs` Command |
| 34 | + |
| 35 | +Generate or update the documentation for your Helm charts by running: |
| 36 | + |
| 37 | +```bash |
| 38 | +helm-docs |
| 39 | +``` |
| 40 | + |
| 41 | +This command will parse the charts in the `charts` directory and update the `charts/magistrala/README.md` file. A typical successful run looks like this: |
| 42 | + |
| 43 | +```bash |
| 44 | +INFO[2024-09-11T11:34:20+03:00] Found Chart directories [charts/magistrala] |
| 45 | +INFO[2024-09-11T11:34:20+03:00] Generating README Documentation for chart charts/magistrala |
| 46 | +``` |
| 47 | + |
| 48 | +### Step 3: Commit and Push the Changes |
| 49 | + |
| 50 | +After `helm-docs` has updated the documentation, review the changes, and then commit and push them to your Git repository: |
| 51 | + |
| 52 | +```bash |
| 53 | +git add charts/magistrala/README.md |
| 54 | +git commit -m "Update Helm chart documentation" |
| 55 | +git push origin <your-branch> |
| 56 | +``` |
| 57 | + |
| 58 | +Replace `<your-branch>` with the branch you are working on. |
10 | 59 |
|
11 | 60 | ## License
|
12 | 61 |
|
13 |
| -[Apace-2.0](LICENSE) |
| 62 | +This project is licensed under the [Apache-2.0](LICENSE). |
0 commit comments