Skip to content

Commit fb44c46

Browse files
authored
MG-145 - Update chart/app version, README, and fix CI (#146)
* Update chart/app version and README Signed-off-by: JeffMboya <[email protected]> * Add dependencies to lint-test.yaml Signed-off-by: JeffMboya <[email protected]> * Fix CI to lint magistrala chart Signed-off-by: JeffMboya <[email protected]> * remove extra spaces Signed-off-by: JeffMboya <[email protected]> * update trigger from main to master Signed-off-by: JeffMboya <[email protected]> * Update README Signed-off-by: JeffMboya <[email protected]> check cluster status Signed-off-by: JeffMboya <[email protected]> check cluster status Signed-off-by: JeffMboya <[email protected]> run cluster check after creation Signed-off-by: JeffMboya <[email protected]> update kubectl version Signed-off-by: JeffMboya <[email protected]> update kubectl version Signed-off-by: JeffMboya <[email protected]> update kubectl version Signed-off-by: JeffMboya <[email protected]> update kubectl version Signed-off-by: JeffMboya <[email protected]> update chart version Signed-off-by: JeffMboya <[email protected]> update chart version Signed-off-by: JeffMboya <[email protected]> update docs Signed-off-by: JeffMboya <[email protected]> remove kubectl steps Signed-off-by: JeffMboya <[email protected]> update ct to v2.6.1 Signed-off-by: JeffMboya <[email protected]> * replace command line arguments with config file Signed-off-by: JeffMboya <[email protected]> use config file for ct Signed-off-by: JeffMboya <[email protected]> use config file for ct Signed-off-by: JeffMboya <[email protected]> * add arguments to ct install Signed-off-by: JeffMboya <[email protected]> * add arguments to ct install Signed-off-by: JeffMboya <[email protected]> * add config options Signed-off-by: JeffMboya <[email protected]> * replace upstream with remote url Signed-off-by: JeffMboya <[email protected]> * replace upstream with remote url Signed-off-by: JeffMboya <[email protected]> * replace upstream with remote url Signed-off-by: JeffMboya <[email protected]> * fix target branch Signed-off-by: JeffMboya <[email protected]> * fix target branch Signed-off-by: JeffMboya <[email protected]> * add step to fetch and install those dependencies Signed-off-by: JeffMboya <[email protected]> * process all charts Signed-off-by: JeffMboya <[email protected]> * update chart dir Signed-off-by: JeffMboya <[email protected]> * update README Signed-off-by: JeffMboya <[email protected]> * Update README Signed-off-by: JeffMboya <[email protected]> --------- Signed-off-by: JeffMboya <[email protected]>
1 parent 585ec3b commit fb44c46

File tree

6 files changed

+382
-239
lines changed

6 files changed

+382
-239
lines changed

.github/workflows/lint-test.yaml

+19-3
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,27 @@ jobs:
1919
with:
2020
version: v3.15.4
2121

22+
- name: Add Helm repositories and update
23+
run: |
24+
helm repo add nats https://nats-io.github.io/k8s/helm/charts/
25+
helm repo add jaegertracing https://jaegertracing.github.io/helm-charts
26+
helm repo add bitnami https://charts.bitnami.com/bitnami
27+
helm repo add hashicorp https://helm.releases.hashicorp.com
28+
helm repo update
29+
30+
- name: Update Helm dependencies
31+
run: |
32+
helm dependency update charts/magistrala
33+
34+
# Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and
35+
# yamllint (https://github.com/adrienverge/yamllint) which require Python
2236
- uses: actions/setup-python@v5
2337
with:
2438
python-version: "3.x"
2539
check-latest: true
2640

2741
- name: Set up chart-testing
28-
uses: helm/[email protected].0
42+
uses: helm/[email protected].1
2943

3044
- name: Run chart-testing (list-changed)
3145
id: list-changed
@@ -37,12 +51,14 @@ jobs:
3751
3852
- name: Run chart-testing (lint)
3953
if: steps.list-changed.outputs.changed == 'true'
40-
run: ct lint --target-branch ${{ github.event.repository.default_branch }}
54+
run: |
55+
ct lint --target-branch ${{ github.event.repository.default_branch }} --chart-dirs charts/magistrala/charts
4156
4257
- name: Create kind cluster
4358
if: steps.list-changed.outputs.changed == 'true'
4459
uses: helm/[email protected]
4560

4661
- name: Run chart-testing (install)
4762
if: steps.list-changed.outputs.changed == 'true'
48-
run: ct install --target-branch ${{ github.event.repository.default_branch }}
63+
run: |
64+
ct install --target-branch ${{ github.event.repository.default_branch }} --chart-dirs charts/magistrala/charts

.github/workflows/release.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: Release Charts
66
on:
77
push:
88
branches:
9-
- main
9+
- master
1010

1111
jobs:
1212
release:
@@ -39,6 +39,10 @@ jobs:
3939
helm repo add nats https://nats-io.github.io/k8s/helm/charts/
4040
helm repo update
4141
42+
- name: Update Helm dependencies
43+
run: |
44+
helm dependency update charts/magistrala
45+
4246
- name: Run chart-releaser
4347
uses: helm/[email protected]
4448
env:

README.md

+54-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,62 @@
11
## DevOps
22

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/).
44

5-
## Install
5+
### Autogenerating Helm Chart Documentation
66

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:
88

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.
1059

1160
## License
1261

13-
[Apace-2.0](LICENSE)
62+
This project is licensed under the [Apache-2.0](LICENSE).

charts/magistrala/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ name: magistrala
66
description: Magistrala IoT Platform
77
icon: https://avatars1.githubusercontent.com/u/13207490
88
type: application
9-
version: 1.0.4 # Incremented chart version if the chart is updated
10-
appVersion: "0.12.2" # Update application version if the app is updated
9+
version: 1.0.6 # Incremented chart version if the chart is updated
10+
appVersion: "0.14.0" # Update application version if the app is updated
1111
home: https://abstractmachines.fr/magistrala.html
1212
sources:
1313
- https://hub.docker.com/u/magistrala

0 commit comments

Comments
 (0)